switch source tree from k&r to c99
This commit is contained in:
+9
-17
@@ -16,13 +16,12 @@
|
||||
|
||||
char morc = 0; /* tell the outside world what char you chose */
|
||||
static boolean suppress_history;
|
||||
static boolean FDECL(ext_cmd_getlin_hook, (char *));
|
||||
static boolean ext_cmd_getlin_hook(char *);
|
||||
|
||||
typedef boolean FDECL((*getlin_hook_proc), (char *));
|
||||
typedef boolean (*getlin_hook_proc)(char *);
|
||||
|
||||
static void FDECL(hooked_tty_getlin,
|
||||
(const char *, char *, getlin_hook_proc));
|
||||
extern int NDECL(extcmd_via_menu); /* cmd.c */
|
||||
static void hooked_tty_getlin(const char *, char *, getlin_hook_proc);
|
||||
extern int extcmd_via_menu(void); /* cmd.c */
|
||||
|
||||
extern char erase_char, kill_char; /* from appropriate tty.c file */
|
||||
|
||||
@@ -33,19 +32,14 @@ extern char erase_char, kill_char; /* from appropriate tty.c file */
|
||||
* resulting string is "\033".
|
||||
*/
|
||||
void
|
||||
tty_getlin(query, bufp)
|
||||
const char *query;
|
||||
register char *bufp;
|
||||
tty_getlin(const char *query, register char *bufp)
|
||||
{
|
||||
suppress_history = FALSE;
|
||||
hooked_tty_getlin(query, bufp, (getlin_hook_proc) 0);
|
||||
}
|
||||
|
||||
static void
|
||||
hooked_tty_getlin(query, bufp, hook)
|
||||
const char *query;
|
||||
register char *bufp;
|
||||
getlin_hook_proc hook;
|
||||
hooked_tty_getlin(const char *query, register char *bufp, getlin_hook_proc hook)
|
||||
{
|
||||
register char *obufp = bufp;
|
||||
register int c;
|
||||
@@ -210,8 +204,7 @@ getlin_hook_proc hook;
|
||||
}
|
||||
|
||||
void
|
||||
xwaitforspace(s)
|
||||
register const char *s; /* chars allowed besides return */
|
||||
xwaitforspace(register const char *s) /* chars allowed besides return */
|
||||
{
|
||||
register int c, x = ttyDisplay ? (int) ttyDisplay->dismiss_more : '\n';
|
||||
|
||||
@@ -253,8 +246,7 @@ register const char *s; /* chars allowed besides return */
|
||||
* + base has enough room to hold our string
|
||||
*/
|
||||
static boolean
|
||||
ext_cmd_getlin_hook(base)
|
||||
char *base;
|
||||
ext_cmd_getlin_hook(char *base)
|
||||
{
|
||||
int oindex, com_index;
|
||||
|
||||
@@ -284,7 +276,7 @@ char *base;
|
||||
* stop when we have found enough characters to make a unique command.
|
||||
*/
|
||||
int
|
||||
tty_get_ext_cmd()
|
||||
tty_get_ext_cmd(void)
|
||||
{
|
||||
int i;
|
||||
char buf[BUFSZ];
|
||||
|
||||
Reference in New Issue
Block a user