Skip to content
Snippets Groups Projects
Commit 07e5f392ebfb authored by Tina Müller's avatar Tina Müller
Browse files

Remove stdbool

Might not be available everywhere
parent e9a12cbf22d5
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,5 @@
#include <stdlib.h>
#include <stdio.h>
#include <stdbool.h>
#include <assert.h>
......@@ -6,6 +5,6 @@
#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);
......@@ -134,8 +133,8 @@
return 1;
}
bool get_line(FILE * input, char *line)
int get_line(FILE * input, char *line)
{
char *newline;
if (!fgets(line, 1024 - 1, input))
......@@ -138,8 +137,8 @@
{
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);
......@@ -147,7 +146,7 @@
}
*newline = '\0';
return true;
return 1;
}
char *get_anchor(char sigil, char *line, char *anchor)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment