diff options
Diffstat (limited to 'coreutils/uudecode.c')
-rw-r--r-- | coreutils/uudecode.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/coreutils/uudecode.c b/coreutils/uudecode.c index a5ac002e9..4f9270c18 100644 --- a/coreutils/uudecode.c +++ b/coreutils/uudecode.c | |||
@@ -46,7 +46,7 @@ static int read_stduu (const char *inname) | |||
46 | char *p; | 46 | char *p; |
47 | 47 | ||
48 | if (fgets (buf, sizeof(buf), stdin) == NULL) { | 48 | if (fgets (buf, sizeof(buf), stdin) == NULL) { |
49 | error_msg("%s: Short file", inname); | 49 | bb_error_msg("%s: Short file", inname); |
50 | return FALSE; | 50 | return FALSE; |
51 | } | 51 | } |
52 | p = buf; | 52 | p = buf; |
@@ -81,7 +81,7 @@ static int read_stduu (const char *inname) | |||
81 | 81 | ||
82 | if (fgets (buf, sizeof(buf), stdin) == NULL | 82 | if (fgets (buf, sizeof(buf), stdin) == NULL |
83 | || strcmp (buf, "end\n")) { | 83 | || strcmp (buf, "end\n")) { |
84 | error_msg("%s: No `end' line", inname); | 84 | bb_error_msg("%s: No `end' line", inname); |
85 | return FALSE; | 85 | return FALSE; |
86 | } | 86 | } |
87 | 87 | ||
@@ -131,7 +131,7 @@ static int read_base64 (const char *inname) | |||
131 | unsigned char *p; | 131 | unsigned char *p; |
132 | 132 | ||
133 | if (fgets (buf, sizeof(buf), stdin) == NULL) { | 133 | if (fgets (buf, sizeof(buf), stdin) == NULL) { |
134 | error_msg("%s: Short file", inname); | 134 | bb_error_msg("%s: Short file", inname); |
135 | return FALSE; | 135 | return FALSE; |
136 | } | 136 | } |
137 | p = buf; | 137 | p = buf; |
@@ -139,7 +139,7 @@ static int read_base64 (const char *inname) | |||
139 | if (memcmp (buf, "====", 4) == 0) | 139 | if (memcmp (buf, "====", 4) == 0) |
140 | break; | 140 | break; |
141 | if (last_data != 0) { | 141 | if (last_data != 0) { |
142 | error_msg("%s: data following `=' padding character", inname); | 142 | bb_error_msg("%s: data following `=' padding character", inname); |
143 | return FALSE; | 143 | return FALSE; |
144 | } | 144 | } |
145 | 145 | ||
@@ -161,14 +161,14 @@ static int read_base64 (const char *inname) | |||
161 | 161 | ||
162 | while ((b64_tab[*p] & '\100') != 0) | 162 | while ((b64_tab[*p] & '\100') != 0) |
163 | if (*p == '\n' || *p++ == '=') { | 163 | if (*p == '\n' || *p++ == '=') { |
164 | error_msg("%s: illegal line", inname); | 164 | bb_error_msg("%s: illegal line", inname); |
165 | return FALSE; | 165 | return FALSE; |
166 | } | 166 | } |
167 | c2 = b64_tab[*p++]; | 167 | c2 = b64_tab[*p++]; |
168 | 168 | ||
169 | while (b64_tab[*p] == '\177') | 169 | while (b64_tab[*p] == '\177') |
170 | if (*p++ == '\n') { | 170 | if (*p++ == '\n') { |
171 | error_msg("%s: illegal line", inname); | 171 | bb_error_msg("%s: illegal line", inname); |
172 | return FALSE; | 172 | return FALSE; |
173 | } | 173 | } |
174 | if (*p == '=') { | 174 | if (*p == '=') { |
@@ -180,7 +180,7 @@ static int read_base64 (const char *inname) | |||
180 | 180 | ||
181 | while (b64_tab[*p] == '\177') | 181 | while (b64_tab[*p] == '\177') |
182 | if (*p++ == '\n') { | 182 | if (*p++ == '\n') { |
183 | error_msg("%s: illegal line", inname); | 183 | bb_error_msg("%s: illegal line", inname); |
184 | return FALSE; | 184 | return FALSE; |
185 | } | 185 | } |
186 | putchar (c1 << 2 | c2 >> 4); | 186 | putchar (c1 << 2 | c2 >> 4); |
@@ -213,7 +213,7 @@ static int decode (const char *inname, | |||
213 | 213 | ||
214 | while (1) { | 214 | while (1) { |
215 | if (fgets (buf, sizeof (buf), stdin) == NULL) { | 215 | if (fgets (buf, sizeof (buf), stdin) == NULL) { |
216 | error_msg("%s: No `begin' line", inname); | 216 | bb_error_msg("%s: No `begin' line", inname); |
217 | return FALSE; | 217 | return FALSE; |
218 | } | 218 | } |
219 | 219 | ||
@@ -239,13 +239,13 @@ static int decode (const char *inname, | |||
239 | while (*p != '/') | 239 | while (*p != '/') |
240 | ++p; | 240 | ++p; |
241 | if (*p == '\0') { | 241 | if (*p == '\0') { |
242 | error_msg("%s: Illegal ~user", inname); | 242 | bb_error_msg("%s: Illegal ~user", inname); |
243 | return FALSE; | 243 | return FALSE; |
244 | } | 244 | } |
245 | *p++ = '\0'; | 245 | *p++ = '\0'; |
246 | pw = getpwnam (buf + 1); | 246 | pw = getpwnam (buf + 1); |
247 | if (pw == NULL) { | 247 | if (pw == NULL) { |
248 | error_msg("%s: No user `%s'", inname, buf + 1); | 248 | bb_error_msg("%s: No user `%s'", inname, buf + 1); |
249 | return FALSE; | 249 | return FALSE; |
250 | } | 250 | } |
251 | outname = concat_path_file(pw->pw_dir, p); | 251 | outname = concat_path_file(pw->pw_dir, p); |
@@ -258,7 +258,7 @@ static int decode (const char *inname, | |||
258 | && (freopen (outname, "w", stdout) == NULL | 258 | && (freopen (outname, "w", stdout) == NULL |
259 | || chmod (outname, mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | 259 | || chmod (outname, mode & (S_IRWXU | S_IRWXG | S_IRWXO)) |
260 | )) { | 260 | )) { |
261 | perror_msg("%s", outname); /* */ | 261 | bb_perror_msg("%s", outname); /* */ |
262 | if (dofre) | 262 | if (dofre) |
263 | free(outname); | 263 | free(outname); |
264 | return FALSE; | 264 | return FALSE; |
@@ -295,7 +295,7 @@ int uudecode_main (int argc, | |||
295 | break; | 295 | break; |
296 | 296 | ||
297 | default: | 297 | default: |
298 | show_usage(); | 298 | bb_show_usage(); |
299 | } | 299 | } |
300 | } | 300 | } |
301 | 301 | ||
@@ -308,7 +308,7 @@ int uudecode_main (int argc, | |||
308 | if (decode (argv[optind], outname) != 0) | 308 | if (decode (argv[optind], outname) != 0) |
309 | exit_status = FALSE; | 309 | exit_status = FALSE; |
310 | } else { | 310 | } else { |
311 | perror_msg("%s", argv[optind]); | 311 | bb_perror_msg("%s", argv[optind]); |
312 | exit_status = EXIT_FAILURE; | 312 | exit_status = EXIT_FAILURE; |
313 | } | 313 | } |
314 | optind++; | 314 | optind++; |