mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 10:40:46 +00:00
ivfrate: fix one error message, make -h/--help display usage.
Actually, right now, any first arg starting with '-' will show the usage. git-svn-id: https://svn.eduke32.com/eduke32@4258 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
4881a13f99
commit
63464e3693
1 changed files with 5 additions and 1 deletions
|
@ -39,8 +39,12 @@ int main(int argc, char **argv)
|
||||||
return 255;
|
return 255;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (argc == 2 && argv[1][0]=='-')
|
||||||
|
goto usage;
|
||||||
|
|
||||||
if (argc != 2 && argc != 4 && argc != 5)
|
if (argc != 2 && argc != 4 && argc != 5)
|
||||||
{
|
{
|
||||||
|
usage:
|
||||||
fprintf(stderr, "Usage: %s <file.ivf> [<fpsnumerator> <fpsdenominator> [-force]]\n"
|
fprintf(stderr, "Usage: %s <file.ivf> [<fpsnumerator> <fpsdenominator> [-force]]\n"
|
||||||
" Without -force, <fpsnumerator> must be < 1000.\n"
|
" Without -force, <fpsnumerator> must be < 1000.\n"
|
||||||
" If <fpsnumerator> is >= 1000, the actual frame rate\n"
|
" If <fpsnumerator> is >= 1000, the actual frame rate\n"
|
||||||
|
@ -54,7 +58,7 @@ int main(int argc, char **argv)
|
||||||
fd = open(argv[1], dowrite ? O_RDWR : O_RDONLY);
|
fd = open(argv[1], dowrite ? O_RDWR : O_RDONLY);
|
||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "Could't open \"%s\" for: %s\n",
|
fprintf(stderr, "Could't open \"%s\" for %s: %s\n", argv[1],
|
||||||
dowrite ? "reading/writing":"reading", strerror(errno));
|
dowrite ? "reading/writing":"reading", strerror(errno));
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue