version 1.1, 1999/12/15 05:21:25 |
version 1.2, 1999/12/22 11:26:37 |
|
|
/* -*- mode: C -*- */ |
/* -*- mode: C -*- */ |
/* $OpenXM$ */ |
/* $OpenXM: OpenXM/src/ox_toolkit/bconv.c,v 1.1 1999/12/15 05:21:25 ohara Exp $ */ |
|
|
/* bconv can convert an OX expression or a CMO expression to a byte stream. */ |
/* bconv can convert an OX expression or a CMO expression to a byte stream. */ |
/* Any expressions, as a string, must have shorter length than 8192.*/ |
/* Any expressions, as a string, must have shorter length than 8192.*/ |
Line 49 static int display(ox *m) |
|
Line 49 static int display(ox *m) |
|
|
|
#define SIZE_CMDLINE 8192 |
#define SIZE_CMDLINE 8192 |
|
|
static int size = SIZE_CMDLINE; |
|
static char cmdline[SIZE_CMDLINE]; |
static char cmdline[SIZE_CMDLINE]; |
|
|
static int prompt() |
static int prompt() |
{ |
{ |
fprintf(stdout, "> "); |
fprintf(stdout, "> "); |
fgets(cmdline, size, stdin); |
fgets(cmdline, SIZE_CMDLINE, stdin); |
setmode_mygetc(cmdline, size); |
init_parser(cmdline); |
} |
} |
|
|
int main() |
int main() |
|
|
setbuf(stdout, NULL); |
setbuf(stdout, NULL); |
|
|
setflag_parse(PFLAG_ADDREV); |
setflag_parse(PFLAG_ADDREV); |
setgetc(mygetc); |
|
|
|
for(prompt(); (m = parse()) != NULL; prompt()) { |
for(prompt(); (m = parse()) != NULL; prompt()) { |
display(m); |
display(m); |
} |
} |