Changeset 1765 in MondoRescue for branches/2.2.5/mindi-busybox/coreutils/od.c


Ignore:
Timestamp:
Nov 4, 2007, 3:16:40 AM (16 years ago)
Author:
Bruno Cornec
Message:

Update to busybox 1.7.2

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.5/mindi-busybox/coreutils/od.c

    r821 r1765  
     1/* vi: set sw=4 ts=4: */
    12/*
    23 * od implementation for busybox
     
    67 *  The Regents of the University of California.  All rights reserved.
    78 *
    8  * This program is free software; you can redistribute it and/or modify
    9  * it under the terms of the GNU General Public License as published by
    10  * the Free Software Foundation; either version 2 of the License, or
    11  * (at your option) any later version.
    12  *
    13  * This program is distributed in the hope that it will be useful,
    14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    16  * General Public License for more details.
    17  *
    18  * You should have received a copy of the GNU General Public License
    19  * along with this program; if not, write to the Free Software
    20  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
     9 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
    2110 *
    2211 * Original copyright notice is retained at the end of this file.
    2312 */
    2413
    25 #include <ctype.h>
    26 #include <string.h>
     14
     15#include "libbb.h"
     16#if ENABLE_DESKTOP
     17/* This one provides -t (busybox's own build script needs it) */
     18#include "od_bloaty.c"
     19#else
    2720#include <getopt.h>
    28 #include <stdlib.h>
    29 #include "busybox.h"
     21
    3022#include "dump.h"
    3123
    32 #define isdecdigit(c) (isdigit)(c)
     24#define isdecdigit(c) isdigit(c)
    3325#define ishexdigit(c) (isxdigit)(c)
    3426
     
    3628odoffset(int argc, char ***argvp)
    3729{
    38     register char *num, *p;
     30    char *num, *p;
    3931    int base;
    4032    char *end;
     
    140132}
    141133
    142 static const char * const add_strings[] = {
     134static const char *const add_strings[] = {
    143135    "16/1 \"%3_u \" \"\\n\"",               /* a */
    144136    "8/2 \" %06o \" \"\\n\"",               /* B, o */
     
    156148};
    157149
    158 static const char od_opts[] = "aBbcDdeFfHhIiLlOoXxv";
    159 
    160 static const char od_o2si[] = {
     150static const char od_opts[] ALIGN1 = "aBbcDdeFfHhIiLlOoXxv";
     151
     152static const char od_o2si[] ALIGN1 = {
    161153    0, 1, 2, 3, 5,
    162154    4, 6, 6, 7, 8,
     
    165157};
    166158
     159int od_main(int argc, char **argv);
    167160int od_main(int argc, char **argv)
    168161{
     
    199192    odoffset(argc, &argv);
    200193
    201     return(bb_dump_dump(argv));
     194    return bb_dump_dump(argv);
    202195}
     196#endif /* ENABLE_DESKTOP */
    203197
    204198/*-
Note: See TracChangeset for help on using the changeset viewer.