#include "my_assert.h"
#include "my_str.h"
+#include "common.h"
struct sl_item {
char *name;
return buf;
}
-#define IS(w, y) !strcasecmp(w, y)
#define IS_OR2(w, x, y) (IS(w, x) || IS(w, y))
#define IS_OR3(w, x, y, z) (IS(w, x) || IS(w, y) || IS(w, z))
+
+#define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0]))
+#define IS(w, y) !strcmp(w, y)
+#define IS_START(w, y) !strncmp(w, y, strlen(y))
+
// read a line, truncating it if it doesn't fit
-static char *my_fgets(char *s, size_t size, FILE *stream)
+static inline char *my_fgets(char *s, size_t size, FILE *stream)
{
char *ret, *ret2;
char buf[64];
#include "my_str.h"
#include "common.h"
-#define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0]))
-#define IS(w, y) !strcmp(w, y)
-#define IS_START(w, y) !strncmp(w, y, strlen(y))
-
#include "protoparse.h"
static const char *asmfn;
#include "my_assert.h"
#include "my_str.h"
-
-#define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0]))
-#define IS(w, y) !strcmp(w, y)
+#include "common.h"
#include "protoparse.h"
#include "my_assert.h"
#include "my_str.h"
-
-#define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0]))
-#define IS(w, y) !strcmp(w, y)
-#define IS_START(w, y) !strncmp(w, y, strlen(y))
+#include "common.h"
#include "protoparse.h"
#include "my_str.h"
#include "common.h"
-#define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0]))
-#define IS(w, y) !strcmp(w, y)
-#define IS_START(w, y) !strncmp(w, y, strlen(y))
-
#include "protoparse.h"
static const char *asmfn;