-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1133 from zekemorton/reapi_match_options
Add match options and match satisfy to reapi
- Loading branch information
Showing
26 changed files
with
700 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#ifndef MATCH_OP_H | ||
#define MATCH_OP_H | ||
|
||
|
||
typedef enum match_op_t { MATCH_UNKNOWN, | ||
MATCH_ALLOCATE, | ||
MATCH_ALLOCATE_W_SATISFIABILITY, | ||
MATCH_ALLOCATE_ORELSE_RESERVE, | ||
MATCH_SATISFIABILITY } match_op_t; | ||
|
||
static const char *match_op_to_string (match_op_t match_op) { | ||
switch (match_op) { | ||
case MATCH_ALLOCATE: return "allocate"; | ||
case MATCH_ALLOCATE_ORELSE_RESERVE: return "allocate_orelse_reserve"; | ||
case MATCH_ALLOCATE_W_SATISFIABILITY: return "allocate_with_satisfiability"; | ||
case MATCH_SATISFIABILITY: return "satisfiability"; | ||
default: return "error"; | ||
} | ||
} | ||
|
||
static bool match_op_valid (match_op_t match_op) { | ||
|
||
if ( (match_op != MATCH_ALLOCATE) && | ||
(match_op != MATCH_ALLOCATE_W_SATISFIABILITY) && | ||
(match_op != MATCH_ALLOCATE_ORELSE_RESERVE) && | ||
(match_op != MATCH_SATISFIABILITY) ) { | ||
|
||
return false; | ||
} | ||
|
||
return true; | ||
} | ||
|
||
#endif //MATCH_OP_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.