9 |
|
|
10 |
|
#include "copyright.h" |
11 |
|
|
12 |
+ |
#include <stdio.h> |
13 |
+ |
#include <string.h> |
14 |
+ |
|
15 |
|
#include "color.h" |
16 |
|
|
17 |
|
#include "driver.h" |
23 |
|
#define iskill(c) ((c) == 'U'-'@' || (c) == 'X'-'@') |
24 |
|
|
25 |
|
|
26 |
< |
void |
27 |
< |
editline(buf, c_get, s_put) /* edit input line */ |
28 |
< |
char *buf; |
29 |
< |
int (*c_get)(); |
30 |
< |
void (*s_put)(); |
26 |
> |
extern void |
27 |
> |
editline( /* edit input line */ |
28 |
> |
char *buf, |
29 |
> |
dr_getchf_t *c_get, |
30 |
> |
dr_comoutf_t *s_put |
31 |
> |
) |
32 |
|
{ |
33 |
|
static char erases[] = "\b \b"; |
34 |
|
static char obuf[4]; |
86 |
|
for (cp = mybuf; *cp; cp++) |
87 |
|
; |
88 |
|
comstart = cp; |
89 |
< |
while (*cp++ = *b) |
89 |
> |
while ( (*cp++ = *b) ) |
90 |
|
if (cp >= mybuf+sizeof(mybuf)) { |
91 |
|
*comstart = '\0'; |
92 |
|
return; /* what should I do about this? */ |