aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-04-12 00:32:05 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-04-12 00:32:05 +0000
commit51742f4bb0c57a4d5063ece9437a2f34a42e52c8 (patch)
tree7a912fc65ff43bdb09078d75bfc02ad8f5380b47 /shell
parent50f7f446ecaadef6895a4ee601567e0b68330637 (diff)
downloadbusybox-51742f4bb0c57a4d5063ece9437a2f34a42e52c8.tar.gz
style fixes. No code changes
Diffstat (limited to 'shell')
-rw-r--r--shell/bbsh.c12
-rw-r--r--shell/msh.c24
2 files changed, 18 insertions, 18 deletions
diff --git a/shell/bbsh.c b/shell/bbsh.c
index 6bef3685a..8f0fb0511 100644
--- a/shell/bbsh.c
+++ b/shell/bbsh.c
@@ -68,7 +68,7 @@ struct pipeline {
static void free_list(void *list, void (*freeit)(void *data))
{
- while(list) {
+ while (list) {
void **next = (void **)list;
void *list_next = *next;
freeit(list);
@@ -159,12 +159,12 @@ static int run_pipeline(struct pipeline *line)
// Handle local commands. This is totally fake and plastic.
if (cmd->argc==2 && !strcmp(cmd->argv[0],"cd"))
chdir(cmd->argv[1]);
- else if(!strcmp(cmd->argv[0],"exit"))
+ else if (!strcmp(cmd->argv[0],"exit"))
exit(cmd->argc>1 ? atoi(cmd->argv[1]) : 0);
else {
int status;
pid_t pid=fork();
- if(!pid) {
+ if (!pid) {
run_applet_and_exit(cmd->argv[0],cmd->argc,cmd->argv);
execvp(cmd->argv[0],cmd->argv);
printf("No %s",cmd->argv[0]);
@@ -179,7 +179,7 @@ static void free_cmd(void *data)
{
struct command *cmd=(struct command *)data;
- while(cmd->argc) free(cmd->argv[--cmd->argc]);
+ while (cmd->argc) free(cmd->argv[--cmd->argc]);
}
@@ -211,8 +211,8 @@ int bbsh_main(int argc, char **argv)
else {
unsigned cmdlen=0;
for (;;) {
- if(!f) putchar('$');
- if(1 > getline(&command, &cmdlen,f ? : stdin)) break;
+ if (!f) putchar('$');
+ if (1 > getline(&command, &cmdlen,f ? : stdin)) break;
handle(command);
}
diff --git a/shell/msh.c b/shell/msh.c
index 963e59446..4d1e84cf0 100644
--- a/shell/msh.c
+++ b/shell/msh.c
@@ -92,21 +92,21 @@ extern char **environ;
#ifdef MSHDEBUG
int mshdbg = MSHDEBUG;
-#define DBGPRINTF(x) if(mshdbg>0)printf x
-#define DBGPRINTF0(x) if(mshdbg>0)printf x
-#define DBGPRINTF1(x) if(mshdbg>1)printf x
-#define DBGPRINTF2(x) if(mshdbg>2)printf x
-#define DBGPRINTF3(x) if(mshdbg>3)printf x
-#define DBGPRINTF4(x) if(mshdbg>4)printf x
-#define DBGPRINTF5(x) if(mshdbg>5)printf x
-#define DBGPRINTF6(x) if(mshdbg>6)printf x
-#define DBGPRINTF7(x) if(mshdbg>7)printf x
-#define DBGPRINTF8(x) if(mshdbg>8)printf x
-#define DBGPRINTF9(x) if(mshdbg>9)printf x
+#define DBGPRINTF(x) if (mshdbg>0) printf x
+#define DBGPRINTF0(x) if (mshdbg>0) printf x
+#define DBGPRINTF1(x) if (mshdbg>1) printf x
+#define DBGPRINTF2(x) if (mshdbg>2) printf x
+#define DBGPRINTF3(x) if (mshdbg>3) printf x
+#define DBGPRINTF4(x) if (mshdbg>4) printf x
+#define DBGPRINTF5(x) if (mshdbg>5) printf x
+#define DBGPRINTF6(x) if (mshdbg>6) printf x
+#define DBGPRINTF7(x) if (mshdbg>7) printf x
+#define DBGPRINTF8(x) if (mshdbg>8) printf x
+#define DBGPRINTF9(x) if (mshdbg>9) printf x
int mshdbg_rc = 0;
-#define RCPRINTF(x) if(mshdbg_rc)printf x
+#define RCPRINTF(x) if (mshdbg_rc) printf x
#else