1 |
– |
/* Copyright (c) 1995 Regents of the University of California */ |
2 |
– |
|
1 |
|
#ifndef lint |
2 |
< |
static char SCCSid[] = "$SunId$ LBL"; |
2 |
> |
static const char RCSid[] = "$Id$"; |
3 |
|
#endif |
6 |
– |
|
4 |
|
/* |
5 |
|
* editline.c - routine for editing raw input for rview. |
6 |
|
* |
7 |
< |
* 10/5/88 |
7 |
> |
* External symbols declared in driver.h |
8 |
|
*/ |
9 |
|
|
10 |
+ |
#include "copyright.h" |
11 |
+ |
|
12 |
+ |
#include <stdio.h> |
13 |
+ |
|
14 |
+ |
#include "color.h" |
15 |
+ |
|
16 |
+ |
#include "driver.h" |
17 |
+ |
|
18 |
|
#define iscntrl(c) ((c) < ' ') |
19 |
|
#define isblank(c) ((c) == ' ') |
20 |
|
#define iserase(c) ((c) == '\b' || (c) == 127) |
22 |
|
#define iskill(c) ((c) == 'U'-'@' || (c) == 'X'-'@') |
23 |
|
|
24 |
|
|
25 |
+ |
void |
26 |
|
editline(buf, c_get, s_put) /* edit input line */ |
27 |
|
char *buf; |
28 |
< |
int (*c_get)(), (*s_put)(); |
28 |
> |
int (*c_get)(); |
29 |
> |
void (*s_put)(); |
30 |
|
{ |
31 |
|
static char erases[] = "\b \b"; |
32 |
|
static char obuf[4]; |
70 |
|
} |
71 |
|
|
72 |
|
|
66 |
– |
#include "driver.h" |
67 |
– |
|
73 |
|
static char mybuf[512]; |
74 |
|
|
75 |
|
|
76 |
+ |
void |
77 |
|
tocombuf(b, d) /* add command(s) to my buffer */ |
78 |
|
register char *b; |
79 |
|
register struct driver *d; |
95 |
|
} |
96 |
|
|
97 |
|
|
98 |
+ |
int |
99 |
|
fromcombuf(b, d) /* get command from my buffer */ |
100 |
|
char *b; |
101 |
|
struct driver *d; |