version 1.9, 1999/11/15 22:12:00 |
version 1.10, 1999/11/17 15:34:13 |
|
|
#endif /* not lint */ |
#endif /* not lint */ |
|
|
#include <sys/cdefs.h> |
#include <sys/cdefs.h> |
#include <stdio.h> |
|
#include <ctype.h> |
#include <ctype.h> |
|
#include <err.h> |
|
#include <stddef.h> |
|
#include <stdio.h> |
#include "mdef.h" |
#include "mdef.h" |
|
#include "extern.h" |
|
|
/* |
/* |
* expression evaluator: performs a standard recursive |
* expression evaluator: performs a standard recursive |
|
|
#define DECIMAL 10 |
#define DECIMAL 10 |
#define HEX 16 |
#define HEX 16 |
|
|
static char *nxtch; /* Parser scan pointer */ |
static const char *nxtch; /* Parser scan pointer */ |
|
|
static int query __P((void)); |
static int query __P((void)); |
static int lor __P((void)); |
static int lor __P((void)); |
|
|
static int num __P((void)); |
static int num __P((void)); |
static int geteqrel __P((void)); |
static int geteqrel __P((void)); |
static int skipws __P((void)); |
static int skipws __P((void)); |
static void experr __P((char *)); |
static void experr __P((const char *)); |
|
|
/* |
/* |
* For longjmp |
* For longjmp |
|
|
|
|
int |
int |
expr(expbuf) |
expr(expbuf) |
char *expbuf; |
const char *expbuf; |
{ |
{ |
int rval; |
int rval; |
|
|
|
|
*/ |
*/ |
static void |
static void |
experr(msg) |
experr(msg) |
char *msg; |
const char *msg; |
{ |
{ |
printf("m4: %s in expr.\n", msg); |
printf("m4: %s in expr.\n", msg); |
longjmp(expjump, -1); |
longjmp(expjump, -1); |