diff --git a/eval.c b/eval.c index 2b5a7ed7..5db43b4a 100644 --- a/eval.c +++ b/eval.c @@ -33,7 +33,7 @@ sexp sexp_compile_error (sexp ctx, const char *message, sexp o) { return exn; } -void sexp_warn (sexp ctx, char *msg, sexp x) { +void sexp_warn (sexp ctx, const char *msg, sexp x) { sexp_gc_var1(out); int strictp = sexp_truep(sexp_global(ctx, SEXP_G_STRICT_P)); sexp_gc_preserve1(ctx, out); @@ -1319,7 +1319,7 @@ static sexp sexp_load_dl (sexp ctx, sexp file, sexp env) { sexp sexp_load_op (sexp ctx, sexp self, sexp_sint_t n, sexp source, sexp env) { #if SEXP_USE_DL || SEXP_USE_STATIC_LIBS - char *suffix; + const char *suffix; #endif sexp_gc_var5(ctx2, x, in, res, out); if (!env) env = sexp_context_env(ctx); diff --git a/include/chibi/eval.h b/include/chibi/eval.h index e694ebe2..6796db84 100644 --- a/include/chibi/eval.h +++ b/include/chibi/eval.h @@ -54,7 +54,7 @@ SEXP_API const char** sexp_opcode_names; /**************************** prototypes ******************************/ -SEXP_API void sexp_warn (sexp ctx, char *msg, sexp x); +SEXP_API void sexp_warn (sexp ctx, const char *msg, sexp x); SEXP_API void sexp_scheme_init (void); SEXP_API sexp sexp_make_eval_context (sexp context, sexp stack, sexp env, sexp_uint_t size, sexp_uint_t max_size); SEXP_API sexp sexp_make_child_context (sexp context, sexp lambda); diff --git a/include/chibi/sexp.h b/include/chibi/sexp.h index da554829..79a3e65f 100755 --- a/include/chibi/sexp.h +++ b/include/chibi/sexp.h @@ -230,7 +230,7 @@ typedef sexp (*sexp_proc4) (sexp, sexp, sexp_sint_t, sexp, sexp, sexp); typedef sexp (*sexp_proc5) (sexp, sexp, sexp_sint_t, sexp, sexp, sexp, sexp); typedef sexp (*sexp_proc6) (sexp, sexp, sexp_sint_t, sexp, sexp, sexp, sexp, sexp); typedef sexp (*sexp_proc7) (sexp, sexp, sexp_sint_t, sexp, sexp, sexp, sexp, sexp, sexp); -typedef sexp (*sexp_init_proc)(sexp, sexp, sexp_sint_t, sexp, const char*, sexp_abi_identifier_t); +typedef sexp (*sexp_init_proc)(sexp, sexp, sexp_sint_t, sexp, const char*, const sexp_abi_identifier_t); typedef struct sexp_free_list_t *sexp_free_list; struct sexp_free_list_t { diff --git a/main.c b/main.c index b297ce2d..b6a358ef 100644 --- a/main.c +++ b/main.c @@ -363,7 +363,8 @@ void run_main (int argc, char **argv) { #if SEXP_USE_MODULES char *impmod; #endif - char *arg, *prefix=NULL, *suffix=NULL, *main_symbol=NULL, *main_module=NULL; + char *arg; + const char *prefix=NULL, *suffix=NULL, *main_symbol=NULL, *main_module=NULL; sexp_sint_t i, j, c, quit=0, print=0, init_loaded=0, mods_loaded=0, no_script=0, fold_case=SEXP_DEFAULT_FOLD_CASE_SYMS; sexp_uint_t heap_size=0, heap_max_size=SEXP_MAXIMUM_HEAP_SIZE; @@ -439,7 +440,7 @@ void run_main (int argc, char **argv) { sexp_load_standard_ports(ctx, env, stdin, stdout, stderr, 0); break; case 'q': - argv[i--] = "-xchibi"; + argv[i--] = (char*)"-xchibi"; break; case 'A': init_context(); @@ -491,7 +492,7 @@ void run_main (int argc, char **argv) { if (! init_loaded++) { init_context(); env = sexp_load_standard_env(ctx, env, SEXP_SEVEN); - } + } arg = ((argv[i][2] == '\0') ? argv[++i] : argv[i]+2); if (!sexp_save_image(ctx, arg)) exit_failure(); diff --git a/sexp.c b/sexp.c index b19d6b32..2bb67d24 100644 --- a/sexp.c +++ b/sexp.c @@ -512,7 +512,7 @@ sexp sexp_make_exception (sexp ctx, sexp kind, sexp message, sexp irritants, return exn; } -sexp sexp_string_cat3 (sexp ctx, char *pre, char *mid, char* suf) { +sexp sexp_string_cat3 (sexp ctx, const char *pre, const char *mid, const char* suf) { int plen=strlen(pre), mlen=strlen(mid), slen=strlen(suf); char *s; sexp str; @@ -3145,4 +3145,3 @@ void sexp_init (void) { #endif } } -