svn commit: trunk/busybox/shell

rpjday at busybox.net rpjday at busybox.net
Sat Jul 1 14:30:36 UTC 2006


Author: rpjday
Date: 2006-07-01 07:30:28 -0700 (Sat, 01 Jul 2006)
New Revision: 15569

Log:
Get rid of all "#if 0" content.


Modified:
   trunk/busybox/shell/ash.c
   trunk/busybox/shell/hush.c
   trunk/busybox/shell/lash.c
   trunk/busybox/shell/msh.c


Changeset:
Modified: trunk/busybox/shell/ash.c
===================================================================
--- trunk/busybox/shell/ash.c	2006-07-01 13:08:46 UTC (rev 15568)
+++ trunk/busybox/shell/ash.c	2006-07-01 14:30:28 UTC (rev 15569)
@@ -2547,11 +2547,6 @@
 	int i;
 
 	intpending = 0;
-#if 0
-	/* comment by vodz: its strange for me, this programm don`t use other
-	   signal block */
-	sigsetmask(0);
-#endif
 	i = EXSIG;
 	if (gotsig[SIGINT - 1] && !trap[SIGINT]) {
 		if (!(rootshell && iflag)) {

Modified: trunk/busybox/shell/hush.c
===================================================================
--- trunk/busybox/shell/hush.c	2006-07-01 13:08:46 UTC (rev 15568)
+++ trunk/busybox/shell/hush.c	2006-07-01 14:30:28 UTC (rev 15569)
@@ -1251,15 +1251,6 @@
 			/* child stopped */
 			pi->stopped_progs++;
 			pi->progs[prognum].is_stopped = 1;
-
-#if 0
-			/* Printing this stuff is a pain, since it tends to
-			 * overwrite the prompt an inconveinient moments.  So
-			 * don't do that.  */
-			if (pi->stopped_progs == pi->num_progs) {
-				printf("\n"JOB_STATUS_FORMAT, pi->jobid, "Stopped", pi->text);
-			}
-#endif
 		}
 	}
 
@@ -1272,32 +1263,6 @@
 	return -1;
 }
 
-/* Figure out our controlling tty, checking in order stderr,
- * stdin, and stdout.  If check_pgrp is set, also check that
- * we belong to the foreground process group associated with
- * that tty.  The value of shell_terminal is needed in order to call
- * tcsetpgrp(shell_terminal, ...); */
-#if 0
-static void controlling_tty(int check_pgrp)
-{
-	pid_t curpgrp;
-
-	if ((curpgrp = tcgetpgrp(shell_terminal = 2)) < 0
-			&& (curpgrp = tcgetpgrp(shell_terminal = 0)) < 0
-			&& (curpgrp = tcgetpgrp(shell_terminal = 1)) < 0)
-		goto shell_terminal_error;
-
-	if (check_pgrp && curpgrp != getpgid(0))
-		goto shell_terminal_error;
-
-	return;
-
-shell_terminal_error:
-		shell_terminal = -1;
-		return;
-}
-#endif
-
 /* run_pipe_real() starts all the jobs, but doesn't wait for anything
  * to finish.  See checkjobs().
  *
@@ -1759,19 +1724,6 @@
 	return 0;
 }
 
-#if 0
-static void globprint(glob_t *pglob)
-{
-	int i;
-	debug_printf("glob_t at %p:\n", pglob);
-	debug_printf("  gl_pathc=%d  gl_pathv=%p  gl_offs=%d  gl_flags=%d\n",
-		pglob->gl_pathc, pglob->gl_pathv, pglob->gl_offs, pglob->gl_flags);
-	for (i=0; i<pglob->gl_pathc; i++)
-		debug_printf("pglob->gl_pathv[%d] = %p = %s\n", i,
-			pglob->gl_pathv[i], pglob->gl_pathv[i]);
-}
-#endif
-
 static int xglob(o_string *dest, int flags, glob_t *pglob)
 {
 	int gr;
@@ -2255,13 +2207,7 @@
 			dup2(channel[1],1);
 			close(channel[1]);
 		}
-#if 0
-#define SURROGATE "surrogate response"
-		write(1,SURROGATE,sizeof(SURROGATE));
-		_exit(run_list(head));
-#else
 		_exit(run_list_real(head));   /* leaks memory */
-#endif
 	}
 	debug_printf("forked child %d\n",pid);
 	close(channel[1]);
@@ -2476,14 +2422,6 @@
 				debug_printf("leaving parse_stream (triggered)\n");
 				return 0;
 			}
