Ignore:
Timestamp:
Feb 25, 2011, 9:26:54 PM (13 years ago)
Author:
Bruno Cornec
Message:
  • Update mindi-busybox to 1.18.3 to avoid problems with the tar command which is now failing on recent versions with busybox 1.7.3
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.9/mindi-busybox/coreutils/catv.c

    r1765 r2725  
    55 * Copyright (C) 2006 Rob Landley <rob@landley.net>
    66 *
    7  * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
     7 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
    88 */
    99
     
    1313#include "libbb.h"
    1414
    15 int catv_main(int argc, char **argv);
    16 int catv_main(int argc, char **argv)
     15int catv_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
     16int catv_main(int argc UNUSED_PARAM, char **argv)
    1717{
    1818    int retval = EXIT_SUCCESS;
     
    2828
    2929    /* Read from stdin if there's nothing else to do. */
    30     fd = 0;
    31     if (!argv[0]) {
    32         argv--;
    33         goto jump_in;
    34     }
     30    if (!argv[0])
     31        *--argv = (char*)"-";
    3532    do {
    36         fd = open_or_warn(*argv, O_RDONLY);
     33        fd = open_or_warn_stdin(*argv);
    3734        if (fd < 0) {
    3835            retval = EXIT_FAILURE;
    3936            continue;
    4037        }
    41  jump_in:
    4238        for (;;) {
    4339            int i, res;
     
    6359                    if (c == 10) {
    6460                        if (flags & CATV_OPT_e)
    65                             putchar('$');
     61                            bb_putchar('$');
    6662                    } else if (flags & (c==9 ? CATV_OPT_t : CATV_OPT_v)) {
    6763                        printf("^%c", c+'@');
     
    6965                    }
    7066                }
    71                 putchar(c);
     67                bb_putchar(c);
    7268            }
    7369        }
Note: See TracChangeset for help on using the changeset viewer.