- Use ANSI C function prototypes/definitions instead of K&R style ones
- Add a missing return type for main(..) MFC after: 1 week Sponsored by: EMC / Isilon Storage Division
This commit is contained in:
parent
d6f598ef53
commit
ae11a85edd
@ -26,9 +26,8 @@ extern void regprint();
|
|||||||
/*
|
/*
|
||||||
- main - do the simple case, hand off to regress() for regression
|
- main - do the simple case, hand off to regress() for regression
|
||||||
*/
|
*/
|
||||||
main(argc, argv)
|
int
|
||||||
int argc;
|
main(int argc, char **argv)
|
||||||
char *argv[];
|
|
||||||
{
|
{
|
||||||
regex_t re;
|
regex_t re;
|
||||||
# define NS 10
|
# define NS 10
|
||||||
@ -126,8 +125,7 @@ char *argv[];
|
|||||||
== void regress(FILE *in);
|
== void regress(FILE *in);
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
regress(in)
|
regress(FILE *in)
|
||||||
FILE *in;
|
|
||||||
{
|
{
|
||||||
char inbuf[1000];
|
char inbuf[1000];
|
||||||
# define MAXF 10
|
# define MAXF 10
|
||||||
@ -201,15 +199,10 @@ FILE *in;
|
|||||||
/*
|
/*
|
||||||
- try - try it, and report on problems
|
- try - try it, and report on problems
|
||||||
== void try(char *f0, char *f1, char *f2, char *f3, char *f4, int opts);
|
== void try(char *f0, char *f1, char *f2, char *f3, char *f4, int opts);
|
||||||
|
- opts: may not match f1
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
try(f0, f1, f2, f3, f4, opts)
|
try(char *f0, char *f1, char *f2, char *f3, char *f4, int opts)
|
||||||
char *f0;
|
|
||||||
char *f1;
|
|
||||||
char *f2;
|
|
||||||
char *f3;
|
|
||||||
char *f4;
|
|
||||||
int opts; /* may not match f1 */
|
|
||||||
{
|
{
|
||||||
regex_t re;
|
regex_t re;
|
||||||
# define NSUBS 10
|
# define NSUBS 10
|
||||||
@ -311,12 +304,11 @@ int opts; /* may not match f1 */
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
- options - pick options out of a regression-test string
|
- options - pick options out of a regression-test string
|
||||||
|
- type: 'c' - compile, 'e' - exec
|
||||||
== int options(int type, char *s);
|
== int options(int type, char *s);
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
options(type, s)
|
options(int type, char *s)
|
||||||
int type; /* 'c' compile, 'e' exec */
|
|
||||||
char *s;
|
|
||||||
{
|
{
|
||||||
char *p;
|
char *p;
|
||||||
int o = (type == 'c') ? copts : eopts;
|
int o = (type == 'c') ? copts : eopts;
|
||||||
@ -371,9 +363,7 @@ char *s;
|
|||||||
== int opt(int c, char *s);
|
== int opt(int c, char *s);
|
||||||
*/
|
*/
|
||||||
int /* predicate */
|
int /* predicate */
|
||||||
opt(c, s)
|
opt(int c, char *s)
|
||||||
int c;
|
|
||||||
char *s;
|
|
||||||
{
|
{
|
||||||
return(strchr(s, c) != NULL);
|
return(strchr(s, c) != NULL);
|
||||||
}
|
}
|
||||||
@ -383,8 +373,7 @@ char *s;
|
|||||||
== void fixstr(char *p);
|
== void fixstr(char *p);
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
fixstr(p)
|
fixstr(char *p)
|
||||||
char *p;
|
|
||||||
{
|
{
|
||||||
if (p == NULL)
|
if (p == NULL)
|
||||||
return;
|
return;
|
||||||
@ -405,10 +394,7 @@ char *p;
|
|||||||
== char *check(char *str, regmatch_t sub, char *should);
|
== char *check(char *str, regmatch_t sub, char *should);
|
||||||
*/
|
*/
|
||||||
char * /* NULL or complaint */
|
char * /* NULL or complaint */
|
||||||
check(str, sub, should)
|
check(char *str, regmatch_t sub, char *should)
|
||||||
char *str;
|
|
||||||
regmatch_t sub;
|
|
||||||
char *should;
|
|
||||||
{
|
{
|
||||||
int len;
|
int len;
|
||||||
int shlen;
|
int shlen;
|
||||||
@ -482,8 +468,7 @@ char *should;
|
|||||||
== static char *eprint(int err);
|
== static char *eprint(int err);
|
||||||
*/
|
*/
|
||||||
static char *
|
static char *
|
||||||
eprint(err)
|
eprint(int err)
|
||||||
int err;
|
|
||||||
{
|
{
|
||||||
static char epbuf[100];
|
static char epbuf[100];
|
||||||
size_t len;
|
size_t len;
|
||||||
@ -498,8 +483,7 @@ int err;
|
|||||||
== static int efind(char *name);
|
== static int efind(char *name);
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
efind(name)
|
efind(char *name)
|
||||||
char *name;
|
|
||||||
{
|
{
|
||||||
static char efbuf[100];
|
static char efbuf[100];
|
||||||
size_t n;
|
size_t n;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user