diff options
author | Dan Nicolaescu <dann@ics.uci.edu> | 2010-07-04 00:50:25 -0700 |
---|---|---|
committer | Dan Nicolaescu <dann@ics.uci.edu> | 2010-07-04 00:50:25 -0700 |
commit | 971de7fb158335fbda39525feb2d7776a26bc030 (patch) | |
tree | 605333d85f16e35bb06baffcb66ac49f4ec0dce9 /src/termcap.c | |
parent | b8463cbfbe2c5183cf40772df2746e58b787ddeb (diff) | |
download | emacs-971de7fb158335fbda39525feb2d7776a26bc030.tar.gz |
Convert (most) functions in src to standard C.
* src/alloc.c: Convert function definitions to standard C.
* src/atimer.c:
* src/bidi.c:
* src/bytecode.c:
* src/callint.c:
* src/callproc.c:
* src/casefiddle.c:
* src/casetab.c:
* src/category.c:
* src/ccl.c:
* src/character.c:
* src/charset.c:
* src/chartab.c:
* src/cmds.c:
* src/coding.c:
* src/composite.c:
* src/data.c:
* src/dbusbind.c:
* src/dired.c:
* src/dispnew.c:
* src/doc.c:
* src/doprnt.c:
* src/ecrt0.c:
* src/editfns.c:
* src/fileio.c:
* src/filelock.c:
* src/filemode.c:
* src/fns.c:
* src/font.c:
* src/fontset.c:
* src/frame.c:
* src/fringe.c:
* src/ftfont.c:
* src/ftxfont.c:
* src/gtkutil.c:
* src/indent.c:
* src/insdel.c:
* src/intervals.c:
* src/keymap.c:
* src/lread.c:
* src/macros.c:
* src/marker.c:
* src/md5.c:
* src/menu.c:
* src/minibuf.c:
* src/prefix-args.c:
* src/print.c:
* src/ralloc.c:
* src/regex.c:
* src/region-cache.c:
* src/scroll.c:
* src/search.c:
* src/sound.c:
* src/strftime.c:
* src/syntax.c:
* src/sysdep.c:
* src/termcap.c:
* src/terminal.c:
* src/terminfo.c:
* src/textprop.c:
* src/tparam.c:
* src/undo.c:
* src/unexelf.c:
* src/window.c:
* src/xfaces.c:
* src/xfns.c:
* src/xfont.c:
* src/xftfont.c:
* src/xgselect.c:
* src/xmenu.c:
* src/xrdb.c:
* src/xselect.c:
* src/xsettings.c:
* src/xsmfns.c:
* src/xterm.c: Likewise.
Diffstat (limited to 'src/termcap.c')
-rw-r--r-- | src/termcap.c | 51 |
1 files changed, 16 insertions, 35 deletions
diff --git a/src/termcap.c b/src/termcap.c index 9b4a7f657f6..5a6d9483a51 100644 --- a/src/termcap.c +++ b/src/termcap.c @@ -127,15 +127,14 @@ xrealloc (ptr, size) for tgetnum, tgetflag and tgetstr to find. */ static char *term_entry; -static char *tgetst1 (); +static char *tgetst1 (char *ptr, char **area); /* Search entry BP for capability CAP. Return a pointer to the capability (in BP) if found, 0 if not found. */ static char * -find_capability (bp, cap) - register char *bp, *cap; +find_capability (register char *bp, register char *cap) { for (; *bp; bp++) if (bp[0] == ':' @@ -146,8 +145,7 @@ find_capability (bp, cap) } int -tgetnum (cap) - char *cap; +tgetnum (char *cap) { register char *ptr = find_capability (term_entry, cap); if (!ptr || ptr[-1] != '#') @@ -156,8 +154,7 @@ tgetnum (cap) } int -tgetflag (cap) - char *cap; +tgetflag (char *cap) { register char *ptr = find_capability (term_entry, cap); return ptr && ptr[-1] == ':'; @@ -169,9 +166,7 @@ tgetflag (cap) If AREA is null, space is allocated with `malloc'. */ char * -tgetstr (cap, area) - char *cap; - char **area; +tgetstr (char *cap, char **area) { register char *ptr = find_capability (term_entry, cap); if (!ptr || (ptr[-1] != '=' && ptr[-1] != '~')) @@ -209,9 +204,7 @@ static const char esctab[] or NULL if PTR is NULL. */ static char * -tgetst1 (ptr, area) - char *ptr; - char **area; +tgetst1 (char *ptr, char **area) { register char *p, *r; register int c; @@ -357,10 +350,7 @@ static const int speeds[] = #endif /* not emacs */ void -tputs (str, nlines, outfun) - register char *str; - int nlines; - register int (*outfun) (); +tputs (register char *str, int nlines, register int (*outfun) (/* ??? */)) { register int padcount = 0; register int speed; @@ -432,10 +422,10 @@ struct termcap_buffer /* Forward declarations of static functions. */ -static int scan_file (); -static char *gobble_line (); -static int compare_contin (); -static int name_match (); +static int scan_file (char *str, int fd, register struct termcap_buffer *bufp); +static char *gobble_line (int fd, register struct termcap_buffer *bufp, char *append_end); +static int compare_contin (register char *str1, register char *str2); +static int name_match (char *line, char *name); #ifdef MSDOS /* MW, May 1993 */ static int @@ -460,8 +450,7 @@ valid_filename_p (fn) in it, and some other value otherwise. */ int -tgetent (bp, name) - char *bp, *name; +tgetent (char *bp, char *name) { register char *termcap_name; register int fd; @@ -625,10 +614,7 @@ tgetent (bp, name) or 0 if no entry is found in the file. */ static int -scan_file (str, fd, bufp) - char *str; - int fd; - register struct termcap_buffer *bufp; +scan_file (char *str, int fd, register struct termcap_buffer *bufp) { register char *end; @@ -665,8 +651,7 @@ scan_file (str, fd, bufp) by termcap entry LINE. */ static int -name_match (line, name) - char *line, *name; +name_match (char *line, char *name) { register char *tem; @@ -681,8 +666,7 @@ name_match (line, name) } static int -compare_contin (str1, str2) - register char *str1, *str2; +compare_contin (register char *str1, register char *str2) { register int c1, c2; while (1) @@ -722,10 +706,7 @@ compare_contin (str1, str2) thing as one line. The caller decides when a line is continued. */ static char * -gobble_line (fd, bufp, append_end) - int fd; - register struct termcap_buffer *bufp; - char *append_end; +gobble_line (int fd, register struct termcap_buffer *bufp, char *append_end) { register char *end; register int nread; |