From a564e775fc0e34c9f378f0cf939fbcc8c76310e2 Mon Sep 17 00:00:00 2001 From: Michael Livshin Date: Mon, 22 May 2000 14:03:37 +0000 Subject: [PATCH] * guile-doc-snarf.in: put the preprocessed file through sed to trim all lines to 512 chars. I hope it doesn't break anybody's shell. we'll see. * gc.h (SCM_[SET_]CELL_{WORD,OBJECT}, SCM_VALIDATE_CELL): reverted the previous change to this macros, after deciding to torture the snarfer instead. --- libguile/ChangeLog | 10 ++++++++++ libguile/gc.h | 20 ++------------------ libguile/guile-doc-snarf.in | 4 +++- 3 files changed, 15 insertions(+), 19 deletions(-) diff --git a/libguile/ChangeLog b/libguile/ChangeLog index 43f80ed4e..efd2f647f 100644 --- a/libguile/ChangeLog +++ b/libguile/ChangeLog @@ -1,3 +1,13 @@ +2000-05-22 Michael Livshin + + * guile-doc-snarf.in: put the preprocessed file through sed to + trim all lines to 512 chars. I hope it doesn't break anybody's + shell. we'll see. + + * gc.h (SCM_[SET_]CELL_{WORD,OBJECT}, SCM_VALIDATE_CELL): reverted + the previous change to this macros, after deciding to torture the + snarfer instead. + 2000-05-21 Michael Livshin * gc.h (SCM_[SET_]CELL_{WORD,OBJECT}, SCM_VALIDATE_CELL): brought diff --git a/libguile/gc.h b/libguile/gc.h index 624d2a650..03084f743 100644 --- a/libguile/gc.h +++ b/libguile/gc.h @@ -85,52 +85,36 @@ typedef scm_cell * SCM_CELLPTR; /* Low level cell data accessing macros: */ -#define SCM_VALIDATE_CELL(x) (!scm_cellp (x) ? abort () : 1) +#define SCM_VALIDATE_CELL(x) \ + (SCM_DEBUG_CELL_ACCESSES ? (!scm_cellp (x) ? abort () : 1) : 1) -#if (SCM_DEBUG_CELL_ACCESSES == 0) -#define SCM_CELL_WORD(x, n) (((scm_bits_t *) SCM2PTR (x)) [n]) -#else #define SCM_CELL_WORD(x, n) \ ((SCM_VALIDATE_CELL (x)), \ (((scm_bits_t *) SCM2PTR (x)) [n])) -#endif - #define SCM_CELL_WORD_0(x) SCM_CELL_WORD (x, 0) #define SCM_CELL_WORD_1(x) SCM_CELL_WORD (x, 1) #define SCM_CELL_WORD_2(x) SCM_CELL_WORD (x, 2) #define SCM_CELL_WORD_3(x) SCM_CELL_WORD (x, 3) -#if (SCM_DEBUG_CELL_ACCESSES == 0) -#define SCM_CELL_OBJECT(x, n) SCM_PACK (((scm_bits_t *) SCM2PTR (x)) [n]) -#else #define SCM_CELL_OBJECT(x, n) \ ((SCM_VALIDATE_CELL (x)), \ (SCM_PACK (((scm_bits_t *) SCM2PTR (x)) [n]))) -#endif #define SCM_CELL_OBJECT_0(x) SCM_CELL_OBJECT (x, 0) #define SCM_CELL_OBJECT_1(x) SCM_CELL_OBJECT (x, 1) #define SCM_CELL_OBJECT_2(x) SCM_CELL_OBJECT (x, 2) #define SCM_CELL_OBJECT_3(x) SCM_CELL_OBJECT (x, 3) -#if (SCM_DEBUG_CELL_ACCESSES == 0) -#define SCM_SET_CELL_WORD(x, n, v) ((((scm_bits_t *) SCM2PTR (x)) [n]) = (scm_bits_t) (v)) -#else #define SCM_SET_CELL_WORD(x, n, v) \ ((SCM_VALIDATE_CELL (x)), \ ((((scm_bits_t *) SCM2PTR (x)) [n]) = (scm_bits_t) (v))) -#endif #define SCM_SET_CELL_WORD_0(x, v) SCM_SET_CELL_WORD (x, 0, v) #define SCM_SET_CELL_WORD_1(x, v) SCM_SET_CELL_WORD (x, 1, v) #define SCM_SET_CELL_WORD_2(x, v) SCM_SET_CELL_WORD (x, 2, v) #define SCM_SET_CELL_WORD_3(x, v) SCM_SET_CELL_WORD (x, 3, v) -#if (SCM_DEBUG_CELL_ACCESSES == 0) -#define SCM_SET_CELL_OBJECT(x, n, v) ((((scm_bits_t *) SCM2PTR (x)) [n]) = SCM_UNPACK (v)) -#else #define SCM_SET_CELL_OBJECT(x, n, v) \ ((SCM_VALIDATE_CELL (x)), \ ((((scm_bits_t *) SCM2PTR (x)) [n]) = SCM_UNPACK (v))) -#endif #define SCM_SET_CELL_OBJECT_0(x, v) SCM_SET_CELL_OBJECT (x, 0, v) #define SCM_SET_CELL_OBJECT_1(x, v) SCM_SET_CELL_OBJECT (x, 1, v) #define SCM_SET_CELL_OBJECT_2(x, v) SCM_SET_CELL_OBJECT (x, 2, v) diff --git a/libguile/guile-doc-snarf.in b/libguile/guile-doc-snarf.in index 9affee8cc..c4af89754 100755 --- a/libguile/guile-doc-snarf.in +++ b/libguile/guile-doc-snarf.in @@ -27,5 +27,7 @@ ${AWK} -f guile-func-name-check "$fullfilename" ## We must use a temporary file here, instead of a pipe, because we ## need to know if CPP exits with a non-zero status. -${CPP} -DSCM_MAGIC_SNARFER "$@" > ${temp} || exit $? +${CPP} -DSCM_MAGIC_SNARFER "$@" | \ +sed 's/^\(................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................\).*/\1/g' \ +> ${temp} || exit $? < ${temp} ${AWK} -f `dirname $0`/guile-snarf.awk `basename ${dot_doc}`