Changeset 1770 in MondoRescue for branches/stable/mindi-busybox/coreutils/od.c
- Timestamp:
- Nov 6, 2007, 11:01:53 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/mindi-busybox/coreutils/od.c
r821 r1770 1 /* vi: set sw=4 ts=4: */ 1 2 /* 2 3 * od implementation for busybox … … 6 7 * The Regents of the University of California. All rights reserved. 7 8 * 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. 21 10 * 22 11 * Original copyright notice is retained at the end of this file. 23 12 */ 24 13 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 27 20 #include <getopt.h> 28 #include <stdlib.h> 29 #include "busybox.h" 21 30 22 #include "dump.h" 31 23 32 #define isdecdigit(c) (isdigit)(c)24 #define isdecdigit(c) isdigit(c) 33 25 #define ishexdigit(c) (isxdigit)(c) 34 26 … … 36 28 odoffset(int argc, char ***argvp) 37 29 { 38 registerchar *num, *p;30 char *num, *p; 39 31 int base; 40 32 char *end; … … 140 132 } 141 133 142 static const char * 134 static const char *const add_strings[] = { 143 135 "16/1 \"%3_u \" \"\\n\"", /* a */ 144 136 "8/2 \" %06o \" \"\\n\"", /* B, o */ … … 156 148 }; 157 149 158 static const char od_opts[] = "aBbcDdeFfHhIiLlOoXxv";159 160 static const char od_o2si[] = {150 static const char od_opts[] ALIGN1 = "aBbcDdeFfHhIiLlOoXxv"; 151 152 static const char od_o2si[] ALIGN1 = { 161 153 0, 1, 2, 3, 5, 162 154 4, 6, 6, 7, 8, … … 165 157 }; 166 158 159 int od_main(int argc, char **argv); 167 160 int od_main(int argc, char **argv) 168 161 { … … 199 192 odoffset(argc, &argv); 200 193 201 return (bb_dump_dump(argv));194 return bb_dump_dump(argv); 202 195 } 196 #endif /* ENABLE_DESKTOP */ 203 197 204 198 /*-
Note:
See TracChangeset
for help on using the changeset viewer.