-#if 0
-			if (ch=='\n') {
-				/* Yahoo!  Time to run with it! */
-				done_pipe(ctx,PIPE_SEQ);
-				run_list(ctx->list_head);
-				initialize_context(ctx);
-			}
-#endif
 			if (m!=2) switch (ch) {
 		case '#':
 			if (dest->length == 0 && !dest->quote) {

Modified: trunk/busybox/shell/lash.c
===================================================================
--- trunk/busybox/shell/lash.c	2006-07-01 13:08:46 UTC (rev 15568)
+++ trunk/busybox/shell/lash.c	2006-07-01 14:30:28 UTC (rev 15569)
@@ -543,16 +543,6 @@
 			/* child stopped */
 			job->stopped_progs++;
 			job->progs[prognum].is_stopped = 1;
-
-#if 0
-			/* Printing this stuff is a pain, since it tends to
-			 * overwrite the prompt an inconveinient moments.  So
-			 * don't do that.  */
-			if (job->stopped_progs == job->num_progs) {
-				printf(JOB_STATUS_FORMAT, job->jobid, "Stopped",
-					   job->text);
-			}
-#endif
 		}
 	}
 

Modified: trunk/busybox/shell/msh.c
===================================================================
--- trunk/busybox/shell/msh.c	2006-07-01 13:08:46 UTC (rev 15568)
+++ trunk/busybox/shell/msh.c	2006-07-01 14:30:28 UTC (rev 15569)
@@ -195,11 +195,7 @@
 #define	BIT(i)	(1<<(i))
 #define	FEXEC	BIT(0)			/* execute without forking */
 
-#if 0							/* Original value */
-#define AREASIZE	(65000)
-#else
 #define AREASIZE	(90000)
-#endif
 
 /*
  * flags to control evaluation of words
@@ -2566,18 +2562,6 @@
 		? eval(wp2, t->type == TCOM ? DOALL : DOALL & ~DOKEY)
 		: NULL;
 
-/* Hard to know how many words there are, be careful of garbage pointer values */
-/* They are likely to cause "PCI bus fault" errors */
-#if 0
-	DBGPRINTF(("EXECUTE: t->left=%p, t->right=%p, t->words[1] is %s\n",
-			   t->left, t->right,
-			   ((t->words[1] == NULL) ? "NULL" : t->words[1])));
-	DBGPRINTF7(("EXECUTE: t->words[2] is %s, t->words[3] is %s\n",
-				((t->words[2] == NULL) ? "NULL" : t->words[2]),
-				((t->words[3] == NULL) ? "NULL" : t->words[3])));
-#endif
-
-
 	switch (t->type) {
 	case TDOT:
 		DBGPRINTF3(("EXECUTE: TDOT\n"));
@@ -2796,21 +2780,6 @@
 	DBGPRINTF7(("FORKEXEC: t->words is %s\n",
 				((t->words == NULL) ? "NULL" : t->words[0])));
 
-/* Hard to know how many words there are, be careful of garbage pointer values */
-/* They are likely to cause "PCI bus fault" errors */
-#if 0
-	DBGPRINTF7(("FORKEXEC: t->words is %s, t->words[1] is %s\n",
-				((t->words == NULL) ? "NULL" : t->words[0]),
-				((t->words == NULL) ? "NULL" : t->words[1])));
-	DBGPRINTF7(("FORKEXEC: wp is %s, wp[1] is %s\n",
-				((wp == NULL) ? "NULL" : wp[0]),
-				((wp[1] == NULL) ? "NULL" : wp[1])));
-	DBGPRINTF7(("FORKEXEC: wp2 is %s, wp[3] is %s\n",
-				((wp[2] == NULL) ? "NULL" : wp[2]),
-				((wp[3] == NULL) ? "NULL" : wp[3])));
-#endif
-
-
 	owp = wp;
 	resetsig = 0;
 	rv = -1;					/* system-detected error */
@@ -2825,14 +2794,6 @@
 						cp, wp, owp));
 			echo(cp ? wp : owp);
 		}
-#if 0
-		DBGPRINTF9(("FORKEXEC: t->words is %s, t->words[1] is %s\n",
-					((t->words == NULL) ? "NULL" : t->words[0]),
-					((t->words == NULL) ? "NULL" : t->words[1])));
-		DBGPRINTF9(("FORKEXEC: wp is %s, wp[1] is %s\n",
-					((wp == NULL) ? "NULL" : wp[0]),
-					((wp == NULL) ? "NULL" : wp[1])));
-#endif
 
 		if (cp == NULL && t->ioact == NULL) {
 			while ((cp = *owp++) != NULL && assign(cp, COPYV));
@@ -2846,11 +2807,6 @@
 	t->words = wp;
 	f = act;
 
-#if 0
-	DBGPRINTF3(("FORKEXEC: t->words is %s, t->words[1] is %s\n",
-				((t->words == NULL) ? "NULL" : t->words[0]),
-				((t->words == NULL) ? "NULL" : t->words[1])));
-#endif
 	DBGPRINTF(("FORKEXEC: shcom %p, f&FEXEC 0x%x, owp %p\n", shcom,
 			   f & FEXEC, owp));
 




More information about the busybox-cvs mailing list