-/* $OpenBSD: main.c,v 1.65 2015/10/17 18:26:24 mmcc Exp $ */
+/* $OpenBSD: main.c,v 1.66 2015/10/18 18:05:35 mmcc Exp $ */
/*
* startup, main loop, environments and error handling
static int is_restricted(char *name);
static void init_username(void);
+const char *kshname;
+pid_t kshpid;
+pid_t procpid;
+uid_t ksheuid;
+int exstat;
+int subst_exstat;
+const char *safe_prompt;
+
/*
* shell initialization
*/
-/* $OpenBSD: sh.h,v 1.39 2015/10/17 18:43:22 mmcc Exp $ */
+/* $OpenBSD: sh.h,v 1.40 2015/10/18 18:05:35 mmcc Exp $ */
/*
* Public Domain Bourne/Korn shell
#define LINE 2048 /* input line size */
#define PATH 1024 /* pathname size (todo: PATH_MAX/pathconf()) */
-EXTERN const char *kshname; /* $0 */
-EXTERN pid_t kshpid; /* $$, shell pid */
-EXTERN pid_t procpid; /* pid of executing process */
-EXTERN uid_t ksheuid; /* effective uid of shell */
-EXTERN int exstat; /* exit status */
-EXTERN int subst_exstat; /* exit status of last $(..)/`..` */
-EXTERN const char *safe_prompt; /* safe prompt if PS1 substitution fails */
-EXTERN char username[]; /* username for \u prompt expansion */
+extern const char *kshname; /* $0 */
+extern pid_t kshpid; /* $$, shell pid */
+extern pid_t procpid; /* pid of executing process */
+extern uid_t ksheuid; /* effective uid of shell */
+extern int exstat; /* exit status */
+extern int subst_exstat; /* exit status of last $(..)/`..` */
+extern const char *safe_prompt; /* safe prompt if PS1 substitution fails */
+extern char username[]; /* username for \u prompt expansion */
/*
* Area-based allocation built on malloc/free