diff options
Diffstat (limited to 'pkgs/tools/text/dos2unix/dos2unix-c-missing-arg.patch')
-rw-r--r-- | pkgs/tools/text/dos2unix/dos2unix-c-missing-arg.patch | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/pkgs/tools/text/dos2unix/dos2unix-c-missing-arg.patch b/pkgs/tools/text/dos2unix/dos2unix-c-missing-arg.patch deleted file mode 100644 index ff63e67134f7e..0000000000000 --- a/pkgs/tools/text/dos2unix/dos2unix-c-missing-arg.patch +++ /dev/null @@ -1,42 +0,0 @@ -diff -up dos2unix-3.1/dos2unix.c.c-missing-arg dos2unix-3.1/dos2unix.c ---- dos2unix-3.1/dos2unix.c.c-missing-arg 2008-01-18 09:24:21.000000000 +0000 -+++ dos2unix-3.1/dos2unix.c 2008-01-18 09:25:43.000000000 +0000 -@@ -533,19 +533,28 @@ int main (int argc, char *argv[]) - - if ((strcmp(argv[ArgIdx],"-c") == 0) || (strcmp(argv[ArgIdx],"--convmode") == 0)) - { -- ArgIdx++; -- if (strcmpi(argv[ArgIdx],"ASCII") == 0) -- pFlag->ConvMode = 0; -- else if (strcmpi(argv[ArgIdx], "7Bit") == 0) -- pFlag->ConvMode = 1; -- else if (strcmpi(argv[ArgIdx], "ISO") == 0) -- pFlag->ConvMode = 2; -- else if (strcmpi(argv[ArgIdx], "Mac") == 0) -- pFlag->ConvMode = 3; -+ if (++ArgIdx < argc) -+ { -+ if (strcmpi(argv[ArgIdx],"ASCII") == 0) -+ pFlag->ConvMode = 0; -+ else if (strcmpi(argv[ArgIdx], "7Bit") == 0) -+ pFlag->ConvMode = 1; -+ else if (strcmpi(argv[ArgIdx], "ISO") == 0) -+ pFlag->ConvMode = 2; -+ else if (strcmpi(argv[ArgIdx], "Mac") == 0) -+ pFlag->ConvMode = 3; -+ else -+ { -+ if (!pFlag->Quiet) -+ fprintf(stderr, "dos2unix: invalid %s conversion mode specified\n",argv[ArgIdx]); -+ ShouldExit = 1; -+ } -+ } - else - { -+ ArgIdx--; - if (!pFlag->Quiet) -- fprintf(stderr, "dos2unix: invalid %s conversion mode specified\n",argv[ArgIdx]); -+ fprintf(stderr,"dos2unix: option `%s' requires an argument\n",argv[ArgIdx]); - ShouldExit = 1; - } - } |