|
|
1.1 ! root 1: /*************************************************************************** ! 2: * This program is Copyright (C) 1986, 1987, 1988 by Jonathan Payne. JOVE * ! 3: * is provided to you without charge, and with no warranty. You may give * ! 4: * away copies of JOVE, including sources, provided that this notice is * ! 5: * included in all the files. * ! 6: ***************************************************************************/ ! 7: ! 8: /* some utility functions, as macros, to be included by jove.h */ ! 9: ! 10: extern char key_strokes[100], ! 11: *keys_p; ! 12: ! 13: extern int ModCount; ! 14: ! 15: #define init_strokes() { keys_p = key_strokes; *keys_p = '\0'; } ! 16: #define add_stroke(c) { \ ! 17: if (keys_p < &key_strokes[sizeof (key_strokes) - 1]) \ ! 18: (*keys_p++ = (c), *keys_p = 0); \ ! 19: } ! 20: ! 21: #define IsModified(b) ((b)->b_modified) ! 22: #define SavLine(a, b) ((a)->l_dline = putline((b))) ! 23: #define SetLine(line) DotTo((line), 0) ! 24: #define bobp() (firstp(curline) && bolp()) ! 25: #define bolp() (curchar == 0) ! 26: #define eobp() (lastp(curline) && eolp()) ! 27: #define eolp() (linebuf[curchar] == '\0') ! 28: #define firstp(line) ((line) == curbuf->b_first) ! 29: #define getDOT() getline(curline->l_dline, linebuf) ! 30: #define lastp(line) ((line) == curbuf->b_last) ! 31: ! 32: extern char ! 33: *IOerr proto((char *err, char *file)), ! 34: *StrIndex proto((int dir,char *buf,int charpos, int what)), ! 35: *basename proto((char *f)), ! 36: *copystr proto((char *str)), ! 37: *emalloc proto((size_t size)), ! 38: *filename proto((struct buffer *b)), ! 39: *get_time proto((time_t *timep,char *buf,int from,int to)), ! 40: *itoa proto((int num)), ! 41: *lcontents proto((struct line *line)), ! 42: *ltobuf proto((struct line *line,char *buf)); ! 43: ! 44: extern int ! 45: LineDist proto((struct line *nextp,struct line *endp)), ! 46: ModBufs proto((int allp)), ! 47: TwoBlank proto((void)), ! 48: blnkp proto((char *buf)), ! 49: within_indent proto((void)), ! 50: casecmp proto((char *s1,char *s2)), ! 51: casencmp proto((char *s1,char *s2, size_t n)), ! 52: fixorder proto((struct line * *line1,int *char1,struct line * *line2,int *char2)), ! 53: inlist proto((struct line *first,struct line *what)), ! 54: inorder proto((struct line *nextp,int char1,struct line *endp,int char2)), ! 55: length proto((struct line *line)), ! 56: max proto((int a,int b)), ! 57: min proto((int a,int b)), ! 58: numcomp proto((char *s1,char *s2)), ! 59: pnt_line proto((void)), ! 60: sindex proto((char *pattern,char *string)), ! 61: waitchar proto((int *slow)); ! 62: ! 63: extern void ! 64: DOTsave proto((struct position *buf)), ! 65: DotTo proto((struct line *line,int col)), ! 66: ExecCmd proto((struct data_obj *cp)), ! 67: PushPntp proto((struct line *line)), ! 68: SetDot proto((struct position *bp)), ! 69: ToFirst proto((void)), ! 70: ToLast proto((void)), ! 71: ins_c proto((int c,char *buf,int atchar,int num,int max)), ! 72: len_error proto((int flag)), ! 73: linecopy proto((char *onto,int atchar,char *from)), ! 74: make_argv proto((char * *argv,char *ap)), ! 75: modify proto((void)), ! 76: SitFor proto((int delay)), ! 77: null_ncpy proto((char *to, char *from, size_t n)), ! 78: #ifdef UNIX ! 79: dopipe proto((int *p)), ! 80: pclose proto((int *p)), ! 81: #endif ! 82: pop_env proto((jmp_buf)), ! 83: push_env proto((jmp_buf)), ! 84: #ifdef LOAD_AV ! 85: get_la proto((double *dp)), ! 86: #endif /* LOAD_AV */ ! 87: to_word proto((int dir)), ! 88: unmodify proto((void)), ! 89: pp_key_strokes proto((char *buffer, size_t size));
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.