*/
#include <ctype.h>
+#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include "parser.h"
sc++;
while ((c = fgetc(input)) != EOF) {
+ if (ferror(input)) {
+ fprintf(stderr, "markdown_load() failed to read input: %s\n", strerror(errno));
+ exit(EXIT_FAILURE);
+ }
+
if(c == '\n') {
// markdown analyse
}
tmp = tmp->next;
}
-
+
for(tmp = line; tmp != list_last_level_1; tmp = tmp->next) {
SET_BIT(tmp->bits, IS_UNORDERED_LIST_1);
}
case 3: SET_BIT(bits, IS_UNORDERED_LIST_3); break;
default: break;
}
-
+
break;
}
}
}
-
+
if(!CHECK_BIT(bits, IS_UNORDERED_LIST_1) &&
!CHECK_BIT(bits, IS_UNORDERED_LIST_2) &&
!CHECK_BIT(bits, IS_UNORDERED_LIST_3)) {
int next_word(cstring_t *text, int i) {
return next_nonblank(text, next_blank(text, i));
}
-