extern void do_freefrag(int argc, char **argv);
extern void do_filefrag(int argc, char *argv[]);
+/* util.c */
+extern time_t string_to_time(const char *arg);
+
/* zap.c */
extern void do_zap_block(int argc, char **argv);
extern void do_block_dump(int argc, char **argv);
#include "debugfs.h"
-ext2_ino_t current_ino;
-ext2_extent_handle_t current_handle;
+static ext2_ino_t current_ino;
+static ext2_extent_handle_t current_handle;
static void dbg_print_extent(char *desc, struct ext2fs_extent *extent)
{
#define ANY_BLOCK ((blk64_t) -1)
-int dump_all, dump_contents, dump_descriptors;
-blk64_t block_to_dump, bitmap_to_dump, inode_block_to_dump;
-unsigned int group_to_dump, inode_offset_to_dump;
-ext2_ino_t inode_to_dump;
+static int dump_all, dump_contents, dump_descriptors;
+static blk64_t block_to_dump, bitmap_to_dump, inode_block_to_dump;
+static unsigned int group_to_dump, inode_offset_to_dump;
+static ext2_ino_t inode_to_dump;
struct journal_source
{
* Parse a string as a time. Return ((time_t)-1) if the string
* doesn't appear to be a sane time.
*/
-extern time_t string_to_time(const char *arg)
+time_t string_to_time(const char *arg)
{
struct tm ts;
time_t ret;
return ctx->dir_info ? ctx->dir_info->count : 0;
}
-extern struct dir_info_iter *e2fsck_dir_info_iter_begin(e2fsck_t ctx)
+struct dir_info_iter *e2fsck_dir_info_iter_begin(e2fsck_t ctx)
{
struct dir_info_iter *iter;
struct dir_info_db *db = ctx->dir_info;
return iter;
}
-extern void e2fsck_dir_info_iter_end(e2fsck_t ctx EXT2FS_ATTR((unused)),
- struct dir_info_iter *iter)
+void e2fsck_dir_info_iter_end(e2fsck_t ctx EXT2FS_ATTR((unused)),
+ struct dir_info_iter *iter)
{
free(iter->tdb_iter.dptr);
ext2fs_free_mem(&iter);
*/
typedef void (*pass_t)(e2fsck_t ctx);
-pass_t e2fsck_passes[] = {
+static pass_t e2fsck_passes[] = {
e2fsck_pass1, e2fsck_pass2, e2fsck_pass3, e2fsck_pass4,
e2fsck_pass5, 0 };
}
}
-extern void e2fsck_setup_tdb_icount(e2fsck_t ctx, int flags,
- ext2_icount_t *ret)
+void e2fsck_setup_tdb_icount(e2fsck_t ctx, int flags,
+ ext2_icount_t *ret)
{
unsigned int threshold;
ext2_ino_t num_dirs;
}
-extern int e2fsck_process_bad_inode(e2fsck_t ctx, ext2_ino_t dir,
- ext2_ino_t ino, char *buf)
+int e2fsck_process_bad_inode(e2fsck_t ctx, ext2_ino_t dir,
+ ext2_ino_t ino, char *buf)
{
ext2_filsys fs = ctx->fs;
struct ext2_inode inode;
int max_pass;
int table[32];
};
-struct percent_tbl e2fsck_tbl = {
+static struct percent_tbl e2fsck_tbl = {
5, { 0, 70, 90, 92, 95, 100 }
};
static char bar[128], spaces[128];
+ tbl->table[pass-1]);
}
-extern void e2fsck_clear_progbar(e2fsck_t ctx)
+void e2fsck_clear_progbar(e2fsck_t ctx)
{
if (!(ctx->flags & E2F_FLAG_PROG_BAR))
return;
}
}
-extern void e2fsck_write_inode_full(e2fsck_t ctx, unsigned long ino,
- struct ext2_inode * inode, int bufsize,
- const char *proc)
+void e2fsck_write_inode_full(e2fsck_t ctx, unsigned long ino,
+ struct ext2_inode * inode, int bufsize,
+ const char *proc)
{
errcode_t retval;
}
}
-extern void e2fsck_write_inode(e2fsck_t ctx, unsigned long ino,
- struct ext2_inode * inode, const char *proc)
+void e2fsck_write_inode(e2fsck_t ctx, unsigned long ino,
+ struct ext2_inode * inode, const char *proc)
{
errcode_t retval;
va_end(pvar);
}
-errf set_com_err_hook (new_proc)
- errf new_proc;
+errf set_com_err_hook(errf new_proc)
{
errf x = com_err_hook;
return x;
}
-errf reset_com_err_hook () {
+errf reset_com_err_hook(void) {
errf x = com_err_hook;
com_err_hook = default_com_err_proc;
return x;
static gettextf com_err_gettext = NULL;
-gettextf set_com_err_gettext (new_proc)
- gettextf new_proc;
+gettextf set_com_err_gettext(gettextf new_proc)
{
gettextf x = com_err_gettext;
struct et_list *next;
const struct error_table *table;
};
-extern struct et_list * _et_list;
+extern struct et_list *_et_list, *_et_dynamic_list;
#define ERRCODE_RANGE 8 /* # of bits to shift table number */
#define BITS_PER_CHAR 6 /* # bits to shift per character in name */
static char buf[6];
-const char * error_table_name(num)
- errcode_t num;
+const char * error_table_name(errcode_t num)
{
int ch;
int i;
DEBUG_OBJS= debug_cmds.o debugfs.o util.o ncheck.o icheck.o ls.o \
lsdel.o dump.o set_fields.o logdump.o htree.o unused.o \
- e2freefrag.o filefrag.o extent_inode.o extent_cmds.o
+ e2freefrag.o filefrag.o extent_inode.o extent_cmds.o zap.o
debugfs.o: $(top_srcdir)/debugfs/debugfs.c
$(E) " CC $<"
$(E) " CC $<"
$(Q) $(CC) $(ALL_CFLAGS) -c $< -o $@
+zap.o: $(top_srcdir)/debugfs/zap.c
+ $(E) " CC $<"
+ $(Q) $(CC) $(ALL_CFLAGS) -c $< -o $@
+
e2freefrag.o: $(top_srcdir)/misc/e2freefrag.c
$(E) " CC $<"
$(Q) $(CC) $(ALL_CFLAGS) -DDEBUGFS -I$(top_srcdir)/debugfs -c $< -o $@
#include <errno.h>
#include "ext2_fs.h"
-#include "ext2fs.h"
+#include "ext2fsP.h"
#if defined(__GNUC__) && !defined(NO_INLINE_FUNCS)
#define _BMAP_INLINE_ __inline__
errcode_t ext2fs_dblist_get_last(ext2_dblist dblist,
struct ext2_db_entry **entry)
{
- EXT2_CHECK_MAGIC(dblist, EXT2_ET_MAGIC_DBLIST);
static struct ext2_db_entry ret_entry;
struct ext2_db_entry2 *last;
+ EXT2_CHECK_MAGIC(dblist, EXT2_ET_MAGIC_DBLIST);
+
if (dblist->count == 0)
return EXT2_ET_DBLIST_EMPTY;
return (*xl->func)(dirent, offset, blocksize, buf, xl->real_private);
}
-extern errcode_t ext2fs_dir_iterate(ext2_filsys fs,
- ext2_ino_t dir,
- int flags,
- char *block_buf,
- int (*func)(struct ext2_dir_entry *dirent,
- int offset,
- int blocksize,
- char *buf,
- void *priv_data),
- void *priv_data)
+errcode_t ext2fs_dir_iterate(ext2_filsys fs,
+ ext2_ino_t dir,
+ int flags,
+ char *block_buf,
+ int (*func)(struct ext2_dir_entry *dirent,
+ int offset,
+ int blocksize,
+ char *buf,
+ void *priv_data),
+ void *priv_data)
{
struct xlate xl;
/*
* Begin functions to handle an inode's extent information
*/
-extern void ext2fs_extent_free(ext2_extent_handle_t handle)
+void ext2fs_extent_free(ext2_extent_handle_t handle)
{
int i;
ext2fs_free_mem(&handle);
}
-extern errcode_t ext2fs_extent_open(ext2_filsys fs, ext2_ino_t ino,
+errcode_t ext2fs_extent_open(ext2_filsys fs, ext2_ino_t ino,
ext2_extent_handle_t *ret_handle)
{
return ext2fs_extent_open2(fs, ino, NULL, ret_handle);
}
-extern errcode_t ext2fs_extent_open2(ext2_filsys fs, ext2_ino_t ino,
+errcode_t ext2fs_extent_open2(ext2_filsys fs, ext2_ino_t ino,
struct ext2_inode *inode,
ext2_extent_handle_t *ret_handle)
{
}
/* Zero the parts of the last block that are past EOF. */
-errcode_t ext2fs_file_zero_past_offset(ext2_file_t file, ext2_off64_t offset)
+static errcode_t ext2fs_file_zero_past_offset(ext2_file_t file,
+ ext2_off64_t offset)
{
ext2_filsys fs = file->fs;
char *b = NULL;
#define rand() random()
#endif
-unsigned ext2fs_mmp_new_seq()
+unsigned ext2fs_mmp_new_seq(void)
{
unsigned new_seq;
struct timeval tv;
* Deallocate all logical blocks starting at start to end, inclusive.
* If end is ~0, then this is effectively truncate.
*/
-extern errcode_t ext2fs_punch(ext2_filsys fs, ext2_ino_t ino,
- struct ext2_inode *inode,
- char *block_buf, blk64_t start,
- blk64_t end)
+errcode_t ext2fs_punch(ext2_filsys fs, ext2_ino_t ino,
+ struct ext2_inode *inode,
+ char *block_buf, blk64_t start,
+ blk64_t end)
{
errcode_t retval;
struct ext2_inode inode_buf;
#include <stdarg.h>
-char * ss_name(sci_idx)
- int sci_idx;
+char *ss_name(int sci_idx)
{
register char *ret_val;
register ss_data *infop;
va_end(pvar);
}
-void ss_perror (sci_idx, code, msg) /* for compatibility */
- int sci_idx;
- long code;
- char const *msg;
+void ss_perror(int sci_idx, long code, char const *msg) /* for compatibility */
{
ss_error (sci_idx, code, "%s", msg);
}
* Notes:
*/
-static int check_request_table (rqtbl, argc, argv, sci_idx)
- register ss_request_table *rqtbl;
- int argc;
- char *argv[];
- int sci_idx;
+static int check_request_table(register ss_request_table *rqtbl, int argc,
+ char *argv[], int sci_idx)
{
#ifdef __SABER__
struct _ss_request_entry *request;
* Notes:
*/
-static int really_execute_command (sci_idx, argc, argv)
- int sci_idx;
- int argc;
- char **argv[];
+static int really_execute_command(int sci_idx, int argc, char **argv[])
{
register ss_request_table **rqtbl;
register ss_data *info;
* Notes:
*/
-int ss_execute_command(sci_idx, argv)
- int sci_idx;
- register char *argv[];
+int ss_execute_command(int sci_idx, register char *argv[])
{
register int i, argc;
char **argp;
* Notes:
*/
-int ss_execute_line (sci_idx, line_ptr)
- int sci_idx;
- char *line_ptr;
+int ss_execute_line(int sci_idx, char *line_ptr)
{
char **argv;
int argc, ret;
#endif
#include "ss_internal.h"
-void ss_help (argc, argv, sci_idx, info_ptr)
- int argc;
- char const * const *argv;
- int sci_idx;
- pointer info_ptr;
+void ss_help(int argc, char const * const *argv, int sci_idx, pointer info_ptr)
{
char *buffer;
char const *request_name;
ss_page_stdin();
default:
(void) close(fd); /* what can we do if it fails? */
- while (wait(0) != child) {
+ while (wait(NULL) != child) {
/* do nothing if wrong pid */
};
}
#include <dirent.h>
#endif
-void ss_add_info_dir(sci_idx, info_dir, code_ptr)
- int sci_idx;
- char *info_dir;
- int *code_ptr;
+void ss_add_info_dir(int sci_idx, char *info_dir, int *code_ptr)
{
register ss_data *info;
DIR *d;
*code_ptr = 0;
}
-void ss_delete_info_dir(sci_idx, info_dir, code_ptr)
- int sci_idx;
- char *info_dir;
- int *code_ptr;
+void ss_delete_info_dir(int sci_idx, char *info_dir, int *code_ptr)
{
register char **i_d;
register char **info_dirs;
#endif
#include <errno.h>
-int ss_create_invocation(subsystem_name, version_string, info_ptr,
- request_table_ptr, code_ptr)
- const char *subsystem_name, *version_string;
- void *info_ptr;
- ss_request_table *request_table_ptr;
- int *code_ptr;
+int ss_create_invocation(const char *subsystem_name, const char *version_string,
+ void *info_ptr, ss_request_table *request_table_ptr,
+ int *code_ptr)
{
register int sci_idx;
register ss_data *new_table;
}
void
-ss_delete_invocation(sci_idx)
- int sci_idx;
+ss_delete_invocation(int sci_idx)
{
register ss_data *t;
int ignored_code;
#endif
static char MORE[] = "more";
-extern char *_ss_pager_name;
extern char *getenv PROTOTYPE((const char *));
char *ss_safe_getenv(const char *arg)
return c;
}
-void ss_page_stdin()
+void ss_page_stdin(void)
{
int i;
sigset_t mask;
#define NEW_ARGV(old,n) (char **)realloc((char *)old,\
(unsigned)(n+2)*sizeof(char*))
-char **ss_parse (sci_idx, line_ptr, argc_ptr)
- int sci_idx;
- register char *line_ptr;
- int *argc_ptr;
+char **ss_parse(int sci_idx, register char *line_ptr, int *argc_ptr)
{
register char **argv, *cp;
register int argc;
#define ssrt ss_request_table /* for some readable code... */
-void ss_add_request_table(sci_idx, rqtbl_ptr, position, code_ptr)
- int sci_idx;
- ssrt *rqtbl_ptr;
- int position; /* 1 -> becomes second... */
- int *code_ptr;
+void ss_add_request_table(int sci_idx, ssrt *rqtbl_ptr, int position, int *code_ptr)
{
register ss_data *info;
register int i, size;
*code_ptr = 0;
}
-void ss_delete_request_table(sci_idx, rqtbl_ptr, code_ptr)
- int sci_idx;
- ssrt *rqtbl_ptr;
- int *code_ptr;
+void ss_delete_request_table(int sci_idx, ssrt *rqtbl_ptr, int *code_ptr)
{
register ss_data *info;
register ssrt **rt1, **rt2;
extern ss_data **_ss_table;
extern char *ss_et_msgs[];
+extern char *_ss_pager_name;
#ifdef USE_SIGPROCMASK
/* fake sigmask, sigblock, sigsetmask */
#define _GNU_SOURCE /* for O_DIRECT */
#endif
-#ifndef O_LARGEFILE
-#define O_LARGEFILE 0
-#endif
-
#include "config.h"
#include <errno.h>
#include <fcntl.h>
#include "ext2fs/ext2fs.h"
#include "nls-enable.h"
-const char * program_name = "badblocks";
-const char * done_string = N_("done \n");
+#ifndef O_LARGEFILE
+#define O_LARGEFILE 0
+#endif
+
+static const char * program_name = "badblocks";
+static const char * done_string = N_("done \n");
static int v_flag; /* verbose */
static int w_flag; /* do r/w test: 0=no, 1=yes,
#define T_INC 32
-unsigned int sys_page_size = 4096;
+static unsigned int sys_page_size = 4096;
static void usage(void)
{
#define in_use(m, x) (ext2fs_test_bit ((x), (m)))
-const char * program_name = "dumpe2fs";
-char * device_name = NULL;
-int hex_format = 0;
-int blocks64 = 0;
+static const char * program_name = "dumpe2fs";
+static char * device_name = NULL;
+static int hex_format = 0;
+static int blocks64 = 0;
static void usage(void)
{
#define QCOW_OFLAG_COPIED (1LL << 63)
-const char * program_name = "e2image";
-char * device_name = NULL;
-char all_data;
-char output_is_blk;
+static const char * program_name = "e2image";
+static char * device_name = NULL;
+static char all_data;
+static char output_is_blk;
/* writing to blk device: don't skip zeroed blocks */
static void lseek_error_and_exit(int errnum)
/*
* These set of functions are used to write a RAW image file.
*/
-ext2fs_block_bitmap meta_block_map;
-ext2fs_block_bitmap scramble_block_map; /* Directory blocks to be scrambled */
-blk64_t meta_blocks_count;
+static ext2fs_block_bitmap meta_block_map;
+static ext2fs_block_bitmap scramble_block_map; /* Directory blocks to be scrambled */
+static blk64_t meta_blocks_count;
struct process_block_struct {
ext2_ino_t ino;
generic_write(fd, buf, blocksize, block);
}
-int name_id[256];
+static int name_id[256];
#define EXT4_MAX_REC_LEN ((1<<16)-1)
#include "../version.h"
#include "nls-enable.h"
-const char * program_name = "e2initrd_helper";
-char * device_name;
+static const char * program_name = "e2initrd_helper";
+static char * device_name;
static int open_flag;
static int root_type;
static blkid_cache cache = NULL;
#include "ext2fs/ext2fs.h"
#include "nls-enable.h"
-unsigned char mtime_key[] = "filesystem MTIME";
-unsigned char uuid_key[] = "filesystem UUID";
-unsigned char blksize_key[] = "filesystem BLKSIZE";
+static unsigned char mtime_key[] = "filesystem MTIME";
+static unsigned char uuid_key[] = "filesystem UUID";
+static unsigned char blksize_key[] = "filesystem BLKSIZE";
-char *prg_name;
+static char *prg_name;
static void usage(void)
{
char msg_buffer[PATH_MAX + 1]; /* pathname of the file */
};
-char lost_found_dir[PATH_MAX + 1];
-int block_size;
-int extents_before_defrag;
-int extents_after_defrag;
-int mode_flag;
-unsigned int current_uid;
-unsigned int defraged_file_count;
-unsigned int frag_files_before_defrag;
-unsigned int frag_files_after_defrag;
-unsigned int regular_count;
-unsigned int succeed_cnt;
-unsigned int total_count;
-__u8 log_groups_per_flex;
-__u32 blocks_per_group;
-__u32 feature_incompat;
-ext4_fsblk_t files_block_count;
-struct frag_statistic_ino frag_rank[SHOW_FRAG_FILES];
+static char lost_found_dir[PATH_MAX + 1];
+static int block_size;
+static int extents_before_defrag;
+static int extents_after_defrag;
+static int mode_flag;
+static unsigned int current_uid;
+static unsigned int defraged_file_count;
+static unsigned int frag_files_before_defrag;
+static unsigned int frag_files_after_defrag;
+static unsigned int regular_count;
+static unsigned int succeed_cnt;
+static unsigned int total_count;
+static __u8 log_groups_per_flex;
+static __u32 blocks_per_group;
+static __u32 feature_incompat;
+static ext4_fsblk_t files_block_count;
+static struct frag_statistic_ino frag_rank[SHOW_FRAG_FILES];
/* Local definitions of some syscalls glibc may not yet have */
}
switch (arg_type) {
+ int mount_dir_len = 0;
+
case DIRNAME:
if (!(mode_flag & STATISTIC))
printf("ext4 defragmentation "
"for directory(%s)\n", argv[i]);
- int mount_dir_len = 0;
mount_dir_len = strnlen(lost_found_dir, PATH_MAX);
strncat(lost_found_dir, "/lost+found",
/*
* Global variables for options
*/
-char *devices[MAX_DEVICES];
-char *args[MAX_ARGS];
-int num_devices, num_args;
-
-int verbose = 0;
-int doall = 0;
-int noexecute = 0;
-int serialize = 0;
-int skip_root = 0;
-int ignore_mounted = 0;
-int notitle = 0;
-int parallel_root = 0;
-int progress = 0;
-int progress_fd = 0;
-int force_all_parallel = 0;
-int num_running = 0;
-int max_running = 0;
-volatile int cancel_requested = 0;
-int kill_sent = 0;
-char *progname;
-char *fstype = NULL;
-struct fs_info *filesys_info = NULL, *filesys_last = NULL;
-struct fsck_instance *instance_list;
-const char *fsck_prefix_path = "/sbin:/sbin/fs.d:/sbin/fs:/etc/fs:/etc";
-char *fsck_path = 0;
-blkid_cache cache = NULL;
+static char *devices[MAX_DEVICES];
+static char *args[MAX_ARGS];
+static int num_devices, num_args;
+
+static int verbose = 0;
+static int doall = 0;
+static int noexecute = 0;
+static int serialize = 0;
+static int skip_root = 0;
+static int ignore_mounted = 0;
+static int notitle = 0;
+static int parallel_root = 0;
+static int progress = 0;
+static int progress_fd = 0;
+static int force_all_parallel = 0;
+static int num_running = 0;
+static int max_running = 0;
+static volatile int cancel_requested = 0;
+static int kill_sent = 0;
+static char *progname;
+static char *fstype = NULL;
+static struct fs_info *filesys_info = NULL, *filesys_last = NULL;
+static struct fsck_instance *instance_list;
+static const char *fsck_prefix_path = "/sbin:/sbin/fs.d:/sbin/fs:/etc/fs:/etc";
+static char *fsck_path = 0;
+static blkid_cache cache = NULL;
static char *string_copy(const char *s)
{
/*
* Deal with the fsck -t argument.
*/
-struct fs_type_compile {
+static struct fs_type_compile {
char **list;
int *type;
int negate;
extern int optind;
#endif
-int outfd = -1;
-int outbufsize = 0;
-void *outbuf = 0;
-int verbose = 0;
-int do_skip = 0;
-int skip_mode = 0;
-pid_t child_pid = -1;
+static int outfd = -1;
+static int outbufsize = 0;
+static void *outbuf = 0;
+static int verbose = 0;
+static int do_skip = 0;
+static int skip_mode = 0;
+static pid_t child_pid = -1;
static void usage(char *progname)
{
extern int isatty(int);
extern FILE *fpopen(const char *cmd, const char *mode);
-const char * program_name = "mke2fs";
-const char * device_name /* = NULL */;
+static const char * program_name = "mke2fs";
+static const char * device_name /* = NULL */;
/* Command line options */
-int cflag;
-int verbose;
-int quiet;
-int super_only;
-int discard = 1; /* attempt to discard device before fs creation */
-int direct_io;
-int force;
-int noaction;
-uid_t root_uid;
-gid_t root_gid;
+static int cflag;
+static int verbose;
+static int quiet;
+static int super_only;
+static int discard = 1; /* attempt to discard device before fs creation */
+static int direct_io;
+static int force;
+static int noaction;
+static uid_t root_uid;
+static gid_t root_gid;
int journal_size;
int journal_flags;
-int lazy_itable_init;
-char *bad_blocks_filename = NULL;
-__u32 fs_stride;
-int quotatype = -1; /* Initialize both user and group quotas by default */
-
-struct ext2_super_block fs_param;
-char *fs_uuid = NULL;
-char *creator_os;
-char *volume_label;
-char *mount_dir;
+static int lazy_itable_init;
+static char *bad_blocks_filename = NULL;
+static __u32 fs_stride;
+static int quotatype = -1; /* Initialize both user and group quotas by default */
+
+static struct ext2_super_block fs_param;
+static char *fs_uuid = NULL;
+static char *creator_os;
+static char *volume_label;
+static char *mount_dir;
char *journal_device;
-int sync_kludge; /* Set using the MKE2FS_SYNC env. option */
-char **fs_types;
+static int sync_kludge; /* Set using the MKE2FS_SYNC env. option */
+static char **fs_types;
-profile_t profile;
+static profile_t profile;
-int sys_page_size = 4096;
-int linux_version_code = 0;
+static int sys_page_size = 4096;
+static int linux_version_code = 0;
static void usage(void)
{
#include "../version.h"
-char *program_name, *device_name, *io_options;
+char *program_name;
+static char *device_name, *io_options;
static void usage (char *prog)
{
#define GE_CLSTR(x, y) (B2C(x) >= B2C(y))
#define GT_CLSTR(x, y) (B2C(x) > B2C(y))
-int lazy_itable_init;
+static int lazy_itable_init;
/*
* This is the top-level routine which does the dirty deed....
* take special care when mapping a source block number to its
* destination block number.
*/
-__u64 extent_translate(ext2_filsys fs, ext2_extent extent, __u64 old_loc)
+static __u64 extent_translate(ext2_filsys fs, ext2_extent extent, __u64 old_loc)
{
__u64 new_block = C2B(ext2fs_extent_translate(extent, B2C(old_loc)));
extern errcode_t ext2fs_iterate_extent(ext2_extent extent, __u64 *old_loc,
__u64 *new_loc, __u64 *size);
+/* main.c */
+extern char *program_name;
+
/* online.c */
extern errcode_t online_resize_fs(ext2_filsys fs, const char *mtpt,
blk64_t *new_size, int flags);
struct subst_entry *next;
};
-struct subst_entry *subst_table = 0;
+static struct subst_entry *subst_table = 0;
static int add_subst(char *name, char *value)
{