mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-21 06:39:17 +02:00
fixes for alternate compile options
This commit is contained in:
parent
3d46acee56
commit
097d6705de
3 changed files with 7 additions and 6 deletions
2
Makefile
2
Makefile
|
@ -44,7 +44,7 @@ XCPPFLAGS := $(CPPFLAGS) -Iinclude
|
|||
endif
|
||||
|
||||
XLDFLAGS := $(LDFLAGS) $(GCLDFLAGS) -lm
|
||||
XCFLAGS := $(CFLAGS) -Wall -O2 -g
|
||||
XCFLAGS := -Wall -O2 -g $(CFLAGS)
|
||||
|
||||
INCLUDES = include/chibi/sexp.h include/chibi/config.h include/chibi/install.h
|
||||
|
||||
|
|
|
@ -35,8 +35,8 @@
|
|||
/* uncomment this to enable stack overflow checks */
|
||||
/* #define USE_CHECK_STACK 1 */
|
||||
|
||||
/* uncomment this to enable debugging utilities */
|
||||
/* #define USE_DEBUG 1 */
|
||||
/* uncomment this to disable debugging utilities */
|
||||
/* #define USE_DEBUG 0 */
|
||||
|
||||
/************************************************************************/
|
||||
/* DEFAULTS - DO NOT MODIFY ANYTHING BELOW THIS LINE */
|
||||
|
|
7
sexp.c
7
sexp.c
|
@ -6,11 +6,12 @@
|
|||
#include "chibi/sexp.h"
|
||||
|
||||
/* optional huffman-compressed immediate symbols */
|
||||
#if USE_HUFF_SYMS
|
||||
struct sexp_huff_entry {
|
||||
unsigned char len;
|
||||
unsigned short bits;
|
||||
};
|
||||
|
||||
#if USE_HUFF_SYMS
|
||||
#include "opt/sexp-hufftabs.c"
|
||||
static struct sexp_huff_entry huff_table[] = {
|
||||
#include "opt/sexp-huff.c"
|
||||
|
@ -433,11 +434,11 @@ sexp sexp_substring (sexp ctx, sexp str, sexp start, sexp end) {
|
|||
return res;
|
||||
}
|
||||
|
||||
#if USE_HASH_SYMS
|
||||
|
||||
#define FNV_PRIME 16777619
|
||||
#define FNV_OFFSET_BASIS 2166136261uL
|
||||
|
||||
#if USE_HASH_SYMS
|
||||
|
||||
static sexp_uint_t sexp_string_hash(char *str, sexp_uint_t acc) {
|
||||
while (*str) {acc *= FNV_PRIME; acc ^= *str++;}
|
||||
return acc;
|
||||
|
|
Loading…
Add table
Reference in a new issue