diff options
Diffstat (limited to 'coreutils/uudecode.c')
-rw-r--r-- | coreutils/uudecode.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/coreutils/uudecode.c b/coreutils/uudecode.c index 825fdb562..ff4a9d9e6 100644 --- a/coreutils/uudecode.c +++ b/coreutils/uudecode.c | |||
@@ -43,7 +43,7 @@ static int read_stduu (const char *inname) | |||
43 | char *p; | 43 | char *p; |
44 | 44 | ||
45 | if (fgets (buf, sizeof(buf), stdin) == NULL) { | 45 | if (fgets (buf, sizeof(buf), stdin) == NULL) { |
46 | errorMsg("%s: Short file\n", inname); | 46 | error_msg("%s: Short file\n", inname); |
47 | return FALSE; | 47 | return FALSE; |
48 | } | 48 | } |
49 | p = buf; | 49 | p = buf; |
@@ -78,7 +78,7 @@ static int read_stduu (const char *inname) | |||
78 | 78 | ||
79 | if (fgets (buf, sizeof(buf), stdin) == NULL | 79 | if (fgets (buf, sizeof(buf), stdin) == NULL |
80 | || strcmp (buf, "end\n")) { | 80 | || strcmp (buf, "end\n")) { |
81 | errorMsg("%s: No `end' line\n", inname); | 81 | error_msg("%s: No `end' line\n", inname); |
82 | return FALSE; | 82 | return FALSE; |
83 | } | 83 | } |
84 | 84 | ||
@@ -128,7 +128,7 @@ static int read_base64 (const char *inname) | |||
128 | unsigned char *p; | 128 | unsigned char *p; |
129 | 129 | ||
130 | if (fgets (buf, sizeof(buf), stdin) == NULL) { | 130 | if (fgets (buf, sizeof(buf), stdin) == NULL) { |
131 | errorMsg("%s: Short file\n", inname); | 131 | error_msg("%s: Short file\n", inname); |
132 | return FALSE; | 132 | return FALSE; |
133 | } | 133 | } |
134 | p = buf; | 134 | p = buf; |
@@ -136,7 +136,7 @@ static int read_base64 (const char *inname) | |||
136 | if (memcmp (buf, "====", 4) == 0) | 136 | if (memcmp (buf, "====", 4) == 0) |
137 | break; | 137 | break; |
138 | if (last_data != 0) { | 138 | if (last_data != 0) { |
139 | errorMsg("%s: data following `=' padding character\n", inname); | 139 | error_msg("%s: data following `=' padding character\n", inname); |
140 | return FALSE; | 140 | return FALSE; |
141 | } | 141 | } |
142 | 142 | ||
@@ -158,14 +158,14 @@ static int read_base64 (const char *inname) | |||
158 | 158 | ||
159 | while ((b64_tab[*p] & '\100') != 0) | 159 | while ((b64_tab[*p] & '\100') != 0) |
160 | if (*p == '\n' || *p++ == '=') { | 160 | if (*p == '\n' || *p++ == '=') { |
161 | errorMsg("%s: illegal line\n", inname); | 161 | error_msg("%s: illegal line\n", inname); |
162 | return FALSE; | 162 | return FALSE; |
163 | } | 163 | } |
164 | c2 = b64_tab[*p++]; | 164 | c2 = b64_tab[*p++]; |
165 | 165 | ||
166 | while (b64_tab[*p] == '\177') | 166 | while (b64_tab[*p] == '\177') |
167 | if (*p++ == '\n') { | 167 | if (*p++ == '\n') { |
168 | errorMsg("%s: illegal line\n", inname); | 168 | error_msg("%s: illegal line\n", inname); |
169 | return FALSE; | 169 | return FALSE; |
170 | } | 170 | } |
171 | if (*p == '=') { | 171 | if (*p == '=') { |
@@ -177,7 +177,7 @@ static int read_base64 (const char *inname) | |||
177 | 177 | ||
178 | while (b64_tab[*p] == '\177') | 178 | while (b64_tab[*p] == '\177') |
179 | if (*p++ == '\n') { | 179 | if (*p++ == '\n') { |
180 | errorMsg("%s: illegal line\n", inname); | 180 | error_msg("%s: illegal line\n", inname); |
181 | return FALSE; | 181 | return FALSE; |
182 | } | 182 | } |
183 | putchar (c1 << 2 | c2 >> 4); | 183 | putchar (c1 << 2 | c2 >> 4); |
@@ -209,7 +209,7 @@ static int decode (const char *inname, | |||
209 | 209 | ||
210 | while (1) { | 210 | while (1) { |
211 | if (fgets (buf, sizeof (buf), stdin) == NULL) { | 211 | if (fgets (buf, sizeof (buf), stdin) == NULL) { |
212 | errorMsg("%s: No `begin' line\n", inname); | 212 | error_msg("%s: No `begin' line\n", inname); |
213 | return FALSE; | 213 | return FALSE; |
214 | } | 214 | } |
215 | 215 | ||
@@ -234,13 +234,13 @@ static int decode (const char *inname, | |||
234 | while (*p != '/') | 234 | while (*p != '/') |
235 | ++p; | 235 | ++p; |
236 | if (*p == '\0') { | 236 | if (*p == '\0') { |
237 | errorMsg("%s: Illegal ~user\n", inname); | 237 | error_msg("%s: Illegal ~user\n", inname); |
238 | return FALSE; | 238 | return FALSE; |
239 | } | 239 | } |
240 | *p++ = '\0'; | 240 | *p++ = '\0'; |
241 | pw = getpwnam (buf + 1); | 241 | pw = getpwnam (buf + 1); |
242 | if (pw == NULL) { | 242 | if (pw == NULL) { |
243 | errorMsg("%s: No user `%s'\n", inname, buf + 1); | 243 | error_msg("%s: No user `%s'\n", inname, buf + 1); |
244 | return FALSE; | 244 | return FALSE; |
245 | } | 245 | } |
246 | n = strlen (pw->pw_dir); | 246 | n = strlen (pw->pw_dir); |
@@ -257,7 +257,7 @@ static int decode (const char *inname, | |||
257 | && (freopen (outname, "w", stdout) == NULL | 257 | && (freopen (outname, "w", stdout) == NULL |
258 | || chmod (outname, mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | 258 | || chmod (outname, mode & (S_IRWXU | S_IRWXG | S_IRWXO)) |
259 | )) { | 259 | )) { |
260 | errorMsg("%s: %s %s\n", outname, inname, strerror(errno)); /* */ | 260 | error_msg("%s: %s %s\n", outname, inname, strerror(errno)); /* */ |
261 | return FALSE; | 261 | return FALSE; |
262 | } | 262 | } |
263 | 263 | ||
@@ -302,7 +302,7 @@ int uudecode_main (int argc, | |||
302 | if (decode (argv[optind], outname) != 0) | 302 | if (decode (argv[optind], outname) != 0) |
303 | exit_status = FALSE; | 303 | exit_status = FALSE; |
304 | } else { | 304 | } else { |
305 | errorMsg("%s: %s\n", argv[optind], strerror(errno)); | 305 | error_msg("%s: %s\n", argv[optind], strerror(errno)); |
306 | exit_status = EXIT_FAILURE; | 306 | exit_status = EXIT_FAILURE; |
307 | } | 307 | } |
308 | optind++; | 308 | optind++; |