-/* $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
#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 *);
-/* $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 $ */
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;
#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 */