Skip to content

Commit

Permalink
Align cmt defs
Browse files Browse the repository at this point in the history
  • Loading branch information
mattfidler committed Dec 2, 2024
1 parent dd7722b commit df580c6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/codegen.c
Original file line number Diff line number Diff line change
Expand Up @@ -676,8 +676,8 @@ SEXP _rxode2_codegen(SEXP c_file, SEXP prefix, SEXP libname,
if (tb.hasKa == 1) {
sAppend(&sbOut, "#define _DEPOT_ %d\n", tb.statei);
sAppend(&sbOut, "#define _CENTRAL_ %d\n", tb.statei+1);
} else if (tb.hasCentral == 1) {
if (tb.hasDepot){
} else if (tb.hasCentralCmt == 1) {
if (tb.hasDepotCmt){
fclose(fpIO);
_rxode2parse_unprotect();
err_trans("linCmt() does not have 'depot' compartment without a 'ka'");
Expand Down
8 changes: 4 additions & 4 deletions src/parseFunsDosing.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ static inline int handleFunctionTadSingleStateCcode(transFunctions *tf,char *v2)
sAppend(&sb, "_%s1(", tf->v);
sAppend(&sbDt, "_%s1(", tf->v);
if (new_de(v2, 0)){
if (!strcmp("depot", v2)) {
tb.hasDepot = 1;
if (tb.linCmt && !strcmp("depot", v2)) {
tb.hasDepotCmt = 1;
aAppendN("_DEPOT_)", 8);
return 1;
} else if (!strcmp("central", v2)) {
tb.hasCentral = 1;
} else if (tb.linCmt && !strcmp("central", v2)) {
tb.hasCentralCmt = 1;
aAppendN("_CENTRAL_)", 10);
return 1;
} else {
Expand Down
2 changes: 0 additions & 2 deletions src/tran.c
Original file line number Diff line number Diff line change
Expand Up @@ -405,8 +405,6 @@ void reset(void) {
tb.maxtheta = 0;
tb.hasCmt = 0;
tb.maxeta = 0;
tb.hasDepot = 0;
tb.hasCentral = 0;
tb.hasDepotCmt = 0;
tb.hasCentralCmt = 0;
tb.hasKa = 0;
Expand Down
2 changes: 0 additions & 2 deletions src/tran.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,6 @@ lhs symbols?
int maxtheta;
int hasCmt;
int maxeta;
int hasDepot;
int hasCentral;
int hasDepotCmt;
int hasCentralCmt;
int hasKa;
Expand Down

0 comments on commit df580c6

Please sign in to comment.