Erik Andersen | e49d5ec | 2000-02-08 19:58:47 +0000 | [diff] [blame] | 1 | /* vi: set sw=4 ts=4: */ |
"Robert P. J. Day" | 801ab14 | 2006-07-12 07:56:04 +0000 | [diff] [blame] | 2 | /* |
Denys Vlasenko | 0ef64bd | 2010-08-16 20:14:46 +0200 | [diff] [blame] | 3 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
"Robert P. J. Day" | 801ab14 | 2006-07-12 07:56:04 +0000 | [diff] [blame] | 4 | */ |
| 5 | |
Denis Vlasenko | b6adbf1 | 2007-05-26 19:00:18 +0000 | [diff] [blame] | 6 | #include "libbb.h" |
Eric Andersen | cc8ed39 | 1999-10-05 16:24:54 +0000 | [diff] [blame] | 7 | #include <math.h> |
| 8 | |
Denys Vlasenko | 7a07b0e | 2010-07-29 04:00:27 +0200 | [diff] [blame] | 9 | //usage:#define dc_trivial_usage |
Denys Vlasenko | 506d3a9 | 2010-07-29 04:06:07 +0200 | [diff] [blame] | 10 | //usage: "EXPRESSION..." |
Denys Vlasenko | 7a07b0e | 2010-07-29 04:00:27 +0200 | [diff] [blame] | 11 | //usage: |
| 12 | //usage:#define dc_full_usage "\n\n" |
| 13 | //usage: "Tiny RPN calculator. Operations:\n" |
Denys Vlasenko | 9daf33f | 2013-01-18 13:30:13 +0100 | [diff] [blame] | 14 | //usage: "+, add, -, sub, *, mul, /, div, %, mod, "IF_FEATURE_DC_LIBM("**, exp, ")"and, or, not, xor,\n" |
Denys Vlasenko | 7a07b0e | 2010-07-29 04:00:27 +0200 | [diff] [blame] | 15 | //usage: "p - print top of the stack (without popping),\n" |
Denys Vlasenko | 506d3a9 | 2010-07-29 04:06:07 +0200 | [diff] [blame] | 16 | //usage: "f - print entire stack,\n" |
| 17 | //usage: "o - pop the value and set output radix (must be 10, 16, 8 or 2).\n" |
Denys Vlasenko | 9daf33f | 2013-01-18 13:30:13 +0100 | [diff] [blame] | 18 | //usage: "Examples: 'dc 2 2 add p' -> 4, 'dc 8 8 mul 2 2 + / p' -> 16" |
Denys Vlasenko | 7a07b0e | 2010-07-29 04:00:27 +0200 | [diff] [blame] | 19 | //usage: |
| 20 | //usage:#define dc_example_usage |
| 21 | //usage: "$ dc 2 2 + p\n" |
| 22 | //usage: "4\n" |
| 23 | //usage: "$ dc 8 8 \\* 2 2 + / p\n" |
| 24 | //usage: "16\n" |
| 25 | //usage: "$ dc 0 1 and p\n" |
| 26 | //usage: "0\n" |
| 27 | //usage: "$ dc 0 1 or p\n" |
| 28 | //usage: "1\n" |
| 29 | //usage: "$ echo 72 9 div 8 mul p | dc\n" |
| 30 | //usage: "64\n" |
| 31 | |
| 32 | #if 0 |
| 33 | typedef unsigned data_t; |
| 34 | #define DATA_FMT "" |
| 35 | #elif 0 |
| 36 | typedef unsigned long data_t; |
| 37 | #define DATA_FMT "l" |
| 38 | #else |
| 39 | typedef unsigned long long data_t; |
| 40 | #define DATA_FMT "ll" |
| 41 | #endif |
Eric Andersen | cc8ed39 | 1999-10-05 16:24:54 +0000 | [diff] [blame] | 42 | |
Denis Vlasenko | 5b27fbe | 2007-03-24 14:06:51 +0000 | [diff] [blame] | 43 | |
Denis Vlasenko | b44c790 | 2008-03-17 09:29:43 +0000 | [diff] [blame] | 44 | struct globals { |
| 45 | unsigned pointer; |
| 46 | unsigned base; |
| 47 | double stack[1]; |
Denys Vlasenko | 98a4c7c | 2010-02-04 15:00:15 +0100 | [diff] [blame] | 48 | } FIX_ALIASING; |
Denis Vlasenko | b44c790 | 2008-03-17 09:29:43 +0000 | [diff] [blame] | 49 | enum { STACK_SIZE = (COMMON_BUFSIZE - offsetof(struct globals, stack)) / sizeof(double) }; |
| 50 | #define G (*(struct globals*)&bb_common_bufsiz1) |
| 51 | #define pointer (G.pointer ) |
| 52 | #define base (G.base ) |
| 53 | #define stack (G.stack ) |
Denis Vlasenko | d8850f2 | 2008-12-30 10:40:05 +0000 | [diff] [blame] | 54 | #define INIT_G() do { \ |
| 55 | base = 10; \ |
| 56 | } while (0) |
Denis Vlasenko | b44c790 | 2008-03-17 09:29:43 +0000 | [diff] [blame] | 57 | |
Eric Andersen | cc8ed39 | 1999-10-05 16:24:54 +0000 | [diff] [blame] | 58 | |
Denys Vlasenko | c4603fb | 2015-05-25 13:31:25 +0200 | [diff] [blame] | 59 | static void check_under(void) |
| 60 | { |
| 61 | if (pointer == 0) |
| 62 | bb_error_msg_and_die("stack underflow"); |
| 63 | } |
| 64 | |
Erik Andersen | e49d5ec | 2000-02-08 19:58:47 +0000 | [diff] [blame] | 65 | static void push(double a) |
Eric Andersen | cc8ed39 | 1999-10-05 16:24:54 +0000 | [diff] [blame] | 66 | { |
Denis Vlasenko | 5b27fbe | 2007-03-24 14:06:51 +0000 | [diff] [blame] | 67 | if (pointer >= STACK_SIZE) |
Manuel Novoa III | cad5364 | 2003-03-19 09:13:01 +0000 | [diff] [blame] | 68 | bb_error_msg_and_die("stack overflow"); |
Matt Kraai | 3e856ce | 2000-12-01 02:55:13 +0000 | [diff] [blame] | 69 | stack[pointer++] = a; |
Eric Andersen | cc8ed39 | 1999-10-05 16:24:54 +0000 | [diff] [blame] | 70 | } |
| 71 | |
Aaron Lehmann | 2dd2d7a | 2001-12-06 03:29:37 +0000 | [diff] [blame] | 72 | static double pop(void) |
Eric Andersen | cc8ed39 | 1999-10-05 16:24:54 +0000 | [diff] [blame] | 73 | { |
Denys Vlasenko | c4603fb | 2015-05-25 13:31:25 +0200 | [diff] [blame] | 74 | check_under(); |
Eric Andersen | cc8ed39 | 1999-10-05 16:24:54 +0000 | [diff] [blame] | 75 | return stack[--pointer]; |
| 76 | } |
| 77 | |
Aaron Lehmann | 2dd2d7a | 2001-12-06 03:29:37 +0000 | [diff] [blame] | 78 | static void add(void) |
Eric Andersen | cc8ed39 | 1999-10-05 16:24:54 +0000 | [diff] [blame] | 79 | { |
| 80 | push(pop() + pop()); |
| 81 | } |
| 82 | |
Aaron Lehmann | 2dd2d7a | 2001-12-06 03:29:37 +0000 | [diff] [blame] | 83 | static void sub(void) |
Eric Andersen | cc8ed39 | 1999-10-05 16:24:54 +0000 | [diff] [blame] | 84 | { |
Erik Andersen | e49d5ec | 2000-02-08 19:58:47 +0000 | [diff] [blame] | 85 | double subtrahend = pop(); |
Eric Andersen | cc8ed39 | 1999-10-05 16:24:54 +0000 | [diff] [blame] | 86 | |
| 87 | push(pop() - subtrahend); |
| 88 | } |
| 89 | |
Aaron Lehmann | 2dd2d7a | 2001-12-06 03:29:37 +0000 | [diff] [blame] | 90 | static void mul(void) |
Eric Andersen | cc8ed39 | 1999-10-05 16:24:54 +0000 | [diff] [blame] | 91 | { |
| 92 | push(pop() * pop()); |
| 93 | } |
| 94 | |
Denis Vlasenko | 0783230 | 2008-10-20 08:43:10 +0000 | [diff] [blame] | 95 | #if ENABLE_FEATURE_DC_LIBM |
Eric Andersen | a928774 | 2003-10-22 11:24:39 +0000 | [diff] [blame] | 96 | static void power(void) |
| 97 | { |
| 98 | double topower = pop(); |
| 99 | |
| 100 | push(pow(pop(), topower)); |
| 101 | } |
Denis Vlasenko | 0783230 | 2008-10-20 08:43:10 +0000 | [diff] [blame] | 102 | #endif |
Eric Andersen | a928774 | 2003-10-22 11:24:39 +0000 | [diff] [blame] | 103 | |
Aaron Lehmann | 2dd2d7a | 2001-12-06 03:29:37 +0000 | [diff] [blame] | 104 | static void divide(void) |
Eric Andersen | cc8ed39 | 1999-10-05 16:24:54 +0000 | [diff] [blame] | 105 | { |
Erik Andersen | e49d5ec | 2000-02-08 19:58:47 +0000 | [diff] [blame] | 106 | double divisor = pop(); |
| 107 | |
Eric Andersen | cc8ed39 | 1999-10-05 16:24:54 +0000 | [diff] [blame] | 108 | push(pop() / divisor); |
| 109 | } |
| 110 | |
Eric Andersen | a928774 | 2003-10-22 11:24:39 +0000 | [diff] [blame] | 111 | static void mod(void) |
| 112 | { |
Denys Vlasenko | 7a07b0e | 2010-07-29 04:00:27 +0200 | [diff] [blame] | 113 | data_t d = pop(); |
Eric Andersen | a928774 | 2003-10-22 11:24:39 +0000 | [diff] [blame] | 114 | |
Denys Vlasenko | 7a07b0e | 2010-07-29 04:00:27 +0200 | [diff] [blame] | 115 | push((data_t) pop() % d); |
Eric Andersen | a928774 | 2003-10-22 11:24:39 +0000 | [diff] [blame] | 116 | } |
| 117 | |
Aaron Lehmann | 2dd2d7a | 2001-12-06 03:29:37 +0000 | [diff] [blame] | 118 | static void and(void) |
Eric Andersen | cc8ed39 | 1999-10-05 16:24:54 +0000 | [diff] [blame] | 119 | { |
Denys Vlasenko | 7a07b0e | 2010-07-29 04:00:27 +0200 | [diff] [blame] | 120 | push((data_t) pop() & (data_t) pop()); |
Eric Andersen | cc8ed39 | 1999-10-05 16:24:54 +0000 | [diff] [blame] | 121 | } |
| 122 | |
Aaron Lehmann | 2dd2d7a | 2001-12-06 03:29:37 +0000 | [diff] [blame] | 123 | static void or(void) |
Eric Andersen | cc8ed39 | 1999-10-05 16:24:54 +0000 | [diff] [blame] | 124 | { |
Denys Vlasenko | 7a07b0e | 2010-07-29 04:00:27 +0200 | [diff] [blame] | 125 | push((data_t) pop() | (data_t) pop()); |
Eric Andersen | cc8ed39 | 1999-10-05 16:24:54 +0000 | [diff] [blame] | 126 | } |
| 127 | |
Aaron Lehmann | 2dd2d7a | 2001-12-06 03:29:37 +0000 | [diff] [blame] | 128 | static void eor(void) |
Eric Andersen | cc8ed39 | 1999-10-05 16:24:54 +0000 | [diff] [blame] | 129 | { |
Denys Vlasenko | 7a07b0e | 2010-07-29 04:00:27 +0200 | [diff] [blame] | 130 | push((data_t) pop() ^ (data_t) pop()); |
Eric Andersen | cc8ed39 | 1999-10-05 16:24:54 +0000 | [diff] [blame] | 131 | } |
| 132 | |
Aaron Lehmann | 2dd2d7a | 2001-12-06 03:29:37 +0000 | [diff] [blame] | 133 | static void not(void) |
Eric Andersen | cc8ed39 | 1999-10-05 16:24:54 +0000 | [diff] [blame] | 134 | { |
Denys Vlasenko | 7a07b0e | 2010-07-29 04:00:27 +0200 | [diff] [blame] | 135 | push(~(data_t) pop()); |
Eric Andersen | cc8ed39 | 1999-10-05 16:24:54 +0000 | [diff] [blame] | 136 | } |
| 137 | |
Glenn L McGrath | 6d07432 | 2002-12-12 10:31:53 +0000 | [diff] [blame] | 138 | static void set_output_base(void) |
| 139 | { |
Denis Vlasenko | 6b38e18 | 2008-10-30 23:25:50 +0000 | [diff] [blame] | 140 | static const char bases[] ALIGN1 = { 2, 8, 10, 16, 0 }; |
| 141 | unsigned b = (unsigned)pop(); |
| 142 | |
| 143 | base = *strchrnul(bases, b); |
| 144 | if (base == 0) { |
| 145 | bb_error_msg("error, base %u is not supported", b); |
Denis Vlasenko | 5b27fbe | 2007-03-24 14:06:51 +0000 | [diff] [blame] | 146 | base = 10; |
Glenn L McGrath | 6d07432 | 2002-12-12 10:31:53 +0000 | [diff] [blame] | 147 | } |
| 148 | } |
| 149 | |
| 150 | static void print_base(double print) |
| 151 | { |
Denys Vlasenko | 7a07b0e | 2010-07-29 04:00:27 +0200 | [diff] [blame] | 152 | data_t x, i; |
Denis Vlasenko | 6b38e18 | 2008-10-30 23:25:50 +0000 | [diff] [blame] | 153 | |
Denys Vlasenko | 7a07b0e | 2010-07-29 04:00:27 +0200 | [diff] [blame] | 154 | x = (data_t) print; |
Denis Vlasenko | 6b38e18 | 2008-10-30 23:25:50 +0000 | [diff] [blame] | 155 | if (base == 10) { |
Denys Vlasenko | 7a07b0e | 2010-07-29 04:00:27 +0200 | [diff] [blame] | 156 | if (x == print) /* exactly representable as unsigned integer */ |
| 157 | printf("%"DATA_FMT"u\n", x); |
| 158 | else |
| 159 | printf("%g\n", print); |
Denis Vlasenko | 6b38e18 | 2008-10-30 23:25:50 +0000 | [diff] [blame] | 160 | return; |
| 161 | } |
| 162 | |
Denis Vlasenko | 6b38e18 | 2008-10-30 23:25:50 +0000 | [diff] [blame] | 163 | switch (base) { |
| 164 | case 16: |
Denys Vlasenko | 7a07b0e | 2010-07-29 04:00:27 +0200 | [diff] [blame] | 165 | printf("%"DATA_FMT"x\n", x); |
Denis Vlasenko | 6b38e18 | 2008-10-30 23:25:50 +0000 | [diff] [blame] | 166 | break; |
| 167 | case 8: |
Denys Vlasenko | 7a07b0e | 2010-07-29 04:00:27 +0200 | [diff] [blame] | 168 | printf("%"DATA_FMT"o\n", x); |
Denis Vlasenko | 6b38e18 | 2008-10-30 23:25:50 +0000 | [diff] [blame] | 169 | break; |
| 170 | default: /* base 2 */ |
Denys Vlasenko | 7a07b0e | 2010-07-29 04:00:27 +0200 | [diff] [blame] | 171 | i = MAXINT(data_t) - (MAXINT(data_t) >> 1); |
| 172 | /* i is 100000...00000 */ |
Denis Vlasenko | 6b38e18 | 2008-10-30 23:25:50 +0000 | [diff] [blame] | 173 | do { |
Denys Vlasenko | 7a07b0e | 2010-07-29 04:00:27 +0200 | [diff] [blame] | 174 | if (x & i) |
| 175 | break; |
Denis Vlasenko | 6b38e18 | 2008-10-30 23:25:50 +0000 | [diff] [blame] | 176 | i >>= 1; |
| 177 | } while (i > 1); |
| 178 | do { |
| 179 | bb_putchar('1' - !(x & i)); |
| 180 | i >>= 1; |
| 181 | } while (i); |
| 182 | bb_putchar('\n'); |
| 183 | } |
Glenn L McGrath | 6d07432 | 2002-12-12 10:31:53 +0000 | [diff] [blame] | 184 | } |
| 185 | |
| 186 | static void print_stack_no_pop(void) |
| 187 | { |
Denis Vlasenko | b44c790 | 2008-03-17 09:29:43 +0000 | [diff] [blame] | 188 | unsigned i = pointer; |
Glenn L McGrath | 6d07432 | 2002-12-12 10:31:53 +0000 | [diff] [blame] | 189 | while (i) |
| 190 | print_base(stack[--i]); |
| 191 | } |
| 192 | |
| 193 | static void print_no_pop(void) |
| 194 | { |
Denys Vlasenko | c4603fb | 2015-05-25 13:31:25 +0200 | [diff] [blame] | 195 | check_under(); |
Glenn L McGrath | 6d07432 | 2002-12-12 10:31:53 +0000 | [diff] [blame] | 196 | print_base(stack[pointer-1]); |
| 197 | } |
| 198 | |
Eric Andersen | cc8ed39 | 1999-10-05 16:24:54 +0000 | [diff] [blame] | 199 | struct op { |
Denis Vlasenko | 5b27fbe | 2007-03-24 14:06:51 +0000 | [diff] [blame] | 200 | const char name[4]; |
Aaron Lehmann | 2dd2d7a | 2001-12-06 03:29:37 +0000 | [diff] [blame] | 201 | void (*function) (void); |
Eric Andersen | cc8ed39 | 1999-10-05 16:24:54 +0000 | [diff] [blame] | 202 | }; |
| 203 | |
Erik Andersen | e49d5ec | 2000-02-08 19:58:47 +0000 | [diff] [blame] | 204 | static const struct op operators[] = { |
Denis Vlasenko | 0783230 | 2008-10-20 08:43:10 +0000 | [diff] [blame] | 205 | #if ENABLE_FEATURE_DC_LIBM |
Eric Andersen | a928774 | 2003-10-22 11:24:39 +0000 | [diff] [blame] | 206 | {"**", power}, |
| 207 | {"exp", power}, |
| 208 | {"pow", power}, |
Denis Vlasenko | 0783230 | 2008-10-20 08:43:10 +0000 | [diff] [blame] | 209 | #endif |
Eric Andersen | a928774 | 2003-10-22 11:24:39 +0000 | [diff] [blame] | 210 | {"%", mod}, |
| 211 | {"mod", mod}, |
Erik Andersen | e49d5ec | 2000-02-08 19:58:47 +0000 | [diff] [blame] | 212 | {"and", and}, |
John Beppu | c035254 | 2000-06-21 18:00:46 +0000 | [diff] [blame] | 213 | {"or", or}, |
Erik Andersen | 5e1189e | 2000-04-15 16:34:54 +0000 | [diff] [blame] | 214 | {"not", not}, |
| 215 | {"eor", eor}, |
Eric Andersen | a928774 | 2003-10-22 11:24:39 +0000 | [diff] [blame] | 216 | {"xor", eor}, |
Bernhard Reutner-Fischer | 70e30e8 | 2015-02-16 17:12:04 +0100 | [diff] [blame] | 217 | {"+", add}, |
| 218 | {"add", add}, |
| 219 | {"-", sub}, |
| 220 | {"sub", sub}, |
| 221 | {"*", mul}, |
| 222 | {"mul", mul}, |
| 223 | {"/", divide}, |
| 224 | {"div", divide}, |
Glenn L McGrath | 6d07432 | 2002-12-12 10:31:53 +0000 | [diff] [blame] | 225 | {"p", print_no_pop}, |
| 226 | {"f", print_stack_no_pop}, |
| 227 | {"o", set_output_base}, |
Eric Andersen | cc8ed39 | 1999-10-05 16:24:54 +0000 | [diff] [blame] | 228 | }; |
| 229 | |
Bernhard Reutner-Fischer | 70e30e8 | 2015-02-16 17:12:04 +0100 | [diff] [blame] | 230 | /* Feed the stack machine */ |
Erik Andersen | e49d5ec | 2000-02-08 19:58:47 +0000 | [diff] [blame] | 231 | static void stack_machine(const char *argument) |
Eric Andersen | cc8ed39 | 1999-10-05 16:24:54 +0000 | [diff] [blame] | 232 | { |
Denys Vlasenko | 9daf33f | 2013-01-18 13:30:13 +0100 | [diff] [blame] | 233 | char *end; |
Bernhard Reutner-Fischer | 70e30e8 | 2015-02-16 17:12:04 +0100 | [diff] [blame] | 234 | double number; |
Denys Vlasenko | 9daf33f | 2013-01-18 13:30:13 +0100 | [diff] [blame] | 235 | const struct op *o; |
Eric Andersen | cc8ed39 | 1999-10-05 16:24:54 +0000 | [diff] [blame] | 236 | |
Bernhard Reutner-Fischer | 70e30e8 | 2015-02-16 17:12:04 +0100 | [diff] [blame] | 237 | next: |
| 238 | number = strtod(argument, &end); |
| 239 | if (end != argument) { |
| 240 | argument = end; |
| 241 | push(number); |
| 242 | goto next; |
Eric Andersen | cc8ed39 | 1999-10-05 16:24:54 +0000 | [diff] [blame] | 243 | } |
| 244 | |
Bernhard Reutner-Fischer | 70e30e8 | 2015-02-16 17:12:04 +0100 | [diff] [blame] | 245 | /* We might have matched a digit, eventually advance the argument */ |
| 246 | argument = skip_whitespace(argument); |
| 247 | |
| 248 | if (*argument == '\0') |
| 249 | return; |
| 250 | |
Denys Vlasenko | 9daf33f | 2013-01-18 13:30:13 +0100 | [diff] [blame] | 251 | o = operators; |
| 252 | do { |
Denys Vlasenko | 8dff01d | 2015-03-12 17:48:34 +0100 | [diff] [blame] | 253 | char *after_name = is_prefixed_with(argument, o->name); |
| 254 | if (after_name) { |
| 255 | argument = after_name; |
Denis Vlasenko | 5b27fbe | 2007-03-24 14:06:51 +0000 | [diff] [blame] | 256 | o->function(); |
Bernhard Reutner-Fischer | 70e30e8 | 2015-02-16 17:12:04 +0100 | [diff] [blame] | 257 | goto next; |
Eric Andersen | cc8ed39 | 1999-10-05 16:24:54 +0000 | [diff] [blame] | 258 | } |
| 259 | o++; |
Denys Vlasenko | 9daf33f | 2013-01-18 13:30:13 +0100 | [diff] [blame] | 260 | } while (o != operators + ARRAY_SIZE(operators)); |
| 261 | |
Denys Vlasenko | bd1de18 | 2009-12-30 18:37:08 +0100 | [diff] [blame] | 262 | bb_error_msg_and_die("syntax error at '%s'", argument); |
Eric Andersen | cc8ed39 | 1999-10-05 16:24:54 +0000 | [diff] [blame] | 263 | } |
| 264 | |
Denis Vlasenko | 9b49a5e | 2007-10-11 10:05:36 +0000 | [diff] [blame] | 265 | int dc_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
Denis Vlasenko | a60f84e | 2008-07-05 09:18:54 +0000 | [diff] [blame] | 266 | int dc_main(int argc UNUSED_PARAM, char **argv) |
Eric Andersen | cc8ed39 | 1999-10-05 16:24:54 +0000 | [diff] [blame] | 267 | { |
Denis Vlasenko | d0a071a | 2008-03-17 09:33:45 +0000 | [diff] [blame] | 268 | INIT_G(); |
| 269 | |
Denis Vlasenko | b44c790 | 2008-03-17 09:29:43 +0000 | [diff] [blame] | 270 | argv++; |
| 271 | if (!argv[0]) { |
| 272 | /* take stuff from stdin if no args are given */ |
| 273 | char *line; |
Denis Vlasenko | 8ee649a | 2008-03-26 20:04:27 +0000 | [diff] [blame] | 274 | while ((line = xmalloc_fgetline(stdin)) != NULL) { |
Bernhard Reutner-Fischer | 70e30e8 | 2015-02-16 17:12:04 +0100 | [diff] [blame] | 275 | stack_machine(line); |
John Beppu | 5db60a7 | 2000-06-12 22:59:12 +0000 | [diff] [blame] | 276 | free(line); |
| 277 | } |
| 278 | } else { |
Denis Vlasenko | b44c790 | 2008-03-17 09:29:43 +0000 | [diff] [blame] | 279 | do { |
| 280 | stack_machine(*argv); |
| 281 | } while (*++argv); |
Eric Andersen | cc8ed39 | 1999-10-05 16:24:54 +0000 | [diff] [blame] | 282 | } |
Matt Kraai | 3e856ce | 2000-12-01 02:55:13 +0000 | [diff] [blame] | 283 | return EXIT_SUCCESS; |
Eric Andersen | cc8ed39 | 1999-10-05 16:24:54 +0000 | [diff] [blame] | 284 | } |