comparison src/lisp.h @ 1632:64eaceca611d

[xemacs-hg @ 2003-08-19 02:07:03 by james] Enable module building and running on Cygwin and MinGW.
author james
date Tue, 19 Aug 2003 02:07:16 +0000
parents ac1be85b4a5f
children 34abfb24e891
comparison
equal deleted inserted replaced
1631:1bf7b032a45d 1632:64eaceca611d
926 #define register 926 #define register
927 /*#else*/ 927 /*#else*/
928 /*#define REGISTER register*/ 928 /*#define REGISTER register*/
929 /*#endif*/ 929 /*#endif*/
930 930
931 #if defined(HAVE_MS_WINDOWS) && defined(HAVE_SHLIB)
932 # ifdef EMACS_MODULE
933 # define MODULE_API __declspec(dllimport)
934 # else
935 # define MODULE_API __declspec(dllexport)
936 # endif
937 #else
938 # define MODULE_API
939 #endif
940
931 /* ------------------------ alignment definitions ------------------- */ 941 /* ------------------------ alignment definitions ------------------- */
932 942
933 /* No type has a greater alignment requirement than max_align_t. 943 /* No type has a greater alignment requirement than max_align_t.
934 (except perhaps for types we don't use, like long double) */ 944 (except perhaps for types we don't use, like long double) */
935 typedef union 945 typedef union
1010 and line of the inline function, which is not very useful. */ 1020 and line of the inline function, which is not very useful. */
1011 1021
1012 #ifdef USE_ASSERTIONS 1022 #ifdef USE_ASSERTIONS
1013 /* Highly dubious kludge */ 1023 /* Highly dubious kludge */
1014 /* (thanks, Jamie, I feel better now -- ben) */ 1024 /* (thanks, Jamie, I feel better now -- ben) */
1015 void assert_failed (const char *, int, const char *); 1025 MODULE_API void assert_failed (const char *, int, const char *);
1016 # define abort() (assert_failed (__FILE__, __LINE__, "abort()")) 1026 # define abort() (assert_failed (__FILE__, __LINE__, "abort()"))
1017 # define assert(x) ((x) ? (void) 0 : assert_failed (__FILE__, __LINE__, #x)) 1027 # define assert(x) ((x) ? (void) 0 : assert_failed (__FILE__, __LINE__, #x))
1018 # define assert_with_message(x, msg) \ 1028 # define assert_with_message(x, msg) \
1019 ((x) ? (void) 0 : assert_failed (__FILE__, __LINE__, msg)) 1029 ((x) ? (void) 0 : assert_failed (__FILE__, __LINE__, msg))
1020 # define assert_at_line(x, file, line) \ 1030 # define assert_at_line(x, file, line) \
1071 1081
1072 /* ------------------------ simple memory allocation ------------------- */ 1082 /* ------------------------ simple memory allocation ------------------- */
1073 1083
1074 /* Memory allocation */ 1084 /* Memory allocation */
1075 void malloc_warning (const char *); 1085 void malloc_warning (const char *);
1076 void *xmalloc (Bytecount size); 1086 MODULE_API void *xmalloc (Bytecount size);
1077 void *xmalloc_and_zero (Bytecount size); 1087 MODULE_API void *xmalloc_and_zero (Bytecount size);
1078 void *xrealloc (void *, Bytecount size); 1088 MODULE_API void *xrealloc (void *, Bytecount size);
1079 char *xstrdup (const char *); 1089 MODULE_API char *xstrdup (const char *);
1080 /* generally useful */ 1090 /* generally useful */
1081 #define countof(x) ((int) (sizeof(x)/sizeof((x)[0]))) 1091 #define countof(x) ((int) (sizeof(x)/sizeof((x)[0])))
1082 #define xnew(type) ((type *) xmalloc (sizeof (type))) 1092 #define xnew(type) ((type *) xmalloc (sizeof (type)))
1083 #define xnew_array(type, len) ((type *) xmalloc ((len) * sizeof (type))) 1093 #define xnew_array(type, len) ((type *) xmalloc ((len) * sizeof (type)))
1084 #define xnew_and_zero(type) ((type *) xmalloc_and_zero (sizeof (type))) 1094 #define xnew_and_zero(type) ((type *) xmalloc_and_zero (sizeof (type)))
1086 #define xnew_array_and_zero(type, len) ((type *) xmalloc_and_zero ((len) * sizeof (type))) 1096 #define xnew_array_and_zero(type, len) ((type *) xmalloc_and_zero ((len) * sizeof (type)))
1087 #define XREALLOC_ARRAY(ptr, type, len) ((void) (ptr = (type *) xrealloc (ptr, (len) * sizeof (type)))) 1097 #define XREALLOC_ARRAY(ptr, type, len) ((void) (ptr = (type *) xrealloc (ptr, (len) * sizeof (type))))
1088 #define alloca_new(type) ((type *) ALLOCA (sizeof (type))) 1098 #define alloca_new(type) ((type *) ALLOCA (sizeof (type)))
1089 #define alloca_array(type, len) ((type *) ALLOCA ((len) * sizeof (type))) 1099 #define alloca_array(type, len) ((type *) ALLOCA ((len) * sizeof (type)))
1090 1100
1091 void *xemacs_c_alloca (unsigned int size); 1101 MODULE_API void *xemacs_c_alloca (unsigned int size);
1092 1102
1093 int record_unwind_protect_freeing (void *ptr); 1103 MODULE_API int record_unwind_protect_freeing (void *ptr);
1094 1104
1095 DECLARE_INLINE_HEADER ( 1105 DECLARE_INLINE_HEADER (
1096 void * 1106 void *
1097 xmalloc_and_record_unwind (Bytecount size) 1107 xmalloc_and_record_unwind (Bytecount size)
1098 ) 1108 )
1142 #define MAX_ALLOCA_VS_C_ALLOCA 262144 1152 #define MAX_ALLOCA_VS_C_ALLOCA 262144
1143 #define MAX_ALLOCA_VS_MALLOC 65536 1153 #define MAX_ALLOCA_VS_MALLOC 65536
1144 1154
1145 #define MAX_FUNCALLS_BETWEEN_ALLOCA_CLEANUP 10 1155 #define MAX_FUNCALLS_BETWEEN_ALLOCA_CLEANUP 10
1146 1156
1147 extern Bytecount __temp_alloca_size__; 1157 extern MODULE_API Bytecount __temp_alloca_size__;
1148 extern Bytecount funcall_alloca_count; 1158 extern Bytecount funcall_alloca_count;
1149 1159
1150 #ifdef ERROR_CHECK_MALLOC 1160 #ifdef ERROR_CHECK_MALLOC
1151 extern int regex_malloc_disallowed; 1161 extern MODULE_API int regex_malloc_disallowed;
1152 #define REGEX_MALLOC_CHECK() assert (!regex_malloc_disallowed) 1162 #define REGEX_MALLOC_CHECK() assert (!regex_malloc_disallowed)
1153 #else 1163 #else
1154 #define REGEX_MALLOC_CHECK() ((void) 0) 1164 #define REGEX_MALLOC_CHECK() ((void) 0)
1155 #endif 1165 #endif
1156 1166
1208 XREALLOC_ARRAY (basevar, type, (sizevar)); \ 1218 XREALLOC_ARRAY (basevar, type, (sizevar)); \
1209 } \ 1219 } \
1210 } while (0) 1220 } while (0)
1211 1221
1212 #ifdef ERROR_CHECK_MALLOC 1222 #ifdef ERROR_CHECK_MALLOC
1213 void xfree_1 (void *); 1223 MODULE_API void xfree_1 (void *);
1214 #define xfree(lvalue) do \ 1224 #define xfree(lvalue) do \
1215 { \ 1225 { \
1216 void **xfree_ptr = (void **) &(lvalue); \ 1226 void **xfree_ptr = (void **) &(lvalue); \
1217 xfree_1 (*xfree_ptr); \ 1227 xfree_1 (*xfree_ptr); \
1218 *xfree_ptr = (void *) 0xDEADBEEF; \ 1228 *xfree_ptr = (void *) 0xDEADBEEF; \
1219 } while (0) 1229 } while (0)
1220 #else 1230 #else
1221 void xfree (void *); 1231 MODULE_API void xfree (void *);
1222 #endif /* ERROR_CHECK_MALLOC */ 1232 #endif /* ERROR_CHECK_MALLOC */
1223 1233
1224 /* ------------------------ dynamic arrays ------------------- */ 1234 /* ------------------------ dynamic arrays ------------------- */
1225 1235
1226 #ifdef ERROR_CHECK_STRUCTURES 1236 #ifdef ERROR_CHECK_STRUCTURES
1243 typedef struct dynarr 1253 typedef struct dynarr
1244 { 1254 {
1245 Dynarr_declare (void); 1255 Dynarr_declare (void);
1246 } Dynarr; 1256 } Dynarr;
1247 1257
1248 void *Dynarr_newf (int elsize); 1258 MODULE_API void *Dynarr_newf (int elsize);
1249 void Dynarr_resize (void *dy, int size); 1259 MODULE_API void Dynarr_resize (void *dy, int size);
1250 void Dynarr_insert_many (void *d, const void *el, int len, int start); 1260 MODULE_API void Dynarr_insert_many (void *d, const void *el, int len, int start);
1251 void Dynarr_delete_many (void *d, int start, int len); 1261 MODULE_API void Dynarr_delete_many (void *d, int start, int len);
1252 void Dynarr_free (void *d); 1262 MODULE_API void Dynarr_free (void *d);
1253 1263
1254 #define Dynarr_new(type) ((type##_dynarr *) Dynarr_newf (sizeof (type))) 1264 #define Dynarr_new(type) ((type##_dynarr *) Dynarr_newf (sizeof (type)))
1255 #define Dynarr_new2(dynarr_type, type) \ 1265 #define Dynarr_new2(dynarr_type, type) \
1256 ((dynarr_type *) Dynarr_newf (sizeof (type))) 1266 ((dynarr_type *) Dynarr_newf (sizeof (type)))
1257 #define Dynarr_at(d, pos) ((d)->base[pos]) 1267 #define Dynarr_at(d, pos) ((d)->base[pos])
1649 (EQ (obj1, obj2) || (!POINTER_TYPE_P (XTYPE (obj1)) \ 1659 (EQ (obj1, obj2) || (!POINTER_TYPE_P (XTYPE (obj1)) \
1650 && !POINTER_TYPE_P (XTYPE (obj2)) \ 1660 && !POINTER_TYPE_P (XTYPE (obj2)) \
1651 && XCHAR_OR_INT (obj1) == XCHAR_OR_INT (obj2))) 1661 && XCHAR_OR_INT (obj1) == XCHAR_OR_INT (obj2)))
1652 1662
1653 #ifdef DEBUG_XEMACS 1663 #ifdef DEBUG_XEMACS
1654 extern int debug_issue_ebola_notices; 1664 extern MODULE_API int debug_issue_ebola_notices;
1655 int eq_with_ebola_notice (Lisp_Object, Lisp_Object); 1665 MODULE_API int eq_with_ebola_notice (Lisp_Object, Lisp_Object);
1656 #define EQ_WITH_EBOLA_NOTICE(obj1, obj2) \ 1666 #define EQ_WITH_EBOLA_NOTICE(obj1, obj2) \
1657 (debug_issue_ebola_notices ? eq_with_ebola_notice (obj1, obj2) \ 1667 (debug_issue_ebola_notices ? eq_with_ebola_notice (obj1, obj2) \
1658 : EQ (obj1, obj2)) 1668 : EQ (obj1, obj2))
1659 #else 1669 #else
1660 #define EQ_WITH_EBOLA_NOTICE(obj1, obj2) EQ (obj1, obj2) 1670 #define EQ_WITH_EBOLA_NOTICE(obj1, obj2) EQ (obj1, obj2)
1706 struct buffer *buffer; 1716 struct buffer *buffer;
1707 int charbpos; 1717 int charbpos;
1708 }; 1718 };
1709 #endif 1719 #endif
1710 1720
1711 DECLARE_LRECORD (cons, Lisp_Cons); 1721 DECLARE_MODULE_API_LRECORD (cons, Lisp_Cons);
1712 #define XCONS(x) XRECORD (x, cons, Lisp_Cons) 1722 #define XCONS(x) XRECORD (x, cons, Lisp_Cons)
1713 #define wrap_cons(p) wrap_record (p, cons) 1723 #define wrap_cons(p) wrap_record (p, cons)
1714 #define CONSP(x) RECORDP (x, cons) 1724 #define CONSP(x) RECORDP (x, cons)
1715 #define CHECK_CONS(x) CHECK_RECORD (x, cons) 1725 #define CHECK_CONS(x) CHECK_RECORD (x, cons)
1716 #define CONCHECK_CONS(x) CONCHECK_RECORD (x, cons) 1726 #define CONCHECK_CONS(x) CONCHECK_RECORD (x, cons)
1717 1727
1718 #define CONS_MARKED_P(c) MARKED_RECORD_HEADER_P(&((c)->lheader)) 1728 #define CONS_MARKED_P(c) MARKED_RECORD_HEADER_P(&((c)->lheader))
1719 #define MARK_CONS(c) MARK_RECORD_HEADER (&((c)->lheader)) 1729 #define MARK_CONS(c) MARK_RECORD_HEADER (&((c)->lheader))
1720 1730
1721 extern Lisp_Object Qnil; 1731 extern MODULE_API Lisp_Object Qnil;
1722 1732
1723 #define NILP(x) EQ (x, Qnil) 1733 #define NILP(x) EQ (x, Qnil)
1724 #define cons_car(a) ((a)->car_) 1734 #define cons_car(a) ((a)->car_)
1725 #define cons_cdr(a) ((a)->cdr_) 1735 #define cons_cdr(a) ((a)->cdr_)
1726 #define XCAR(a) (XCONS (a)->car_) 1736 #define XCAR(a) (XCONS (a)->car_)
2262 }; 2272 };
2263 typedef struct Lisp_String Lisp_String; 2273 typedef struct Lisp_String Lisp_String;
2264 2274
2265 #define MAX_STRING_ASCII_BEGIN ((1 << 21) - 1) 2275 #define MAX_STRING_ASCII_BEGIN ((1 << 21) - 1)
2266 2276
2267 DECLARE_LRECORD (string, Lisp_String); 2277 DECLARE_MODULE_API_LRECORD (string, Lisp_String);
2268 #define XSTRING(x) XRECORD (x, string, Lisp_String) 2278 #define XSTRING(x) XRECORD (x, string, Lisp_String)
2269 #define wrap_string(p) wrap_record (p, string) 2279 #define wrap_string(p) wrap_record (p, string)
2270 #define STRINGP(x) RECORDP (x, string) 2280 #define STRINGP(x) RECORDP (x, string)
2271 #define CHECK_STRING(x) CHECK_RECORD (x, string) 2281 #define CHECK_STRING(x) CHECK_RECORD (x, string)
2272 #define CONCHECK_STRING(x) CONCHECK_RECORD (x, string) 2282 #define CONCHECK_STRING(x) CONCHECK_RECORD (x, string)
2428 && EQ (sym, oblookup (Vobarray, \ 2438 && EQ (sym, oblookup (Vobarray, \
2429 XSTRING_DATA (symbol_name (XSYMBOL (sym))), \ 2439 XSTRING_DATA (symbol_name (XSYMBOL (sym))), \
2430 XSTRING_LENGTH (symbol_name (XSYMBOL (sym)))))) 2440 XSTRING_LENGTH (symbol_name (XSYMBOL (sym))))))
2431 #define KEYWORDP(obj) (SYMBOLP (obj) && SYMBOL_IS_KEYWORD (obj)) 2441 #define KEYWORDP(obj) (SYMBOLP (obj) && SYMBOL_IS_KEYWORD (obj))
2432 2442
2433 DECLARE_LRECORD (symbol, Lisp_Symbol); 2443 DECLARE_MODULE_API_LRECORD (symbol, Lisp_Symbol);
2434 #define XSYMBOL(x) XRECORD (x, symbol, Lisp_Symbol) 2444 #define XSYMBOL(x) XRECORD (x, symbol, Lisp_Symbol)
2435 #define wrap_symbol(p) wrap_record (p, symbol) 2445 #define wrap_symbol(p) wrap_record (p, symbol)
2436 #define SYMBOLP(x) RECORDP (x, symbol) 2446 #define SYMBOLP(x) RECORDP (x, symbol)
2437 #define CHECK_SYMBOL(x) CHECK_RECORD (x, symbol) 2447 #define CHECK_SYMBOL(x) CHECK_RECORD (x, symbol)
2438 #define CONCHECK_SYMBOL(x) CONCHECK_RECORD (x, symbol) 2448 #define CONCHECK_SYMBOL(x) CONCHECK_RECORD (x, symbol)
2492 struct buffer *buffer; 2502 struct buffer *buffer;
2493 Membpos membpos; 2503 Membpos membpos;
2494 char insertion_type; 2504 char insertion_type;
2495 }; 2505 };
2496 2506
2497 DECLARE_LRECORD (marker, Lisp_Marker); 2507 DECLARE_MODULE_API_LRECORD (marker, Lisp_Marker);
2498 #define XMARKER(x) XRECORD (x, marker, Lisp_Marker) 2508 #define XMARKER(x) XRECORD (x, marker, Lisp_Marker)
2499 #define wrap_marker(p) wrap_record (p, marker) 2509 #define wrap_marker(p) wrap_record (p, marker)
2500 #define MARKERP(x) RECORDP (x, marker) 2510 #define MARKERP(x) RECORDP (x, marker)
2501 #define CHECK_MARKER(x) CHECK_RECORD (x, marker) 2511 #define CHECK_MARKER(x) CHECK_RECORD (x, marker)
2502 #define CONCHECK_MARKER(x) CONCHECK_RECORD (x, marker) 2512 #define CONCHECK_MARKER(x) CONCHECK_RECORD (x, marker)
2951 be a more common synonym for `stack'. 2961 be a more common synonym for `stack'.
2952 Everywhere else `stack' seems to be the preferred term. 2962 Everywhere else `stack' seems to be the preferred term.
2953 2963
2954 specpdl_depth is the current depth of `specpdl'. 2964 specpdl_depth is the current depth of `specpdl'.
2955 Save this for use later as arg to `unbind_to_1'. */ 2965 Save this for use later as arg to `unbind_to_1'. */
2956 extern int specpdl_depth_counter; 2966 extern MODULE_API int specpdl_depth_counter;
2957 #define specpdl_depth() specpdl_depth_counter 2967 #define specpdl_depth() specpdl_depth_counter
2958 2968
2959 2969
2960 #define CHECK_FUNCTION(fun) do { \ 2970 #define CHECK_FUNCTION(fun) do { \
2961 while (NILP (Ffunctionp (fun))) \ 2971 while (NILP (Ffunctionp (fun))) \
2983 2993
2984 /* Asynchronous events set something_happened, and then are processed 2994 /* Asynchronous events set something_happened, and then are processed
2985 within the QUIT macro. At this point, we are guaranteed to not be in 2995 within the QUIT macro. At this point, we are guaranteed to not be in
2986 any sensitive code. */ 2996 any sensitive code. */
2987 2997
2988 extern volatile int something_happened; 2998 extern MODULE_API volatile int something_happened;
2989 extern int dont_check_for_quit; 2999 extern MODULE_API int dont_check_for_quit;
2990 void check_what_happened (void); 3000 MODULE_API void check_what_happened (void);
2991 3001
2992 extern volatile int quit_check_signal_happened; 3002 extern MODULE_API volatile int quit_check_signal_happened;
2993 extern volatile int quit_check_signal_tick_count; 3003 extern volatile int quit_check_signal_tick_count;
2994 void check_quit (void); 3004 MODULE_API void check_quit (void);
2995 3005
2996 void signal_quit (void); 3006 MODULE_API void signal_quit (void);
2997 3007
2998 int begin_dont_check_for_quit (void); 3008 int begin_dont_check_for_quit (void);
2999 int begin_do_check_for_quit (void); 3009 int begin_do_check_for_quit (void);
3000 3010
3001 /* Nonzero if the values of `quit-flag' and `inhibit-quit' indicate 3011 /* Nonzero if the values of `quit-flag' and `inhibit-quit' indicate
3124 containing the link disappears. 3134 containing the link disappears.
3125 3135
3126 Every function that can call Feval must protect in this fashion all 3136 Every function that can call Feval must protect in this fashion all
3127 Lisp_Object variables whose contents will be used again. */ 3137 Lisp_Object variables whose contents will be used again. */
3128 3138
3129 extern struct gcpro *gcprolist; 3139 extern MODULE_API struct gcpro *gcprolist;
3130 3140
3131 /* #### Catching insufficient gcpro: 3141 /* #### Catching insufficient gcpro:
3132 3142
3133 The C++ code below catches GCPRO without UNGCPRO or vice-versa. 3143 The C++ code below catches GCPRO without UNGCPRO or vice-versa.
3134 Catching cases where there's no GCPRO or UNGCPRO but should be, however, 3144 Catching cases where there's no GCPRO or UNGCPRO but should be, however,
3194 and so some "This function can GC" comments may be inaccurate. 3204 and so some "This function can GC" comments may be inaccurate.
3195 */ 3205 */
3196 3206
3197 #ifdef DEBUG_GCPRO 3207 #ifdef DEBUG_GCPRO
3198 3208
3199 void debug_gcpro1 (char *, int, struct gcpro *, Lisp_Object *); 3209 MODULE_API void debug_gcpro1 (char *, int, struct gcpro *, Lisp_Object *);
3200 void debug_gcpro2 (char *, int, struct gcpro *, struct gcpro *, 3210 MODULE_API void debug_gcpro2 (char *, int, struct gcpro *, struct gcpro *,
3201 Lisp_Object *, Lisp_Object *); 3211 Lisp_Object *, Lisp_Object *);
3202 void debug_gcpro3 (char *, int, struct gcpro *, struct gcpro *, struct gcpro *, 3212 MODULE_API void debug_gcpro3 (char *, int, struct gcpro *, struct gcpro *,
3203 Lisp_Object *, Lisp_Object *, Lisp_Object *); 3213 struct gcpro *, Lisp_Object *, Lisp_Object *,
3204 void debug_gcpro4 (char *, int, struct gcpro *, struct gcpro *, struct gcpro *, 3214 Lisp_Object *);
3205 struct gcpro *, Lisp_Object *, Lisp_Object *, Lisp_Object *, 3215 MODULE_API void debug_gcpro4 (char *, int, struct gcpro *, struct gcpro *,
3206 Lisp_Object *); 3216 struct gcpro *, struct gcpro *, Lisp_Object *,
3207 void debug_gcpro5 (char *, int, struct gcpro *, struct gcpro *, struct gcpro *, 3217 Lisp_Object *, Lisp_Object *, Lisp_Object *);
3208 struct gcpro *, struct gcpro *, Lisp_Object *, Lisp_Object *, 3218 MODULE_API void debug_gcpro5 (char *, int, struct gcpro *, struct gcpro *,
3209 Lisp_Object *, Lisp_Object *, Lisp_Object *); 3219 struct gcpro *, struct gcpro *, struct gcpro *,
3210 void debug_ungcpro(char *, int, struct gcpro *); 3220 Lisp_Object *, Lisp_Object *, Lisp_Object *,
3221 Lisp_Object *, Lisp_Object *);
3222 MODULE_API void debug_ungcpro(char *, int, struct gcpro *);
3211 3223
3212 #define GCPRO1(v) \ 3224 #define GCPRO1(v) \
3213 debug_gcpro1 (__FILE__, __LINE__,&gcpro1,&v) 3225 debug_gcpro1 (__FILE__, __LINE__,&gcpro1,&v)
3214 #define GCPRO2(v1,v2) \ 3226 #define GCPRO2(v1,v2) \
3215 debug_gcpro2 (__FILE__, __LINE__,&gcpro1,&gcpro2,&v1,&v2) 3227 debug_gcpro2 (__FILE__, __LINE__,&gcpro1,&gcpro2,&v1,&v2)
3455 3467
3456 #ifdef DEBUG_XEMACS 3468 #ifdef DEBUG_XEMACS
3457 3469
3458 /* Help debug crashes gc-marking a staticpro'ed object. */ 3470 /* Help debug crashes gc-marking a staticpro'ed object. */
3459 3471
3460 void staticpro_1 (Lisp_Object *, char *); 3472 MODULE_API void staticpro_1 (Lisp_Object *, char *);
3461 void staticpro_nodump_1 (Lisp_Object *, char *); 3473 MODULE_API void staticpro_nodump_1 (Lisp_Object *, char *);
3462 #define staticpro(ptr) staticpro_1 (ptr, #ptr) 3474 #define staticpro(ptr) staticpro_1 (ptr, #ptr)
3463 #define staticpro_nodump(ptr) staticpro_nodump_1 (ptr, #ptr) 3475 #define staticpro_nodump(ptr) staticpro_nodump_1 (ptr, #ptr)
3464 3476
3465 #ifdef HAVE_SHLIB 3477 #ifdef HAVE_SHLIB
3466 void unstaticpro_nodump_1 (Lisp_Object *, char *); 3478 MODULE_API void unstaticpro_nodump_1 (Lisp_Object *, char *);
3467 #define unstaticpro_nodump(ptr) unstaticpro_nodump_1 (ptr, #ptr) 3479 #define unstaticpro_nodump(ptr) unstaticpro_nodump_1 (ptr, #ptr)
3468 #endif 3480 #endif
3469 3481
3470 #else 3482 #else
3471 3483
3472 /* Call staticpro (&var) to protect static variable `var'. */ 3484 /* Call staticpro (&var) to protect static variable `var'. */
3473 void staticpro (Lisp_Object *); 3485 MODULE_API void staticpro (Lisp_Object *);
3474 3486
3475 /* Call staticpro_nodump (&var) to protect static variable `var'. */ 3487 /* Call staticpro_nodump (&var) to protect static variable `var'. */
3476 /* var will not be saved at dump time */ 3488 /* var will not be saved at dump time */
3477 void staticpro_nodump (Lisp_Object *); 3489 MODULE_API void staticpro_nodump (Lisp_Object *);
3478 3490
3479 #ifdef HAVE_SHLIB 3491 #ifdef HAVE_SHLIB
3480 /* Call unstaticpro_nodump (&var) to stop protecting static variable `var'. */ 3492 /* Call unstaticpro_nodump (&var) to stop protecting static variable `var'. */
3481 void unstaticpro_nodump (Lisp_Object *); 3493 MODULE_API void unstaticpro_nodump (Lisp_Object *);
3482 #endif 3494 #endif
3483 3495
3484 #endif 3496 #endif
3485 3497
3486 void register_post_gc_action (void (*fun) (void *), void *arg); 3498 void register_post_gc_action (void (*fun) (void *), void *arg);
3510 3522
3511 /* Prototypes for all init/syms_of/vars_of initialization functions. */ 3523 /* Prototypes for all init/syms_of/vars_of initialization functions. */
3512 #include "symsinit.h" 3524 #include "symsinit.h"
3513 3525
3514 /* Defined in abbrev.c */ 3526 /* Defined in abbrev.c */
3515 EXFUN (Fexpand_abbrev, 0); 3527 MODULE_API EXFUN (Fexpand_abbrev, 0);
3516 3528
3517 /* Defined in alloc.c */ 3529 /* Defined in alloc.c */
3518 EXFUN (Fcons, 2); 3530 MODULE_API EXFUN (Fcons, 2);
3519 EXFUN (Flist, MANY); 3531 MODULE_API EXFUN (Flist, MANY);
3520 EXFUN (Fmake_byte_code, MANY); 3532 EXFUN (Fmake_byte_code, MANY);
3521 EXFUN (Fmake_list, 2); 3533 MODULE_API EXFUN (Fmake_list, 2);
3522 EXFUN (Fmake_string, 2); 3534 MODULE_API EXFUN (Fmake_string, 2);
3523 EXFUN (Fmake_symbol, 1); 3535 MODULE_API EXFUN (Fmake_symbol, 1);
3524 EXFUN (Fmake_vector, 2); 3536 MODULE_API EXFUN (Fmake_vector, 2);
3525 EXFUN (Fvector, MANY); 3537 MODULE_API EXFUN (Fvector, MANY);
3526 3538
3527 void release_breathing_space (void); 3539 void release_breathing_space (void);
3528 Lisp_Object noseeum_cons (Lisp_Object, Lisp_Object); 3540 Lisp_Object noseeum_cons (Lisp_Object, Lisp_Object);
3529 Lisp_Object make_vector (Elemcount, Lisp_Object); 3541 MODULE_API Lisp_Object make_vector (Elemcount, Lisp_Object);
3530 Lisp_Object vector1 (Lisp_Object); 3542 MODULE_API Lisp_Object vector1 (Lisp_Object);
3531 Lisp_Object vector2 (Lisp_Object, Lisp_Object); 3543 MODULE_API Lisp_Object vector2 (Lisp_Object, Lisp_Object);
3532 Lisp_Object vector3 (Lisp_Object, Lisp_Object, Lisp_Object); 3544 MODULE_API Lisp_Object vector3 (Lisp_Object, Lisp_Object, Lisp_Object);
3533 Lisp_Object make_bit_vector (Elemcount, Lisp_Object); 3545 Lisp_Object make_bit_vector (Elemcount, Lisp_Object);
3534 Lisp_Object make_bit_vector_from_byte_vector (unsigned char *, Elemcount); 3546 Lisp_Object make_bit_vector_from_byte_vector (unsigned char *, Elemcount);
3535 Lisp_Object noseeum_make_marker (void); 3547 Lisp_Object noseeum_make_marker (void);
3536 void garbage_collect_1 (void); 3548 void garbage_collect_1 (void);
3537 Lisp_Object acons (Lisp_Object, Lisp_Object, Lisp_Object); 3549 MODULE_API Lisp_Object acons (Lisp_Object, Lisp_Object, Lisp_Object);
3538 Lisp_Object cons3 (Lisp_Object, Lisp_Object, Lisp_Object); 3550 MODULE_API Lisp_Object cons3 (Lisp_Object, Lisp_Object, Lisp_Object);
3539 Lisp_Object list1 (Lisp_Object); 3551 MODULE_API Lisp_Object list1 (Lisp_Object);
3540 Lisp_Object list2 (Lisp_Object, Lisp_Object); 3552 MODULE_API Lisp_Object list2 (Lisp_Object, Lisp_Object);
3541 Lisp_Object list3 (Lisp_Object, Lisp_Object, Lisp_Object); 3553 MODULE_API Lisp_Object list3 (Lisp_Object, Lisp_Object, Lisp_Object);
3542 Lisp_Object list4 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object); 3554 MODULE_API Lisp_Object list4 (Lisp_Object, Lisp_Object, Lisp_Object,
3543 Lisp_Object list5 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, 3555 Lisp_Object);
3544 Lisp_Object); 3556 MODULE_API Lisp_Object list5 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object,
3545 Lisp_Object list6 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, 3557 Lisp_Object);
3546 Lisp_Object, Lisp_Object); 3558 MODULE_API Lisp_Object list6 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object,
3559 Lisp_Object, Lisp_Object);
3547 DECLARE_DOESNT_RETURN (memory_full (void)); 3560 DECLARE_DOESNT_RETURN (memory_full (void));
3548 void disksave_object_finalization (void); 3561 void disksave_object_finalization (void);
3549 extern int purify_flag; 3562 extern int purify_flag;
3550 extern EMACS_INT gc_generation_number[1]; 3563 extern EMACS_INT gc_generation_number[1];
3551 int c_readonly (Lisp_Object); 3564 int c_readonly (Lisp_Object);
3552 int lisp_readonly (Lisp_Object); 3565 int lisp_readonly (Lisp_Object);
3553 void copy_lisp_object (Lisp_Object dst, Lisp_Object src); 3566 MODULE_API void copy_lisp_object (Lisp_Object dst, Lisp_Object src);
3554 Lisp_Object build_intstring (const Ibyte *); 3567 MODULE_API Lisp_Object build_intstring (const Ibyte *);
3555 Lisp_Object build_string (const CIbyte *); 3568 MODULE_API Lisp_Object build_string (const CIbyte *);
3556 Lisp_Object build_ext_string (const Extbyte *, Lisp_Object); 3569 MODULE_API Lisp_Object build_ext_string (const Extbyte *, Lisp_Object);
3557 Lisp_Object build_msg_intstring (const Ibyte *); 3570 MODULE_API Lisp_Object build_msg_intstring (const Ibyte *);
3558 Lisp_Object build_msg_string (const CIbyte *); 3571 MODULE_API Lisp_Object build_msg_string (const CIbyte *);
3559 Lisp_Object make_string (const Ibyte *, Bytecount); 3572 MODULE_API Lisp_Object make_string (const Ibyte *, Bytecount);
3560 Lisp_Object make_ext_string (const Extbyte *, EMACS_INT, Lisp_Object); 3573 MODULE_API Lisp_Object make_ext_string (const Extbyte *, EMACS_INT, Lisp_Object);
3561 void init_string_ascii_begin (Lisp_Object string); 3574 void init_string_ascii_begin (Lisp_Object string);
3562 Lisp_Object make_uninit_string (Bytecount); 3575 Lisp_Object make_uninit_string (Bytecount);
3563 Lisp_Object make_float (double); 3576 MODULE_API Lisp_Object make_float (double);
3564 Lisp_Object make_string_nocopy (const Ibyte *, Bytecount); 3577 Lisp_Object make_string_nocopy (const Ibyte *, Bytecount);
3565 void free_cons (Lisp_Object); 3578 void free_cons (Lisp_Object);
3566 void free_list (Lisp_Object); 3579 void free_list (Lisp_Object);
3567 void free_alist (Lisp_Object); 3580 void free_alist (Lisp_Object);
3568 void free_marker (Lisp_Object); 3581 void free_marker (Lisp_Object);
3572 void kkcc_gc_stack_push_lisp_object (Lisp_Object obj); 3585 void kkcc_gc_stack_push_lisp_object (Lisp_Object obj);
3573 #endif /* USE_KKCC */ 3586 #endif /* USE_KKCC */
3574 int marked_p (Lisp_Object obj); 3587 int marked_p (Lisp_Object obj);
3575 extern int funcall_allocation_flag; 3588 extern int funcall_allocation_flag;
3576 extern int need_to_garbage_collect; 3589 extern int need_to_garbage_collect;
3577 extern int need_to_check_c_alloca; 3590 extern MODULE_API int need_to_check_c_alloca;
3578 extern int need_to_signal_post_gc; 3591 extern int need_to_signal_post_gc;
3579 extern Lisp_Object Qpost_gc_hook, Qgarbage_collecting; 3592 extern Lisp_Object Qpost_gc_hook, Qgarbage_collecting;
3580 void recompute_funcall_allocation_flag (void); 3593 void recompute_funcall_allocation_flag (void);
3581 3594
3582 #ifdef MEMORY_USAGE_STATS 3595 #ifdef MEMORY_USAGE_STATS
3626 extern struct buffer *current_buffer; 3639 extern struct buffer *current_buffer;
3627 3640
3628 extern void init_initial_directory (void); /* initialize initial_directory */ 3641 extern void init_initial_directory (void); /* initialize initial_directory */
3629 3642
3630 EXFUN (Fbuffer_disable_undo, 1); 3643 EXFUN (Fbuffer_disable_undo, 1);
3631 EXFUN (Fbuffer_modified_p, 1); 3644 MODULE_API EXFUN (Fbuffer_modified_p, 1);
3632 EXFUN (Fbuffer_name, 1); 3645 MODULE_API EXFUN (Fbuffer_name, 1);
3633 EXFUN (Fcurrent_buffer, 0); 3646 MODULE_API EXFUN (Fcurrent_buffer, 0);
3634 EXFUN (Ferase_buffer, 1); 3647 EXFUN (Ferase_buffer, 1);
3635 EXFUN (Fget_buffer, 1); 3648 EXFUN (Fget_buffer, 1);
3636 EXFUN (Fget_buffer_create, 1); 3649 EXFUN (Fget_buffer_create, 1);
3637 EXFUN (Fget_file_buffer, 1); 3650 EXFUN (Fget_file_buffer, 1);
3638 EXFUN (Fkill_buffer, 1); 3651 MODULE_API EXFUN (Fkill_buffer, 1);
3639 EXFUN (Fother_buffer, 3); 3652 EXFUN (Fother_buffer, 3);
3640 EXFUN (Frecord_buffer, 1); 3653 EXFUN (Frecord_buffer, 1);
3641 EXFUN (Fset_buffer, 1); 3654 MODULE_API EXFUN (Fset_buffer, 1);
3642 EXFUN (Fset_buffer_modified_p, 2); 3655 EXFUN (Fset_buffer_modified_p, 2);
3643 3656
3644 extern Lisp_Object QSscratch, Qafter_change_function, Qafter_change_functions; 3657 extern Lisp_Object QSscratch, Qafter_change_function, Qafter_change_functions;
3645 extern Lisp_Object Qbefore_change_function, Qbefore_change_functions; 3658 extern Lisp_Object Qbefore_change_function, Qbefore_change_functions;
3646 extern Lisp_Object Qbuffer_or_string_p, Qdefault_directory, Qfirst_change_hook; 3659 extern Lisp_Object Qbuffer_or_string_p, Qdefault_directory, Qfirst_change_hook;
3709 DECLARE_DOESNT_RETURN (c_write_error (Lisp_Object)); 3722 DECLARE_DOESNT_RETURN (c_write_error (Lisp_Object));
3710 DECLARE_DOESNT_RETURN (lisp_write_error (Lisp_Object)); 3723 DECLARE_DOESNT_RETURN (lisp_write_error (Lisp_Object));
3711 DECLARE_DOESNT_RETURN (args_out_of_range (Lisp_Object, Lisp_Object)); 3724 DECLARE_DOESNT_RETURN (args_out_of_range (Lisp_Object, Lisp_Object));
3712 DECLARE_DOESNT_RETURN (args_out_of_range_3 (Lisp_Object, Lisp_Object, 3725 DECLARE_DOESNT_RETURN (args_out_of_range_3 (Lisp_Object, Lisp_Object,
3713 Lisp_Object)); 3726 Lisp_Object));
3714 Lisp_Object wrong_type_argument (Lisp_Object, Lisp_Object); 3727 MODULE_API Lisp_Object wrong_type_argument (Lisp_Object, Lisp_Object);
3728 MODULE_API
3715 DECLARE_DOESNT_RETURN (dead_wrong_type_argument (Lisp_Object, Lisp_Object)); 3729 DECLARE_DOESNT_RETURN (dead_wrong_type_argument (Lisp_Object, Lisp_Object));
3716 void check_int_range (EMACS_INT, EMACS_INT, EMACS_INT); 3730 void check_int_range (EMACS_INT, EMACS_INT, EMACS_INT);
3717 3731
3718 EXFUN (Fint_to_char, 1); 3732 EXFUN (Fint_to_char, 1);
3719 EXFUN (Fchar_to_int, 1); 3733 EXFUN (Fchar_to_int, 1);
3865 EXFUN (Fthrow, 2); 3879 EXFUN (Fthrow, 2);
3866 EXFUN (Fcall_with_condition_handler, MANY); 3880 EXFUN (Fcall_with_condition_handler, MANY);
3867 EXFUN (Ffunction_max_args, 1); 3881 EXFUN (Ffunction_max_args, 1);
3868 EXFUN (Ffunction_min_args, 1); 3882 EXFUN (Ffunction_min_args, 1);
3869 3883
3870 DECLARE_DOESNT_RETURN (signal_error_1 (Lisp_Object, Lisp_Object)); 3884 MODULE_API DECLARE_DOESNT_RETURN (signal_error_1 (Lisp_Object, Lisp_Object));
3871 void maybe_signal_error_1 (Lisp_Object, Lisp_Object, Lisp_Object, 3885 void maybe_signal_error_1 (Lisp_Object, Lisp_Object, Lisp_Object,
3872 Error_Behavior); 3886 Error_Behavior);
3873 Lisp_Object maybe_signal_continuable_error_1 (Lisp_Object, Lisp_Object, 3887 Lisp_Object maybe_signal_continuable_error_1 (Lisp_Object, Lisp_Object,
3874 Lisp_Object, Error_Behavior); 3888 Lisp_Object, Error_Behavior);
3875 DECLARE_DOESNT_RETURN_GCC_ATTRIBUTE_SYNTAX_SUCKS (signal_ferror 3889 MODULE_API DECLARE_DOESNT_RETURN_GCC_ATTRIBUTE_SYNTAX_SUCKS (signal_ferror
3876 (Lisp_Object, 3890 (Lisp_Object,
3877 const CIbyte *, 3891 const CIbyte *,
3878 ...), 2, 3); 3892 ...), 2, 3);
3879 void maybe_signal_ferror (Lisp_Object, Lisp_Object, Error_Behavior, 3893 void maybe_signal_ferror (Lisp_Object, Lisp_Object, Error_Behavior,
3880 const CIbyte *, ...) PRINTF_ARGS (4, 5); 3894 const CIbyte *, ...) PRINTF_ARGS (4, 5);
3881 Lisp_Object signal_continuable_ferror (Lisp_Object, const CIbyte *, ...) 3895 Lisp_Object signal_continuable_ferror (Lisp_Object, const CIbyte *, ...)
3882 PRINTF_ARGS (2, 3); 3896 PRINTF_ARGS (2, 3);
3883 Lisp_Object maybe_signal_continuable_ferror (Lisp_Object, Lisp_Object, 3897 Lisp_Object maybe_signal_continuable_ferror (Lisp_Object, Lisp_Object,
3938 DECLARE_DOESNT_RETURN (sferror (const CIbyte *reason, Lisp_Object frob)); 3952 DECLARE_DOESNT_RETURN (sferror (const CIbyte *reason, Lisp_Object frob));
3939 DECLARE_DOESNT_RETURN (sferror_2 (const CIbyte *reason, Lisp_Object frob1, 3953 DECLARE_DOESNT_RETURN (sferror_2 (const CIbyte *reason, Lisp_Object frob1,
3940 Lisp_Object frob2)); 3954 Lisp_Object frob2));
3941 void maybe_sferror (const CIbyte *, Lisp_Object, Lisp_Object, 3955 void maybe_sferror (const CIbyte *, Lisp_Object, Lisp_Object,
3942 Error_Behavior); 3956 Error_Behavior);
3943 DECLARE_DOESNT_RETURN (invalid_argument (const CIbyte *reason, 3957 MODULE_API DECLARE_DOESNT_RETURN (invalid_argument (const CIbyte *reason,
3944 Lisp_Object frob)); 3958 Lisp_Object frob));
3945 DECLARE_DOESNT_RETURN (invalid_argument_2 (const CIbyte *reason, 3959 MODULE_API DECLARE_DOESNT_RETURN (invalid_argument_2 (const CIbyte *reason,
3946 Lisp_Object frob1, 3960 Lisp_Object frob1,
3947 Lisp_Object frob2)); 3961 Lisp_Object frob2));
3948 void maybe_invalid_argument (const CIbyte *, Lisp_Object, Lisp_Object, 3962 void maybe_invalid_argument (const CIbyte *, Lisp_Object, Lisp_Object,
3949 Error_Behavior); 3963 Error_Behavior);
3950 DECLARE_DOESNT_RETURN (invalid_operation (const CIbyte *reason, 3964 MODULE_API DECLARE_DOESNT_RETURN (invalid_operation (const CIbyte *reason,
3951 Lisp_Object frob)); 3965 Lisp_Object frob));
3952 DECLARE_DOESNT_RETURN (invalid_operation_2 (const CIbyte *reason, 3966 MODULE_API DECLARE_DOESNT_RETURN (invalid_operation_2 (const CIbyte *reason,
3953 Lisp_Object frob1, 3967 Lisp_Object frob1,
3954 Lisp_Object frob2)); 3968 Lisp_Object frob2));
3955 void maybe_invalid_operation (const CIbyte *, Lisp_Object, Lisp_Object, 3969 MODULE_API void maybe_invalid_operation (const CIbyte *, Lisp_Object,
3956 Error_Behavior); 3970 Lisp_Object, Error_Behavior);
3957 DECLARE_DOESNT_RETURN (invalid_state (const CIbyte *reason, 3971 DECLARE_DOESNT_RETURN (invalid_state (const CIbyte *reason,
3958 Lisp_Object frob)); 3972 Lisp_Object frob));
3959 DECLARE_DOESNT_RETURN (invalid_state_2 (const CIbyte *reason, 3973 DECLARE_DOESNT_RETURN (invalid_state_2 (const CIbyte *reason,
3960 Lisp_Object frob1, 3974 Lisp_Object frob1,
3961 Lisp_Object frob2)); 3975 Lisp_Object frob2));
3966 DECLARE_DOESNT_RETURN (invalid_change_2 (const CIbyte *reason, 3980 DECLARE_DOESNT_RETURN (invalid_change_2 (const CIbyte *reason,
3967 Lisp_Object frob1, 3981 Lisp_Object frob1,
3968 Lisp_Object frob2)); 3982 Lisp_Object frob2));
3969 void maybe_invalid_change (const CIbyte *, Lisp_Object, Lisp_Object, 3983 void maybe_invalid_change (const CIbyte *, Lisp_Object, Lisp_Object,
3970 Error_Behavior); 3984 Error_Behavior);
3971 DECLARE_DOESNT_RETURN (invalid_constant (const CIbyte *reason, 3985 MODULE_API DECLARE_DOESNT_RETURN (invalid_constant (const CIbyte *reason,
3972 Lisp_Object frob)); 3986 Lisp_Object frob));
3973 DECLARE_DOESNT_RETURN (invalid_constant_2 (const CIbyte *reason, 3987 DECLARE_DOESNT_RETURN (invalid_constant_2 (const CIbyte *reason,
3974 Lisp_Object frob1, 3988 Lisp_Object frob1,
3975 Lisp_Object frob2)); 3989 Lisp_Object frob2));
3976 void maybe_invalid_constant (const CIbyte *, Lisp_Object, Lisp_Object, 3990 void maybe_invalid_constant (const CIbyte *, Lisp_Object, Lisp_Object,
3977 Error_Behavior); 3991 Error_Behavior);
3978 DECLARE_DOESNT_RETURN (wtaerror (const CIbyte *reason, Lisp_Object frob)); 3992 DECLARE_DOESNT_RETURN (wtaerror (const CIbyte *reason, Lisp_Object frob));
3979 DECLARE_DOESNT_RETURN (out_of_memory (const CIbyte *reason, 3993 MODULE_API DECLARE_DOESNT_RETURN (out_of_memory (const CIbyte *reason,
3980 Lisp_Object frob)); 3994 Lisp_Object frob));
3981 DECLARE_DOESNT_RETURN (stack_overflow (const CIbyte *reason, 3995 DECLARE_DOESNT_RETURN (stack_overflow (const CIbyte *reason,
3982 Lisp_Object frob)); 3996 Lisp_Object frob));
3997 MODULE_API
3983 DECLARE_DOESNT_RETURN_GCC_ATTRIBUTE_SYNTAX_SUCKS (printing_unreadable_object 3998 DECLARE_DOESNT_RETURN_GCC_ATTRIBUTE_SYNTAX_SUCKS (printing_unreadable_object
3984 (const CIbyte *, 3999 (const CIbyte *,
3985 ...), 1, 2); 4000 ...), 1, 2);
3986 4001
3987 Lisp_Object signal_void_function_error (Lisp_Object); 4002 Lisp_Object signal_void_function_error (Lisp_Object);
4137 Lisp_Object (*) (Lisp_Object), 4152 Lisp_Object (*) (Lisp_Object),
4138 Lisp_Object, 4153 Lisp_Object,
4139 Lisp_Object (*) (Lisp_Object, Lisp_Object), 4154 Lisp_Object (*) (Lisp_Object, Lisp_Object),
4140 Lisp_Object); 4155 Lisp_Object);
4141 Lisp_Object condition_case_3 (Lisp_Object, Lisp_Object, Lisp_Object); 4156 Lisp_Object condition_case_3 (Lisp_Object, Lisp_Object, Lisp_Object);
4142 Lisp_Object unbind_to_1 (int, Lisp_Object); 4157 MODULE_API Lisp_Object unbind_to_1 (int, Lisp_Object);
4143 #define unbind_to(obj) unbind_to_1 (obj, Qnil) 4158 #define unbind_to(obj) unbind_to_1 (obj, Qnil)
4144 void specbind (Lisp_Object, Lisp_Object); 4159 void specbind (Lisp_Object, Lisp_Object);
4145 int record_unwind_protect (Lisp_Object (*) (Lisp_Object), Lisp_Object); 4160 MODULE_API int record_unwind_protect (Lisp_Object (*) (Lisp_Object),
4146 int record_unwind_protect_freeing (void *ptr); 4161 Lisp_Object);
4147 int record_unwind_protect_freeing_dynarr (void *ptr); 4162 int record_unwind_protect_freeing_dynarr (void *ptr);
4148 int record_unwind_protect_restoring_int (int *addr, int val); 4163 int record_unwind_protect_restoring_int (int *addr, int val);
4149 int internal_bind_int (int *addr, int newval); 4164 int internal_bind_int (int *addr, int newval);
4150 int internal_bind_lisp_object (Lisp_Object *addr, Lisp_Object newval); 4165 int internal_bind_lisp_object (Lisp_Object *addr, Lisp_Object newval);
4151 void do_autoload (Lisp_Object, Lisp_Object); /* GCPROs both arguments */ 4166 void do_autoload (Lisp_Object, Lisp_Object); /* GCPROs both arguments */
4152 Lisp_Object un_autoload (Lisp_Object); 4167 Lisp_Object un_autoload (Lisp_Object);
4153 void warn_when_safe_lispobj (Lisp_Object, Lisp_Object, Lisp_Object); 4168 void warn_when_safe_lispobj (Lisp_Object, Lisp_Object, Lisp_Object);
4154 void warn_when_safe (Lisp_Object, Lisp_Object, const CIbyte *, 4169 MODULE_API void warn_when_safe (Lisp_Object, Lisp_Object, const CIbyte *,
4155 ...) PRINTF_ARGS (3, 4); 4170 ...) PRINTF_ARGS (3, 4);
4156 extern int backtrace_with_internal_sections; 4171 extern int backtrace_with_internal_sections;
4157 4172
4158 extern Lisp_Object Vstack_trace_on_error; 4173 extern Lisp_Object Vstack_trace_on_error;
4159 4174
4160 /* Defined in event-stream.c */ 4175 /* Defined in event-stream.c */
4237 extern Lisp_Object Vfile_name_coding_system, Vkeyboard_coding_system; 4252 extern Lisp_Object Vfile_name_coding_system, Vkeyboard_coding_system;
4238 extern Lisp_Object Vterminal_coding_system; 4253 extern Lisp_Object Vterminal_coding_system;
4239 extern Lisp_Object Qcanonicalize_after_coding; 4254 extern Lisp_Object Qcanonicalize_after_coding;
4240 int coding_system_is_for_text_file (Lisp_Object coding_system); 4255 int coding_system_is_for_text_file (Lisp_Object coding_system);
4241 Lisp_Object find_coding_system_for_text_file (Lisp_Object name, int eol_wrap); 4256 Lisp_Object find_coding_system_for_text_file (Lisp_Object name, int eol_wrap);
4242 Lisp_Object get_coding_system_for_text_file (Lisp_Object name, int eol_wrap); 4257 MODULE_API Lisp_Object get_coding_system_for_text_file (Lisp_Object name,
4258 int eol_wrap);
4243 int coding_system_is_binary (Lisp_Object coding_system); 4259 int coding_system_is_binary (Lisp_Object coding_system);
4244 4260
4245 4261
4246 /* Defined in fileio.c */ 4262 /* Defined in fileio.c */
4247 EXFUN (Fdirectory_file_name, 1); 4263 EXFUN (Fdirectory_file_name, 1);
4291 EXFUN (Ftruncate, 1); 4307 EXFUN (Ftruncate, 1);
4292 4308
4293 double extract_float (Lisp_Object); 4309 double extract_float (Lisp_Object);
4294 4310
4295 /* Defined in fns.c */ 4311 /* Defined in fns.c */
4296 EXFUN (Fappend, MANY); 4312 MODULE_API EXFUN (Fappend, MANY);
4297 EXFUN (Fassoc, 2); 4313 EXFUN (Fassoc, 2);
4298 EXFUN (Fassq, 2); 4314 EXFUN (Fassq, 2);
4299 EXFUN (Fcanonicalize_lax_plist, 2); 4315 EXFUN (Fcanonicalize_lax_plist, 2);
4300 EXFUN (Fcanonicalize_plist, 2); 4316 EXFUN (Fcanonicalize_plist, 2);
4301 EXFUN (Fcheck_valid_plist, 1); 4317 EXFUN (Fcheck_valid_plist, 1);
4306 EXFUN (Fcopy_tree, 2); 4322 EXFUN (Fcopy_tree, 2);
4307 EXFUN (Fdelete, 2); 4323 EXFUN (Fdelete, 2);
4308 EXFUN (Fdelq, 2); 4324 EXFUN (Fdelq, 2);
4309 EXFUN (Fdestructive_alist_to_plist, 1); 4325 EXFUN (Fdestructive_alist_to_plist, 1);
4310 EXFUN (Felt, 2); 4326 EXFUN (Felt, 2);
4311 EXFUN (Fequal, 2); 4327 MODULE_API EXFUN (Fequal, 2);
4312 EXFUN (Fget, 3); 4328 MODULE_API EXFUN (Fget, 3);
4313 EXFUN (Flast, 2); 4329 EXFUN (Flast, 2);
4314 EXFUN (Flax_plist_get, 3); 4330 EXFUN (Flax_plist_get, 3);
4315 EXFUN (Flax_plist_remprop, 2); 4331 EXFUN (Flax_plist_remprop, 2);
4316 EXFUN (Flength, 1); 4332 MODULE_API EXFUN (Flength, 1);
4317 EXFUN (Fmapcar, 2); 4333 EXFUN (Fmapcar, 2);
4318 EXFUN (Fmember, 2); 4334 EXFUN (Fmember, 2);
4319 EXFUN (Fmemq, 2); 4335 EXFUN (Fmemq, 2);
4320 EXFUN (Fnconc, MANY); 4336 EXFUN (Fnconc, MANY);
4321 EXFUN (Fnreverse, 1); 4337 MODULE_API EXFUN (Fnreverse, 1);
4322 EXFUN (Fnthcdr, 2); 4338 EXFUN (Fnthcdr, 2);
4323 EXFUN (Fold_assq, 2); 4339 EXFUN (Fold_assq, 2);
4324 EXFUN (Fold_equal, 2); 4340 EXFUN (Fold_equal, 2);
4325 EXFUN (Fold_member, 2); 4341 EXFUN (Fold_member, 2);
4326 EXFUN (Fold_memq, 2); 4342 EXFUN (Fold_memq, 2);
4327 EXFUN (Fplist_get, 3); 4343 EXFUN (Fplist_get, 3);
4328 EXFUN (Fplist_member, 2); 4344 EXFUN (Fplist_member, 2);
4329 EXFUN (Fplist_put, 3); 4345 EXFUN (Fplist_put, 3);
4330 EXFUN (Fprovide, 1); 4346 MODULE_API EXFUN (Fprovide, 1);
4331 EXFUN (Fput, 3); 4347 MODULE_API EXFUN (Fput, 3);
4332 EXFUN (Frassq, 2); 4348 EXFUN (Frassq, 2);
4333 EXFUN (Fremassq, 2); 4349 EXFUN (Fremassq, 2);
4334 EXFUN (Freplace_list, 2); 4350 EXFUN (Freplace_list, 2);
4351 MODULE_API EXFUN (Freverse, 1);
4335 EXFUN (Fsafe_length, 1); 4352 EXFUN (Fsafe_length, 1);
4336 EXFUN (Fsort, 2); 4353 EXFUN (Fsort, 2);
4337 EXFUN (Fstring_equal, 2); 4354 EXFUN (Fstring_equal, 2);
4338 EXFUN (Fstring_lessp, 2); 4355 EXFUN (Fstring_lessp, 2);
4339 EXFUN (Fsubstring, 3); 4356 EXFUN (Fsubstring, 3);
4499 int echo_area_active (struct frame *); 4516 int echo_area_active (struct frame *);
4500 Lisp_Object echo_area_contents (struct frame *); 4517 Lisp_Object echo_area_contents (struct frame *);
4501 void message_internal (const Ibyte *, Lisp_Object, Bytecount, Bytecount); 4518 void message_internal (const Ibyte *, Lisp_Object, Bytecount, Bytecount);
4502 void message_append_internal (const Ibyte *, Lisp_Object, 4519 void message_append_internal (const Ibyte *, Lisp_Object,
4503 Bytecount, Bytecount); 4520 Bytecount, Bytecount);
4504 void message (const char *, ...) PRINTF_ARGS (1, 2); 4521 MODULE_API void message (const char *, ...) PRINTF_ARGS (1, 2);
4505 void message_append (const char *, ...) PRINTF_ARGS (1, 2); 4522 void message_append (const char *, ...) PRINTF_ARGS (1, 2);
4506 void message_no_translate (const char *, ...) PRINTF_ARGS (1, 2); 4523 void message_no_translate (const char *, ...) PRINTF_ARGS (1, 2);
4507 void clear_message (void); 4524 void clear_message (void);
4508 4525
4509 /* Defined in mule-charset.c */ 4526 /* Defined in mule-charset.c */
4528 void debug_short_backtrace (int); 4545 void debug_short_backtrace (int);
4529 void debug_backtrace (void); 4546 void debug_backtrace (void);
4530 /* NOTE: Do not call this with the data of a Lisp_String. Use princ. 4547 /* NOTE: Do not call this with the data of a Lisp_String. Use princ.
4531 * Note: stream should be defaulted before calling 4548 * Note: stream should be defaulted before calling
4532 * (eg Qnil means stdout, not Vstandard_output, etc) */ 4549 * (eg Qnil means stdout, not Vstandard_output, etc) */
4533 void write_c_string (Lisp_Object stream, const CIbyte *str); 4550 MODULE_API void write_c_string (Lisp_Object stream, const CIbyte *str);
4534 /* Same goes for this function. */ 4551 /* Same goes for this function. */
4535 void write_string (Lisp_Object stream, const Ibyte *str); 4552 MODULE_API void write_string (Lisp_Object stream, const Ibyte *str);
4536 /* Same goes for this function. */ 4553 /* Same goes for this function. */
4537 void write_string_1 (Lisp_Object stream, const Ibyte *str, Bytecount size); 4554 void write_string_1 (Lisp_Object stream, const Ibyte *str, Bytecount size);
4538 void write_eistring (Lisp_Object stream, const Eistring *ei); 4555 void write_eistring (Lisp_Object stream, const Eistring *ei);
4539 4556
4540 /* Higher-level (printf-style) ways to output data: */ 4557 /* Higher-level (printf-style) ways to output data: */
4541 void write_fmt_string (Lisp_Object stream, const CIbyte *fmt, ...); 4558 MODULE_API void write_fmt_string (Lisp_Object stream, const CIbyte *fmt, ...);
4542 void write_fmt_string_lisp (Lisp_Object stream, const CIbyte *fmt, 4559 MODULE_API void write_fmt_string_lisp (Lisp_Object stream, const CIbyte *fmt,
4543 int nargs, ...); 4560 int nargs, ...);
4544 void stderr_out (const CIbyte *, ...) PRINTF_ARGS (1, 2); 4561 void stderr_out (const CIbyte *, ...) PRINTF_ARGS (1, 2);
4545 void stderr_out_lisp (const CIbyte *, int nargs, ...); 4562 void stderr_out_lisp (const CIbyte *, int nargs, ...);
4546 void stdout_out (const CIbyte *, ...) PRINTF_ARGS (1, 2); 4563 void stdout_out (const CIbyte *, ...) PRINTF_ARGS (1, 2);
4547 void external_out (int dest, const CIbyte *fmt, ...) PRINTF_ARGS (2, 3); 4564 void external_out (int dest, const CIbyte *fmt, ...) PRINTF_ARGS (2, 3);
4548 void debug_out (const CIbyte *, ...) PRINTF_ARGS (1, 2); 4565 void debug_out (const CIbyte *, ...) PRINTF_ARGS (1, 2);
4568 constant. */ 4585 constant. */
4569 #define DECIMAL_PRINT_SIZE(integral_type) \ 4586 #define DECIMAL_PRINT_SIZE(integral_type) \
4570 (((2410824 * sizeof (integral_type)) / 1000000) + 3) 4587 (((2410824 * sizeof (integral_type)) / 1000000) + 3)
4571 void long_to_string (char *, long); 4588 void long_to_string (char *, long);
4572 extern int print_escape_newlines; 4589 extern int print_escape_newlines;
4573 extern int print_readably; 4590 extern MODULE_API int print_readably;
4574 Lisp_Object internal_with_output_to_temp_buffer (Lisp_Object, 4591 Lisp_Object internal_with_output_to_temp_buffer (Lisp_Object,
4575 Lisp_Object (*) (Lisp_Object), 4592 Lisp_Object (*) (Lisp_Object),
4576 Lisp_Object, Lisp_Object); 4593 Lisp_Object, Lisp_Object);
4577 void float_to_string (char *, double); 4594 void float_to_string (char *, double);
4578 void internal_object_printer (Lisp_Object, Lisp_Object, int); 4595 void internal_object_printer (Lisp_Object, Lisp_Object, int);
4657 EXFUN (Fsymbol_plist, 1); 4674 EXFUN (Fsymbol_plist, 1);
4658 EXFUN (Fsymbol_value, 1); 4675 EXFUN (Fsymbol_value, 1);
4659 4676
4660 unsigned int hash_string (const Ibyte *, Bytecount); 4677 unsigned int hash_string (const Ibyte *, Bytecount);
4661 Lisp_Object intern_int (const Ibyte *str); 4678 Lisp_Object intern_int (const Ibyte *str);
4662 Lisp_Object intern (const CIbyte *str); 4679 MODULE_API Lisp_Object intern (const CIbyte *str);
4663 Lisp_Object intern_converting_underscores_to_dashes (const CIbyte *str); 4680 Lisp_Object intern_converting_underscores_to_dashes (const CIbyte *str);
4664 Lisp_Object oblookup (Lisp_Object, const Ibyte *, Bytecount); 4681 Lisp_Object oblookup (Lisp_Object, const Ibyte *, Bytecount);
4665 void map_obarray (Lisp_Object, int (*) (Lisp_Object, void *), void *); 4682 void map_obarray (Lisp_Object, int (*) (Lisp_Object, void *), void *);
4666 Lisp_Object indirect_function (Lisp_Object, int); 4683 Lisp_Object indirect_function (Lisp_Object, int);
4667 Lisp_Object symbol_value_in_buffer (Lisp_Object, Lisp_Object); 4684 Lisp_Object symbol_value_in_buffer (Lisp_Object, Lisp_Object);
5159 extern Lisp_Object Qexternal_debugging_output, Qfeaturep, Qfile_error; 5176 extern Lisp_Object Qexternal_debugging_output, Qfeaturep, Qfile_error;
5160 extern Lisp_Object Qfile_name_sans_extension, Qfinal; 5177 extern Lisp_Object Qfile_name_sans_extension, Qfinal;
5161 extern Lisp_Object Qforeground, Qformat, Qframe_live_p, Qgraphic; 5178 extern Lisp_Object Qforeground, Qformat, Qframe_live_p, Qgraphic;
5162 extern Lisp_Object Qgui_error, Qicon_glyph_p, Qidentity, Qinhibit_quit; 5179 extern Lisp_Object Qgui_error, Qicon_glyph_p, Qidentity, Qinhibit_quit;
5163 extern Lisp_Object Qinhibit_read_only, Qinteger_char_or_marker_p; 5180 extern Lisp_Object Qinhibit_read_only, Qinteger_char_or_marker_p;
5164 extern Lisp_Object Qinteger_or_char_p, Qinteger_or_marker_p, Qintegerp; 5181 extern Lisp_Object Qinteger_or_char_p, Qinteger_or_marker_p;
5165 extern Lisp_Object Qinteractive, Qinternal_error, Qinvalid_argument; 5182 extern Lisp_Object Qinteractive, Qinternal_error;
5166 extern Lisp_Object Qinvalid_byte_code, Qinvalid_change, Qinvalid_constant; 5183 extern Lisp_Object Qinvalid_byte_code, Qinvalid_change, Qinvalid_constant;
5167 extern Lisp_Object Qinvalid_function, Qinvalid_operation; 5184 extern Lisp_Object Qinvalid_function, Qinvalid_operation;
5168 extern Lisp_Object Qinvalid_read_syntax, Qinvalid_state, Qio_error, Qlambda; 5185 extern Lisp_Object Qinvalid_read_syntax, Qinvalid_state, Qio_error, Qlambda;
5169 extern Lisp_Object Qlayout, Qlist_formation_error, Qlistp, Qload; 5186 extern Lisp_Object Qlayout, Qlist_formation_error, Qlistp, Qload;
5170 extern Lisp_Object Qlong_name, Qmacro, Qmakunbound, Qmalformed_list; 5187 extern Lisp_Object Qlong_name, Qmacro, Qmakunbound, Qmalformed_list;
5174 extern Lisp_Object Qnothing_image_instance_p, Qnumber_char_or_marker_p; 5191 extern Lisp_Object Qnothing_image_instance_p, Qnumber_char_or_marker_p;
5175 extern Lisp_Object Qnumberp, Qout_of_memory; 5192 extern Lisp_Object Qnumberp, Qout_of_memory;
5176 extern Lisp_Object Qoverflow_error, Qpoint, Qpointer_glyph_p; 5193 extern Lisp_Object Qoverflow_error, Qpoint, Qpointer_glyph_p;
5177 extern Lisp_Object Qpointer_image_instance_p, Qprint_length; 5194 extern Lisp_Object Qpointer_image_instance_p, Qprint_length;
5178 extern Lisp_Object Qprint_string_length, Qprinting_unreadable_object; 5195 extern Lisp_Object Qprint_string_length, Qprinting_unreadable_object;
5179 extern Lisp_Object Qprocess_error, Qprogn, Qquit, Qquote, Qrange_error; 5196 extern Lisp_Object Qprogn, Qquit, Qquote, Qrange_error;
5180 extern Lisp_Object Qread_char, Qread_from_minibuffer; 5197 extern Lisp_Object Qread_char, Qread_from_minibuffer;
5181 extern Lisp_Object Qreally_early_error_handler, Qregion_beginning; 5198 extern Lisp_Object Qreally_early_error_handler, Qregion_beginning;
5182 extern Lisp_Object Qregion_end, Qregistry, Qreverse_direction_charset; 5199 extern Lisp_Object Qregion_end, Qregistry, Qreverse_direction_charset;
5183 extern Lisp_Object Qrun_hooks, Qsans_modifiers, Qsave_buffers_kill_emacs; 5200 extern Lisp_Object Qrun_hooks, Qsans_modifiers, Qsave_buffers_kill_emacs;
5184 extern Lisp_Object Qself_insert_command, Qself_insert_defer_undo, Qsequencep; 5201 extern Lisp_Object Qself_insert_command, Qself_insert_defer_undo, Qsequencep;
5185 extern Lisp_Object Qset, Qsetting_constant, Qshort_name, Qsingularity_error; 5202 extern Lisp_Object Qset, Qsetting_constant, Qshort_name, Qsingularity_error;
5186 extern Lisp_Object Qsound_error, Qstack_overflow, Qstandard_input; 5203 extern Lisp_Object Qsound_error, Qstack_overflow, Qstandard_input;
5187 extern Lisp_Object Qstandard_output, Qstart_open, Qstring_lessp; 5204 extern Lisp_Object Qstandard_output, Qstart_open, Qstring_lessp;
5188 extern Lisp_Object Qstructure_formation_error, Qsubwindow; 5205 extern Lisp_Object Qstructure_formation_error, Qsubwindow;
5189 extern Lisp_Object Qsubwindow_image_instance_p, Qsyntax_error, Qt; 5206 extern Lisp_Object Qsubwindow_image_instance_p;
5190 extern Lisp_Object Qtext_conversion_error, Qtext_image_instance_p, Qtop_level; 5207 extern Lisp_Object Qtext_conversion_error, Qtext_image_instance_p, Qtop_level;
5191 extern Lisp_Object Qtrue_list_p, Qunbound, Qunderflow_error, Qunderline; 5208 extern Lisp_Object Qtrue_list_p, Qunderflow_error, Qunderline;
5192 extern Lisp_Object Quser_files_and_directories, Qvalues; 5209 extern Lisp_Object Quser_files_and_directories, Qvalues;
5193 extern Lisp_Object Qvariable_documentation, Qvariable_domain, Qvoid_function; 5210 extern Lisp_Object Qvariable_documentation, Qvariable_domain, Qvoid_function;
5194 extern Lisp_Object Qvoid_variable, Qwindow_live_p, Qwrong_number_of_arguments; 5211 extern Lisp_Object Qvoid_variable, Qwindow_live_p, Qwrong_number_of_arguments;
5195 extern Lisp_Object Qwrong_type_argument, Qyes_or_no_p; 5212 extern Lisp_Object Qwrong_type_argument, Qyes_or_no_p;
5196 5213
5214 extern MODULE_API Lisp_Object Qintegerp, Qinvalid_argument, Qprocess_error;
5215 extern MODULE_API Lisp_Object Qsyntax_error, Qt, Qunbound;
5216
5197 #define SYMBOL(fou) extern Lisp_Object fou 5217 #define SYMBOL(fou) extern Lisp_Object fou
5218 #define SYMBOL_MODULE_API(fou) extern MODULE_API Lisp_Object fou
5198 #define SYMBOL_KEYWORD(la_cle_est_fou) extern Lisp_Object la_cle_est_fou 5219 #define SYMBOL_KEYWORD(la_cle_est_fou) extern Lisp_Object la_cle_est_fou
5199 #define SYMBOL_GENERAL(tout_le_monde, est_fou) \ 5220 #define SYMBOL_GENERAL(tout_le_monde, est_fou) \
5200 extern Lisp_Object tout_le_monde 5221 extern Lisp_Object tout_le_monde
5201 5222
5202 #include "general-slots.h" 5223 #include "general-slots.h"
5203 5224
5204 #undef SYMBOL 5225 #undef SYMBOL
5226 #undef SYMBOL_MODULE_API
5205 #undef SYMBOL_KEYWORD 5227 #undef SYMBOL_KEYWORD
5206 #undef SYMBOL_GENERAL 5228 #undef SYMBOL_GENERAL
5207 5229
5208 /*--------------- prototypes for variables of type Lisp_Object ------------*/ 5230 /*--------------- prototypes for variables of type Lisp_Object ------------*/
5209 5231