diff options
Diffstat (limited to 'src/c')
-rw-r--r-- | src/c/urweb.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/c/urweb.c b/src/c/urweb.c index c37393f2..6f54e1a7 100644 --- a/src/c/urweb.c +++ b/src/c/urweb.c @@ -122,7 +122,7 @@ void lw_set_input(lw_context ctx, char *name, char *value) { ctx->inputs[n] = value; - printf("[%d] %s = %s\n", n, name, value); + //printf("[%d] %s = %s\n", n, name, value); } char *lw_get_input(lw_context ctx, int n) { @@ -130,7 +130,7 @@ char *lw_get_input(lw_context ctx, int n) { lw_error(ctx, FATAL, "Negative input index %d", n); if (n >= lw_inputs_len) lw_error(ctx, FATAL, "Out-of-bounds input index %d", n); - printf("[%d] = %s\n", n, ctx->inputs[n]); + //printf("[%d] = %s\n", n, ctx->inputs[n]); return ctx->inputs[n]; } @@ -656,3 +656,13 @@ char *lw_Basis_sqlifyBool(lw_context ctx, lw_Basis_bool b) { else return "TRUE"; } + +char *lw_Basis_ensqlBool(lw_Basis_bool b) { + static lw_Basis_int true = 1; + static lw_Basis_int false = 0; + + if (b == lw_Basis_False) + return (char *)&false; + else + return (char *)&true; +} |