* Replace use of deprecated macros SCM_INPORTP, SCM_OUTPORTP, SCM_ICHRP.
+2000-05-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
+
+ * async.c (scm_sys_gc_async_thunk), chars.h (SCM_ICHRP, SCM_ICHR,
+ SCM_MAKICHR), continuations.h (SCM_SETJMPBUF), error.c
+ (scm_sysmissing), error.h (scm_sysmissing), evalext.c
+ ('serial-map), ioext.c (scm_fseek), ioext.h (scm_fseek),
+ keywords.c (scm_tc16_kw, scm_init_keywords), ports.h (SCM_CRDY,
+ SCM_INPORTP, SCM_OUTPORTP), ramap.c ('serial-array-copy!,
+ 'serial-array-map!), smob.c (scm_newsmob), smob.h (scm_smobfuns,
+ scm_newsmob), tag.c (scm_tag), tag.h (scm_tag), tags.h
+ (scm_tc16_flo, scm_tc_flo, scm_tc_dblr, scm_tc_dblc): Wrapped
+ deprecated code between #if (SCM_DEBUG_DEPRECATED == 0) #endif.
+
+ * fports.c (scm_fport_buffer_add), ports.c (scm_input_port_p,
+ scm_output_port_p), print.c (scm_get_print_state), validate.h
+ (SCM_VALIDATE_CHAR): Replace use of deprecated macros
+ SCM_INPORTP, SCM_OUTPORTP, SCM_ICHRP by SCM_INPUT_PORT_P,
+ SCM_OUTPUT_PORT_P, SCM_CHARP, respectively.
+
2000-05-14 Gary Houston <ghouston@arglist.com>
* stime.c (scm_strftime): if HAVE_TM_ZONE is not defined, hack the
scm_sys_gc_async_thunk (void)
{
scm_c_run_hook (scm_after_gc_hook, SCM_EOL);
+
+#if (SCM_DEBUG_DEPRECATED == 0)
+
/* The following code will be removed in Guile 1.5. */
if (SCM_NFALSEP (scm_gc_vcell))
{
if (SCM_NFALSEP (proc) && !SCM_UNBNDP (proc))
scm_apply (proc, SCM_EOL, SCM_EOL);
}
+
+#endif /* SCM_DEBUG_DEPRECATED == 0 */
+
return SCM_UNSPECIFIED;
}
#define SCM_CHAR(x) ((unsigned int)SCM_ITAG8_DATA(x))
#define SCM_MAKE_CHAR(x) SCM_MAKE_ITAG8(x, scm_tc8_char)
-#define SCM_ICHRP(x) SCM_CHARP(x) /* deprecated */
-#define SCM_ICHR(x) SCM_CHAR(x) /* deprecated */
-#define SCM_MAKICHR(x) SCM_MAKE_CHAR(x) /* deprecated */
-
\f
extern char *const scm_charnames[];
extern int scm_downcase (unsigned int c);
extern void scm_init_chars (void);
+\f
+
+#if (SCM_DEBUG_DEPRECATED == 0)
+
+#define SCM_ICHRP(x) SCM_CHARP(x)
+#define SCM_ICHR(x) SCM_CHAR(x)
+#define SCM_MAKICHR(x) SCM_MAKE_CHAR(x)
+
+#endif /* SCM_DEBUG_DEPRECATED == 0 */
+
#endif /* SCM_CHARSH */
/*
#define SCM_CONTREGS(x) ((scm_contregs *) SCM_CELL_WORD_1 (x))
#define SCM_SET_CONTREGS(x, r) (SCM_SET_CELL_WORD_1 ((x), (scm_bits_t) (r)))
-#define SCM_SETJMPBUF(x, r) (SCM_SET_CONTREGS ((x), (r))) /* deprecated */
#define SCM_JMPBUF(x) ((SCM_CONTREGS (x))->jmpbuf)
#define SCM_DYNENV(x) ((SCM_CONTREGS (x))->dynenv)
extern SCM scm_call_continuation (SCM cont, SCM val);
extern void scm_init_continuations (void);
+\f
+
+#if (SCM_DEBUG_DEPRECATED == 0)
+
+#define SCM_SETJMPBUF(x, r) (SCM_SET_CONTREGS ((x), (r)))
+
+#endif /* SCM_DEBUG_DEPRECATED == 0 */
+
#endif /* CONTINUATIONSH */
/*
scm_cons (SCM_MAKINUM (eno), SCM_EOL));
}
+
+#if (SCM_DEBUG_DEPRECATED == 0)
+
/* scm_sysmissing is no longer used in libguile. it can probably be
removed after a release or two. there's a comment in NEWS about it
(2000-01-09). */
#endif
}
+#endif /* SCM_DEBUG_DEPRECATED == 0 */
+
+
SCM_SYMBOL (scm_num_overflow_key, "numerical-overflow");
void
scm_num_overflow (const char *subr)
extern void scm_syserror (const char *subr) SCM_NORETURN;
extern void scm_syserror_msg (const char *subr, const char *message,
SCM args, int eno) SCM_NORETURN;
-/* scm_sysmissing is no longer used in libguile. it can probably be
- removed after a release or two (2000-01-09). */
-extern void scm_sysmissing (const char *subr) SCM_NORETURN;
extern void scm_num_overflow (const char *subr) SCM_NORETURN;
extern void scm_out_of_range (const char *subr, SCM bad_value)
SCM_NORETURN;
extern SCM scm_wta (SCM arg, const char *pos, const char *s_subr);
extern void scm_init_error (void);
+\f
+
+#if (SCM_DEBUG_DEPRECATED == 0)
+
+extern void scm_sysmissing (const char *subr) SCM_NORETURN;
+
+#endif /* SCM_DEBUG_DEPRECATED == 0 */
+
#endif /* ERRORH */
/*
#endif
}
+#if (SCM_DEBUG_DEPRECATED == 0)
+
/* This name is obsolete. Will be removed in 1.5. */
SCM_REGISTER_PROC (s_serial_map, "serial-map", 2, 0, 1, scm_map);
+#endif /* SCM_DEBUG_DEPRECATED == 0 */
+
SCM_REGISTER_PROC (s_map_in_order, "map-in-order", 2, 0, 1, scm_map);
void
write_size = default_size;
}
- if (SCM_INPORTP (port) && read_size > 0)
+ if (SCM_INPUT_PORT_P (port) && read_size > 0)
{
pt->read_buf = malloc (read_size);
if (pt->read_buf == NULL)
pt->read_buf_size = 1;
}
- if (SCM_OUTPORTP (port) && write_size > 0)
+ if (SCM_OUTPUT_PORT_P (port) && write_size > 0)
{
pt->write_buf = malloc (write_size);
if (pt->write_buf == NULL)
}
#undef FUNC_NAME
+
+#if (SCM_DEBUG_DEPRECATED == 0)
+
SCM_DEFINE (scm_fseek, "fseek", 3, 0, 0,
(SCM object, SCM offset, SCM whence),
"Obsolete. Almost the same as seek, above, but the return value is\n"
}
#undef FUNC_NAME
+#endif /* SCM_DEBUG_DEPRECATED == 0 */
+
+
SCM_DEFINE (scm_redirect_port, "redirect-port", 2, 0, 0,
(SCM old, SCM new),
"This procedure takes two ports and duplicates the underlying file\n"
extern SCM scm_read_line (SCM port);
extern SCM scm_write_line (SCM obj, SCM port);
extern SCM scm_ftell (SCM object);
-extern SCM scm_fseek (SCM object, SCM offset, SCM whence);
extern SCM scm_redirect_port (SCM into_pt, SCM from_pt);
extern SCM scm_dup_to_fdes (SCM fd_or_port, SCM newfd);
extern SCM scm_fileno (SCM port);
extern SCM scm_fdes_to_ports (SCM fd);
extern void scm_init_ioext (void);
+\f
+
+#if (SCM_DEBUG_DEPRECATED == 0)
+
+extern SCM scm_fseek (SCM object, SCM offset, SCM whence);
+
+#endif /* SCM_DEBUG_DEPRECATED == 0 */
+
#endif /* IOEXTH */
/*
int scm_tc16_keyword;
+
+#if (SCM_DEBUG_DEPRECATED == 0)
+
/* This global is only kept for backward compatibility.
Will be removed in next release. */
int scm_tc16_kw;
+#endif /* SCM_DEBUG_DEPRECATED == 0 */
+
SCM_DEFINE (scm_make_keyword_from_dash_symbol, "make-keyword-from-dash-symbol", 1, 0, 0,
(SCM symbol),
{
scm_tc16_keyword = scm_make_smob_type_mfpe ("keyword", 0,
scm_markcdr, NULL, prin_keyword, NULL);
+
+#if (SCM_DEBUG_DEPRECATED == 0)
+
scm_tc16_kw = scm_tc16_keyword;
+
+#endif /* SCM_DEBUG_DEPRECATED == 0 */
+
scm_keyword_obarray = scm_make_vector (SCM_MAKINUM (256), SCM_EOL);
#include "libguile/keywords.x"
}
{
if (SCM_IMP (x))
return SCM_BOOL_F;
- return SCM_BOOL(SCM_INPORTP (x));
+ return SCM_BOOL(SCM_INPUT_PORT_P (x));
}
#undef FUNC_NAME
return SCM_BOOL_F;
if (SCM_PORT_WITH_PS_P (x))
x = SCM_PORT_WITH_PS_PORT (x);
- return SCM_BOOL(SCM_OUTPORTP (x));
+ return SCM_BOOL(SCM_OUTPUT_PORT_P (x));
}
#undef FUNC_NAME
#define SCM_RDNG (2L<<16) /* Is it a readable port? */
#define SCM_WRTNG (4L<<16) /* Is it writable? */
#define SCM_BUF0 (8L<<16) /* Is it unbuffered? */
-/* #define SCM_CRDY (32L<<16) obsolete, for pushed back characters */
#define SCM_BUFLINE (64L<<16) /* Is it line-buffered? */
#define SCM_PORTP(x) (SCM_NIMP(x) && (SCM_TYP7(x)==scm_tc7_port))
#define SCM_INPUT_PORT_P(x) \
(SCM_NIMP(x) \
&& (((0x7f | SCM_RDNG) & SCM_UNPACK_CAR(x)) == (scm_tc7_port | SCM_RDNG)))
-#define SCM_INPORTP(x) SCM_INPUT_PORT_P (x) /* Deprecated */
#define SCM_OUTPUT_PORT_P(x) \
(SCM_NIMP(x) \
&& (((0x7f | SCM_WRTNG) & SCM_UNPACK_CAR(x))==(scm_tc7_port | SCM_WRTNG)))
-#define SCM_OUTPORTP(x) SCM_OUTPUT_PORT_P (x) /* Deprecated */
#define SCM_OPENP(x) (SCM_NIMP(x) && (SCM_OPN & SCM_UNPACK_CAR (x)))
#define SCM_CLOSEDP(x) (!SCM_OPENP(x))
extern SCM scm_pt_member (SCM member);
#endif /* GUILE_DEBUG */
+\f
+
+#if (SCM_DEBUG_DEPRECATED == 0)
+
+/* #define SCM_CRDY (32L<<16) obsolete, for pushed back characters */
+#define SCM_INPORTP(x) SCM_INPUT_PORT_P (x)
+#define SCM_OUTPORTP(x) SCM_OUTPUT_PORT_P (x)
+
+#endif /* SCM_DEBUG_DEPRECATED == 0 */
+
#endif /* PORTSH */
/*
{
if (SCM_PORT_WITH_PS_P (port))
return SCM_PORT_WITH_PS_PS (port);
- if (SCM_OUTPORTP (port))
+ if (SCM_OUTPUT_PORT_P (port))
return SCM_BOOL_F;
RETURN_SCM_WTA (1,port);
}
}
+#if (SCM_DEBUG_DEPRECATED == 0)
+
/* This name is obsolete. Will go away in release 1.5. */
SCM_REGISTER_PROC(s_serial_array_copy_x, "serial-array-copy!", 2, 0, 0, scm_array_copy_x);
+
+#endif /* SCM_DEBUG_DEPRECATED == 0 */
+
+
SCM_REGISTER_PROC(s_array_copy_in_order_x, "array-copy-in-order!", 2, 0, 0, scm_array_copy_x);
return 1;
}
+
+#if (SCM_DEBUG_DEPRECATED == 0)
+
/* This name is obsolete. Will go away in release 1.5. */
SCM_REGISTER_PROC(s_serial_array_map_x, "serial-array-map!", 2, 0, 1, scm_array_map_x);
+
+#endif /* SCM_DEBUG_DEPRECATED == 0 */
+
+
SCM_REGISTER_PROC(s_array_map_in_order_x, "array-map-in-order!", 2, 0, 1, scm_array_map_x);
if (equalp) scm_set_smob_equalp (tc, equalp);
}
-/* Deprecated function - use scm_make_smob_type, or scm_make_smob_type_mfpe
- instead. */
+
+#if (SCM_DEBUG_DEPRECATED == 0)
+
+/* Use scm_make_smob_type or scm_make_smob_type_mfpe instead. */
long
scm_newsmob (const scm_smobfuns *smob)
{
return tc;
}
+#endif /* SCM_DEBUG_DEPRECATED == 0 */
+
SCM
scm_make_smob (long tc)
SCM (*equalp) (SCM, SCM);
} scm_smob_descriptor;
-/* scm_smobfuns is the argument type for the obsolete function scm_newsmob */
-
-typedef struct scm_smobfuns
-{
- SCM (*mark) (SCM);
- scm_sizet (*free) (SCM);
- int (*print) (SCM exp, SCM port, scm_print_state *pstate);
- SCM (*equalp) (SCM, SCM);
-} scm_smobfuns;
-
\f
#define SCM_NEWSMOB(z, tc, data) \
extern SCM scm_make_smob (long tc);
extern void scm_smob_prehistory (void);
-/* Deprecated function */
+\f
+
+#if (SCM_DEBUG_DEPRECATED == 0)
+
+typedef struct scm_smobfuns
+{
+ SCM (*mark) (SCM);
+ scm_sizet (*free) (SCM);
+ int (*print) (SCM exp, SCM port, scm_print_state *pstate);
+ SCM (*equalp) (SCM, SCM);
+} scm_smobfuns;
+
extern long scm_newsmob (const scm_smobfuns *smob);
+#endif /* SCM_DEBUG_DEPRECATED == 0 */
+
#endif /* SMOBH */
/*
SCM_CONST_LONG (scm_utag_struct_base, "utag_struct_base", 255);
+#if (SCM_DEBUG_DEPRECATED == 0)
+
SCM_DEFINE (scm_tag, "tag", 1, 0, 0,
(SCM x),
"Return an integer corresponding to the type of X. Deprecated.")
}
#undef FUNC_NAME
+#endif /* SCM_DEBUG_DEPRECATED == 0 */
\f
\f
-
+extern void scm_init_tag (void);
\f
+#if (SCM_DEBUG_DEPRECATED == 0)
+
extern SCM scm_tag (SCM x);
-extern void scm_init_tag (void);
+
+#endif /* SCM_DEBUG_DEPRECATED == 0 */
#endif /* TAGH */
#define scm_tc16_real 0x027f
#define scm_tc16_complex 0x037f
-/* The following four macros are now deprecated: */
-#define scm_tc16_flo scm_tc16_real
-#define scm_tc_flo 0x017fL
-#define scm_tc_dblr scm_tc16_real
-#define scm_tc_dblc scm_tc16_complex
-
/* Smob type 4 allocated, but not initialized cells;
this is required to prevent the gc from hosing your cells if
you have to allocate while creating the cell*/
#define scm_tcs_symbols scm_tc7_ssymbol:case scm_tc7_msymbol
+\f
+
+#if (SCM_DEBUG_DEPRECATED == 0)
+
+#define scm_tc16_flo scm_tc16_real
+#define scm_tc_flo 0x017fL
+#define scm_tc_dblr scm_tc16_real
+#define scm_tc_dblc scm_tc16_complex
+
+#endif /* SCM_DEBUG_DEPRECATED == 0 */
+
#endif /* TAGSH */
/*
-/* $Id: validate.h,v 1.9 2000-04-18 15:23:11 gjb Exp $ */
+/* $Id: validate.h,v 1.10 2000-05-15 11:47:48 dirk Exp $ */
/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
cvar = SCM_TRUE_P (flag) ? 1 : 0; \
} while (0)
-#define SCM_VALIDATE_CHAR(pos, scm) SCM_MAKE_VALIDATE (pos, scm, ICHRP)
+#define SCM_VALIDATE_CHAR(pos, scm) SCM_MAKE_VALIDATE (pos, scm, CHARP)
#define SCM_VALIDATE_CHAR_COPY(pos, scm, cvar) \
do { \