aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrpjday <rpjday@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-07-01 14:30:28 +0000
committerrpjday <rpjday@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-07-01 14:30:28 +0000
commit4787f4d6e9c127b4f062204081b2540af40a8670 (patch)
treefe7a0c54092f1a50536638cad02d9c3e9c6edd15
parenta7719dadd888f13b8153fd442a71e4051eaaee99 (diff)
downloadbusybox-w32-4787f4d6e9c127b4f062204081b2540af40a8670.tar.gz
busybox-w32-4787f4d6e9c127b4f062204081b2540af40a8670.tar.bz2
busybox-w32-4787f4d6e9c127b4f062204081b2540af40a8670.zip
Get rid of all "#if 0" content.
git-svn-id: svn://busybox.net/trunk/busybox@15569 69ca8d6d-28ef-0310-b511-8ec308f3f277
-rw-r--r--shell/ash.c5
-rw-r--r--shell/hush.c62
-rw-r--r--shell/lash.c10
-rw-r--r--shell/msh.c44
4 files changed, 0 insertions, 121 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 300f19132..cc46881c9 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -2547,11 +2547,6 @@ onint(void) {
2547 int i; 2547 int i;
2548 2548
2549 intpending = 0; 2549 intpending = 0;
2550#if 0
2551 /* comment by vodz: its strange for me, this programm don`t use other
2552 signal block */
2553 sigsetmask(0);
2554#endif
2555 i = EXSIG; 2550 i = EXSIG;
2556 if (gotsig[SIGINT - 1] && !trap[SIGINT]) { 2551 if (gotsig[SIGINT - 1] && !trap[SIGINT]) {
2557 if (!(rootshell && iflag)) { 2552 if (!(rootshell && iflag)) {
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) {
diff --git a/shell/lash.c b/shell/lash.c
index d87c5a25b..1b34052a1 100644
--- a/shell/lash.c
+++ b/shell/lash.c
@@ -543,16 +543,6 @@ static void checkjobs(struct jobset *j_list)
543 /* child stopped */ 543 /* child stopped */
544 job->stopped_progs++; 544 job->stopped_progs++;
545 job->progs[prognum].is_stopped = 1; 545 job->progs[prognum].is_stopped = 1;
546
547#if 0
548 /* Printing this stuff is a pain, since it tends to
549 * overwrite the prompt an inconveinient moments. So
550 * don't do that. */
551 if (job->stopped_progs == job->num_progs) {
552 printf(JOB_STATUS_FORMAT, job->jobid, "Stopped",
553 job->text);
554 }
555#endif
556 } 546 }
557 } 547 }
558 548
diff --git a/shell/msh.c b/shell/msh.c
index f8562b725..633070112 100644
--- a/shell/msh.c
+++ b/shell/msh.c
@@ -195,11 +195,7 @@ static char *T_CMD_NAMES[] = {
195#define BIT(i) (1<<(i)) 195#define BIT(i) (1<<(i))
196#define FEXEC BIT(0) /* execute without forking */ 196#define FEXEC BIT(0) /* execute without forking */
197 197
198#if 0 /* Original value */
199#define AREASIZE (65000)
200#else
201#define AREASIZE (90000) 198#define AREASIZE (90000)
202#endif
203 199
204/* 200/*
205 * flags to control evaluation of words 201 * flags to control evaluation of words
@@ -2566,18 +2562,6 @@ static int execute(struct op *t, int *pin, int *pout, int act)
2566 ? eval(wp2, t->type == TCOM ? DOALL : DOALL & ~DOKEY) 2562 ? eval(wp2, t->type == TCOM ? DOALL : DOALL & ~DOKEY)
2567 : NULL; 2563 : NULL;
2568 2564
2569/* Hard to know how many words there are, be careful of garbage pointer values */
2570/* They are likely to cause "PCI bus fault" errors */
2571#if 0
2572 DBGPRINTF(("EXECUTE: t->left=%p, t->right=%p, t->words[1] is %s\n",
2573 t->left, t->right,
2574 ((t->words[1] == NULL) ? "NULL" : t->words[1])));
2575 DBGPRINTF7(("EXECUTE: t->words[2] is %s, t->words[3] is %s\n",
2576 ((t->words[2] == NULL) ? "NULL" : t->words[2]),
2577 ((t->words[3] == NULL) ? "NULL" : t->words[3])));
2578#endif
2579
2580
2581 switch (t->type) { 2565 switch (t->type) {
2582 case TDOT: 2566 case TDOT:
2583 DBGPRINTF3(("EXECUTE: TDOT\n")); 2567 DBGPRINTF3(("EXECUTE: TDOT\n"));
@@ -2796,21 +2780,6 @@ forkexec(struct op *t, int *pin, int *pout, int act, char **wp)
2796 DBGPRINTF7(("FORKEXEC: t->words is %s\n", 2780 DBGPRINTF7(("FORKEXEC: t->words is %s\n",
2797 ((t->words == NULL) ? "NULL" : t->words[0]))); 2781 ((t->words == NULL) ? "NULL" : t->words[0])));
2798 2782
2799/* Hard to know how many words there are, be careful of garbage pointer values */
2800/* They are likely to cause "PCI bus fault" errors */
2801#if 0
2802 DBGPRINTF7(("FORKEXEC: t->words is %s, t->words[1] is %s\n",
2803 ((t->words == NULL) ? "NULL" : t->words[0]),
2804 ((t->words == NULL) ? "NULL" : t->words[1])));
2805 DBGPRINTF7(("FORKEXEC: wp is %s, wp[1] is %s\n",
2806 ((wp == NULL) ? "NULL" : wp[0]),
2807 ((wp[1] == NULL) ? "NULL" : wp[1])));
2808 DBGPRINTF7(("FORKEXEC: wp2 is %s, wp[3] is %s\n",
2809 ((wp[2] == NULL) ? "NULL" : wp[2]),
2810 ((wp[3] == NULL) ? "NULL" : wp[3])));
2811#endif
2812
2813
2814 owp = wp; 2783 owp = wp;
2815 resetsig = 0; 2784 resetsig = 0;
2816 rv = -1; /* system-detected error */ 2785 rv = -1; /* system-detected error */
@@ -2825,14 +2794,6 @@ forkexec(struct op *t, int *pin, int *pout, int act, char **wp)
2825 cp, wp, owp)); 2794 cp, wp, owp));
2826 echo(cp ? wp : owp); 2795 echo(cp ? wp : owp);
2827 } 2796 }
2828#if 0
2829 DBGPRINTF9(("FORKEXEC: t->words is %s, t->words[1] is %s\n",
2830 ((t->words == NULL) ? "NULL" : t->words[0]),
2831 ((t->words == NULL) ? "NULL" : t->words[1])));
2832 DBGPRINTF9(("FORKEXEC: wp is %s, wp[1] is %s\n",
2833 ((wp == NULL) ? "NULL" : wp[0]),
2834 ((wp == NULL) ? "NULL" : wp[1])));
2835#endif
2836 2797
2837 if (cp == NULL && t->ioact == NULL) { 2798 if (cp == NULL && t->ioact == NULL) {
2838 while ((cp = *owp++) != NULL && assign(cp, COPYV)); 2799 while ((cp = *owp++) != NULL && assign(cp, COPYV));
@@ -2846,11 +2807,6 @@ forkexec(struct op *t, int *pin, int *pout, int act, char **wp)
2846 t->words = wp; 2807 t->words = wp;
2847 f = act; 2808 f = act;
2848 2809
2849#if 0
2850 DBGPRINTF3(("FORKEXEC: t->words is %s, t->words[1] is %s\n",
2851 ((t->words == NULL) ? "NULL" : t->words[0]),
2852 ((t->words == NULL) ? "NULL" : t->words[1])));
2853#endif
2854 DBGPRINTF(("FORKEXEC: shcom %p, f&FEXEC 0x%x, owp %p\n", shcom, 2810 DBGPRINTF(("FORKEXEC: shcom %p, f&FEXEC 0x%x, owp %p\n", shcom,
2855 f & FEXEC, owp)); 2811 f & FEXEC, owp));
2856 2812