Commit 7b4be968 authored by jjgarcia's avatar jjgarcia

Remove more unused entries in external.h.

parent 399952f4
......@@ -43,7 +43,7 @@ OBJS = main.o symbol.o package.o list.o\
time.o unixint.o\
mapfun.o multival.o hash.o format.o pathname.o\
structure.o load.o unixfsys.o unixsys.o \
all_symbols.o init.o @[email protected]
all_symbols.o @[email protected]
.SUFFIXES: .c .o .d
......
......@@ -64,10 +64,9 @@ make_our_hash_table(cl_object test, int size)
@(return class)
@)
static void
clos_boot(void)
void
init_clos(void)
{
SYM_VAL(@'si::*class-name-hash-table*') = make_our_hash_table(@'eq', 1024);
/* booting Class CLASS */
......@@ -110,11 +109,3 @@ clos_boot(void)
CLASS_SUPERIORS(class_class) = CONS(class_object, Cnil);
CLASS_INFERIORS(class_class) = CONS(class_built_in, Cnil);
}
void
init_clos(void)
{
SYM_VAL(@'si::*class-name-hash-table*') = OBJNULL;
clos_boot();
}
/*
init.c -- Lisp Initialization.
*/
/*
Copyright (c) 1990, Giuseppe Attardi.
Copyright (c) 2001, Juan Jose Garcia Ripoll.
ECL is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
See file '../Copyright' for full details.
*/
#include "ecl.h"
/******************************* ------- ******************************/
extern bool ecl_booted = 0;
#ifdef __cplusplus
extern "C" void init_LSP(void);
extern "C" void init_CLOS(void);
#else
extern void init_LSP();
extern void init_CLOS();
#endif
void
init_lisp(void)
{
init_symbol();
init_package();
/* These must come _after_ init_symbol() and init_package() */
GC_disable();
init_all_symbols();
GC_enable();
#if !defined(GBC_BOEHM)
/* We need this because a lot of stuff is to be created */
init_GC();
#endif
SYM_VAL(@'*package*') = lisp_package;
SYM_VAL(@'*gensym_counter*') = MAKE_FIXNUM(0);
init_compiler();
init_interpreter();
init_eval();
init_typespec();
init_number();
init_character();
init_file();
init_read();
init_print();
init_pathname();
#ifdef unix
init_load();
/* init_unixsys(); */
#endif /* unix */
init_array();
/* init_list(); */
/* init_predicate(); */
/* init_cfun(); */
/* init_sequence(); */
/* init_structure(); */
/* init_string(); */
#if !defined(GBC_BOEHM)
init_alloc_function();
#endif
#ifdef TCP
/* init_tcp(); */
#endif
#ifdef THREADS
init_lwp();
#endif
#ifdef CLOS
/* init_instance(); */
init_clos();
/* init_gfun(); */
#endif
#ifdef TK
init_tk();
#endif
/* init_hash(); */
#ifdef unix
/* init_unixfsys(); */
init_unixtime();
#endif
/* init_reference(); */
init_assignment();
init_error();
/* init_toplevel(); */
/* init_conditional(); */
/* init_catch(); */
init_macros();
/* init_let(); */
/* init_prog(); */
/* init_block(); */
init_multival();
/* init_mapfun(); */
/* init_iteration(); */
init_cmpaux();
init_main();
init_format();
init_interrupt();
#ifdef RUNTIME
SYM_VAL(@'*features*') = CONS(make_keyword("RUNTIME"), SYM_VAL(@'*features*'));
#endif
/* This has to come before init_LSP/CLOS, because we need
* clear_compiler_properties() to work in init_CLOS(). */
ecl_booted = 1;
lex_env = Cnil;
init_LSP();
init_CLOS();
}
......@@ -41,9 +41,11 @@ int data_start = (int)&data_start;
/******************************* EXPORTS ******************************/
bool ecl_booted = 0;
const char *ecl_self;
/******************************* ------- ******************************/
/************************ GLOBAL INITIALIZATION ***********************/
static int ARGC;
static char **ARGV;
......@@ -53,6 +55,15 @@ static char stdin_buf[BUFSIZ];
static char stdout_buf[BUFSIZ];
#endif
#ifdef __cplusplus
extern "C" void init_LSP(void);
extern "C" void init_CLOS(void);
#else
extern void init_LSP();
extern void init_CLOS();
#endif
static void init_main();
int
cl_boot(int argc, char **argv)
{
......@@ -75,7 +86,69 @@ cl_boot(int argc, char **argv)
lex_new();
/* Initialize library */
init_lisp();
init_symbol();
init_package();
/* These must come _after_ init_symbol() and init_package() */
GC_disable();
init_all_symbols();
GC_enable();
#if !defined(GBC_BOEHM)
/* We need this because a lot of stuff is to be created */
init_GC();
#endif
SYM_VAL(@'*package*') = lisp_package;
SYM_VAL(@'*gensym_counter*') = MAKE_FIXNUM(0);
init_compiler();
init_interpreter();
init_eval();
init_typespec();
init_number();
init_character();
init_file();
init_read();
init_print();
init_pathname();
init_load();
init_array();
#if !defined(GBC_BOEHM)
init_alloc_function();
#endif
#ifdef THREADS
init_lwp();
#endif
#ifdef CLOS
init_clos();
#endif
#ifdef TK
init_tk();
#endif
#ifdef unix
init_unixtime();
#endif
init_assignment();
init_error();
init_macros();
init_multival();
init_cmpaux();
init_main();
init_format();
init_interrupt();
#ifdef RUNTIME
SYM_VAL(@'*features*') = CONS(make_keyword("RUNTIME"), SYM_VAL(@'*features*'));
#endif
/* This has to come before init_LSP/CLOS, because we need
* clear_compiler_properties() to work in init_CLOS(). */
ecl_booted = 1;
lex_env = Cnil;
init_LSP();
#ifdef CLOS
init_CLOS();
#endif
/* Jump to top level */
SYM_VAL(@'*package*') = user_package;
......@@ -95,6 +168,8 @@ cl_boot(int argc, char **argv)
#endif
}
/************************* ENVIRONMENT ROUTINES ***********************/
@(defun quit (&optional (code MAKE_FIXNUM(0)))
cl_fixnum i;
@
......@@ -167,7 +242,7 @@ si_pointer(cl_object x)
@(return make_unsigned_integer((cl_index)x))
}
void
static void
init_main(void)
{
{ cl_object features;
......
......@@ -291,7 +291,7 @@ count_bits(cl_object x)
Left shift if w > 0, right shift if w < 0.
*/
cl_object
integer_shift(cl_object x, cl_fixnum w)
ecl_ash(cl_object x, cl_fixnum w)
{
cl_object y;
......@@ -312,13 +312,13 @@ integer_shift(cl_object x, cl_fixnum w)
return(big_register_normalize(y));
}
int
static int
int_bit_length(int i)
{
register int count, j;
register int count, j;
count = 0;
for (j = 0; j < 31 ; j++)
for (j = 0; j < (sizeof(cl_index)/sizeof(u_int8_t))*8-1; j++)
if (((i >> j) & 1) == 1) count = j + 1;
return(count);
}
......@@ -455,7 +455,7 @@ cl_ash(cl_object x, cl_object y)
assert_type_integer(x);
assert_type_integer(y);
if (FIXNUMP(y))
r = integer_shift(x, fix(y));
r = ecl_ash(x, fix(y));
else {
/*
bit position represented by bignum is probably
......
......@@ -152,16 +152,6 @@ extern long big_to_long(cl_object x);
extern void init_big(void);
/* block.c */
extern void init_block(void);
/* catch.c */
extern void init_catch(void);
/* cfun.c */
extern cl_object si_compiled_function_name(cl_object fun);
......@@ -174,7 +164,6 @@ extern cl_object cl_make_cclosure_va(cl_object (*self)(int narg,...), cl_object
extern void cl_def_c_function(cl_object sym, cl_object (*self)(), int narg);
extern void cl_def_c_macro_va(cl_object sym, cl_object (*self)(int narg,...));
extern void cl_def_c_function_va(cl_object sym, cl_object (*self)(int narg,...));
extern void init_cfun(void);
/* character.c */
......@@ -283,10 +272,6 @@ extern cl_object lambda_apply(int narg, cl_object fun);
extern cl_object *interpret(cl_object *memory);
extern void init_interpreter(void);
/* conditional.c */
extern void init_conditional(void);
/* disassembler.c */
extern cl_object si_bc_disassemble(cl_object v);
......@@ -394,7 +379,6 @@ extern long file_position_set(cl_object strm, long disp);
extern long file_length(cl_object strm);
extern int file_column(cl_object strm);
extern void init_file(void);
extern void init_file_function(void);
/* format.c */
......@@ -447,7 +431,6 @@ extern cl_object si_method_ht_get(cl_object keylist, cl_object table);
extern cl_object si_set_compiled_function_name(cl_object keylist, cl_object table);
extern cl_object compute_method(int narg, cl_object fun, cl_object *args);
extern void init_gfun(void);
#endif /* CLOS */
......@@ -478,13 +461,6 @@ extern bool remhash(cl_object key, cl_object hash);
extern void cl_clear_hashtable(cl_object hashtable);
/* init.c */
extern bool ecl_booted;
extern void init_lisp(void);
extern void init_libs(void);
/* instance.c */
#ifdef CLOS
......@@ -507,18 +483,6 @@ extern void init_instance(void);
#endif /* CLOS */
/* iteration.c */
extern void do_bindings(cl_object var_list, struct iterator *bt);
extern void init_iteration(void);
/* let.c */
extern void let_bindings(cl_object var_list, struct let *let);
extern void init_let(void);
/* list.c */
extern cl_object cl_caar(cl_object x);
......@@ -620,7 +584,6 @@ extern cl_object assq(cl_object x, cl_object l);
extern cl_object assql(cl_object x, cl_object l);
extern cl_object assoc(cl_object x, cl_object l);
extern cl_object assqlp(cl_object x, cl_object l);
extern void init_list(void);
/* load.c */
......@@ -630,7 +593,7 @@ extern cl_object si_load_binary(cl_object file, cl_object verbose, cl_object pri
extern cl_object cl_load _ARGS((int narg, cl_object pathname, ...));
extern void init_load(void);
extern void load_until_tag(cl_object stream, cl_object end_tag);
/* lwp.c */
#ifdef THREADS
......@@ -688,9 +651,9 @@ extern cl_object si_setenv(cl_object var, cl_object value);
extern cl_object si_pointer(cl_object x);
extern cl_object cl_quit _ARGS((int narg, ...));
extern int cl_boot(int argc, char **argv);
extern bool ecl_booted;
extern const char *ecl_self;
extern void init_main(void);
extern int cl_boot(int argc, char **argv);
/* mapfun.c */
......@@ -701,7 +664,6 @@ extern cl_object cl_mapc _ARGS((int narg, cl_object fun, ...));
extern cl_object cl_mapl _ARGS((int narg, cl_object fun, ...));
extern cl_object cl_mapcan _ARGS((int narg, cl_object fun, ...));
extern cl_object cl_mapcon _ARGS((int narg, cl_object fun, ...));
extern void init_mapfun(void);
/* multival.c */
......@@ -734,7 +696,6 @@ extern cl_object integer_divide(cl_object x, cl_object y);
extern cl_object get_gcd(cl_object x, cl_object y);
extern cl_object one_plus(cl_object x);
extern cl_object one_minus(cl_object x);
extern void init_num_arith(void);
/* number.c */
......@@ -824,8 +785,7 @@ extern cl_object cl_logxor _ARGS((int narg, ...));
extern cl_object cl_logand _ARGS((int narg, ...));
extern cl_object cl_logeqv _ARGS((int narg, ...));
extern cl_object integer_shift(cl_object x, cl_fixnum w);
extern int int_bit_length(int i);
extern cl_object ecl_ash(cl_object x, cl_fixnum w);
extern void init_num_log(void);
......@@ -842,7 +802,6 @@ extern int number_plusp(cl_object x);
extern int number_minusp(cl_object x);
extern int number_oddp(cl_object x);
extern int number_evenp(cl_object x);
extern void init_num_pred(void);
/* num_rand.c */
......@@ -929,7 +888,6 @@ extern void use_package(cl_object x0, cl_object p);
extern void unuse_package(cl_object x0, cl_object p);
extern void delete_package(cl_object p);
extern void init_package(void);
extern void init_package_function(void);
/* pathname.c */
......@@ -1004,7 +962,6 @@ extern bool numberp(cl_object x);
extern bool eql(cl_object x, cl_object y);
extern bool equal(register cl_object x, cl_object y);
extern bool equalp(cl_object x, cl_object y);
extern void init_predicate(void);
/* print.c */
......@@ -1045,11 +1002,6 @@ extern int init_profile(void);
#endif
/* prog.c */
extern void init_prog(void);
/* read.c */
extern cl_object si_read_bytes(cl_object stream, cl_object string, cl_object start, cl_object end);
......@@ -1110,7 +1062,6 @@ extern cl_object cl_special_operator_p(cl_object form);
extern cl_object cl_macro_function _ARGS((int narg, cl_object sym, ...));
extern cl_object symbol_function(cl_object sym);
extern void init_reference(void);
/* sequence.c */
......@@ -1128,7 +1079,6 @@ extern cl_object cl_alloc_simple_bitvector(int l);
extern cl_object elt(cl_object seq, cl_fixnum index);
extern cl_object elt_set(cl_object seq, cl_fixnum index, cl_object val);
extern cl_fixnum length(cl_object x);
extern void init_sequence(void);
/* stacks.c */
......@@ -1199,7 +1149,6 @@ extern bool string_equal(cl_object x, cl_object y);
extern bool member_char(int c, cl_object char_bag);
extern int cl_string_push_extend(cl_object s, int c);
extern void get_string_start_end(cl_object s, cl_object start, cl_object end, cl_index *ps, cl_index *pe);
extern void init_string(void);
/* structure.c */
......@@ -1219,7 +1168,6 @@ extern cl_object structure_to_list(cl_object x);
#endif
extern cl_object structure_ref(cl_object x, cl_object name, int n);
extern cl_object structure_set(cl_object x, cl_object name, int n, cl_object v);
extern void init_structure(void);
/* symbol.c */
......@@ -1306,7 +1254,6 @@ extern cl_object si_open_server_stream(cl_object port);
extern cl_object si_open_unix_socket_stream(cl_object path);
extern cl_object si_lookup_host_entry(cl_object host_or_address);
extern cl_object make_stream(cl_object host, int fd, enum smmode smm);
extern int init_tcp(void);
#endif
......@@ -1333,11 +1280,6 @@ extern void Tk_main(int synchronize, char *name, char *fileName, char *Xdisplay,
#endif
/* toplevel.c */
extern void init_toplevel(void);
/* typespec.c */
extern cl_object TSor_string_symbol;
......@@ -1401,7 +1343,6 @@ extern bool file_exists(cl_object file);
extern FILE *backup_fopen(const char *filename, const char *option);
extern int file_len(FILE *fp);
extern cl_object homedir_pathname(cl_object user);
extern void init_unixfsys(void);
extern void FEfilesystem_error(const char *msg, int narg, ...);
......@@ -1420,7 +1361,6 @@ extern void init_interrupt(void);
extern cl_object si_system(cl_object cmd);
extern cl_object si_open_pipe(cl_object cmd);
extern void init_unixsys(void);
#ifdef __cplusplus
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment