diff --git a/libguile/eval.c b/libguile/eval.c index 56270611c..28bf63426 100644 --- a/libguile/eval.c +++ b/libguile/eval.c @@ -449,13 +449,13 @@ SCM scm_i_trace; -static void bodycheck SCM_P ((SCM xorig, SCM *bodyloc, char *what)); +static void bodycheck SCM_P ((SCM xorig, SCM *bodyloc, const char *what)); static void bodycheck (xorig, bodyloc, what) SCM xorig; SCM *bodyloc; - char *what; + const char *what; { ASRTSYNTAX (scm_ilength (*bodyloc) >= 1, scm_s_expression); } @@ -957,7 +957,7 @@ scm_m_letrec (xorig, env) SCM_SYNTAX(s_let, "let", scm_makmmacro, scm_m_let); -SCM_SYMBOL(scm_i_let, s_let); +SCM_GLOBAL_SYMBOL(scm_i_let, s_let); SCM scm_m_let (xorig, env) diff --git a/libguile/numbers.c b/libguile/numbers.c index 9dcf904fd..6a41f381e 100644 --- a/libguile/numbers.c +++ b/libguile/numbers.c @@ -753,7 +753,9 @@ scm_bit_extract (n, start, end) return SCM_MAKINUM ((SCM_INUM (n) >> start) & ((1L << (end - start)) - 1)); } -char scm_logtab[] = { 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4 }; +static const char scm_logtab[] = { + 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4 +}; SCM_PROC (s_logcount, "logcount", 1, 0, 0, scm_logcount); SCM @@ -786,7 +788,9 @@ scm_logcount (n) return SCM_MAKINUM (c); } -char scm_ilentab[] = { 0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4 }; +static const char scm_ilentab[] = { + 0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4 +}; SCM_PROC (s_integer_length, "integer-length", 1, 0, 0, scm_integer_length); SCM @@ -827,7 +831,7 @@ scm_integer_length (n) #ifdef SCM_BIGDIG -char scm_s_bignum[] = "bignum"; +static const char s_bignum[] = "bignum"; SCM scm_mkbig (nlen, sign) @@ -837,11 +841,11 @@ scm_mkbig (nlen, sign) SCM v = nlen; /* Cast to SCM to avoid signed/unsigned comparison warnings. */ if (((v << 16) >> 16) != (SCM) nlen) - scm_wta (SCM_MAKINUM (nlen), (char *) SCM_NALLOC, scm_s_bignum); + scm_wta (SCM_MAKINUM (nlen), (char *) SCM_NALLOC, s_bignum); SCM_NEWCELL (v); SCM_DEFER_INTS; SCM_SETCHARS (v, scm_must_malloc ((long) (nlen * sizeof (SCM_BIGDIG)), - scm_s_bignum)); + s_bignum)); SCM_SETNUMDIGS (v, nlen, sign ? scm_tc16_bigneg : scm_tc16_bigpos); SCM_ALLOW_INTS; return v; @@ -868,7 +872,7 @@ scm_big2inum (b, l) } -char s_adjbig[] = "scm_adjbig"; +static const char s_adjbig[] = "scm_adjbig"; SCM scm_adjbig (b, nlen) @@ -1521,7 +1525,7 @@ scm_divbigbig (x, nx, y, ny, sgn, modes) /*** NUMBERS -> STRINGS ***/ #ifdef SCM_FLOATS int scm_dblprec; -static double fx[] = +static const double fx[] = { 0.0, 5e-1, 5e-2, 5e-3, 5e-4, 5e-5, 5e-6, 5e-7, 5e-8, 5e-9, 5e-10, 5e-11, 5e-12, 5e-13, 5e-14, 5e-15, diff --git a/libguile/numbers.h b/libguile/numbers.h index 93fa8e317..fbc87a335 100644 --- a/libguile/numbers.h +++ b/libguile/numbers.h @@ -173,8 +173,6 @@ # define SCM_BIGDN(x) ((x) >> SCM_BITSPERDIG) # define SCM_BIGLO(x) ((x) & (SCM_BIGRAD-1)) -extern char scm_s_bignum[]; - #endif /* def BIGNUMS */ #ifndef SCM_BIGDIG diff --git a/libguile/snarf.h b/libguile/snarf.h index bf62e6144..ce6a088e9 100644 --- a/libguile/snarf.h +++ b/libguile/snarf.h @@ -62,7 +62,7 @@ #ifndef SCM_MAGIC_SNARFER #define SCM_SYNTAX(RANAME, STR, TYPE, CFN) \ - static char RANAME[]=STR + static const char RANAME[]=STR #else #define SCM_SYNTAX(RANAME, STR, TYPE, CFN) \ %%% scm_make_synt (RANAME, TYPE, CFN)