1999-09-14 09:36:47 -04:00
|
|
|
#include "scheme48.h"
|
|
|
|
|
|
|
|
/* StobData is used by fdports.c. It should be changed over to STOB_REF
|
|
|
|
** by removing the extra indirection. */
|
|
|
|
#define StobData(x) (S48_ADDRESS_AFTER_HEADER(x, s48_value))
|
|
|
|
|
|
|
|
#define IsChar(x) ((((long) x) & 0xff) == S48_CHAR)
|
2002-01-11 05:13:58 -05:00
|
|
|
/* JMG: untested !! */
|
1999-09-14 09:36:47 -04:00
|
|
|
|
|
|
|
#define StrByte(x, i) ((i) + S48_ADDRESS_AFTER_HEADER((x), char))
|
1999-09-14 15:46:27 -04:00
|
|
|
#define cig_string_body(x) (S48_ADDRESS_AFTER_HEADER((x), char))
|
1999-09-14 09:36:47 -04:00
|
|
|
|
1999-09-14 15:46:27 -04:00
|
|
|
#define AlienVal(x) (S48_STOB_REF((x),0))
|
2002-01-11 05:13:58 -05:00
|
|
|
/* JMG: no () around this, because it's a do..while(0) */
|
1999-09-17 15:56:52 -04:00
|
|
|
#define SetAlienVal(x, v) S48_STOB_SET((x), 0, (v))
|
1999-09-14 15:46:27 -04:00
|
|
|
|
2002-01-11 05:13:58 -05:00
|
|
|
/* JMG: some hacks to leave to old sources untouched */
|
1999-09-14 15:46:27 -04:00
|
|
|
#define ENTER_BOOLEAN(x) (x ? S48_TRUE : S48_FALSE)
|
1999-09-15 20:22:51 -04:00
|
|
|
#define EXTRACT_BOOLEAN(x) ((x==S48_TRUE) ? 1 : 0)
|
2002-01-11 05:13:58 -05:00
|
|
|
/* #define ENTER_FIXNUM(x) (s48_enter_fixnum(x)) */
|
|
|
|
/* #define SCHFALSE S48_FALSE */
|
1999-09-14 09:36:47 -04:00
|
|
|
|
|
|
|
extern char *scheme2c_strcpy(s48_value sstr);
|
|
|
|
|
|
|
|
extern s48_value strlen_or_false(const char *s);
|
|
|
|
|
|
|
|
extern char *copystring_or_die(const char *);
|
|
|
|
extern char *copystring(char *, const char *);
|
|
|
|
|
|
|
|
extern s48_value strlen_or_false(const char *);
|
|
|
|
|
|
|
|
extern void cig_check_nargs(int arity, int nargs, const char *fn);
|