Fix the pwd and group functions. The bb_ stuff was a leftover from
[oweals/busybox.git] / sh.c
diff --git a/sh.c b/sh.c
index 9e6d09565fe848d751967020e14e733b52287ec5..bd6945605867c4b5ccfda9be50ea64b713dd7bb9 100644 (file)
--- a/sh.c
+++ b/sh.c
@@ -2,7 +2,7 @@
 /*
  * lash -- the BusyBox Lame-Ass SHell
  *
- * Copyright (C) 2000 by Lineo, inc.
+ * Copyright (C) 1999,2000,2001 by Lineo, inc.
  * Written by Erik Andersen <andersen@lineo.com>, <andersee@debian.org>
  *
  * Based in part on ladsh.c by Michael K. Johnson and Erik W. Troan, which is
@@ -64,8 +64,8 @@
 #include <getopt.h>
 #include "cmdedit.h"
 
-#define MAX_LINE       256     /* size of input buffer for cwd data */
-#define MAX_READ       128     /* size of input buffer for `read' builtin */
+static const int MAX_LINE = 256;       /* size of input buffer for cwd data */
+static const int MAX_READ = 128;       /* size of input buffer for `read' builtin */
 #define JOB_STATUS_FORMAT "[%d] %-22s %.40s\n"
 extern size_t NUM_APPLETS;
 
@@ -1665,8 +1665,6 @@ static int busy_loop(FILE * input)
 #ifdef BB_FEATURE_CLEAN_UP
 void free_memory(void)
 {
-       if (prompt_str)
-               free(prompt_str);
        if (cwd)
                free(cwd);
        if (local_pending_command)
@@ -1688,7 +1686,7 @@ int shell_main(int argc_l, char **argv_l)
 
        shell_context = 0;
        cwd=NULL;
-#ifdef BB_FEATURE_STANDALONE_SHELL
+#ifdef BB_FEATURE_SH_STANDALONE_SHELL
        /* These variables need re-initializing when recursing */
        local_pending_command = NULL;
        job_list.head = NULL;