Changeset 2725 in MondoRescue for branches/2.2.9/mindi-busybox/coreutils/uuencode.c
- Timestamp:
- Feb 25, 2011, 9:26:54 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.9/mindi-busybox/coreutils/uuencode.c
r1765 r2725 6 6 * Copyright (C) 1995, 1996, 1997, 1998, 2000 Free Software Foundation, Inc. 7 7 * 8 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.8 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 9 9 */ 10 10 … … 12 12 13 13 enum { 14 SRC_BUF_SIZE = 45, /* This *MUST* be a multiple of 3 */14 SRC_BUF_SIZE = 15*3, /* This *MUST* be a multiple of 3 */ 15 15 DST_BUF_SIZE = 4 * ((SRC_BUF_SIZE + 2) / 3), 16 16 }; 17 17 18 int uuencode_main(int argc, char **argv) ;19 int uuencode_main(int argc , char **argv)18 int uuencode_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; 19 int uuencode_main(int argc UNUSED_PARAM, char **argv) 20 20 { 21 21 struct stat stat_buf; … … 33 33 } 34 34 argv += optind; 35 if (arg c == optind + 2) {36 src_fd = xopen( *argv, O_RDONLY);35 if (argv[1]) { 36 src_fd = xopen(argv[0], O_RDONLY); 37 37 fstat(src_fd, &stat_buf); 38 38 mode = stat_buf.st_mode & (S_IRWXU | S_IRWXG | S_IRWXO); … … 49 49 /* Encode the buffer we just read in */ 50 50 bb_uuencode(dst_buf, src_buf, size, tbl); 51 putchar('\n');51 bb_putchar('\n'); 52 52 if (tbl == bb_uuenc_tbl_std) { 53 putchar(tbl[size]);53 bb_putchar(tbl[size]); 54 54 } 55 55 fflush(stdout);
Note:
See TracChangeset
for help on using the changeset viewer.