Mercurial > hg > toybox
comparison toys/toysh.c @ 165:ad48dca1f4c5
Zap a warning.
author | Rob Landley <rob@landley.net> |
---|---|
date | Thu, 15 Nov 2007 20:52:01 -0600 |
parents | 1e8f4b05cb65 |
children | 25447caf1b4b |
comparison
equal
deleted
inserted
replaced
164:c79290b54bd3 | 165:ad48dca1f4c5 |
---|---|
205 if (isatty(0)) toys.optflags |= 1; | 205 if (isatty(0)) toys.optflags |= 1; |
206 } | 206 } |
207 f = *toys.optargs ? xfopen(*toys.optargs, "r") : NULL; | 207 f = *toys.optargs ? xfopen(*toys.optargs, "r") : NULL; |
208 if (TT.command) handle(TT.command); | 208 if (TT.command) handle(TT.command); |
209 else { | 209 else { |
210 unsigned cmdlen = 0; | 210 size_t cmdlen = 0; |
211 for (;;) { | 211 for (;;) { |
212 char *command = 0; | 212 char *command = 0; |
213 if (!f) putchar('$'); | 213 if (!f) putchar('$'); |
214 if (1 > getline(&command, &cmdlen, f ? : stdin)) break; | 214 if (1 > getline(&command, &cmdlen, f ? : stdin)) break; |
215 handle(command); | 215 handle(command); |