From 9c311a1ba865843e9a4055d8734ce75c003b28fe Mon Sep 17 00:00:00 2001 From: Renaud Fivet Date: Mon, 20 May 2013 13:16:08 +0800 Subject: [PATCH] split efunc into corresponding headers. --- Makefile | 34 +++++---- bind.c | 3 + bind.h | 25 ++++++ buffer.c | 3 + buffer.h | 22 ++++++ efunc.h | 225 +++++------------------------------------------------- eval.c | 2 + eval.h | 26 +++++++ exec.c | 3 + exec.h | 62 +++++++++++++++ isearch.c | 2 + isearch.h | 11 +++ lock.c | 2 + lock.h | 6 ++ pklock.c | 2 + pklock.h | 3 + posix.c | 3 + posix.h | 11 +++ random.c | 3 + random.h | 39 ++++++++++ region.c | 3 + region.h | 12 +++ search.c | 3 + search.h | 23 ++++++ spawn.c | 3 + spawn.h | 11 +++ word.c | 3 + word.h | 18 +++++ 28 files changed, 340 insertions(+), 223 deletions(-) create mode 100644 bind.h create mode 100644 buffer.h create mode 100644 eval.h create mode 100644 exec.h create mode 100644 isearch.h create mode 100644 lock.h create mode 100644 pklock.h create mode 100644 posix.h create mode 100644 random.h create mode 100644 region.h create mode 100644 search.h create mode 100644 spawn.h create mode 100644 word.h diff --git a/Makefile b/Makefile index 8fe91f0..96bd554 100644 --- a/Makefile +++ b/Makefile @@ -28,8 +28,10 @@ OBJ=basic.o bind.o buffer.o crypt.o display.o eval.o exec.o \ termio.o window.o word.o names.o globals.o \ wrapper.o utf8.o -HDR=basic.h crypt.h display.h ebind.h edef.h efunc.h estruct.h file.h fileio.h \ - input.h line.h main.h version.h window.h wrapper.h +HDR=basic.h bind.h buffer.h crypt.h display.h ebind.h edef.h efunc.h \ + estruct.h eval.h exec.h file.h fileio.h input.h isearch.h line.h \ + lock.h main.h pklock.h posix.h random.h region.h search.h spawn.h \ + utf8.h version.h window.h word.h wrapper.h # DO NOT ADD OR MODIFY ANY LINES ABOVE THIS -- make source creates them @@ -133,34 +135,34 @@ depend: ${SRC} ansi.o: ansi.c estruct.h edef.h basic.o: basic.c basic.h estruct.h edef.h -bind.o: bind.c estruct.h edef.h fileio.h -buffer.o: buffer.c estruct.h edef.h +bind.o: bind.c bind.h estruct.h edef.h fileio.h +buffer.o: buffer.c buffer.h estruct.h edef.h crypt.o: crypt.c crypt.h display.h estruct.h edef.h input.h display.o: display.c display.h estruct.h edef.h utf8.h version.h window.h -eval.o: eval.c estruct.h edef.h version.h fileio.h -exec.o: exec.c estruct.h edef.h +eval.o: eval.c eval.h estruct.h edef.h version.h fileio.h +exec.o: exec.c exec.h estruct.h edef.h file.o: file.c file.h crypt.h estruct.h edef.h fileio.h fileio.o: fileio.c fileio.h crypt.h display.h estruct.h edef.h ibmpc.o: ibmpc.c estruct.h edef.h input.o: input.c input.h estruct.h edef.h -isearch.o: isearch.c estruct.h edef.h -line.o: line.c estruct.h edef.h -lock.o: lock.c estruct.h edef.h +isearch.o: isearch.c isearch.h estruct.h edef.h +line.o: line.c line.h estruct.h edef.h +lock.o: lock.c lock.h estruct.h edef.h main.o: main.c main.h estruct.h crypt.h efunc.h edef.h ebind.h version.h names.o: names.c estruct.h crypt.h edef.h efunc.h line.h -pklock.o: pklock.c estruct.h -posix.o: posix.c estruct.h utf8.h -random.o: random.c estruct.h edef.h -region.o: region.c estruct.h edef.h -search.o: search.c estruct.h edef.h -spawn.o: spawn.c estruct.h edef.h +pklock.o: pklock.c pklock.h estruct.h +posix.o: posix.c posix.h estruct.h utf8.h +random.o: random.c random.h estruct.h edef.h +region.o: region.c region.h estruct.h edef.h +search.o: search.c search.h estruct.h edef.h +spawn.o: spawn.c spawn.h estruct.h edef.h tcap.o: tcap.c estruct.h edef.h termio.o: termio.c estruct.h edef.h utf8.o: utf8.c utf8.h vmsvt.o: vmsvt.c estruct.h edef.h vt52.o: vt52.c estruct.h edef.h window.o: window.c window.h estruct.h edef.h basic.h display.h main.h line.h wrapper.h -word.o: word.c estruct.h edef.h +word.o: word.c word.h estruct.h edef.h wrapper.o: wrapper.c wrapper.h # DEPENDENCIES MUST END AT END OF FILE diff --git a/bind.c b/bind.c index 26b7ce6..6b59eb3 100644 --- a/bind.c +++ b/bind.c @@ -1,3 +1,6 @@ +/* bind.c -- implements bind.h */ +#include "bind.h" + /* bind.c * * This file is for functions having to do with key bindings, diff --git a/bind.h b/bind.h new file mode 100644 index 0000000..ae7de26 --- /dev/null +++ b/bind.h @@ -0,0 +1,25 @@ +#ifndef _BIND_H_ +#define _BIND_H_ + +#include "edef.h" + +int help( int f, int n) ; +int deskey( int f, int n) ; +int bindtokey( int f, int n) ; +int unbindkey( int f, int n) ; +int unbindchar( int c) ; +int desbind( int f, int n) ; +int apro( int f, int n) ; +int buildlist( int type, char *mstring) ; +int strinc( char *source, char *sub) ; +unsigned int getckey( int mflag) ; +int startup( char *sfname) ; +char *flook( const char *fname, int hflag) ; +void cmdstr( int c, char *seq) ; +fn_t getbind( int c) ; +char *getfname( fn_t) ; +fn_t fncmatch( char *) ; +unsigned int stock( char *keyname) ; +char *transbind( char *skey) ; + +#endif diff --git a/buffer.c b/buffer.c index 9aaf530..a66587b 100644 --- a/buffer.c +++ b/buffer.c @@ -1,3 +1,6 @@ +/* buffer.c -- implements buffer.h */ +#include "buffer.h" + /* buffer.c * * Buffer management. diff --git a/buffer.h b/buffer.h new file mode 100644 index 0000000..3768346 --- /dev/null +++ b/buffer.h @@ -0,0 +1,22 @@ +#ifndef _BUFFER_H_ +#define _BUFFER_H_ + +#include "estruct.h" + +int usebuffer( int f, int n) ; +int nextbuffer( int f, int n) ; +int swbuffer( struct buffer *bp) ; +int killbuffer( int f, int n) ; +int zotbuf( struct buffer *bp) ; +int namebuffer( int f, int n) ; +int listbuffers( int f, int n) ; +int makelist( int iflag) ; +void ltoa( char *buf, int width, long num) ; +int addline( char *text) ; +int anycb( void) ; +int bclear( struct buffer *bp) ; +int unmark( int f, int n) ; +/* Lookup a buffer by name. */ +struct buffer *bfind( char *bname, int cflag, int bflag) ; + +#endif diff --git a/efunc.h b/efunc.h index 7a68499..55e09c0 100644 --- a/efunc.h +++ b/efunc.h @@ -1,3 +1,6 @@ +#ifndef _EFUNC_H_ +#define _EFUNC_H_ + /* efunc.h * * Function declarations and names. @@ -12,19 +15,7 @@ /* External function declarations. */ /* word.c */ -extern int wrapword(int f, int n); -extern int backword(int f, int n); -extern int forwword(int f, int n); -extern int upperword(int f, int n); -extern int lowerword(int f, int n); -extern int capword(int f, int n); -extern int delfword(int f, int n); -extern int delbword(int f, int n); -extern int inword(void); -extern int fillpara(int f, int n); -extern int justpara(int f, int n); -extern int killpara(int f, int n); -extern int wordcount(int f, int n); +#include "word.h" /* window.c */ #include "window.h" @@ -33,39 +24,7 @@ extern int wordcount(int f, int n); #include "basic.h" /* random.c */ -extern int tabsize; /* Tab size (0: use real tabs). */ -extern int setfillcol(int f, int n); -extern int showcpos(int f, int n); -extern int getcline(void); -extern int getccol(int bflg); -extern int setccol(int pos); -extern int twiddle(int f, int n); -extern int quote(int f, int n); -extern int insert_tab(int f, int n); -extern int detab(int f, int n); -extern int entab(int f, int n); -extern int trim(int f, int n); -extern int openline(int f, int n); -extern int insert_newline(int f, int n); -extern int cinsert(void); -extern int insbrace(int n, int c); -extern int inspound(void); -extern int deblank(int f, int n); -extern int indent(int f, int n); -extern int forwdel(int f, int n); -extern int backdel(int f, int n); -extern int killtext(int f, int n); -extern int setemode(int f, int n); -extern int delmode(int f, int n); -extern int setgmode(int f, int n); -extern int delgmode(int f, int n); -extern int adjustmode(int kind, int global); -extern int clrmes(int f, int n); -extern int writemsg(int f, int n); -extern int getfence(int f, int n); -extern int fmatch(int ch); -extern int istring(int f, int n); -extern int ovstring(int f, int n); +#include "random.h" /* main.c */ #include "main.h" @@ -74,190 +33,42 @@ extern int ovstring(int f, int n); #include "display.h" /* region.c */ -extern int killregion(int f, int n); -extern int copyregion(int f, int n); -extern int lowerregion(int f, int n); -extern int upperregion(int f, int n); -extern int getregion(struct region *rp); +#include "region.h" /* posix.c */ -extern void ttopen(void); -extern void ttclose(void); -extern int ttputc(int c); -extern void ttflush(void); -extern int ttgetc(void); -extern int typahead(void); +#include "posix.h" /* input.c */ #include "input.h" /* bind.c */ -extern int help(int f, int n); -extern int deskey(int f, int n); -extern int bindtokey(int f, int n); -extern int unbindkey(int f, int n); -extern int unbindchar(int c); -extern int desbind(int f, int n); -extern int apro(int f, int n); -extern int buildlist(int type, char *mstring); -extern int strinc(char *source, char *sub); -extern unsigned int getckey(int mflag); -extern int startup(char *sfname); -char *flook( const char *fname, int hflag) ; -extern void cmdstr(int c, char *seq); -extern fn_t getbind(int c); -extern char *getfname(fn_t); -extern fn_t fncmatch(char *); -extern unsigned int stock(char *keyname); -extern char *transbind(char *skey); +#include "bind.h" /* buffer.c */ -extern int usebuffer(int f, int n); -extern int nextbuffer(int f, int n); -extern int swbuffer(struct buffer *bp); -extern int killbuffer(int f, int n); -extern int zotbuf(struct buffer *bp); -extern int namebuffer(int f, int n); -extern int listbuffers(int f, int n); -extern int makelist(int iflag); -extern void ltoa(char *buf, int width, long num); -extern int addline(char *text); -extern int anycb(void); -extern int bclear(struct buffer *bp); -extern int unmark(int f, int n); -/* Lookup a buffer by name. */ -extern struct buffer *bfind(char *bname, int cflag, int bflag); +#include "buffer.h" /* file.c */ #include "file.h" /* exec.c */ -extern int namedcmd(int f, int n); -extern int execcmd(int f, int n); -extern int docmd(char *cline); -extern char *token(char *src, char *tok, int size); -extern int macarg(char *tok); -extern int nextarg(char *prompt, char *buffer, int size, int terminator); -extern int storemac(int f, int n); -extern int storeproc(int f, int n); -extern int execproc(int f, int n); -extern int execbuf(int f, int n); -extern int dobuf(struct buffer *bp); -extern void freewhile(struct while_block *wp); -extern int execfile(int f, int n); -extern int dofile(char *fname); -extern int cbuf(int f, int n, int bufnum); -extern int cbuf1(int f, int n); -extern int cbuf2(int f, int n); -extern int cbuf3(int f, int n); -extern int cbuf4(int f, int n); -extern int cbuf5(int f, int n); -extern int cbuf6(int f, int n); -extern int cbuf7(int f, int n); -extern int cbuf8(int f, int n); -extern int cbuf9(int f, int n); -extern int cbuf10(int f, int n); -extern int cbuf11(int f, int n); -extern int cbuf12(int f, int n); -extern int cbuf13(int f, int n); -extern int cbuf14(int f, int n); -extern int cbuf15(int f, int n); -extern int cbuf16(int f, int n); -extern int cbuf17(int f, int n); -extern int cbuf18(int f, int n); -extern int cbuf19(int f, int n); -extern int cbuf20(int f, int n); -extern int cbuf21(int f, int n); -extern int cbuf22(int f, int n); -extern int cbuf23(int f, int n); -extern int cbuf24(int f, int n); -extern int cbuf25(int f, int n); -extern int cbuf26(int f, int n); -extern int cbuf27(int f, int n); -extern int cbuf28(int f, int n); -extern int cbuf29(int f, int n); -extern int cbuf30(int f, int n); -extern int cbuf31(int f, int n); -extern int cbuf32(int f, int n); -extern int cbuf33(int f, int n); -extern int cbuf34(int f, int n); -extern int cbuf35(int f, int n); -extern int cbuf36(int f, int n); -extern int cbuf37(int f, int n); -extern int cbuf38(int f, int n); -extern int cbuf39(int f, int n); -extern int cbuf40(int f, int n); +#include "exec.h" /* spawn.c */ -extern int spawncli(int f, int n); -extern int bktoshell(int f, int n); -extern void rtfrmshell(void); -extern int spawn(int f, int n); -extern int execprg(int f, int n); -extern int pipecmd(int f, int n); -extern int filter_buffer(int f, int n); -extern int sys(char *cmd); -extern int shellprog(char *cmd); -extern int execprog(char *cmd); +#include "spawn.h" /* search.c */ -extern int forwsearch(int f, int n); -extern int forwhunt(int f, int n); -extern int backsearch(int f, int n); -extern int backhunt(int f, int n); -extern int mcscanner(struct magic *mcpatrn, int direct, int beg_or_end); -extern int scanner(const char *patrn, int direct, int beg_or_end); -extern int eq(unsigned char bc, unsigned char pc); -extern void savematch(void); -extern void rvstrcpy(char *rvstr, char *str); -extern int sreplace(int f, int n); -extern int qreplace(int f, int n); -extern int delins(int dlength, char *instr, int use_meta); -extern int expandp(char *srcstr, char *deststr, int maxlength); -extern int boundry(struct line *curline, int curoff, int dir); -extern void mcclear(void); -extern void rmcclear(void); +#include "search.h" /* isearch.c */ -extern int risearch(int f, int n); -extern int fisearch(int f, int n); -extern int isearch(int f, int n); -extern int checknext(char chr, char *patrn, int dir); -extern int scanmore(char *patrn, int dir); -extern int match_pat(char *patrn); -extern int promptpattern(char *prompt); -extern int get_char(void); -extern int uneat(void); -extern void reeat(int c); +#include "isearch.h" /* eval.c */ -extern void varinit(void); -extern char *gtfun(char *fname); -extern char *gtusr(char *vname); -extern char *gtenv(char *vname); -extern char *getkill(void); -extern int setvar(int f, int n); -extern void findvar(char *var, struct variable_description *vd, int size); -extern int svar(struct variable_description *var, char *value); -extern char *itoa(int i); -extern int gettyp(char *token); -extern char *getval(char *token); -extern int stol(char *val); -extern char *ltos(int val); -extern char *mkupper(char *str); -extern char *mklower(char *str); -extern int abs(int x); -extern int ernd(void); -extern int sindex(char *source, char *pattern); -extern char *xlat(char *source, char *lookup, char *trans); +#include "eval.h" /* lock.c */ -extern int lockchk(char *fname); -extern int lockrel(void); -extern int lock(char *fname); -extern int unlock(char *fname); -extern void lckerror(char *errstr); +#include "lock.h" /* pklock.c */ -extern char *dolock(char *fname); -extern char *undolock(char *fname); +#include "pklock.h" + +#endif diff --git a/eval.c b/eval.c index 41a94c3..2e39c28 100644 --- a/eval.c +++ b/eval.c @@ -1,3 +1,5 @@ +#include "eval.h" + /* eval.c * * Expression evaluation functions diff --git a/eval.h b/eval.h new file mode 100644 index 0000000..cc44b37 --- /dev/null +++ b/eval.h @@ -0,0 +1,26 @@ +#ifndef _EVAL_H_ +#define _EVAL_H_ + +#include "estruct.h" + +void varinit( void) ; +char *gtfun( char *fname) ; +char *gtusr( char *vname) ; +char *gtenv( char *vname) ; +char *getkill( void) ; +int setvar( int f, int n) ; +void findvar( char *var, struct variable_description *vd, int size) ; +int svar( struct variable_description *var, char *value) ; +char *itoa( int i) ; +int gettyp( char *token) ; +char *getval( char *token) ; +int stol( char *val) ; +char *ltos( int val) ; +char *mkupper( char *str) ; +char *mklower( char *str) ; +int abs( int x) ; +int ernd( void) ; +int sindex( char *source, char *pattern) ; +char *xlat( char *source, char *lookup, char *trans) ; + +#endif diff --git a/exec.c b/exec.c index 2937966..6ac8919 100644 --- a/exec.c +++ b/exec.c @@ -1,3 +1,6 @@ +/* exec.c -- implements exec.h */ +#include "exec.h" + /* exec.c * * This file is for functions dealing with execution of diff --git a/exec.h b/exec.h new file mode 100644 index 0000000..e0b8082 --- /dev/null +++ b/exec.h @@ -0,0 +1,62 @@ +#ifndef _EXEC_H_ +#define _EXEC_H_ + +#include "estruct.h" + +int namedcmd( int f, int n) ; +int execcmd( int f, int n) ; +int docmd( char *cline) ; +char *token( char *src, char *tok, int size) ; +int macarg( char *tok) ; +int nextarg( char *prompt, char *buffer, int size, int terminator) ; +int storemac( int f, int n) ; +int storeproc( int f, int n) ; +int execproc( int f, int n) ; +int execbuf( int f, int n) ; +int dobuf( struct buffer *bp) ; +void freewhile( struct while_block *wp) ; +int execfile( int f, int n) ; +int dofile( char *fname) ; +int cbuf( int f, int n, int bufnum) ; +int cbuf1( int f, int n) ; +int cbuf2( int f, int n) ; +int cbuf3( int f, int n) ; +int cbuf4( int f, int n) ; +int cbuf5( int f, int n) ; +int cbuf6( int f, int n) ; +int cbuf7( int f, int n) ; +int cbuf8( int f, int n) ; +int cbuf9( int f, int n) ; +int cbuf10( int f, int n) ; +int cbuf11( int f, int n) ; +int cbuf12( int f, int n) ; +int cbuf13( int f, int n) ; +int cbuf14( int f, int n) ; +int cbuf15( int f, int n) ; +int cbuf16( int f, int n) ; +int cbuf17( int f, int n) ; +int cbuf18( int f, int n) ; +int cbuf19( int f, int n) ; +int cbuf20( int f, int n) ; +int cbuf21( int f, int n) ; +int cbuf22( int f, int n) ; +int cbuf23( int f, int n) ; +int cbuf24( int f, int n) ; +int cbuf25( int f, int n) ; +int cbuf26( int f, int n) ; +int cbuf27( int f, int n) ; +int cbuf28( int f, int n) ; +int cbuf29( int f, int n) ; +int cbuf30( int f, int n) ; +int cbuf31( int f, int n) ; +int cbuf32( int f, int n) ; +int cbuf33( int f, int n) ; +int cbuf34( int f, int n) ; +int cbuf35( int f, int n) ; +int cbuf36( int f, int n) ; +int cbuf37( int f, int n) ; +int cbuf38( int f, int n) ; +int cbuf39( int f, int n) ; +int cbuf40( int f, int n) ; + +#endif diff --git a/isearch.c b/isearch.c index dcc408b..0fbe9e6 100644 --- a/isearch.c +++ b/isearch.c @@ -1,3 +1,5 @@ +#include "isearch.h" + /* isearch.c * * The functions in this file implement commands that perform incremental diff --git a/isearch.h b/isearch.h new file mode 100644 index 0000000..86e0b13 --- /dev/null +++ b/isearch.h @@ -0,0 +1,11 @@ +int risearch( int f, int n) ; +int fisearch( int f, int n) ; +int isearch( int f, int n) ; +int checknext( char chr, char *patrn, int dir) ; +int scanmore( char *patrn, int dir) ; +int match_pat( char *patrn) ; +int promptpattern( char *prompt) ; +int get_char( void) ; +int uneat( void) ; +void reeat( int c) ; + diff --git a/lock.c b/lock.c index dce53a7..753f9ef 100644 --- a/lock.c +++ b/lock.c @@ -1,3 +1,5 @@ +#include "lock.h" + /* LOCK.C * * File locking command routines diff --git a/lock.h b/lock.h new file mode 100644 index 0000000..b1f9d75 --- /dev/null +++ b/lock.h @@ -0,0 +1,6 @@ +int lockchk( char *fname) ; +int lockrel( void) ; +int lock( char *fname) ; +int unlock( char *fname) ; +void lckerror( char *errstr) ; + diff --git a/pklock.c b/pklock.c index dc30b76..51cdd28 100644 --- a/pklock.c +++ b/pklock.c @@ -1,3 +1,5 @@ +#include "pklock.h" + /* PKLOCK.C * * locking routines as modified by Petri Kutvonen diff --git a/pklock.h b/pklock.h new file mode 100644 index 0000000..fd91c1c --- /dev/null +++ b/pklock.h @@ -0,0 +1,3 @@ +char *dolock( char *fname) ; +char *undolock( char *fname) ; + diff --git a/posix.c b/posix.c index 0a723b8..8412333 100644 --- a/posix.c +++ b/posix.c @@ -1,3 +1,6 @@ +/* posix.c -- implements posix.h */ +#include "posix.h" + /* posix.c * * The functions in this file negotiate with the operating system for diff --git a/posix.h b/posix.h new file mode 100644 index 0000000..fd4c891 --- /dev/null +++ b/posix.h @@ -0,0 +1,11 @@ +#ifndef _POSIX_H_ +#define _POSIX_H_ + +void ttopen( void) ; +void ttclose( void) ; +int ttputc( int c) ; +void ttflush( void) ; +int ttgetc( void) ; +int typahead( void) ; + +#endif diff --git a/random.c b/random.c index 455661d..5a2321e 100644 --- a/random.c +++ b/random.c @@ -1,3 +1,6 @@ +/* random.c -- implements random.h */ +#include "random.h" + /* random.c * * This file contains the command processing functions for a number of diff --git a/random.h b/random.h new file mode 100644 index 0000000..db30655 --- /dev/null +++ b/random.h @@ -0,0 +1,39 @@ +#ifndef _RANDOM_H_ +#define _RANDOM_H_ + +extern int tabsize ; /* Tab size (0: use real tabs). */ + +int setfillcol( int f, int n) ; +int showcpos( int f, int n) ; +int getcline( void) ; +int getccol( int bflg) ; +int setccol( int pos) ; +int twiddle( int f, int n) ; +int quote( int f, int n) ; +int insert_tab( int f, int n) ; +int detab( int f, int n) ; +int entab( int f, int n) ; +int trim( int f, int n) ; +int openline( int f, int n) ; +int insert_newline( int f, int n) ; +int cinsert( void) ; +int insbrace( int n, int c) ; +int inspound( void) ; +int deblank( int f, int n) ; +int indent( int f, int n) ; +int forwdel( int f, int n) ; +int backdel( int f, int n) ; +int killtext( int f, int n) ; +int setemode( int f, int n) ; +int delmode( int f, int n) ; +int setgmode( int f, int n) ; +int delgmode( int f, int n) ; +int adjustmode( int kind, int global) ; +int clrmes( int f, int n) ; +int writemsg( int f, int n) ; +int getfence( int f, int n) ; +int fmatch( int ch) ; +int istring( int f, int n) ; +int ovstring( int f, int n) ; + +#endif diff --git a/region.c b/region.c index 5190f86..c523ae9 100644 --- a/region.c +++ b/region.c @@ -1,3 +1,6 @@ +/* region.c -- implements region.h */ +#include "region.h" + /* region.c * * The routines in this file deal with the region, that magic space diff --git a/region.h b/region.h new file mode 100644 index 0000000..bd98247 --- /dev/null +++ b/region.h @@ -0,0 +1,12 @@ +#ifndef _REGION_H_ +#define _REGION_H_ + +#include "estruct.h" + +int killregion( int f, int n) ; +int copyregion( int f, int n) ; +int lowerregion( int f, int n) ; +int upperregion( int f, int n) ; +int getregion( struct region *rp) ; + +#endif diff --git a/search.c b/search.c index 6502f9b..91621b3 100644 --- a/search.c +++ b/search.c @@ -1,3 +1,6 @@ +/* search.c -- implements search.h */ +#include "search.h" + /* search.c * * The functions in this file implement commands that search in the forward diff --git a/search.h b/search.h new file mode 100644 index 0000000..040a437 --- /dev/null +++ b/search.h @@ -0,0 +1,23 @@ +#ifndef _SEARCH_H_ +#define _SEARCH_H_ + +#include "estruct.h" + +int forwsearch( int f, int n) ; +int forwhunt( int f, int n) ; +int backsearch( int f, int n) ; +int backhunt( int f, int n) ; +int mcscanner( struct magic *mcpatrn, int direct, int beg_or_end) ; +int scanner( const char *patrn, int direct, int beg_or_end) ; +int eq( unsigned char bc, unsigned char pc) ; +void savematch( void) ; +void rvstrcpy( char *rvstr, char *str) ; +int sreplace( int f, int n) ; +int qreplace( int f, int n) ; +int delins( int dlength, char *instr, int use_meta) ; +int expandp( char *srcstr, char *deststr, int maxlength) ; +int boundry( struct line *curline, int curoff, int dir) ; +void mcclear( void) ; +void rmcclear( void) ; + +#endif diff --git a/spawn.c b/spawn.c index e0d4471..29a9129 100644 --- a/spawn.c +++ b/spawn.c @@ -1,3 +1,6 @@ +/* spawn.c -- implements spawn.h */ +#include "spawn.h" + /* spawn.c * * Various operating system access commands. diff --git a/spawn.h b/spawn.h new file mode 100644 index 0000000..3ce690d --- /dev/null +++ b/spawn.h @@ -0,0 +1,11 @@ +int spawncli( int f, int n) ; +int bktoshell( int f, int n) ; +void rtfrmshell( void) ; +int spawn( int f, int n) ; +int execprg( int f, int n) ; +int pipecmd( int f, int n) ; +int filter_buffer( int f, int n) ; +int sys( char *cmd) ; +int shellprog( char *cmd) ; +int execprog( char *cmd) ; + diff --git a/word.c b/word.c index 83cfe9b..fdd952b 100644 --- a/word.c +++ b/word.c @@ -1,3 +1,6 @@ +/* word.c -- implements word.h */ +#include "word.h" + /* word.c * * The routines in this file implement commands that work word or a diff --git a/word.h b/word.h new file mode 100644 index 0000000..2d0316d --- /dev/null +++ b/word.h @@ -0,0 +1,18 @@ +#ifndef _WORD_H_ +#define _WORD_H_ + +int wrapword( int f, int n) ; +int backword( int f, int n) ; +int forwword( int f, int n) ; +int upperword( int f, int n) ; +int lowerword( int f, int n) ; +int capword( int f, int n) ; +int delfword( int f, int n) ; +int delbword( int f, int n) ; +int inword( void) ; +int fillpara( int f, int n) ; +int justpara( int f, int n) ; +int killpara( int f, int n) ; +int wordcount( int f, int n) ; + +#endif