2017-06-26 12:15:03 +03:00
|
|
|
#ifndef PRELUDE_H
|
|
|
|
#define PRELUDE_H
|
|
|
|
|
|
|
|
#include <assert.h>
|
2018-02-27 16:14:14 +03:00
|
|
|
#include <stdbool.h>
|
2018-02-27 16:49:06 +03:00
|
|
|
#include <stddef.h>
|
2017-06-26 12:15:03 +03:00
|
|
|
|
2017-12-04 11:24:31 +03:00
|
|
|
typedef char* string;
|
2018-03-04 21:39:00 +03:00
|
|
|
typedef char* pattern;
|
2017-11-22 18:25:05 +03:00
|
|
|
|
2017-10-13 13:48:18 +03:00
|
|
|
// Array
|
|
|
|
typedef struct {
|
2017-12-03 21:14:58 +03:00
|
|
|
size_t len;
|
2017-10-13 13:48:18 +03:00
|
|
|
void *data;
|
|
|
|
} Array;
|
|
|
|
|
2017-06-26 12:15:03 +03:00
|
|
|
bool not(bool b) {
|
|
|
|
return !b;
|
|
|
|
}
|
|
|
|
|
2017-10-24 15:13:45 +03:00
|
|
|
bool and(bool x, bool y) { return x && y; }
|
|
|
|
bool or(bool x, bool y) { return x || y; }
|
2017-06-26 12:15:03 +03:00
|
|
|
|
|
|
|
#endif
|