Skip to content

Commit

Permalink
Remove stdbool
Browse files Browse the repository at this point in the history
Might not be available everywhere
  • Loading branch information
perlpunk committed Feb 28, 2019
1 parent 1560fc8 commit 78e6ebf
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions tests/run-emitter-test-suite.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@

#include <stdlib.h>
#include <stdio.h>
#include <stdbool.h>
#include <assert.h>

bool get_line(FILE * input, char *line);
int get_line(FILE * input, char *line);
char *get_anchor(char sigil, char *line, char *anchor);
char *get_tag(char *line, char *tag);
void get_value(char *line, char *value, int *style);
Expand Down Expand Up @@ -134,20 +133,20 @@ int main(int argc, char *argv[])
return 1;
}

bool get_line(FILE * input, char *line)
int get_line(FILE * input, char *line)
{
char *newline;

if (!fgets(line, 1024 - 1, input))
return false;
return 0;

if ((newline = strchr(line, '\n')) == NULL) {
fprintf(stderr, "Line too long: '%s'", line);
abort();
}
*newline = '\0';

return true;
return 1;
}

char *get_anchor(char sigil, char *line, char *anchor)
Expand Down

0 comments on commit 78e6ebf

Please sign in to comment.