2013-05-19 05:36:24 -04:00
|
|
|
/* efunc.h
|
2005-05-31 11:50:56 -04:00
|
|
|
*
|
2013-05-19 05:36:24 -04:00
|
|
|
* Function declarations and names.
|
2005-05-31 11:50:56 -04:00
|
|
|
*
|
2013-05-19 05:36:24 -04:00
|
|
|
* This file list all the C code functions used and the names to use
|
|
|
|
* to bind keys to them. To add functions, declare it here in both the
|
2010-08-26 12:20:25 -04:00
|
|
|
* extern function list and the name binding table.
|
2005-05-31 11:50:56 -04:00
|
|
|
*
|
2013-05-19 05:36:24 -04:00
|
|
|
* modified by Petri Kutvonen
|
2005-05-31 11:50:56 -04:00
|
|
|
*/
|
|
|
|
|
2010-08-26 12:20:25 -04:00
|
|
|
/* External function declarations. */
|
2005-05-31 11:50:56 -04:00
|
|
|
|
2005-10-01 01:52:45 -04:00
|
|
|
/* 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);
|
2005-05-31 11:50:56 -04:00
|
|
|
|
2005-10-01 01:52:45 -04:00
|
|
|
/* window.c */
|
2013-05-18 02:43:13 -04:00
|
|
|
#include "window.h"
|
2005-05-31 11:50:56 -04:00
|
|
|
|
2005-10-01 01:52:45 -04:00
|
|
|
/* basic.c */
|
2013-05-18 20:13:48 -04:00
|
|
|
#include "basic.h"
|
2005-05-31 11:50:56 -04:00
|
|
|
|
2005-10-01 01:52:45 -04:00
|
|
|
/* random.c */
|
2010-08-26 12:20:25 -04:00
|
|
|
extern int tabsize; /* Tab size (0: use real tabs). */
|
2005-10-01 01:52:45 -04:00
|
|
|
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);
|
2005-10-01 03:22:55 -04:00
|
|
|
extern int insert_tab(int f, int n);
|
2005-10-01 01:52:45 -04:00
|
|
|
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);
|
2005-10-01 03:22:55 -04:00
|
|
|
extern int insert_newline(int f, int n);
|
2005-10-01 01:52:45 -04:00
|
|
|
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);
|
2010-08-19 17:55:31 -04:00
|
|
|
extern int setemode(int f, int n);
|
2005-10-01 01:52:45 -04:00
|
|
|
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);
|
2005-05-31 11:50:56 -04:00
|
|
|
|
2005-10-01 01:52:45 -04:00
|
|
|
/* main.c */
|
2013-05-18 20:13:48 -04:00
|
|
|
#include "main.h"
|
2005-10-01 01:52:45 -04:00
|
|
|
|
|
|
|
/* display.c */
|
2013-05-18 01:40:11 -04:00
|
|
|
#include "display.h"
|
2005-10-01 01:52:45 -04:00
|
|
|
|
|
|
|
/* 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);
|
2010-07-10 00:46:27 -04:00
|
|
|
extern int getregion(struct region *rp);
|
2005-10-01 01:52:45 -04:00
|
|
|
|
|
|
|
/* 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);
|
|
|
|
|
|
|
|
/* input.c */
|
2013-05-18 02:21:28 -04:00
|
|
|
#include "input.h"
|
2005-10-01 01:52:45 -04:00
|
|
|
|
|
|
|
/* 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);
|
2013-05-17 04:54:02 -04:00
|
|
|
char *flook( const char *fname, int hflag) ;
|
2005-10-01 01:52:45 -04:00
|
|
|
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);
|
|
|
|
|
|
|
|
/* buffer.c */
|
|
|
|
extern int usebuffer(int f, int n);
|
|
|
|
extern int nextbuffer(int f, int n);
|
2010-02-15 21:09:42 -05:00
|
|
|
extern int swbuffer(struct buffer *bp);
|
2005-10-01 01:52:45 -04:00
|
|
|
extern int killbuffer(int f, int n);
|
2010-02-15 21:09:42 -05:00
|
|
|
extern int zotbuf(struct buffer *bp);
|
2005-10-01 01:52:45 -04:00
|
|
|
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);
|
2010-02-15 21:09:42 -05:00
|
|
|
extern int bclear(struct buffer *bp);
|
2005-10-01 01:52:45 -04:00
|
|
|
extern int unmark(int f, int n);
|
2010-10-20 20:57:08 -04:00
|
|
|
/* Lookup a buffer by name. */
|
|
|
|
extern struct buffer *bfind(char *bname, int cflag, int bflag);
|
2005-10-01 01:52:45 -04:00
|
|
|
|
|
|
|
/* file.c */
|
2013-05-19 05:36:24 -04:00
|
|
|
#include "file.h"
|
2005-10-01 01:52:45 -04:00
|
|
|
|
|
|
|
/* 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);
|
2010-02-15 21:09:42 -05:00
|
|
|
extern int dobuf(struct buffer *bp);
|
2010-10-30 21:07:41 -04:00
|
|
|
extern void freewhile(struct while_block *wp);
|
2005-10-01 01:52:45 -04:00
|
|
|
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);
|
|
|
|
|
|
|
|
/* spawn.c */
|
|
|
|
extern int spawncli(int f, int n);
|
2005-10-01 02:52:55 -04:00
|
|
|
extern int bktoshell(int f, int n);
|
2005-10-01 01:52:45 -04:00
|
|
|
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);
|
2005-10-01 03:22:55 -04:00
|
|
|
extern int filter_buffer(int f, int n);
|
2005-10-01 01:52:45 -04:00
|
|
|
extern int sys(char *cmd);
|
|
|
|
extern int shellprog(char *cmd);
|
|
|
|
extern int execprog(char *cmd);
|
|
|
|
|
|
|
|
/* 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);
|
2010-11-27 19:28:01 -05:00
|
|
|
extern int mcscanner(struct magic *mcpatrn, int direct, int beg_or_end);
|
2005-10-01 03:56:15 -04:00
|
|
|
extern int scanner(const char *patrn, int direct, int beg_or_end);
|
2005-10-01 01:52:45 -04:00
|
|
|
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);
|
2010-04-17 19:38:09 -04:00
|
|
|
extern int boundry(struct line *curline, int curoff, int dir);
|
2005-10-01 01:52:45 -04:00
|
|
|
extern void mcclear(void);
|
|
|
|
extern void rmcclear(void);
|
|
|
|
|
|
|
|
/* 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);
|
2005-10-01 03:56:15 -04:00
|
|
|
extern void reeat(int c);
|
2005-10-01 01:52:45 -04:00
|
|
|
|
|
|
|
/* 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);
|
2010-11-06 12:09:44 -04:00
|
|
|
extern void findvar(char *var, struct variable_description *vd, int size);
|
|
|
|
extern int svar(struct variable_description *var, char *value);
|
2005-10-01 01:52:45 -04:00
|
|
|
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);
|
|
|
|
|
|
|
|
/* 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);
|
|
|
|
|
2005-10-01 03:56:15 -04:00
|
|
|
/* pklock.c */
|
|
|
|
extern char *dolock(char *fname);
|
|
|
|
extern char *undolock(char *fname);
|