#include <ast/error.h>
#include <cgraph/agxbuf.h>
#include <gvpr/parse.h>
+#include <stdbool.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
{
int c;
- while (1) {
+ while (true) {
c = readc(str, 0);
if (!isspace(c)) {
return c;
*/
static void parseID(Sfio_t * str, int c, char *buf, size_t bsize)
{
- int more = 1;
+ bool more = true;
char *ptr = buf;
char *eptr = buf + (bsize - 1);
while (more) {
c = readc(str, 0);
if (c < 0)
- more = 0;
+ more = false;
if (isalpha(c) || c == '_') {
if (ptr == eptr)
- more = 0;
+ more = false;
else
*ptr++ = c;
} else {
- more = 0;
+ more = false;
unreadc(str, c);
}
}
{
int c;
- while (1) {
+ while (true) {
c = readc(ins, outs);
if (c < 0 || c == ec)
return c;
char *mode;
char *guard = NULL;
char *action = NULL;
- int more;
+ bool more;
parse_block *blocklist = 0;
case_info *edgelist = 0;
case_info *nodelist = 0;
}
begg_stmt = 0;
- more = 1;
+ more = true;
while (more) {
switch (parseCase(str, &guard, &gline, &action, &line)) {
case Begin:
bindAction(EndG, action, line, &prog->endg_stmt, &prog->l_endg);
break;
case Eof:
- more = 0;
+ more = false;
break;
case Node:
nodel = addCase(nodel, guard, gline, action, line, &n_nstmts);
edgelist = edgel;
break;
case Error: /* to silence warnings */
- more = 0;
+ more = false;
break;
}
}