summaryrefslogtreecommitdiffstats
path: root/scm.h
diff options
context:
space:
mode:
Diffstat (limited to 'scm.h')
-rw-r--r--scm.h57
1 files changed, 44 insertions, 13 deletions
diff --git a/scm.h b/scm.h
index 1f01292..55be55a 100644
--- a/scm.h
+++ b/scm.h
@@ -1,15 +1,15 @@
-/* Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
- *
+/* Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997 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
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* 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.
@@ -36,7 +36,7 @@
*
* 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.
*/
/* "scm.h" SCM data types and external functions. */
@@ -45,11 +45,17 @@
extern "C" {
#endif
+#ifdef hpux
+# ifndef __GNUC__
+# define const /**/
+# endif
+#endif
+
typedef long SCM;
typedef struct {SCM car, cdr;} cell;
typedef struct {long sname;SCM (*cproc)();} subr;
-typedef struct {char *string;SCM (*cproc)();} iproc;
typedef struct {long sname;double (*dproc)();} dsubr;
+typedef struct {const char *string;SCM (*cproc)();} iproc;
#include <stdio.h>
#include "scmfig.h"
@@ -122,6 +128,7 @@ typedef struct {SCM type;double *real;} dbl;
#define ICDR (0x00080000L)
#define IFRINC (0x00000100L)
#define IDSTMSK (-IDINC)
+#define MAKILOC(if, id) (ILOC00 + (((long)id)<<20) + (((long)if)<<8))
#define IFRAME(n) ((int)((ICDR-IFRINC)>>8) & ((int)(n)>>8))
#define IDIST(n) (((unsigned long)(n))>>20)
#define ICDRP(n) (ICDR & (n))
@@ -167,6 +174,8 @@ extern char *isymnames[];
#define s_quote (ISYMCHARS(IM_QUOTE)+2)
#define s_set (ISYMCHARS(IM_SET)+2)
#define s_define (ISYMCHARS(IM_DEFINE)+2)
+#define s_delay (ISYMCHARS(IM_DELAY)+2)
+#define s_quasiquote (ISYMCHARS(IM_QUASIQUOTE)+2)
extern SCM i_dot, i_quote, i_quasiquote, i_unquote, i_uq_splicing;
#define s_apply (ISYMCHARS(IM_APPLY)+2)
@@ -175,8 +184,16 @@ extern SCM i_dot, i_quote, i_quasiquote, i_unquote, i_uq_splicing;
/* corresponds to it's position in isymnames[] in sys.c */
#define IM_APPLY MAKISYM(14)
#define IM_CONT MAKISYM(15)
+#define IM_FARLOC_CAR MAKISYM(16)
+#define IM_FARLOC_CDR MAKISYM(17)
+#define IM_DELAY MAKISYM(18)
+#define IM_QUASIQUOTE MAKISYM(19)
+#define IM_UNQUOTE MAKISYM(20)
+#define IM_UQ_SPLICING MAKISYM(21)
+#define IM_ELSE MAKISYM(22)
+#define IM_ARROW MAKISYM(23)
-#define NUM_ISYMS 16
+#define NUM_ISYMS 24
#define BOOL_F MAKIFLAG(NUM_ISYMS+0)
#define BOOL_T MAKIFLAG(NUM_ISYMS+1)
@@ -192,11 +209,11 @@ extern SCM i_dot, i_quote, i_quasiquote, i_unquote, i_uq_splicing;
/* Now some unnamed flags used as magic cookies by repl_driver. */
/* Argument n can range from -4 to 16 */
#ifdef SHORT_INT
-#define COOKIE(n) (n)
-#define UNCOOK(f) (f)
+# define COOKIE(n) (n)
+# define UNCOOK(f) (f)
#else
-#define COOKIE(n) MAKIFLAG(NUM_ISYMS+6+4+n)
-#define UNCOOK(f) (ISYMNUM(f)-(NUM_ISYMS+6+4))
+# define COOKIE(n) MAKIFLAG(NUM_ISYMS+6+4+n)
+# define UNCOOK(f) (ISYMNUM(f)-(NUM_ISYMS+6+4))
#endif
#define FALSEP(x) (BOOL_F==(x))
@@ -630,6 +647,7 @@ SCM floequal P((SCM x, SCM y));
SCM uve_equal P((SCM u, SCM v));
SCM raequal P((SCM ra0, SCM ra1));
SCM array_equal P((SCM u, SCM v));
+SCM array_rank P((SCM ra));
int rafill P((SCM ra, SCM fill, SCM ignore));
SCM uve_fill P((SCM uve, SCM fill));
SCM array_fill P((SCM ra, SCM fill));
@@ -679,6 +697,9 @@ SCM map P((SCM proc, SCM arg1, SCM args));
SCM scm_make_cont P((void));
SCM copytree P((SCM obj));
SCM eval P((SCM obj));
+SCM identp P((SCM obj));
+SCM ident_eqp P((SCM id1, SCM id2, SCM env));
+SCM renamed_ident P((SCM id, SCM env));
SCM input_portp P((SCM x));
SCM output_portp P((SCM x));
SCM cur_input_port P((void));
@@ -718,6 +739,7 @@ SCM aset P((SCM v, SCM obj, SCM args));
SCM aref P((SCM v, SCM args));
SCM cvref P((SCM v, sizet pos, SCM last));
SCM quit P((SCM n));
+void ints_viol P((int sense));
void add_final P((void (*final)(void)));
SCM makcclo P((SCM proc, long len));
SCM make_uve P((long k, SCM prot));
@@ -730,7 +752,6 @@ SCM scm_load_string P((SCM str));
void scm_print_stack P((SCM stk));
char * dld_find_executable P((const char* command));
SCM scm_unexec P((const SCM pathname));
-char * scm_cat_path P((char *str1, const char *str2, long n));
/* Defined in "rope.c" */
SCM long2num P((long n));
@@ -750,6 +771,7 @@ void scm_ldstr P((char *str));
int scm_ldfile P((char *path));
int scm_ldprog P((char *path));
unsigned long scm_addr P((SCM args, char *name));
+int scm_cell_p P((SCM x));
#ifdef FLOATS
SCM makdbl P((double x, double y));
@@ -764,7 +786,7 @@ double floident P((double x));
#endif
#ifdef BIGDIG
-void longdigs P((long x, BIGDIG digs [DIGSPERLONG ]));
+void longdigs P((long x, BIGDIG digs[DIGSPERLONG]));
SCM adjbig P((SCM b, sizet nlen));
SCM normbig P((SCM b));
SCM copybig P((SCM b, int sign));
@@ -779,6 +801,15 @@ long pseudolong P((long x));
int bigcomp P((SCM x, SCM y));
SCM bigequal P((SCM x, SCM y));
+/* "script.c" functions */
+char * scm_cat_path P((char *str1, const char *str2, long n));
+char * scm_try_path P((char *path));
+char * script_find_executable P((const char *command));
+char ** script_process_argv P((int argc, char **argv));
+int script_count_argv P((char **argv));
+char * scm_find_impl_file P((char *exec_path, const char *generic_name,
+ const char *initname, const char *sep));
+
#ifdef RECKLESS
# define ASSERT(_cond, _arg, _pos, _subr) ;
# define ASRTGO(_cond, _label) ;