1
0
mirror of https://github.com/rfivet/uemacs.git synced 2024-12-18 07:16:23 -05:00

split efunc into corresponding headers.

This commit is contained in:
Renaud 2013-05-20 13:16:08 +08:00
parent 73c372fc7f
commit 9c311a1ba8
28 changed files with 340 additions and 223 deletions

View File

@ -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

3
bind.c
View File

@ -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,

25
bind.h Normal file
View File

@ -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

View File

@ -1,3 +1,6 @@
/* buffer.c -- implements buffer.h */
#include "buffer.h"
/* buffer.c
*
* Buffer management.

22
buffer.h Normal file
View File

@ -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

225
efunc.h
View File

@ -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

2
eval.c
View File

@ -1,3 +1,5 @@
#include "eval.h"
/* eval.c
*
* Expression evaluation functions

26
eval.h Normal file
View File

@ -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

3
exec.c
View File

@ -1,3 +1,6 @@
/* exec.c -- implements exec.h */
#include "exec.h"
/* exec.c
*
* This file is for functions dealing with execution of

62
exec.h Normal file
View File

@ -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

View File

@ -1,3 +1,5 @@
#include "isearch.h"
/* isearch.c
*
* The functions in this file implement commands that perform incremental

11
isearch.h Normal file
View File

@ -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) ;

2
lock.c
View File

@ -1,3 +1,5 @@
#include "lock.h"
/* LOCK.C
*
* File locking command routines

6
lock.h Normal file
View File

@ -0,0 +1,6 @@
int lockchk( char *fname) ;
int lockrel( void) ;
int lock( char *fname) ;
int unlock( char *fname) ;
void lckerror( char *errstr) ;

View File

@ -1,3 +1,5 @@
#include "pklock.h"
/* PKLOCK.C
*
* locking routines as modified by Petri Kutvonen

3
pklock.h Normal file
View File

@ -0,0 +1,3 @@
char *dolock( char *fname) ;
char *undolock( char *fname) ;

View File

@ -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

11
posix.h Normal file
View File

@ -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

View File

@ -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

39
random.h Normal file
View File

@ -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

View File

@ -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

12
region.h Normal file
View File

@ -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

View File

@ -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

23
search.h Normal file
View File

@ -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

View File

@ -1,3 +1,6 @@
/* spawn.c -- implements spawn.h */
#include "spawn.h"
/* spawn.c
*
* Various operating system access commands.

11
spawn.h Normal file
View File

@ -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) ;

3
word.c
View File

@ -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

18
word.h Normal file
View File

@ -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