Skip to content

Commit

Permalink
Use a macro
Browse files Browse the repository at this point in the history
  • Loading branch information
bryce-carson committed Nov 23, 2024
1 parent 1e91496 commit 430f3dc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 7 additions & 1 deletion src/api/r.c
Original file line number Diff line number Diff line change
Expand Up @@ -896,7 +896,13 @@ static bool initR(tic_mem *tic, const char *code) {
/* MAYBE TODO: test that TIC-80, minimally, has been redefined. If the
* others are not redefined from `{` print a single warning on the standard
* error (AND ABSOLUTLY NOWHERE ELSE). */
EVALG("`TIC-80` <- BDR <- BOOT <- MENU <- SCN <- `{`");
#define def(i) EVALG(#i" <- `{`;");
def(`TIC-80`);
def(BDR);
def(BOOT);
def(MENU);
def(SCN);
#undef def

/* Manually create a vector of type string, parse it, then evaluate it
* expression by expression. */
Expand Down
8 changes: 7 additions & 1 deletion src/api/r.org
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,13 @@ only one).
/* MAYBE TODO: test that TIC-80, minimally, has been redefined. If the
,* others are not redefined from `{` print a single warning on the standard
,* error (AND ABSOLUTLY NOWHERE ELSE). */
EVALG("`TIC-80` <- BDR <- BOOT <- MENU <- SCN <- `{`");
#define def(i) EVALG(#i" <- `{`;");
def(`TIC-80`);
def(BDR);
def(BOOT);
def(MENU);
def(SCN);
#undef def

/* Manually create a vector of type string, parse it, then evaluate it
,* expression by expression. */
Expand Down

0 comments on commit 430f3dc

Please sign in to comment.