/* file: smtlin.c */
extern char smeof[];
extern void pathadd(SMTLin *a, char *nam);
extern void pathapp(SMTLin *a, char *nam);
extern void pathdelM(SMTLin *a);
extern void pathdel(SMTLin *a);
extern void smtlin_decode(SMTLin *a, char **strp);
extern void smtlin_addext(SMTLin *a, char *ext);
extern void smtlin_del(SMTLin *a);
extern char *smtlin_out(SMTLin *a, char *typ, ...);

/* file: chlog.c */
extern FILE *chlog;
extern int chlog_seq;
extern void chlog_open(char *idts);
extern void chlog_close();
extern void wrlog(char *nam, char *path);
extern int path_cmp(unsigned char *p, unsigned char *q);

/* file: main.c */
extern char usage_text[];
extern char node_test_usage[];
extern int o_local;
extern int o_auto;
extern int o_basic;
extern int o_debug;
extern int o_follow;
extern int o_test;
extern int o_backup;
extern int o_verb;
extern char *o_editor;
extern char *base;
extern char *tgz_pathname;
extern List *o_excl;
extern List *o_prune;
extern int timeout;
extern int no_xtreediff;
extern char *command;
extern uid_t my_uid;
extern gid_t my_gid;
extern int main(int ac, char **av);
extern void special_test_mode(int val);
extern void do_node_test(char *node, int ac, char **av);

/* file: md5.c */
extern void md5_init();
extern void md5_update(const void *vp_data, unsigned int len);
extern u8 md5_out[];
extern char md5_outhex[];
extern char md5_out64[];
extern char md5_out62[];
extern void md5_final();
extern void random_id();

/* file: memdebug.c */
extern void(*__malloc_initialize_hook)(void);
extern char *caller_name(const void *caller0);
extern void checkall(char *callnam);
extern void memdebug_check();
extern void memdebug_list();

/* file: mlocal.c */
extern int last_ctrlc_1;
extern int last_ctrlc_2;
extern int abort_now;
extern void ctrlc_handler(int sig);
extern void do_local(char **av, char *rem_opt);
extern void action_list_pre(char **pp, SMSave *sv, int ext);
extern int fetch_xtreediff();
extern int fetch_xtree();
extern int fetch_tree();
extern void call_editor(char *fnam);
extern void clean_and_pack(char *idts);

/* file: mremote.c */
extern void do_remote();

/* file: remcon.c */
extern pid_t rem_pid;
extern void pipe_wrlin(char *fmt, ...);
extern void pipe_wrOK();
extern void pipe_wrmem(char *buf, int len);
extern void pipe_wrfile(char *fnam, int len);
extern char *pipe_rdlin();
extern void pipe_rdmem(char *buf, int len);
extern void pipe_rdfile(char *fnam, int len);
extern void pipe_rdOK(char *cmdnam);
extern void pipe_conn(char **av);
extern void pipe_disconn();
extern void pipe_remote();

/* file: smact.c */
extern SMAct *smact(char **inp, char *base, char *idts);
extern int smact_do(SMAct *tt);
extern void smact_del(SMAct *tt);

/* file: smcomp.c */
extern SMComp *smcomp(char **inp1, char **inp2);
extern int smcomp_do(SMComp *tt);
extern void smcomp_del(SMComp *tt);

/* file: smdiff.c */
extern SMDiff *smdiff(char **inp1, char **inp2);
extern int smdiff_do(SMDiff *tt);
extern void smdiff_del(SMDiff *tt);

/* file: smload.c */
extern SMLoad *smload(char *fnam);
extern SMLoad *smload_sorted(char *fnam);
extern int smload_do(SMLoad *ld);
extern void smload_del(SMLoad *ld);

/* file: smmapch.c */
extern SMMapch *smmapch(char **inp);
extern int smmapch_do(SMMapch *tt);
extern void smmapch_del(SMMapch *tt);

/* file: smmerge.c */
extern SMMerge *smmerge(char **inp1, char **inp2);
extern int smmerge_do(SMMerge *tt);
extern void smmerge_del(SMMerge *tt);

/* file: smpatch.c */
extern SMPatch *smpatch(char **inp1, char **inp2);
extern int smpatch_do(SMPatch *tt);
extern void smpatch_del(SMPatch *tt);

/* file: smsave.c */
extern SMSave *smsave(char *fnam, char **inp);
extern int smsave_do(SMSave *sv);
extern void smsave_del(SMSave *sv);

/* file: smtee.c */
extern SMTee *smtee(char **inp);
extern int smtee_do(SMTee *tt);
extern void smtee_del(SMTee *tt);

/* file: smtree.c */
extern SMTree *smtree(char *base);
extern int smtree_do(SMTree *tr);
extern void smtree_del(SMTree *tr);
extern char *smtree_lookup(char *path, int follow, char *flag);

/* file: smtsave.c */
extern SMTsave *smtsave(char *fnam, char **inp, int xtr2tr);
extern int smtsave_do(SMTsave *sv);
extern void smtsave_del(SMTsave *sv);

/* file: smxcomp.c */
extern SMXcomp *smxcomp(char **inp1, char **inp2);
extern int smxcomp_do(SMXcomp *tt);
extern void smxcomp_del(SMXcomp *tt);

/* file: smxtree.c */
extern SMXtree *smxtree(char **inp1, char **inp2);
extern int smxtree_do(SMXtree *tt);
extern void smxtree_del(SMXtree *tt);

/* file: util.c */
extern int fatal_to_stdout;
extern void error(char *fmt, ...);
extern void verror(char *fmt, va_list ap);
extern void warn(char *fmt, ...);
extern void die(char *fil, int lin);
extern void usage();
extern void *Alloc(int size);
extern void *StrDup(char *str);
extern void *StrDupR(char *str, char *end);
extern char *StrDupF(char *fmt, ...);
extern char *StrDupT(char *str, ...);
extern char *StrF(char *fmt, ...);
extern char *StrT(char *str, ...);
extern char *skipTSV(char *p);
extern char *ends_with(char *p, char *q);
extern int starts_with(char *p, char *q);
extern int str_eq(char *p, char *q);
extern int str_ne(char *p, char *q);
extern int enc_cc(char *p);
extern int enc_ccN(int ch, ...);
extern void decode_mug(char *mug, int *modp, int *uidp, int *gidp);
extern void decode_szt(char *szt, int *sizp, int *mtimp, int *symp);
extern void do_mkdir(char *path, char *mug);
extern void do_chmug(char *path, char *mug);
extern void do_mtime(char *path, int mtime);
extern void do_symlink(char *path, char *val);
extern void do_rm(char *path);
extern void do_backup(char *path);
extern char *expand_symlink(char *path);
extern int glob_match(char *patt, char *str);
extern int time_us();
extern void status(char *fmt, ...);
extern void list_add(List **lp, char *str);
extern void list_push(List **lp, char *str);
extern char *list_rem(List **lp);
extern char *list_pop(List **lp);
extern void list_sort(List **lp);
extern void list_rsort(List **lp);
extern void list_free(List **lp);
extern char *list_string(List **lp, int rev, char *sep);
extern ub4 hash_of_time();
extern ub4 do_hash(register ub1 *k, register ub4 length, register ub4 initval);

/* file: writetgz.c */
extern gzFile *tgz_out;
extern void tgz_open(char *path);
extern void tgz_close();
extern void tgz_append(char *path);
extern void tgz_append_as(char *path, char *nam);

