diff options
author | Greg J. Badros <gjb@cs.washington.edu> | 1999-12-12 20:35:02 +0000 |
---|---|---|
committer | Greg J. Badros <gjb@cs.washington.edu> | 1999-12-12 20:35:02 +0000 |
commit | 6e8d25a6954b00e1ff40976d95c8289cfa9fcca4 (patch) | |
tree | 524a6cdf3bb04e0ed9cb97b5d66777972e336c07 /libguile/scm_validate.h | |
parent | 1006486ec27336ea25ece6e5d97a2dbefbfe79e3 (diff) | |
download | guile-6e8d25a6954b00e1ff40976d95c8289cfa9fcca4.tar.gz |
* *.c: Finish replacing K&R style prototypes with ANSI C
prototypes.
* eval.c: Make scm_m_mody's 3rd argument be a const char *, not a
char *. ANSI prototypes caught this.
* strorder.c: Use GUILE_PROC1 for the couple SCM_PROC1 expansions
that I missed.
* scm_validate.h: Use SCM_BOOLP for validating bools. Do not
expand macros if SCM_DOCSTRING_SNARF.
Diffstat (limited to 'libguile/scm_validate.h')
-rw-r--r-- | libguile/scm_validate.h | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/libguile/scm_validate.h b/libguile/scm_validate.h index c74e76e1d..88d66f965 100644 --- a/libguile/scm_validate.h +++ b/libguile/scm_validate.h @@ -1,4 +1,4 @@ -/* $Id: scm_validate.h,v 1.4 1999-12-12 19:09:46 gjb Exp $ */ +/* $Id: scm_validate.h,v 1.5 1999-12-12 20:35:02 gjb Exp $ */ /* Copyright (C) 1999 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify @@ -85,20 +85,24 @@ #define SCM_MUST_MALLOC(size) (scm_must_malloc((size), FUNC_NAME)) -#define SCM_VALIDATE_NIM(pos,scm) \ - do { SCM_ASSERT(SCM_NIMP(scm), scm, pos, FUNC_NAME); } while (0) - #define SCM_MAKE_NIM_VALIDATE(pos,var,pred) \ do { SCM_ASSERT (SCM_NIMP(var) && SCM ## pred(var), var, pos, FUNC_NAME); } while (0) #define SCM_MAKE_VALIDATE(pos,var,pred) \ do { SCM_ASSERT (SCM ## pred(var), var, pos, FUNC_NAME); } while (0) + + +#ifndef SCM_DOCSTRING_SNARF + +#define SCM_VALIDATE_NIM(pos,scm) \ + do { SCM_ASSERT(SCM_NIMP(scm), scm, pos, FUNC_NAME); } while (0) + #define SCM_VALIDATE_BOOL(pos,flag) \ - do { SCM_ASSERT(SCM_BOOL_T == flag || SCM_BOOL_F == flag, flag, pos, FUNC_NAME); } while (0) + do { SCM_ASSERT(SCM_BOOLP(flag), pos, FUNC_NAME); } while (0) #define SCM_VALIDATE_BOOL_COPY(pos,flag,cvar) \ - do { SCM_ASSERT(SCM_BOOL_T == flag || SCM_BOOL_F == flag, flag, pos, FUNC_NAME); \ + do { SCM_ASSERT(SCM_BOOLP(flags), flag, pos, FUNC_NAME); \ cvar = (SCM_BOOL_T == flag)? 1: 0; } while (0) #define SCM_VALIDATE_CHAR(pos,scm) \ @@ -306,3 +310,5 @@ do { SCM_ASSERT (SCM_NIMP (v) && SCM_VECTORP (v) && len == SCM_LENGTH(v), v, pos, FUNC_NAME); } while (0) #endif + +#endif |