aboutsummaryrefslogtreecommitdiff
path: root/shell/hush.c
diff options
context:
space:
mode:
author"Robert P. J. Day" <rpjday@mindspring.com>2006-07-01 14:30:28 +0000
committer"Robert P. J. Day" <rpjday@mindspring.com>2006-07-01 14:30:28 +0000
commit177c9f312829d5932a798a8e2c8f6feea1a8b8d5 (patch)
treefe7a0c54092f1a50536638cad02d9c3e9c6edd15 /shell/hush.c
parent68229837ff1e690190d51b74b281cfe999220e6d (diff)
downloadbusybox-w32-177c9f312829d5932a798a8e2c8f6feea1a8b8d5.tar.gz
busybox-w32-177c9f312829d5932a798a8e2c8f6feea1a8b8d5.tar.bz2
busybox-w32-177c9f312829d5932a798a8e2c8f6feea1a8b8d5.zip
Get rid of all "#if 0" content.
Diffstat (limited to 'shell/hush.c')
-rw-r--r--shell/hush.c62
1 files changed, 0 insertions, 62 deletions
diff --git a/shell/hush.c b/shell/hush.c
index 13a992fc2..6b6c54f3b 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -1251,15 +1251,6 @@ static int checkjobs(struct pipe* fg_pipe)
1251 /* child stopped */ 1251 /* child stopped */
1252 pi->stopped_progs++; 1252 pi->stopped_progs++;
1253 pi->progs[prognum].is_stopped = 1; 1253 pi->progs[prognum].is_stopped = 1;
1254
1255#if 0
1256 /* Printing this stuff is a pain, since it tends to
1257 * overwrite the prompt an inconveinient moments. So
1258 * don't do that. */
1259 if (pi->stopped_progs == pi->num_progs) {
1260 printf("\n"JOB_STATUS_FORMAT, pi->jobid, "Stopped", pi->text);
1261 }
1262#endif
1263 } 1254 }
1264 } 1255 }
1265 1256
@@ -1272,32 +1263,6 @@ static int checkjobs(struct pipe* fg_pipe)
1272 return -1; 1263 return -1;
1273} 1264}
1274 1265
1275/* Figure out our controlling tty, checking in order stderr,
1276 * stdin, and stdout. If check_pgrp is set, also check that
1277 * we belong to the foreground process group associated with
1278 * that tty. The value of shell_terminal is needed in order to call
1279 * tcsetpgrp(shell_terminal, ...); */
1280#if 0
1281static void controlling_tty(int check_pgrp)
1282{
1283 pid_t curpgrp;
1284
1285 if ((curpgrp = tcgetpgrp(shell_terminal = 2)) < 0
1286 && (curpgrp = tcgetpgrp(shell_terminal = 0)) < 0
1287 && (curpgrp = tcgetpgrp(shell_terminal = 1)) < 0)
1288 goto shell_terminal_error;
1289
1290 if (check_pgrp && curpgrp != getpgid(0))
1291 goto shell_terminal_error;
1292
1293 return;
1294
1295shell_terminal_error:
1296 shell_terminal = -1;
1297 return;
1298}
1299#endif
1300
1301/* run_pipe_real() starts all the jobs, but doesn't wait for anything 1266/* run_pipe_real() starts all the jobs, but doesn't wait for anything
1302 * to finish. See checkjobs(). 1267 * to finish. See checkjobs().
1303 * 1268 *
@@ -1759,19 +1724,6 @@ static int glob_needed(const char *s)
1759 return 0; 1724 return 0;
1760} 1725}
1761 1726
1762#if 0
1763static void globprint(glob_t *pglob)
1764{
1765 int i;
1766 debug_printf("glob_t at %p:\n", pglob);
1767 debug_printf(" gl_pathc=%d gl_pathv=%p gl_offs=%d gl_flags=%d\n",
1768 pglob->gl_pathc, pglob->gl_pathv, pglob->gl_offs, pglob->gl_flags);
1769 for (i=0; i<pglob->gl_pathc; i++)
1770 debug_printf("pglob->gl_pathv[%d] = %p = %s\n", i,
1771 pglob->gl_pathv[i], pglob->gl_pathv[i]);
1772}
1773#endif
1774
1775static int xglob(o_string *dest, int flags, glob_t *pglob) 1727static int xglob(o_string *dest, int flags, glob_t *pglob)
1776{ 1728{
1777 int gr; 1729 int gr;
@@ -2255,13 +2207,7 @@ static FILE *generate_stream_from_list(struct pipe *head)
2255 dup2(channel[1],1); 2207 dup2(channel[1],1);
2256 close(channel[1]); 2208 close(channel[1]);
2257 } 2209 }
2258#if 0
2259#define SURROGATE "surrogate response"
2260 write(1,SURROGATE,sizeof(SURROGATE));
2261 _exit(run_list(head));
2262#else
2263 _exit(run_list_real(head)); /* leaks memory */ 2210 _exit(run_list_real(head)); /* leaks memory */
2264#endif
2265 } 2211 }
2266 debug_printf("forked child %d\n",pid); 2212 debug_printf("forked child %d\n",pid);
2267 close(channel[1]); 2213 close(channel[1]);
@@ -2476,14 +2422,6 @@ int parse_stream(o_string *dest, struct p_context *ctx,
2476 debug_printf("leaving parse_stream (triggered)\n"); 2422 debug_printf("leaving parse_stream (triggered)\n");
2477 return 0; 2423 return 0;
2478 } 2424 }
2479#if 0
2480 if (ch=='\n') {
2481 /* Yahoo! Time to run with it! */
2482 done_pipe(ctx,PIPE_SEQ);
2483 run_list(ctx->list_head);
2484 initialize_context(ctx);
2485 }
2486#endif
2487 if (m!=2) switch (ch) { 2425 if (m!=2) switch (ch) {
2488 case '#': 2426 case '#':
2489 if (dest->length == 0 && !dest->quote) { 2427 if (dest->length == 0 && !dest->quote) {