mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-21 14:49:18 +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
|
endif
|
||||||
|
|
||||||
XLDFLAGS := $(LDFLAGS) $(GCLDFLAGS) -lm
|
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
|
INCLUDES = include/chibi/sexp.h include/chibi/config.h include/chibi/install.h
|
||||||
|
|
||||||
|
|
|
@ -35,8 +35,8 @@
|
||||||
/* uncomment this to enable stack overflow checks */
|
/* uncomment this to enable stack overflow checks */
|
||||||
/* #define USE_CHECK_STACK 1 */
|
/* #define USE_CHECK_STACK 1 */
|
||||||
|
|
||||||
/* uncomment this to enable debugging utilities */
|
/* uncomment this to disable debugging utilities */
|
||||||
/* #define USE_DEBUG 1 */
|
/* #define USE_DEBUG 0 */
|
||||||
|
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
/* DEFAULTS - DO NOT MODIFY ANYTHING BELOW THIS LINE */
|
/* DEFAULTS - DO NOT MODIFY ANYTHING BELOW THIS LINE */
|
||||||
|
|
7
sexp.c
7
sexp.c
|
@ -6,11 +6,12 @@
|
||||||
#include "chibi/sexp.h"
|
#include "chibi/sexp.h"
|
||||||
|
|
||||||
/* optional huffman-compressed immediate symbols */
|
/* optional huffman-compressed immediate symbols */
|
||||||
#if USE_HUFF_SYMS
|
|
||||||
struct sexp_huff_entry {
|
struct sexp_huff_entry {
|
||||||
unsigned char len;
|
unsigned char len;
|
||||||
unsigned short bits;
|
unsigned short bits;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if USE_HUFF_SYMS
|
||||||
#include "opt/sexp-hufftabs.c"
|
#include "opt/sexp-hufftabs.c"
|
||||||
static struct sexp_huff_entry huff_table[] = {
|
static struct sexp_huff_entry huff_table[] = {
|
||||||
#include "opt/sexp-huff.c"
|
#include "opt/sexp-huff.c"
|
||||||
|
@ -433,11 +434,11 @@ sexp sexp_substring (sexp ctx, sexp str, sexp start, sexp end) {
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if USE_HASH_SYMS
|
|
||||||
|
|
||||||
#define FNV_PRIME 16777619
|
#define FNV_PRIME 16777619
|
||||||
#define FNV_OFFSET_BASIS 2166136261uL
|
#define FNV_OFFSET_BASIS 2166136261uL
|
||||||
|
|
||||||
|
#if USE_HASH_SYMS
|
||||||
|
|
||||||
static sexp_uint_t sexp_string_hash(char *str, sexp_uint_t acc) {
|
static sexp_uint_t sexp_string_hash(char *str, sexp_uint_t acc) {
|
||||||
while (*str) {acc *= FNV_PRIME; acc ^= *str++;}
|
while (*str) {acc *= FNV_PRIME; acc ^= *str++;}
|
||||||
return acc;
|
return acc;
|
||||||
|
|
Loading…
Add table
Reference in a new issue