summaryrefslogtreecommitdiff
path: root/libguile/print.h
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2018-06-18 09:44:35 +0200
committerAndy Wingo <wingo@pobox.com>2018-06-18 09:44:35 +0200
commit8a6f46ee96e0946e539e3a33c95c3228b63e9fb3 (patch)
tree6df1b84f414e46add11e2329f89f15d26a647752 /libguile/print.h
parentbe18b507735ccb6006dcd9a58cba7119b43b7d7c (diff)
downloadguile-8a6f46ee96e0946e539e3a33c95c3228b63e9fb3.tar.gz
More validate.h devolution
* libguile/validate.h: * libguile/alist.h (SCM_VALIDATE_ALISTCELL, SCM_VALIDATE_ALISTCELL_COPYSCM) * libguile/bytevectors.h (SCM_VALIDATE_BYTEVECTOR) * libguile/chars.h (SCM_VALIDATE_CHAR, SCM_VALIDATE_CHAR_COPY): * libguile/print.h (SCM_VALIDATE_OPORT_VALUE, SCM_VALIDATE_PRINTSTATE): * libguile/procs.h (SCM_VALIDATE_THUNK) * libguile/smob.h (SCM_VALIDATE_SMOB) * libguile/strings.h (SCM_VALIDATE_STRING): Devolve these macros from validate.h.
Diffstat (limited to 'libguile/print.h')
-rw-r--r--libguile/print.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/libguile/print.h b/libguile/print.h
index 2cfc39273..9271c9235 100644
--- a/libguile/print.h
+++ b/libguile/print.h
@@ -3,8 +3,8 @@
#ifndef SCM_PRINT_H
#define SCM_PRINT_H
-/* Copyright (C) 1995, 1996, 1998, 2000, 2001, 2003, 2004, 2006, 2008,
- * 2010, 2012, 2017 Free Software Foundation, Inc.
+/* Copyright (C) 1995-1996,1998,2000-2001,2003-2004,2006,2008,
+ * 2010,2012,2017-2018 Free Software Foundation, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
@@ -27,7 +27,9 @@
#include "libguile/__scm.h"
#include "libguile/chars.h"
+#include <libguile/error.h>
#include "libguile/options.h"
+
/* State information passed around during printing.
@@ -53,6 +55,14 @@ do { \
#define SCM_COERCE_OUTPORT(p) \
(SCM_PORT_WITH_PS_P (p) ? SCM_PORT_WITH_PS_PORT (p) : p)
+#define SCM_VALIDATE_OPORT_VALUE(pos, port) \
+ do { \
+ SCM_ASSERT (scm_valid_oport_value_p (port), port, pos, FUNC_NAME); \
+ } while (0)
+
+#define SCM_VALIDATE_PRINTSTATE(pos, a) \
+ SCM_MAKE_VALIDATE_MSG(pos, a, PRINT_STATE_P, "print-state")
+
#define SCM_PRINT_STATE_LAYOUT "pwuwuwuwuwuwpwuwuwuwpwpw"
typedef struct scm_print_state {
SCM handle; /* Struct handle */