Merged with 4.4lite.
Changed to conform to NetBSD's new RCS Id conventions.
This commit is contained in:
parent
31ce5c89d3
commit
b2fe91d9f0
@ -1,17 +1,21 @@
|
|||||||
# from: @(#)Makefile 5.8 (Berkeley) 6/5/90
|
# $NetBSD: Makefile,v 1.3 1994/11/17 08:27:58 jtc Exp $
|
||||||
# $Id: Makefile,v 1.2 1993/07/30 22:30:17 mycroft Exp $
|
# @(#)Makefile 8.1 (Berkeley) 6/9/93
|
||||||
|
|
||||||
PROG= vfontedpr
|
PROG= vfontedpr
|
||||||
SRCS= regexp.c vfontedpr.c vgrindefs.c
|
SRCS= regexp.c vfontedpr.c
|
||||||
MAN1= vgrind.0
|
MAN1= vgrind.0
|
||||||
MAN5= vgrindefs.0
|
MAN5= vgrindefs.0
|
||||||
BINDIR= /usr/libexec
|
BINDIR= /usr/libexec
|
||||||
|
CLEANFILES+=vgrindefs.src.db
|
||||||
|
|
||||||
beforeinstall:
|
beforeinstall:
|
||||||
|
cap_mkdb -f vgrindefs.src ${.CURDIR}/vgrindefs.src
|
||||||
install -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
|
install -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
|
||||||
${.CURDIR}/vgrind.sh ${DESTDIR}/usr/bin/vgrind
|
${.CURDIR}/vgrind.sh ${DESTDIR}/usr/bin/vgrind
|
||||||
install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${.CURDIR}/vgrindefs.src \
|
install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${.CURDIR}/vgrindefs.src \
|
||||||
${DESTDIR}/usr/share/misc/vgrindefs
|
${DESTDIR}/usr/share/misc/vgrindefs
|
||||||
|
install -c -o ${BINOWN} -g ${BINGRP} -m 444 \
|
||||||
|
vgrindefs.src.db ${DESTDIR}/usr/share/misc/vgrindefs.db
|
||||||
install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${.CURDIR}/tmac.vgrind \
|
install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${.CURDIR}/tmac.vgrind \
|
||||||
${DESTDIR}/usr/share/tmac
|
${DESTDIR}/usr/share/tmac
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
# $NetBSD: Makefile,v 1.2 1994/11/17 08:28:17 jtc Exp $
|
||||||
# @(#)Makefile 8.1 (Berkeley) 6/6/93
|
# @(#)Makefile 8.1 (Berkeley) 6/6/93
|
||||||
|
|
||||||
PROG= retest
|
PROG= retest
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
/* $NetBSD: retest.c,v 1.2 1994/11/17 08:28:18 jtc Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1980, 1993
|
* Copyright (c) 1980, 1993
|
||||||
* The Regents of the University of California. All rights reserved.
|
* The Regents of the University of California. All rights reserved.
|
||||||
@ -38,7 +40,10 @@ static char copyright[] =
|
|||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
|
#if 0
|
||||||
static char sccsid[] = "@(#)retest.c 8.1 (Berkeley) 6/6/93";
|
static char sccsid[] = "@(#)retest.c 8.1 (Berkeley) 6/6/93";
|
||||||
|
#endif
|
||||||
|
static char rcsid[] = "$NetBSD: retest.c,v 1.2 1994/11/17 08:28:18 jtc Exp $":
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
/* $NetBSD: extern.h,v 1.2 1994/11/17 08:27:59 jtc Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1980, 1993
|
* Copyright (c) 1980, 1993
|
||||||
* The Regents of the University of California. All rights reserved.
|
* The Regents of the University of California. All rights reserved.
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
|
/* $NetBSD: pathnames.h,v 1.3 1994/11/17 08:28:01 jtc Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1989 The Regents of the University of California.
|
* Copyright (c) 1989, 1993
|
||||||
* All rights reserved.
|
* The Regents of the University of California. All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@ -30,8 +32,7 @@
|
|||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* from: @(#)pathnames.h 5.2 (Berkeley) 6/1/90
|
* @(#)pathnames.h 8.1 (Berkeley) 6/6/93
|
||||||
* $Id: pathnames.h,v 1.2 1993/08/01 18:03:26 mycroft Exp $
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define _PATH_VGRINDEFS "/usr/share/misc/vgrindefs"
|
#define _PATH_VGRINDEFS "/usr/share/misc/vgrindefs"
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
|
/* $NetBSD: regexp.c,v 1.3 1994/11/17 08:28:02 jtc Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1980 The Regents of the University of California.
|
* Copyright (c) 1980, 1993
|
||||||
* All rights reserved.
|
* The Regents of the University of California. All rights reserved.
|
||||||
|
*
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@ -32,18 +35,32 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
/*static char sccsid[] = "from: @(#)regexp.c 5.3 (Berkeley) 6/1/90";*/
|
static char copyright[] =
|
||||||
static char rcsid[] = "$Id: regexp.c,v 1.2 1993/08/01 18:03:29 mycroft Exp $";
|
"@(#) Copyright (c) 1980, 1993\n\
|
||||||
|
The Regents of the University of California. All rights reserved.\n";
|
||||||
|
#endif /* not lint */
|
||||||
|
|
||||||
|
#ifndef lint
|
||||||
|
#if 0
|
||||||
|
static char sccsid[] = "@(#)regexp.c 8.1 (Berkeley) 6/6/93";
|
||||||
|
#endif
|
||||||
|
static char rcsid[] = "$NetBSD: regexp.c,v 1.3 1994/11/17 08:28:02 jtc Exp $";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include "extern.h"
|
||||||
|
|
||||||
typedef int boolean;
|
|
||||||
#define TRUE 1
|
|
||||||
#define FALSE 0
|
#define FALSE 0
|
||||||
|
#define TRUE !(FALSE)
|
||||||
#define NIL 0
|
#define NIL 0
|
||||||
|
|
||||||
boolean l_onecase; /* true if upper and lower equivalent */
|
static void expconv __P((void));
|
||||||
|
|
||||||
|
boolean _escaped; /* true if we are currently _escaped */
|
||||||
|
char *_start; /* start of string */
|
||||||
|
boolean l_onecase; /* true if upper and lower equivalent */
|
||||||
|
|
||||||
#define makelower(c) (isupper((c)) ? tolower((c)) : (c))
|
#define makelower(c) (isupper((c)) ? tolower((c)) : (c))
|
||||||
|
|
||||||
@ -52,6 +69,7 @@ boolean l_onecase; /* true if upper and lower equivalent */
|
|||||||
* if l_onecase is set.
|
* if l_onecase is set.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
int
|
||||||
STRNCMP(s1, s2, len)
|
STRNCMP(s1, s2, len)
|
||||||
register char *s1,*s2;
|
register char *s1,*s2;
|
||||||
register int len;
|
register int len;
|
||||||
@ -130,9 +148,8 @@ STRNCMP(s1, s2, len)
|
|||||||
#define ALT 8
|
#define ALT 8
|
||||||
#define OPER 16
|
#define OPER 16
|
||||||
|
|
||||||
char *ure; /* pointer current position in unconverted exp */
|
static char *ccre; /* pointer to current position in converted exp*/
|
||||||
char *ccre; /* pointer to current position in converted exp*/
|
static char *ure; /* pointer current position in unconverted exp */
|
||||||
char *malloc();
|
|
||||||
|
|
||||||
char *
|
char *
|
||||||
convexp(re)
|
convexp(re)
|
||||||
@ -160,6 +177,7 @@ convexp(re)
|
|||||||
return (cre);
|
return (cre);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
expconv()
|
expconv()
|
||||||
{
|
{
|
||||||
register char *cs; /* pointer to current symbol in converted exp */
|
register char *cs; /* pointer to current symbol in converted exp */
|
||||||
@ -250,7 +268,7 @@ expconv()
|
|||||||
OCNT(cs) = ccre - cs; /* offset to next symbol */
|
OCNT(cs) = ccre - cs; /* offset to next symbol */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* return from a recursion */
|
/* reurn from a recursion */
|
||||||
case ')':
|
case ')':
|
||||||
if (acs != NIL) {
|
if (acs != NIL) {
|
||||||
do {
|
do {
|
||||||
@ -330,9 +348,6 @@ expconv()
|
|||||||
* character matched.
|
* character matched.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
boolean _escaped; /* true if we are currently _escaped */
|
|
||||||
char *_start; /* start of string */
|
|
||||||
|
|
||||||
char *
|
char *
|
||||||
expmatch (s, re, mstring)
|
expmatch (s, re, mstring)
|
||||||
register char *s; /* string to check for a match in */
|
register char *s; /* string to check for a match in */
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
|
/* $NetBSD: vfontedpr.c,v 1.3 1994/11/17 08:28:03 jtc Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1980 The Regents of the University of California.
|
* Copyright (c) 1980, 1993
|
||||||
* All rights reserved.
|
* The Regents of the University of California. All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@ -32,25 +34,30 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
char copyright[] =
|
static char copyright[] =
|
||||||
"@(#) Copyright (c) 1980 The Regents of the University of California.\n\
|
"@(#) Copyright (c) 1980, 1993\n\
|
||||||
All rights reserved.\n";
|
The Regents of the University of California. All rights reserved.\n";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
/*static char sccsid[] = "from: @(#)vfontedpr.c 5.5 (Berkeley) 6/1/90";*/
|
#if 0
|
||||||
static char rcsid[] = "$Id: vfontedpr.c,v 1.2 1993/08/01 18:03:28 mycroft Exp $";
|
static char sccsid[] = "@(#)vfontedpr.c 8.1 (Berkeley) 6/6/93";
|
||||||
|
#endif
|
||||||
|
static char rcsid[] = "$NetBSD: vfontedpr.c,v 1.3 1994/11/17 08:28:03 jtc Exp $";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
#include <time.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "pathnames.h"
|
#include "pathnames.h"
|
||||||
|
#include "extern.h"
|
||||||
|
|
||||||
#define boolean int
|
|
||||||
#define TRUE 1
|
|
||||||
#define FALSE 0
|
#define FALSE 0
|
||||||
|
#define TRUE !(FALSE)
|
||||||
#define NIL 0
|
#define NIL 0
|
||||||
#define STANDARD 0
|
#define STANDARD 0
|
||||||
#define ALTERNATE 1
|
#define ALTERNATE 1
|
||||||
@ -66,82 +73,72 @@ static char rcsid[] = "$Id: vfontedpr.c,v 1.2 1993/08/01 18:03:28 mycroft Exp $"
|
|||||||
#define PNAMELEN 40 /* length of a function/procedure name */
|
#define PNAMELEN 40 /* length of a function/procedure name */
|
||||||
#define PSMAX 20 /* size of procedure name stacking */
|
#define PSMAX 20 /* size of procedure name stacking */
|
||||||
|
|
||||||
/* regular expression routines */
|
static int iskw __P((char *));
|
||||||
|
static boolean isproc __P((char *));
|
||||||
char *expmatch(); /* match a string to an expression */
|
static void putKcp __P((char *, char *, boolean));
|
||||||
char *STRNCMP(); /* a different kindof strncmp */
|
static void putScp __P((char *));
|
||||||
char *convexp(); /* convert expression to internal form */
|
static void putcp __P((int));
|
||||||
char *tgetstr();
|
static int tabs __P((char *, char *));
|
||||||
|
static int width __P((char *, char *));
|
||||||
boolean isproc();
|
|
||||||
|
|
||||||
|
|
||||||
char *ctime();
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The state variables
|
* The state variables
|
||||||
*/
|
*/
|
||||||
|
|
||||||
boolean incomm; /* in a comment of the primary type */
|
static boolean filter = FALSE; /* act as a filter (like eqn) */
|
||||||
boolean instr; /* in a string constant */
|
static boolean inchr; /* in a string constant */
|
||||||
boolean inchr; /* in a string constant */
|
static boolean incomm; /* in a comment of the primary type */
|
||||||
boolean nokeyw = FALSE; /* no keywords being flagged */
|
static boolean idx = FALSE; /* form an index */
|
||||||
boolean index = FALSE; /* form an index */
|
static boolean instr; /* in a string constant */
|
||||||
boolean filter = FALSE; /* act as a filter (like eqn) */
|
static boolean nokeyw = FALSE; /* no keywords being flagged */
|
||||||
boolean pass = FALSE; /* when acting as a filter, pass indicates
|
static boolean pass = FALSE; /*
|
||||||
|
* when acting as a filter, pass indicates
|
||||||
* whether we are currently processing
|
* whether we are currently processing
|
||||||
* input.
|
* input.
|
||||||
*/
|
*/
|
||||||
boolean prccont; /* continue last procedure */
|
|
||||||
int comtype; /* type of comment */
|
static int blklevel; /* current nesting level */
|
||||||
int margin;
|
static int comtype; /* type of comment */
|
||||||
int psptr; /* the stack index of the current procedure */
|
static char *defsfile[2] = { _PATH_VGRINDEFS, 0 };
|
||||||
char pstack[PSMAX][PNAMELEN+1]; /* the procedure name stack */
|
/* name of language definitions file */
|
||||||
int plstack[PSMAX]; /* the procedure nesting level stack */
|
static int margin;
|
||||||
int blklevel; /* current nesting level */
|
static int plstack[PSMAX]; /* the procedure nesting level stack */
|
||||||
char *defsfile = _PATH_VGRINDEFS; /* name of language definitions file */
|
static char pname[BUFSIZ+1];
|
||||||
char pname[BUFSIZ+1];
|
static boolean prccont; /* continue last procedure */
|
||||||
|
static int psptr; /* the stack index of the current procedure */
|
||||||
|
static char pstack[PSMAX][PNAMELEN+1]; /* the procedure name stack */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The language specific globals
|
* The language specific globals
|
||||||
*/
|
*/
|
||||||
|
|
||||||
char *language = "c"; /* the language indicator */
|
|
||||||
char *l_keywds[BUFSIZ/2]; /* keyword table address */
|
|
||||||
char *l_prcbeg; /* regular expr for procedure begin */
|
|
||||||
char *l_combeg; /* string introducing a comment */
|
|
||||||
char *l_comend; /* string ending a comment */
|
|
||||||
char *l_acmbeg; /* string introducing a comment */
|
char *l_acmbeg; /* string introducing a comment */
|
||||||
char *l_acmend; /* string ending a comment */
|
char *l_acmend; /* string ending a comment */
|
||||||
char *l_blkbeg; /* string begining of a block */
|
char *l_blkbeg; /* string begining of a block */
|
||||||
char *l_blkend; /* string ending a block */
|
char *l_blkend; /* string ending a block */
|
||||||
char *l_strbeg; /* delimiter for string constant */
|
|
||||||
char *l_strend; /* delimiter for string constant */
|
|
||||||
char *l_chrbeg; /* delimiter for character constant */
|
char *l_chrbeg; /* delimiter for character constant */
|
||||||
char *l_chrend; /* delimiter for character constant */
|
char *l_chrend; /* delimiter for character constant */
|
||||||
char l_escape; /* character used to escape characters */
|
char *l_combeg; /* string introducing a comment */
|
||||||
boolean l_toplex; /* procedures only defined at top lex level */
|
char *l_comend; /* string ending a comment */
|
||||||
|
char l_escape; /* character used to escape characters */
|
||||||
/*
|
char *l_keywds[BUFSIZ/2]; /* keyword table address */
|
||||||
* global variables also used by expmatch
|
char *l_prcbeg; /* regular expr for procedure begin */
|
||||||
*/
|
char *l_strbeg; /* delimiter for string constant */
|
||||||
boolean _escaped; /* if last character was an escape */
|
char *l_strend; /* delimiter for string constant */
|
||||||
char *_start; /* start of the current string */
|
boolean l_toplex; /* procedures only defined at top lex level */
|
||||||
boolean l_onecase; /* upper and lower case are equivalent */
|
char *language = "c"; /* the language indicator */
|
||||||
|
|
||||||
#define ps(x) printf("%s", x)
|
#define ps(x) printf("%s", x)
|
||||||
|
|
||||||
|
void
|
||||||
main(argc, argv)
|
main(argc, argv)
|
||||||
int argc;
|
int argc;
|
||||||
char *argv[];
|
char *argv[];
|
||||||
{
|
{
|
||||||
int lineno;
|
|
||||||
char *fname = "";
|
char *fname = "";
|
||||||
char *ptr;
|
|
||||||
struct stat stbuf;
|
struct stat stbuf;
|
||||||
char buf[BUFSIZ];
|
char buf[BUFSIZ];
|
||||||
char strings[2 * BUFSIZ];
|
char *defs;
|
||||||
char defs[2 * BUFSIZ];
|
|
||||||
int needbp = 0;
|
int needbp = 0;
|
||||||
|
|
||||||
argc--, argv++;
|
argc--, argv++;
|
||||||
@ -180,7 +177,7 @@ main(argc, argv)
|
|||||||
|
|
||||||
/* build an index */
|
/* build an index */
|
||||||
if (!strcmp(argv[0], "-x")) {
|
if (!strcmp(argv[0], "-x")) {
|
||||||
index++;
|
idx++;
|
||||||
argv[0] = "-n";
|
argv[0] = "-n";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -211,7 +208,7 @@ main(argc, argv)
|
|||||||
|
|
||||||
/* specify the language description file */
|
/* specify the language description file */
|
||||||
if (!strncmp(argv[0], "-d", 2)) {
|
if (!strncmp(argv[0], "-d", 2)) {
|
||||||
defsfile = argv[1];
|
defsfile[0] = argv[1];
|
||||||
argc--, argv++;
|
argc--, argv++;
|
||||||
argc--, argv++;
|
argc--, argv++;
|
||||||
continue;
|
continue;
|
||||||
@ -222,7 +219,7 @@ main(argc, argv)
|
|||||||
perror(argv[0]);
|
perror(argv[0]);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
if (index)
|
if (idx)
|
||||||
printf("'ta 4i 4.25i 5.5iR\n'in .5i\n");
|
printf("'ta 4i 4.25i 5.5iR\n'in .5i\n");
|
||||||
fname = argv[0];
|
fname = argv[0];
|
||||||
argc--, argv++;
|
argc--, argv++;
|
||||||
@ -232,22 +229,24 @@ main(argc, argv)
|
|||||||
/*
|
/*
|
||||||
* get the language definition from the defs file
|
* get the language definition from the defs file
|
||||||
*/
|
*/
|
||||||
i = tgetent (defs, language, defsfile);
|
i = cgetent(&defs, defsfile, language);
|
||||||
if (i == 0) {
|
if (i == -1) {
|
||||||
fprintf (stderr, "no entry for language %s\n", language);
|
fprintf (stderr, "no entry for language %s\n", language);
|
||||||
exit (0);
|
exit (0);
|
||||||
} else if (i < 0) {
|
} else if (i == -2) { fprintf(stderr,
|
||||||
fprintf (stderr, "cannot find vgrindefs file %s\n", defsfile);
|
"cannot find vgrindefs file %s\n", defsfile[0]);
|
||||||
exit (0);
|
exit (0);
|
||||||
|
} else if (i == -3) { fprintf(stderr,
|
||||||
|
"potential reference loop detected in vgrindefs file %s\n",
|
||||||
|
defsfile[0]);
|
||||||
|
exit(0);
|
||||||
}
|
}
|
||||||
cp = strings;
|
if (cgetustr(defs, "kw", &cp) == -1)
|
||||||
if (tgetstr ("kw", &cp) == NIL)
|
|
||||||
nokeyw = TRUE;
|
nokeyw = TRUE;
|
||||||
else {
|
else {
|
||||||
char **cpp;
|
char **cpp;
|
||||||
|
|
||||||
cpp = l_keywds;
|
cpp = l_keywds;
|
||||||
cp = strings;
|
|
||||||
while (*cp) {
|
while (*cp) {
|
||||||
while (*cp == ' ' || *cp =='\t')
|
while (*cp == ' ' || *cp =='\t')
|
||||||
*cp++ = NULL;
|
*cp++ = NULL;
|
||||||
@ -258,31 +257,31 @@ main(argc, argv)
|
|||||||
}
|
}
|
||||||
*cpp = NIL;
|
*cpp = NIL;
|
||||||
}
|
}
|
||||||
cp = buf;
|
cgetustr(defs, "pb", &cp);
|
||||||
l_prcbeg = convexp (tgetstr ("pb", &cp));
|
l_prcbeg = convexp(cp);
|
||||||
cp = buf;
|
cgetustr(defs, "cb", &cp);
|
||||||
l_combeg = convexp (tgetstr ("cb", &cp));
|
l_combeg = convexp(cp);
|
||||||
cp = buf;
|
cgetustr(defs, "ce", &cp);
|
||||||
l_comend = convexp (tgetstr ("ce", &cp));
|
l_comend = convexp(cp);
|
||||||
cp = buf;
|
cgetustr(defs, "ab", &cp);
|
||||||
l_acmbeg = convexp (tgetstr ("ab", &cp));
|
l_acmbeg = convexp(cp);
|
||||||
cp = buf;
|
cgetustr(defs, "ae", &cp);
|
||||||
l_acmend = convexp (tgetstr ("ae", &cp));
|
l_acmend = convexp(cp);
|
||||||
cp = buf;
|
cgetustr(defs, "sb", &cp);
|
||||||
l_strbeg = convexp (tgetstr ("sb", &cp));
|
l_strbeg = convexp(cp);
|
||||||
cp = buf;
|
cgetustr(defs, "se", &cp);
|
||||||
l_strend = convexp (tgetstr ("se", &cp));
|
l_strend = convexp(cp);
|
||||||
cp = buf;
|
cgetustr(defs, "bb", &cp);
|
||||||
l_blkbeg = convexp (tgetstr ("bb", &cp));
|
l_blkbeg = convexp(cp);
|
||||||
cp = buf;
|
cgetustr(defs, "be", &cp);
|
||||||
l_blkend = convexp (tgetstr ("be", &cp));
|
l_blkend = convexp(cp);
|
||||||
cp = buf;
|
cgetustr(defs, "lb", &cp);
|
||||||
l_chrbeg = convexp (tgetstr ("lb", &cp));
|
l_chrbeg = convexp(cp);
|
||||||
cp = buf;
|
cgetustr(defs, "le", &cp);
|
||||||
l_chrend = convexp (tgetstr ("le", &cp));
|
l_chrend = convexp(cp);
|
||||||
l_escape = '\\';
|
l_escape = '\\';
|
||||||
l_onecase = tgetflag ("oc");
|
l_onecase = (cgetcap(defs, "oc", ':') != NULL);
|
||||||
l_toplex = tgetflag ("tl");
|
l_toplex = (cgetcap(defs, "tl", ':') != NULL);
|
||||||
|
|
||||||
/* initialize the program */
|
/* initialize the program */
|
||||||
|
|
||||||
@ -352,6 +351,7 @@ main(argc, argv)
|
|||||||
|
|
||||||
#define isidchr(c) (isalnum(c) || (c) == '_')
|
#define isidchr(c) (isalnum(c) || (c) == '_')
|
||||||
|
|
||||||
|
static void
|
||||||
putScp(os)
|
putScp(os)
|
||||||
char *os;
|
char *os;
|
||||||
{
|
{
|
||||||
@ -532,6 +532,7 @@ skip:
|
|||||||
} while (*s);
|
} while (*s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
putKcp (start, end, force)
|
putKcp (start, end, force)
|
||||||
char *start; /* start of string to write */
|
char *start; /* start of string to write */
|
||||||
char *end; /* end of string to write */
|
char *end; /* end of string to write */
|
||||||
@ -541,7 +542,7 @@ putKcp (start, end, force)
|
|||||||
int xfld = 0;
|
int xfld = 0;
|
||||||
|
|
||||||
while (start <= end) {
|
while (start <= end) {
|
||||||
if (index) {
|
if (idx) {
|
||||||
if (*start == ' ' || *start == '\t') {
|
if (*start == ' ' || *start == '\t') {
|
||||||
if (xfld == 0)
|
if (xfld == 0)
|
||||||
printf("");
|
printf("");
|
||||||
@ -581,6 +582,7 @@ putKcp (start, end, force)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static int
|
||||||
tabs(s, os)
|
tabs(s, os)
|
||||||
char *s, *os;
|
char *s, *os;
|
||||||
{
|
{
|
||||||
@ -588,6 +590,7 @@ tabs(s, os)
|
|||||||
return (width(s, os) / 8);
|
return (width(s, os) / 8);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
width(s, os)
|
width(s, os)
|
||||||
register char *s, *os;
|
register char *s, *os;
|
||||||
{
|
{
|
||||||
@ -608,6 +611,7 @@ width(s, os)
|
|||||||
return (i);
|
return (i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
putcp(c)
|
putcp(c)
|
||||||
register int c;
|
register int c;
|
||||||
{
|
{
|
||||||
@ -672,7 +676,7 @@ putcp(c)
|
|||||||
/*
|
/*
|
||||||
* look for a process beginning on this line
|
* look for a process beginning on this line
|
||||||
*/
|
*/
|
||||||
boolean
|
static boolean
|
||||||
isproc(s)
|
isproc(s)
|
||||||
char *s;
|
char *s;
|
||||||
{
|
{
|
||||||
@ -688,6 +692,7 @@ isproc(s)
|
|||||||
/* iskw - check to see if the next word is a keyword
|
/* iskw - check to see if the next word is a keyword
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
static int
|
||||||
iskw(s)
|
iskw(s)
|
||||||
register char *s;
|
register char *s;
|
||||||
{
|
{
|
||||||
@ -702,3 +707,4 @@ iskw(s)
|
|||||||
return (i);
|
return (i);
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
.\" Copyright (c) 1980 ,1990 The Regents of the University of California.
|
.\" $NetBSD: vgrind.1,v 1.4 1994/11/17 08:28:04 jtc Exp $
|
||||||
.\" All rights reserved.
|
.\"
|
||||||
|
.\" Copyright (c) 1980, 1990, 1993
|
||||||
|
.\" The Regents of the University of California. All rights reserved.
|
||||||
.\"
|
.\"
|
||||||
.\" Redistribution and use in source and binary forms, with or without
|
.\" Redistribution and use in source and binary forms, with or without
|
||||||
.\" modification, are permitted provided that the following conditions
|
.\" modification, are permitted provided that the following conditions
|
||||||
@ -29,10 +31,9 @@
|
|||||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
.\" SUCH DAMAGE.
|
.\" SUCH DAMAGE.
|
||||||
.\"
|
.\"
|
||||||
.\" from: @(#)vgrind.1 6.4 (Berkeley) 4/23/91
|
.\" @(#)vgrind.1 8.1 (Berkeley) 6/6/93
|
||||||
.\" $Id: vgrind.1,v 1.3 1993/09/05 22:48:37 mycroft Exp $
|
|
||||||
.\"
|
.\"
|
||||||
.Dd April 23, 1991
|
.Dd June 6, 1993
|
||||||
.Dt VGRIND 1
|
.Dt VGRIND 1
|
||||||
.Os BSD 4
|
.Os BSD 4
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
@ -177,6 +178,7 @@ language descriptions
|
|||||||
.Sh SEE ALSO
|
.Sh SEE ALSO
|
||||||
.Xr lpr 1 ,
|
.Xr lpr 1 ,
|
||||||
.Xr troff 1 ,
|
.Xr troff 1 ,
|
||||||
|
.Xr getcap 3 ,
|
||||||
.Xr vgrindefs 5
|
.Xr vgrindefs 5
|
||||||
.Sh BUGS
|
.Sh BUGS
|
||||||
Vfontedpr assumes that a certain programming style is followed:
|
Vfontedpr assumes that a certain programming style is followed:
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
#!/bin/csh -f
|
#!/bin/csh -f
|
||||||
#
|
#
|
||||||
# Copyright (c) 1980 The Regents of the University of California.
|
# $NetBSD: vgrind.sh,v 1.3 1994/11/17 08:28:06 jtc Exp $
|
||||||
# All rights reserved.
|
#
|
||||||
|
# Copyright (c) 1980, 1993
|
||||||
|
# The Regents of the University of California. All rights reserved.
|
||||||
#
|
#
|
||||||
# Redistribution and use in source and binary forms, with or without
|
# Redistribution and use in source and binary forms, with or without
|
||||||
# modification, are permitted provided that the following conditions
|
# modification, are permitted provided that the following conditions
|
||||||
@ -31,7 +33,7 @@
|
|||||||
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
# SUCH DAMAGE.
|
# SUCH DAMAGE.
|
||||||
#
|
#
|
||||||
# @(#)vgrind.sh 5.7 (Berkeley) 4/16/91
|
# @(#)vgrind.sh 8.1 (Berkeley) 6/6/93
|
||||||
#
|
#
|
||||||
|
|
||||||
set voptions=
|
set voptions=
|
||||||
@ -116,10 +118,10 @@ if (-r index) then
|
|||||||
else
|
else
|
||||||
if ("$head" != "") then
|
if ("$head" != "") then
|
||||||
$vf $options -h "$head" $files | \
|
$vf $options -h "$head" $files | \
|
||||||
sh -c "troff -rx1 $voptions -i -mvgrind 2>> xindex"
|
sh -c "psroff -rx1 $voptions -i -mvgrind 2>> xindex"
|
||||||
else
|
else
|
||||||
$vf $options $files | \
|
$vf $options $files | \
|
||||||
sh -c "troff -rx1 $voptions -i -mvgrind 2>> xindex"
|
sh -c "psroff -rx1 $voptions -i -mvgrind 2>> xindex"
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
sort -df +0 -2 xindex >index
|
sort -df +0 -2 xindex >index
|
||||||
@ -133,9 +135,9 @@ else
|
|||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
if ("$head" != "") then
|
if ("$head" != "") then
|
||||||
$vf $options -h "$head" $files | troff -i $voptions -mvgrind
|
$vf $options -h "$head" $files | psroff -i $voptions -mvgrind
|
||||||
else
|
else
|
||||||
$vf $options $files | troff -i $voptions -mvgrind
|
$vf $options $files | psroff -i $voptions -mvgrind
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
.\" Copyright (c) 1989, 1991 The Regents of the University of California.
|
.\" $NetBSD: vgrindefs.5,v 1.3 1994/11/17 08:28:07 jtc Exp $
|
||||||
.\" All rights reserved.
|
.\"
|
||||||
|
.\" Copyright (c) 1989, 1991, 1993
|
||||||
|
.\" The Regents of the University of California. All rights reserved.
|
||||||
.\"
|
.\"
|
||||||
.\" Redistribution and use in source and binary forms, with or without
|
.\" Redistribution and use in source and binary forms, with or without
|
||||||
.\" modification, are permitted provided that the following conditions
|
.\" modification, are permitted provided that the following conditions
|
||||||
@ -29,10 +31,9 @@
|
|||||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
.\" SUCH DAMAGE.
|
.\" SUCH DAMAGE.
|
||||||
.\"
|
.\"
|
||||||
.\" from: @(#)vgrindefs.5 6.7 (Berkeley) 7/31/91
|
.\" @(#)vgrindefs.5 8.1 (Berkeley) 6/6/93
|
||||||
.\" $Id: vgrindefs.5,v 1.2 1993/08/01 07:26:39 mycroft Exp $
|
|
||||||
.\"
|
.\"
|
||||||
.Dd July 31, 1991
|
.Dd June 6, 1993
|
||||||
.Dt VGRINDEFS 5
|
.Dt VGRINDEFS 5
|
||||||
.Os BSD 4.2
|
.Os BSD 4.2
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
|
/* $NetBSD: vgrindefs.c,v 1.4 1994/11/17 08:28:08 jtc Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1980 The Regents of the University of California.
|
* Copyright (c) 1980, 1993
|
||||||
* All rights reserved.
|
* The Regents of the University of California. All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@ -32,8 +34,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
/*static char sccsid[] = "from: @(#)vgrindefs.c 5.3 (Berkeley) 6/1/90";*/
|
#if 0
|
||||||
static char rcsid[] = "$Id: vgrindefs.c,v 1.3 1993/08/01 18:03:27 mycroft Exp $";
|
static char sccsid[] = "@(#)vgrindefs.c 8.1 (Berkeley) 6/6/93";
|
||||||
|
#endif
|
||||||
|
static char rcsid[] = "$NetBSD: vgrindefs.c,v 1.4 1994/11/17 08:28:08 jtc Exp $";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
#define BUFSIZ 1024
|
#define BUFSIZ 1024
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# $NetBSD: vgrindefs.src,v 1.2 1994/11/17 08:28:09 jtc Exp $
|
||||||
|
#
|
||||||
# Copyright (c) 1987, 1993
|
# Copyright (c) 1987, 1993
|
||||||
# The Regents of the University of California. All rights reserved.
|
# The Regents of the University of California. All rights reserved.
|
||||||
#
|
#
|
||||||
|
Loading…
Reference in New Issue
Block a user