From: nicm Date: Mon, 5 Oct 2015 23:26:58 +0000 (+0000) Subject: Remove EXTERN from table.h and put the definitions in table.c, from X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=7df1fdf486933c91e857653170976e680628a00d;p=openbsd Remove EXTERN from table.h and put the definitions in table.c, from Michael McConville. --- diff --git a/bin/ksh/table.c b/bin/ksh/table.c index cb27bbf5ffe..2af57b41d19 100644 --- a/bin/ksh/table.c +++ b/bin/ksh/table.c @@ -1,4 +1,4 @@ -/* $OpenBSD: table.c,v 1.18 2015/09/18 07:28:24 nicm Exp $ */ +/* $OpenBSD: table.c,v 1.19 2015/10/05 23:26:58 nicm Exp $ */ /* * dynamic hashed associative table for commands and variables @@ -8,6 +8,19 @@ #define INIT_TBLS 8 /* initial table size (power of 2) */ +struct table taliases; /* tracked aliases */ +struct table builtins; /* built-in commands */ +struct table aliases; /* aliases */ +struct table keywords; /* keywords */ +struct table homedirs; /* homedir() cache */ + +char *path; /* copy of either PATH or def_path */ +const char *def_path; /* path to use if PATH not set */ +char *tmpdir; /* TMPDIR value */ +const char *prompt; +int cur_prompt; /* PS1 or PS2 */ +int current_lineno; /* LINENO value */ + static void texpand(struct table *, int); static int tnamecmp(const void *, const void *); diff --git a/bin/ksh/table.h b/bin/ksh/table.h index 0431c777be2..5336775c9d9 100644 --- a/bin/ksh/table.h +++ b/bin/ksh/table.h @@ -1,4 +1,4 @@ -/* $OpenBSD: table.h,v 1.9 2015/09/14 16:08:50 nicm Exp $ */ +/* $OpenBSD: table.h,v 1.10 2015/10/05 23:26:58 nicm Exp $ */ /* $From: table.h,v 1.3 1994/05/31 13:34:34 michael Exp $ */ @@ -136,12 +136,11 @@ struct tstate { struct tbl **next; }; - -EXTERN struct table taliases; /* tracked aliases */ -EXTERN struct table builtins; /* built-in commands */ -EXTERN struct table aliases; /* aliases */ -EXTERN struct table keywords; /* keywords */ -EXTERN struct table homedirs; /* homedir() cache */ +extern struct table taliases; /* tracked aliases */ +extern struct table builtins; /* built-in commands */ +extern struct table aliases; /* aliases */ +extern struct table keywords; /* keywords */ +extern struct table homedirs; /* homedir() cache */ struct builtin { const char *name; @@ -175,9 +174,9 @@ extern const struct builtin shbuiltins [], kshbuiltins []; #define PS1 0 /* command */ #define PS2 1 /* command continuation */ -EXTERN char *path; /* copy of either PATH or def_path */ -EXTERN const char *def_path; /* path to use if PATH not set */ -EXTERN char *tmpdir; /* TMPDIR value */ -EXTERN const char *prompt; -EXTERN int cur_prompt; /* PS1 or PS2 */ -EXTERN int current_lineno; /* LINENO value */ +extern char *path; /* copy of either PATH or def_path */ +extern const char *def_path; /* path to use if PATH not set */ +extern char *tmpdir; /* TMPDIR value */ +extern const char *prompt; +extern int cur_prompt; /* PS1 or PS2 */ +extern int current_lineno; /* LINENO value */