SCCS-vsn: usr.bin/vgrind/regexp.c 4.2
SCCS-vsn: usr.bin/vgrind/vgrindefs.c 4.3
SCCS-vsn: usr.bin/vgrind/vfontedpr.c 4.2
-static char sccsid[] = "@(#)regexp.c 4.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)regexp.c 4.2 (Berkeley) %G%";
/* let the conversion begin */
acs = NIL;
/* let the conversion begin */
acs = NIL;
while (*ure != NIL) {
switch (c = *ure++) {
while (*ure != NIL) {
switch (c = *ure++) {
/* escaped characters are just characters */
default:
/* escaped characters are just characters */
default:
- if ((*cs & STR) == 0) {
+ if (cs == NIL || (*cs & STR) == 0) {
cs = ccre;
*cs = STR;
SCNT(cs) = 1;
cs = ccre;
*cs = STR;
SCNT(cs) = 1;
/* mark the last match sequence as optional */
case '?':
/* mark the last match sequence as optional */
case '?':
+ if (cs)
+ *cs = *cs | OPT;
break;
/* recurse and define a subexpression */
break;
/* recurse and define a subexpression */
/* if its not a metasymbol just build a scharacter string */
default:
/* if its not a metasymbol just build a scharacter string */
default:
- if ((*cs & STR) == 0) {
+ if (cs == NIL || (*cs & STR) == 0) {
cs = ccre;
*cs = STR;
SCNT(cs) = 1;
cs = ccre;
*cs = STR;
SCNT(cs) = 1;
-static char sccsid[] = "@(#)vfontedpr.c 4.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)vfontedpr.c 4.2 (Berkeley) %G%";
#include <ctype.h>
#include <stdio.h>
#include <ctype.h>
#include <stdio.h>
char *expmatch(); /* match a string to an expression */
char *STRNCMP(); /* a different kindof strncmp */
char *convexp(); /* convert expression to internal form */
char *expmatch(); /* match a string to an expression */
char *STRNCMP(); /* a different kindof strncmp */
char *convexp(); /* convert expression to internal form */
ps("\\c\n'-C\n");
continue;
} else {
ps("\\c\n'-C\n");
continue;
} else {
- putKcp (s, s + strlen(s) -1);
+ putKcp (s, s + strlen(s) -1, TRUE);
s = s + strlen(s);
continue;
}
s = s + strlen(s);
continue;
}
-static char sccsid[] = "@(#)vgrindefs.c 4.2 (Berkeley) %G%";
+static char sccsid[] = "@(#)vgrindefs.c 4.3 (Berkeley) %G%";
#endif
/* Copyright (c) 1979 Regents of the University of California */
#endif
/* Copyright (c) 1979 Regents of the University of California */
static int hopcount; /* detect infinite loops in termcap, init 0 */
char *tskip();
char *tgetstr();
static int hopcount; /* detect infinite loops in termcap, init 0 */
char *tskip();
char *tgetstr();
* from the termcap file. Parse is very rudimentary;
* we just notice escaped newlines.
*/
* from the termcap file. Parse is very rudimentary;
* we just notice escaped newlines.
*/
-tgetent(bp, name, filename)
- char *bp, *name, *filename;
+tgetent(bp, name, file)
+ char *bp, *name, *file;
{
register char *cp;
register int c;
{
register char *cp;
register int c;
tf = open(filename, 0);
if (tf < 0)
return (-1);
tf = open(filename, 0);
if (tf < 0)
return (-1);
write(2, "Infinite tc= loop\n", 18);
return (0);
}
write(2, "Infinite tc= loop\n", 18);
return (0);
}
- if (tgetent(tcbuf, tcname) != 1)
+ if (tgetent(tcbuf, tcname, filename) != 1)
return(0);
for (q=tcbuf; *q != ':'; q++)
;
return(0);
for (q=tcbuf; *q != ':'; q++)
;