dtdocbook: Change to ANSI function definitions

This commit is contained in:
Peter Howkins
2018-06-28 04:12:10 +01:00
parent 3baf0744f2
commit 948baafd17
51 changed files with 2295 additions and 1978 deletions

View File

@@ -25,8 +25,7 @@
#include <stdlib.h>
void
tpt_regerror(s)
char *s;
tpt_regerror(char *s)
{
#ifdef ERRAVAIL
error("tpt_regexp: %s", s);

View File

@@ -186,10 +186,10 @@ STATIC char *reg();
STATIC char *regbranch();
STATIC char *regpiece();
STATIC char *regatom();
STATIC char *regnode();
STATIC char *regnode(char op);
STATIC char *regnext();
STATIC void regc();
STATIC void reginsert();
STATIC void regc(char b);
STATIC void reginsert(char op, char *opnd);
STATIC void regtail();
STATIC void regoptail();
#ifdef STRCSPN
@@ -212,8 +212,7 @@ STATIC int strcspn();
* of the structure of the compiled regexp.
*/
regexp *
tpt_regcomp(exp)
char *exp;
tpt_regcomp(char *exp)
{
register regexp *r;
register char *scan;
@@ -299,9 +298,10 @@ char *exp;
* follows makes it hard to avoid.
*/
static char *
reg(paren, flagp)
int paren; /* Parenthesized? */
int *flagp;
reg(
int paren, /* Parenthesized? */
int *flagp
)
{
register char *ret;
register char *br;
@@ -371,8 +371,7 @@ int *flagp;
* Implements the concatenation operator.
*/
static char *
regbranch(flagp)
int *flagp;
regbranch(int *flagp)
{
register char *ret;
register char *chain;
@@ -410,8 +409,7 @@ int *flagp;
* endmarker role is not redundant.
*/
static char *
regpiece(flagp)
int *flagp;
regpiece(int *flagp)
{
register char *ret;
register char op;
@@ -474,8 +472,7 @@ int *flagp;
* separate node; the code is simpler that way and it's not worth fixing.
*/
static char *
regatom(flagp)
int *flagp;
regatom(int *flagp)
{
register char *ret;
int flags;
@@ -583,8 +580,7 @@ int *flagp;
- regnode - emit a node
*/
static char * /* Location. */
regnode(op)
char op;
regnode(char op)
{
register char *ret;
register char *ptr;
@@ -608,8 +604,7 @@ char op;
- regc - emit (if appropriate) a byte of code
*/
static void
regc(b)
char b;
regc(char b)
{
if (regcode != &regdummy)
*regcode++ = b;
@@ -623,9 +618,7 @@ char b;
* Means relocating the operand.
*/
static void
reginsert(op, opnd)
char op;
char *opnd;
reginsert(char op, char *opnd)
{
register char *src;
register char *dst;
@@ -652,9 +645,7 @@ char *opnd;
- regtail - set the next-pointer at the end of a node chain
*/
static void
regtail(p, val)
char *p;
char *val;
regtail(char *p, char *val)
{
register char *scan;
register char *temp;
@@ -684,9 +675,7 @@ char *val;
- regoptail - regtail on operand of first argument; nop if operandless
*/
static void
regoptail(p, val)
char *p;
char *val;
regoptail(char *p, char *val)
{
/* "Operandless" and "op != BRANCH" are synonymous in practice. */
if (p == NULL || p == &regdummy || OP(p) != BRANCH)
@@ -723,9 +712,7 @@ STATIC char *regprop();
- regexec - match a regexp against a string
*/
int
tpt_regexec(prog, string)
register regexp *prog;
register char *string;
tpt_regexec(register regexp *prog, register char *string)
{
register char *s;
@@ -784,9 +771,7 @@ register char *string;
- regtry - try match at specific point
*/
static int /* 0 failure, 1 success */
regtry(prog, string)
regexp *prog;
char *string;
regtry(regexp *prog, char *string)
{
register int i;
register char **sp;
@@ -821,8 +806,7 @@ char *string;
* by recursion.
*/
static int /* 0 failure, 1 success */
regmatch(prog)
char *prog;
regmatch(char *prog)
{
register char *scan; /* Current node. */
char *next; /* Next node. */
@@ -1008,8 +992,7 @@ char *prog;
- regrepeat - repeatedly match something simple, report how many
*/
static int
regrepeat(p)
char *p;
regrepeat(char *p)
{
register int count = 0;
register char *scan;
@@ -1054,8 +1037,7 @@ char *p;
- regnext - dig the "next" pointer out of a node
*/
static char *
regnext(p)
register char *p;
regnext(register char *p)
{
register int offset;
@@ -1080,8 +1062,7 @@ STATIC char *regprop();
- regdump - dump a regexp onto stdout in vaguely comprehensible form
*/
void
regdump(r)
regexp *r;
regdump(regexp *r)
{
register char *s;
register char op = EXACTLY; /* Arbitrary non-END op. */
@@ -1123,8 +1104,7 @@ regexp *r;
- regprop - printable representation of opcode
*/
static char *
regprop(op)
char *op;
regprop(char *op)
{
register char *p;
static char buf[50];
@@ -1215,9 +1195,7 @@ char *op;
*/
static int
strcspn(s1, s2)
char *s1;
char *s2;
strcspn(char *s1, char *s2)
{
register char *scan1;
register char *scan2;

View File

@@ -55,10 +55,7 @@
- regsub - perform substitutions after a regexp match
*/
void
tpt_regsub(prog, source, dest)
regexp *prog;
char *source;
char *dest;
tpt_regsub(regexp *prog, char *source, char *dest)
{
register char *src;
register char *dst;