Commit 48efb209 authored by jjgarcia's avatar jjgarcia

Remove unused functions and use prefix ecl_ on all internal functions in file.d

parent bdd8a424
......@@ -292,14 +292,12 @@ EXPORTS
cl_echo_stream_output_stream
cl_make_string_output_stream
cl_get_output_stream_string
si_output_stream_string
cl_streamp
cl_input_stream_p
cl_output_stream_p
cl_stream_element_type
cl_stream_external_format
cl_file_length
si_get_string_input_stream_index
si_make_string_output_stream_from_string
si_copy_stream
cl_open_stream_p
......@@ -317,16 +315,11 @@ EXPORTS
si_file_column
cl_interactive_stream_p
input_stream_p
output_stream_p
;stream_element_type
open_stream
close_stream
make_two_way_stream
make_string_input_stream
make_string_output_stream
make_string_output_stream_from_string
get_output_stream_string
ecl_input_stream_p
ecl_output_stream_p
ecl_open_stream
ecl_make_string_input_stream
ecl_make_string_output_stream
ecl_read_byte
ecl_write_byte
ecl_read_char_noeof
......@@ -335,14 +328,14 @@ EXPORTS
ecl_peek_char
ecl_write_char
writestr_stream
flush_stream
clear_input_stream
clear_output_stream
ecl_force_output
ecl_clear_input
ecl_clear_output
ecl_listen_stream
ecl_file_position
ecl_file_position_set
cl_file_length
file_column
ecl_file_column
ecl_make_stream_from_fd
......
......@@ -292,7 +292,6 @@ EXPORTS
cl_echo_stream_output_stream
cl_make_string_output_stream
cl_get_output_stream_string
si_output_stream_string
cl_streamp
cl_input_stream_p
cl_output_stream_p
......@@ -317,16 +316,11 @@ EXPORTS
si_file_column
cl_interactive_stream_p
input_stream_p
output_stream_p
;stream_element_type
open_stream
close_stream
make_two_way_stream
make_string_input_stream
make_string_output_stream
make_string_output_stream_from_string
get_output_stream_string
ecl_input_stream_p
ecl_output_stream_p
ecl_open_stream
ecl_make_string_input_stream
ecl_make_string_output_stream
ecl_read_byte
ecl_write_byte
ecl_read_char_noeof
......@@ -335,14 +329,14 @@ EXPORTS
ecl_peek_char
ecl_write_char
writestr_stream
flush_stream
clear_input_stream
clear_output_stream
ecl_force_output
ecl_clear_input
ecl_clear_output
ecl_listen_stream
ecl_file_position
ecl_file_position_set
cl_file_length
file_column
ecl_file_column
ecl_make_stream_from_fd
......
ECL 0.9h
ECL 0.9i
========
* Platforms:
- Ported to OpenBSD/x86. Might also work on other architectures.
* Errors fixed:
- The garbage collection of FASL files had been deactivated by the use of
high level routines (VECTOR-PUSH-EXTEND) to handle the vector of weak
pointers to the files.
- MULTIPLE-VALUE-SETQ must output only the primary value.
- MAKE-CONDITION now accepts type specifiers such as '(AND SIMPLE-CONDITION
TYPE-ERROR).
- LOAD can now load code from streams which are not associated to files.
- DISASSEMBLE now signals a TYPE-ERROR condition when the argument is neither
an extended function designator nor a lambda expression.
- The block name of a function does not involve the the forms in the lambda
list: i.e. (LAMBDA-EXT F (&aux (X (RETURN-FROM F 2)))) is no longer valid.
- Many of the STRING* functions (STRING=, STRING<, etc) were proclaimed to
work only on strings, instead of string-designators.
- The command line option "-s" does not take any arguments.
- In ECL, all complex types are upgraded to (COMPLEX REAL). However, parts
SUBTYPEP did not apply this.
- When reading 1/0, the reader must signal a READER-ERROR, because it is
a syntax error to have a denominator full of zeros (CLHS 2.2 end plus
2.3.2.1.2).
- When a DEFMETHOD form had an incongruent lambda list, an internal error
prevented ECL from writing the proper error message.
- SUBTYPEP formerly broken when handling (EQL #C(...))
- Fixed several type propagations: for instance, the compiler assumed that
SQRT of a real number is always real.
- DECODE/ENCODE-UNIVERSAL-TIME now work with very big dates, although the
accuracy for determining whether a time belongs to DAY-SAVING-TIME might
depend on the implementation of the C library.
- Most systems do not support dates before 1970 or after 2038. For guessing
the daylight saving time property we shift the dates to equivalent years
within this range.
* Design:
- Simplified the structure of the frame stack, removing redundant fields.
- Reworked the structure of the lexical environment to accelerate access to
variables.
- New hash routine, similar to SBCL's one, faster and leading to fewer
collisions between similar strings.
- Method combinations do not longer rely on a hash table of precomputed
effective methods. That method required a structural analysis of the forms
generated by the method combinations, which is plain slower than generating
the effective method as either a closure (in most cases) or as bytecodes
(for the most complex declarative forms).
- CALL-NEXT-METHOD and NEXT-METHOD-P are now implemented in a simpler way,
without relying on the code walker (which is a damm buggy piece of code).
- Formerly, the body of methods was walked through, replacing slot access with
the indices of the slots in the object structure. This is plain wrong
because the structure of a class may change. Such aggressive optimizations
may be reimplemented in a future in the compiler, but only when the user
asks for them.
- The code walker is no longer needed and has been removed from the core.
It will be available in the contributed packages.
- Possibility of configure --without-gmp when cross-compiling (there are no
true bignums then, just long long int if possible; doesn't work with native
compilation because compiler needs true bignums).
- ECL's own conservative garbage collector works again.
- It is possible now to execute lisp code from threads that have been created
by external C applications. The functions
ecl_import_current_thread(cl_object name, cl_object bindings)
should be called to register the current thread with the lisp world, while
ecl_release_current_thread()
should be invoked before the current thread exits. However, in order to
ensure that the garbage collector can handle these threads, these
applications must be compiled and linked against ECL so that the
appropiate replacements for pthread_create()/CreateThread() are used.
- On some systems we are able to signal and trap floating point
exceptions of the following kinds: overflow, underflow and division by zero.
Trapping of these exceptions can be disabled with (SI::TRAP-FPE T NIL). In
practice this means overflows in routines like EXP, EXPT, etc, are now
detected.
* Visible changes:
- The code for handling command line options has been redesigned. Now multiple
-compile options are allowed; the -o/-c/-h/-data options have to come before
the associated -compile; we introduce a new -rc option to force loading
initialization files; errors during initialization are intercepted and cause
ECL to abort.
- Replacing GC_malloc with GC_malloc_ignore_offset() makes ECL use less
memory. A 30% reduction observed when running the ANSI compatibility test
suite.
- Creating arrays with element type NIL now raises an error.
- The DEFSYSTEM system definition facility v 3.4 is now distributed with ECL
in the directory of external packages (contrib/defsystem).
- The version of ASDF distributed with ECL supports building single FASL
files, shared libraries and standalone executable files from a single
definition file.
- The test suites are now part of a separate project, ecls-test, that is only
distributed via CVS from Sourceforge.
* Foreign function interface (FFI):
- Foreign function return type is now correctly handled, when it is specified
with a user-defined foreign type that is an alias for a primitive type
(M. Goffioul)
- C-INLINE forms which contain :CSTRING as argument are now automatically
rewritten in terms of WITH-CSTRING. This way, the null terminated strings
that are generated at run time will not be garbage collected.
- There is a primitive implementation of run-time automatic generation of
interfaces to C functions. This allows us to call functions in shared
libraries without need of the compiler. The current implementation only
works on the intel architecture with GCC, but should be easily extended.
It can be turned on/off for individual compilations with variable
SI::*USE-DFFI* (default is on if supported).
- There is now a simple implementation of callbacks, with a syntax similar to
that of CFFI:
(ffi:defcallback foo :int ((a :int))
(1+ a))
- Many functions have got now the prefix "ecl_" so as to avoid namespace
collisions with C/C++ code.
- On the intel x86 architecture we also have the possibility of creating
callbacks dynamically, at run time, without the compiler.
- Several functions with duplicate functionality (make_two_way_streams,
make_string_output_stream_from_string, close_stream, etc) have been removed.
;;; Local Variables: ***
;;; mode:text ***
......
This diff is collapsed.
......@@ -96,7 +96,7 @@ get_aux_stream(void)
start_critical_section();
if (cl_env.fmt_aux_stream == Cnil)
stream = make_string_output_stream(64);
stream = ecl_make_string_output_stream(64);
else {
stream = cl_env.fmt_aux_stream;
cl_env.fmt_aux_stream = Cnil;
......@@ -316,8 +316,8 @@ static void
fmt_prepare_aux_stream(format_stack fmt)
{
fmt->aux_string->string.fillp = 0;
fmt->aux_stream->stream.int0 = file_column(fmt->stream);
fmt->aux_stream->stream.int1 = file_column(fmt->stream);
fmt->aux_stream->stream.int0 = ecl_file_column(fmt->stream);
fmt->aux_stream->stream.int1 = ecl_file_column(fmt->stream);
}
......@@ -335,8 +335,8 @@ fmt_ascii(format_stack fmt, bool colon, bool atsign)
padchar = set_param(fmt, 3, CHAR, ' ');
fmt->aux_string->string.fillp = 0;
fmt->aux_stream->stream.int0 = file_column(fmt->stream);
fmt->aux_stream->stream.int1 = file_column(fmt->stream);
fmt->aux_stream->stream.int0 = ecl_file_column(fmt->stream);
fmt->aux_stream->stream.int1 = ecl_file_column(fmt->stream);
x = fmt_advance(fmt);
if (colon && Null(x))
writestr_stream("()", fmt->aux_stream);
......@@ -1245,7 +1245,7 @@ fmt_ampersand(format_stack fmt, bool colon, bool atsign)
fmt_not_atsign(fmt, atsign);
if (n == 0)
return;
if (file_column(fmt->stream) != 0)
if (ecl_file_column(fmt->stream) != 0)
ecl_write_char('\n', fmt->stream);
while (--n > 0)
ecl_write_char('\n', fmt->stream);
......@@ -1303,7 +1303,7 @@ fmt_tabulate(format_stack fmt, bool colon, bool atsign)
colnum = set_param(fmt, 0, INT, 1);
colinc = set_param(fmt, 1, INT, 1);
if (!atsign) {
c = file_column(fmt->stream);
c = ecl_file_column(fmt->stream);
if (c < 0) {
writestr_stream(" ", fmt->stream);
return;
......@@ -1317,7 +1317,7 @@ fmt_tabulate(format_stack fmt, bool colon, bool atsign)
} else {
for (i = colnum; i > 0; --i)
ecl_write_char(' ', fmt->stream);
c = file_column(fmt->stream);
c = ecl_file_column(fmt->stream);
if (c < 0 || colinc <= 0)
return;
colnum = 0;
......@@ -1397,7 +1397,7 @@ fmt_case(format_stack fmt, bool colon, bool atsign)
int up_colon;
bool b;
x = make_string_output_stream(64);
x = ecl_make_string_output_stream(64);
i = fmt->ctl_index;
j = fmt_skip(fmt);
if (fmt->ctl_str[--j] != ')' || fmt->ctl_str[--j] != '~')
......@@ -1675,7 +1675,7 @@ fmt_justification(format_stack fmt, volatile bool colon, bool atsign)
fields = Cnil;
for (;;) {
cl_object this_field = make_string_output_stream(64);
cl_object this_field = ecl_make_string_output_stream(64);
i = fmt->ctl_index;
j0 = j = fmt_skip(fmt);
while (fmt->ctl_str[--j] != '~')
......@@ -1752,7 +1752,7 @@ fmt_justification(format_stack fmt, volatile bool colon, bool atsign)
;
l = mincol + k * colinc;
if (special != Cnil &&
file_column(fmt->stream) + l + spare_spaces > line_length)
ecl_file_column(fmt->stream) + l + spare_spaces > line_length)
princ(special, fmt->stream);
/*
* Output the text with the padding segments. The total number of
......@@ -1827,7 +1827,7 @@ doformat(cl_narg narg, cl_object strm, cl_object string, cl_va_list args, bool i
fmt_set_arg_list(&fmt, output);
fmt.jmp_buf = &fmt_jmp_buf0;
if (symbol_value(@'si::*indent-formatted-output*') != Cnil)
fmt.indents = file_column(strm);
fmt.indents = ecl_file_column(strm);
else
fmt.indents = 0;
fmt.string = string;
......@@ -1838,7 +1838,7 @@ doformat(cl_narg narg, cl_object strm, cl_object string, cl_va_list args, bool i
fmt_error(&fmt, "illegal ~:^");
} else {
format(&fmt, string->string.self, string->string.fillp);
flush_stream(strm);
ecl_force_output(strm);
}
cl_env.fmt_aux_stream = fmt.aux_stream;
if (!in_formatter)
......@@ -2086,7 +2086,7 @@ DIRECTIVE:
@':control-string', string,
@':offset', MAKE_FIXNUM(0));
}
strm = make_string_output_stream(0);
strm = ecl_make_string_output_stream(0);
strm->stream.object0 = output;
if (null_strm == 0)
output = Cnil;
......
......@@ -318,7 +318,7 @@ si_load_source(cl_object source, cl_object verbose, cl_object print)
/* INV: if "source" is not a valid stream, file.d will complain */
strm = source;
} else {
strm = open_stream(source, smm_input, Cnil, Cnil, 8, 1, 1);
strm = ecl_open_stream(source, smm_input, Cnil, Cnil, 8, 1, 1);
if (Null(strm))
@(return Cnil)
}
......@@ -339,7 +339,7 @@ si_load_source(cl_object source, cl_object verbose, cl_object print)
try to close the stream, and then jump to next catch
point */
if (strm != source)
close_stream(strm, TRUE);
cl_close(3, strm, @':abort', @'t');
} CL_UNWIND_PROTECT_END;
@(return Cnil)
}
......
......@@ -66,7 +66,7 @@ ecl_init_env(struct cl_env_struct *env)
env->print_pretty = FALSE;
env->queue = cl_alloc_atomic(ECL_PPRINT_QUEUE_SIZE * sizeof(short));
env->indent_stack = cl_alloc_atomic(ECL_PPRINT_INDENTATION_STACK_SIZE * sizeof(short));
env->fmt_aux_stream = make_string_output_stream(64);
env->fmt_aux_stream = ecl_make_string_output_stream(64);
#endif
#if !defined(GBC_BOEHM)
# if defined(THREADS)
......
......@@ -821,7 +821,7 @@ ecl_namestring(cl_object x, int truncate_if_unreadable)
* or using make_pathname(). In all of these cases ECL will complain
* at creation time if the pathname has wrong components.
*/
buffer = make_string_output_stream(128);
buffer = ecl_make_string_output_stream(128);
logical = x->pathname.logical;
host = x->pathname.host;
if (logical) {
......@@ -927,7 +927,7 @@ NO_DIRECTORY:
return Cnil;
}
}
return get_output_stream_string(buffer);
return cl_get_output_stream_string(buffer);
}
cl_object
......
......@@ -92,15 +92,15 @@ BEGIN:
else if (c == UNMARK)
cl_env.isp -= 2;
else if (c == SET_INDENT)
cl_env.indent_stack[cl_env.isp] = file_column(stream);
cl_env.indent_stack[cl_env.isp] = ecl_file_column(stream);
else if (c == INDENT) {
goto DO_INDENT;
} else if (c == INDENT1) {
i = file_column(stream)-cl_env.indent_stack[cl_env.isp];
i = ecl_file_column(stream)-cl_env.indent_stack[cl_env.isp];
if (i < 8 && cl_env.indent_stack[cl_env.isp] < LINE_LENGTH/2) {
ecl_write_char(' ', stream);
cl_env.indent_stack[cl_env.isp]
= file_column(stream);
= ecl_file_column(stream);
} else {
if (cl_env.indent_stack[cl_env.isp] < LINE_LENGTH/2) {
cl_env.indent_stack[cl_env.isp]
......@@ -118,7 +118,7 @@ BEGIN:
return;
DO_MARK:
k = LINE_LENGTH - 1 - file_column(stream);
k = LINE_LENGTH - 1 - ecl_file_column(stream);
for (i = 1, j = 0, l = 1; l > 0 && i < cl_env.qc && j < k; i++) {
c = cl_env.queue[mod(cl_env.qh + i)];
if (c == MARK)
......@@ -139,14 +139,14 @@ DO_MARK:
if (cl_env.isp >= ECL_PPRINT_INDENTATION_STACK_SIZE-2)
FEerror("Can't pretty-print.", 0);
cl_env.isp+=2;
cl_env.indent_stack[cl_env.isp-1] = file_column(stream);
cl_env.indent_stack[cl_env.isp-1] = ecl_file_column(stream);
cl_env.indent_stack[cl_env.isp] = cl_env.indent_stack[cl_env.isp-1];
goto BEGIN;
DO_INDENT:
if (cl_env.iisp > cl_env.isp)
goto PUT_INDENT;
k = LINE_LENGTH - 1 - file_column(stream);
k = LINE_LENGTH - 1 - ecl_file_column(stream);
for (i0 = 0, i = 1, j = 0, l = 1; i < cl_env.qc && j < k; i++) {
c = cl_env.queue[mod(cl_env.qh + i)];
if (c == MARK)
......@@ -1712,7 +1712,7 @@ potential_number_p(cl_object strng, int base)
strm = stream_or_default_output(strm);
si_write_object(x, strm);
flush_stream(strm);
ecl_force_output(strm);
bds_unwind_n(15);
@(return x)
......@@ -1737,7 +1737,7 @@ potential_number_p(cl_object strng, int base)
bds_bind(@'*print-pretty*', Ct);
ecl_write_char('\n', strm);
si_write_object(obj, strm);
flush_stream(strm);
ecl_force_output(strm);
bds_unwind_n(2);
@(return)
@)
......@@ -1775,7 +1775,7 @@ potential_number_p(cl_object strng, int base)
strm = stream_or_default_output(strm);
si_do_write_sequence(strng, strm, start, end);
ecl_write_char('\n', strm);
flush_stream(strm);
ecl_force_output(strm);
@(return strng)
@)
......@@ -1793,10 +1793,10 @@ potential_number_p(cl_object strng, int base)
return funcall(2, @'ext::stream-fresh-line', strm);
}
#endif
if (file_column(strm) == 0)
if (ecl_file_column(strm) == 0)
@(return Cnil)
ecl_write_char('\n', strm);
flush_stream(strm);
ecl_force_output(strm);
@(return Ct)
@)
......@@ -1808,21 +1808,21 @@ potential_number_p(cl_object strng, int base)
return funcall(2, @'ext::stream-finish-output', strm);
}
#endif
flush_stream(strm);
ecl_force_output(strm);
@(return Cnil)
@)
@(defun force-output (&o strm)
@
strm = stream_or_default_output(strm);
flush_stream(strm);
ecl_force_output(strm);
@(return Cnil)
@)
@(defun clear-output (&o strm)
@
strm = stream_or_default_output(strm);
clear_output_stream(strm);
ecl_clear_output(strm);
@(return Cnil)
@)
......@@ -1860,7 +1860,7 @@ prin1(cl_object obj, cl_object strm)
strm = stream_or_default_output(strm);
bds_bind(@'*print-escape*', Ct);
si_write_object(obj, strm);
flush_stream(strm);
ecl_force_output(strm);
bds_unwind1();
return obj;
}
......@@ -1885,7 +1885,7 @@ terpri(cl_object strm)
}
#endif
ecl_write_char('\n', strm);
flush_stream(strm);
ecl_force_output(strm);
return(Cnil);
}
......@@ -1898,7 +1898,7 @@ write_string(cl_object strng, cl_object strm)
assert_type_string(strng);
for (i = 0; i < strng->string.fillp; i++)
ecl_write_char(strng->string.self[i], strm);
flush_stream(strm);
ecl_force_output(strm);
}
/*
......@@ -1916,6 +1916,7 @@ princ_char(int c, cl_object strm)
{
strm = stream_or_default_output(strm);
ecl_write_char(c, strm);
if (c == '\n')
flush_stream(strm);
if (c == '\n') {
ecl_force_output(strm);
}
}
......@@ -1550,7 +1550,7 @@ do_read_delimited_list(int d, cl_object in, bool proper_list)
@(defun clear_input (&optional (strm Cnil))
@
strm = stream_or_default_input(strm);
clear_input_stream(strm);
ecl_clear_input(strm);
@(return Cnil)
@)
......@@ -1810,7 +1810,7 @@ si_string_to_object(cl_object x)
cl_object in;
assert_type_string(x);
in = make_string_input_stream(x, 0, x->string.fillp);
in = ecl_make_string_input_stream(x, 0, x->string.fillp);
x = read_object(in);
if (x == OBJNULL)
FEend_of_file(in);
......@@ -1980,8 +1980,8 @@ read_VV(cl_object block, void (*entry_point)(cl_object))
if ((len == 0) || (block->cblock.data_text == 0)) goto NO_DATA_LABEL;
/* Read all data for the library */
in=make_string_input_stream(make_constant_string(block->cblock.data_text),
0, block->cblock.data_text_size);
in=ecl_make_string_input_stream(make_constant_string(block->cblock.data_text),
0, block->cblock.data_text_size);
bds_bind(@'*read-base*', MAKE_FIXNUM(10));
bds_bind(@'*read-default-float-format*', @'single-float');
bds_bind(@'*read-suppress*', Cnil);
......@@ -2016,7 +2016,7 @@ read_VV(cl_object block, void (*entry_point)(cl_object))
bds_unwind1();
} CL_UNWIND_PROTECT_EXIT {
if (in != OBJNULL)
close_stream(in, 0);
cl_close(1,in);
} CL_UNWIND_PROTECT_END;
return block;
......
......@@ -260,13 +260,13 @@ cl_symbol_name(cl_object x)
FEwrong_type_argument(cl_list(3, @'or', @'string', @'integer'),
prefix);
}
output = make_string_output_stream(64);
output = ecl_make_string_output_stream(64);
bds_bind(@'*print-base*', MAKE_FIXNUM(10));
bds_bind(@'*print-radix*', Cnil);
princ(prefix, output);
princ(counter, output);
bds_unwind_n(2);
output = make_symbol(get_output_stream_string(output));
output = make_symbol(cl_get_output_stream_string(output));
if (increment)
ECL_SETQ(@'*gensym-counter*',one_plus(counter));
@(return output)
......@@ -279,14 +279,14 @@ cl_symbol_name(cl_object x)
assert_type_string(prefix);
pack = si_coerce_to_package(pack);
ONCE_MORE:
output = make_string_output_stream(64);
output = ecl_make_string_output_stream(64);
bds_bind(@'*print-base*', MAKE_FIXNUM(10));
bds_bind(@'*print-radix*', Cnil);
princ(prefix, output);
princ(cl_core.gentemp_counter, output);
bds_unwind_n(2);
cl_core.gentemp_counter = one_plus(cl_core.gentemp_counter);
s = intern(get_output_stream_string(output), pack, &intern_flag);
s = intern(cl_get_output_stream_string(output), pack, &intern_flag);
if (intern_flag != 0)
goto ONCE_MORE;
@(return s)
......
......@@ -1106,7 +1106,6 @@ cl_symbols[] = {
{SYS_ "GET-LIBRARY-PATHNAME", SI_ORDINARY, si_get_library_pathname, 0, OBJNULL},
#endif
{SYS_ "GET-SYSPROP", SI_ORDINARY, si_get_sysprop, 2, OBJNULL},
{SYS_ "GET-STRING-INPUT-STREAM-INDEX", SI_ORDINARY, si_get_string_input_stream_index, 1, OBJNULL},
{SYS_ "GETENV", SI_ORDINARY, si_getenv, 1, OBJNULL},
{SYS_ "GETCWD", SI_ORDINARY, si_getcwd, 0, OBJNULL},
{SYS_ "GETPID", SI_ORDINARY, si_getpid, 0, OBJNULL},
......@@ -1136,7 +1135,6 @@ cl_symbols[] = {
{SYS_ "MKSTEMP", SI_ORDINARY, si_mkstemp, 1, OBJNULL},
{SYS_ "RMDIR", SI_ORDINARY, si_rmdir, 1, OBJNULL},
{SYS_ "OPEN-PIPE", SI_ORDINARY, si_open_pipe, 1, OBJNULL},
{SYS_ "OUTPUT-STREAM-STRING", SI_ORDINARY, si_output_stream_string, 1, OBJNULL},
{SYS_ "PACKAGE-LOCK", SI_ORDINARY, si_package_lock, 2, OBJNULL},
{SYS_ "PACKAGE-HASH-TABLES", SI_ORDINARY, si_package_hash_tables, 1, OBJNULL},
{SYS_ "PATHNAME-TRANSLATIONS", SI_ORDINARY, si_pathname_translations, -1, OBJNULL},
......
......@@ -1106,7 +1106,6 @@ cl_symbols[] = {
{SYS_ "GET-LIBRARY-PATHNAME","si_get_library_pathname"},
#endif
{SYS_ "GET-SYSPROP","si_get_sysprop"},
{SYS_ "GET-STRING-INPUT-STREAM-INDEX","si_get_string_input_stream_index"},
{SYS_ "GETENV","si_getenv"},
{SYS_ "GETCWD","si_getcwd"},
{SYS_ "GETPID","si_getpid"},
......@@ -1136,7 +1135,6 @@ cl_symbols[] = {
{SYS_ "MKSTEMP","si_mkstemp"},
{SYS_ "RMDIR","si_rmdir"},
{SYS_ "OPEN-PIPE","si_open_pipe"},
{SYS_ "OUTPUT-STREAM-STRING","si_output_stream_string"},
{SYS_ "PACKAGE-LOCK","si_package_lock"},
{SYS_ "PACKAGE-HASH-TABLES","si_package_hash_tables"},
{SYS_ "PATHNAME-TRANSLATIONS","si_pathname_translations"},
......
......@@ -558,7 +558,7 @@ init_tk()
#else
TkWidgetType = _intern("WIDGET", tk_package);
#endif
string_stream = make_string_output_stream(64);
string_stream = ecl_make_string_output_stream(64);
ecl_register_static_root(&string_stream);
Tcl_InitHashTable(&VarTable, TCL_STRING_KEYS);
}
......
......@@ -397,6 +397,6 @@ stream_to_handle(cl_object s, bool output)
stream_read = cl_core.null_stream;
}
@(return ((parent_read || parent_write)?
make_two_way_stream(stream_read, stream_write) :
cl_make_two_way_stream(stream_read, stream_write) :
Cnil))
@)
......@@ -334,24 +334,29 @@
;; file file.d
(proclaim-function make-synonym-stream (t) t)
(proclaim-function make-broadcast-stream (*) t)
(proclaim-function make-concatenated-stream (*) t)
(proclaim-function make-two-way-stream (t t) t)
(proclaim-function make-echo-stream (t t) t)
(proclaim-function make-string-input-stream (*) t)
(proclaim-function make-string-output-stream (*) t)
(proclaim-function get-output-stream-string (*) t)
(proclaim-function si:output-stream-string (t) t)
(proclaim-function make-synonym-stream (symbol) synonym-stream)
(proclaim-function make-broadcast-stream (*) broadcast-stream)
(proclaim-function make-concatenated-stream (*) concatenated-stream)
(proclaim-function make-two-way-stream (stream stream) two-way-stream)
(proclaim-function make-echo-stream (stream stream) echo-stream)
(proclaim-function make-string-input-stream (*) string-stream)
(proclaim-function make-string-output-stream (*) string-stream)
(def-inline make-string-output-stream :always () string-stream
"ecl_make_string_output_stream(128)")
(proclaim-function get-output-stream-string (string-stream) string)
(proclaim-function streamp (t) t :predicate t)
(proclaim-function input-stream-p (t) t :predicate t)
(proclaim-function input-stream-p (stream) t :predicate t)
(def-inline input-stream-p :always (stream) :bool "ecl_input_stream_p(#0)")
(proclaim-function output-stream-p (t) t :predicate t)
(def-inline input-stream-p :always (stream) :bool "ecl_output_stream_p(#0)")
(proclaim-function stream-element-type (t) t)
(proclaim-function close (t *) t)
(proclaim-function file-position (t *) t)
(proclaim-function file-length (t) t)
(proclaim-function si:get-string-input-stream-index (*) t)
(proclaim-function si:make-string-output-stream-from-string (*) t)
(proclaim-function close (stream *) t)
(proclaim-function file-position (stream *) t)
(proclaim-function file-length (stream) t)
(proclaim-function si:make-string-output-stream-from-string (string) string-stream)
;; file gbc.d / alloc_2.d
......@@ -1012,9 +1017,15 @@ type_of(#0)==t_bitvector")
;; file print.d, read.d
(proclaim-function clear-output (*) t)
(proclaim-function finish-output (*) t)
(proclaim-function force-output (*) t)
(proclaim-function clear-output (*) NULL)
(def-inline clear-output :always (stream) NULL "(ecl_clear_output(#0),Cnil)")
(proclaim-function finish-output (*) NULL)
(def-inline finish-output :always (stream) NULL "(ecl_finish_output(#0),Cnil)")
(proclaim-function force-output (*) NULL)
(def-inline finish-output :always (stream) NULL "(ecl_force_output(#0),Cnil)")
(proclaim-function fresh-line (*) t)
(proclaim-function listen (*) t)
(proclaim-function peek-char (*) t)
......@@ -1050,7 +1061,9 @@ type_of(#0)==t_bitvector")
(proclaim-function write-line (t *) t)
(proclaim-function write-string (t *) t)
(proclaim-function read-char-no-hang (*) t)
(proclaim-function clear-input (*) t)
(proclaim-function clear-input (*) NULL)