aboutsummaryrefslogtreecommitdiffstats
path: root/qm.h
blob: 173dd4c550a63ba61d55387b3e93dffa0e37498a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#ifndef QM_C
#define QM_C

#include <string.h>

typedef struct {
    char var;
    bool not_;
} Variable;

typedef struct {
    unsigned int numVars;
    Variable vars[26];
} DNFTerm;

typedef struct {
    unsigned int numTerms;
    DNFTerm terms[100];
} DNF;

unsigned int strcnt(const char* str, const char cnt);
DNF parseDNFStr(const char* inpStr);
DNFTerm parseDNFTerm(const char* termStr);
void printForm(const DNF form);
void printForm2(const DNF form);

#endif