* __scm.h, alist.c, async.c, async.h, backtrace.h, chars.c,
[bpt/guile.git] / libguile / smob.h
index 08ce772..0bf99fd 100644 (file)
@@ -2,7 +2,7 @@
 
 #ifndef SMOBH
 #define SMOBH
-/*     Copyright (C) 1995,1996 Free Software Foundation, Inc.
+/*     Copyright (C) 1995,1996,1998 Free Software Foundation, Inc.
  * 
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -16,7 +16,8 @@
  * 
  * You should have received a copy of the GNU General Public License
  * along with this software; see the file COPYING.  If not, write to
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ * the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
  *
  * As a special exception, the Free Software Foundation gives permission
  * for additional uses of the text contained in its release of GUILE.
  *
  * If you write modifications of your own for GUILE, it is your choice
  * whether to permit this exception to apply to your modifications.
- * If you do not wish that, delete this exception notice.  
- */
+ * If you do not wish that, delete this exception notice.  */
 \f
-#include <libguile/__scm.h>
-#include "params.h"
+#include "libguile/__scm.h"
+#include "libguile/print.h"
 
 \f
-
-
-
 typedef struct scm_smobfuns
 {
   SCM (*mark) SCM_P ((SCM));
   scm_sizet (*free) SCM_P ((SCM));
-  int (*print) SCM_P ((SCM exp, SCM port, int writing));
+  int (*print) SCM_P ((SCM exp, SCM port, scm_print_state *pstate));
   SCM (*equalp) SCM_P ((SCM, SCM));
 } scm_smobfuns;
 
-typedef struct scm_ptobfuns
-{
-  SCM (*mark) ();
-  int (*free) ();
-  int (*print) ();
-  SCM (*equalp) ();
-  int (*fputc) ();
-  int (*fputs) ();
-  scm_sizet (*fwrite) ();
-  int (*fflush) ();
-  int (*fgetc) ();
-  int (*fclose) ();
-
-  
-  
-} scm_ptobfuns;
-
-
 \f
 
-#define SCM_SMOBNUM(x) (0x0ff & (SCM_CAR(x)>>8));
-#define SCM_PTOBNUM(x) (0x0ff & (SCM_CAR(x)>>8));
+#define SCM_SMOBNUM(x) (0x0ff & (SCM_CAR(x)>>8))
 
-extern scm_sizet scm_numsmob;
+extern int scm_numsmob;
 extern scm_smobfuns *scm_smobs;
 
 \f
-#ifdef __STDC__
-extern long scm_newsmob (scm_smobfuns *smob);
-extern void scm_smob_prehistory (void);
-
-#else /* STDC */
-extern long scm_newsmob ();
-extern void scm_smob_prehistory ();
-
-#endif /* STDC */
-
-
 
+/* Everyone who uses smobs needs to print.  */
+#include "libguile/ports.h"
+#include "libguile/genio.h"
 
+/* ... and they all need to GC.  */
+#include "libguile/markers.h"
 
+\f
+extern long scm_newsmob SCM_P ((scm_smobfuns *smob));
+extern void scm_smob_prehistory SCM_P ((void));
 
 #endif  /* SMOBH */