Skip to content

Commit

Permalink
fixes for alternate compile options
Browse files Browse the repository at this point in the history
  • Loading branch information
ashinn committed Jun 22, 2009
1 parent 3d46ace commit 097d670
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions include/chibi/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
7 changes: 4 additions & 3 deletions sexp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 097d670

Please sign in to comment.