1996-12-08 16:52:38 +00:00
|
|
|
/* dynl.c - dynamic linking
|
|
|
|
|
*
|
* alist.c, arbiters.c, async.h, backtrace.h, boolean.c, chars.c,
chars.h, continuations.h, debug-malloc.h, dynl.c, feature.c,
feature.h, filesys.h, fluids.h, fports.h, gc_os_dep.c,
gdb_interface.h, gh_eval.c, gh_funcs.c, gh_io.c, gh_list.c,
gh_predicates.c, gsubr.c, gsubr.h, guardians.h,
guile-func-name-check.in, guile-snarf-docs-texi.in,
guile-snarf-docs.in, guile-snarf.awk.in, guile-snarf.in,
hashtab.h, iselect.h, keywords.h, lang.c, list.h, load.h,
objprop.c, objprop.h, options.c, options.h, random.h,
regex-posix.h, root.c, root.h, script.c, snarf.h, stackchk.c,
strerror.c, strop.h, strports.h, threads.h, values.c, values.h,
version.c, version.h: Updated copyright notice.
2001-07-19 21:08:49 +00:00
|
|
|
* Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001 Free Software Foundation, Inc.
|
1996-12-08 16:52:38 +00:00
|
|
|
*
|
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
|
* the Free Software Foundation; either version 2, or (at your option)
|
|
|
|
|
* any later version.
|
|
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
|
* along with this software; see the file COPYING. If not, write to
|
1997-05-26 22:34:48 +00:00
|
|
|
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
|
|
|
|
* Boston, MA 02111-1307 USA
|
1996-12-08 16:52:38 +00:00
|
|
|
*
|
|
|
|
|
* As a special exception, the Free Software Foundation gives permission
|
|
|
|
|
* for additional uses of the text contained in its release of GUILE.
|
|
|
|
|
*
|
|
|
|
|
* The exception is that, if you link the GUILE library with other files
|
|
|
|
|
* to produce an executable, this does not by itself cause the
|
|
|
|
|
* resulting executable to be covered by the GNU General Public License.
|
|
|
|
|
* Your use of that executable is in no way restricted on account of
|
|
|
|
|
* linking the GUILE library code into it.
|
|
|
|
|
*
|
|
|
|
|
* This exception does not however invalidate any other reasons why
|
|
|
|
|
* the executable file might be covered by the GNU General Public License.
|
|
|
|
|
*
|
|
|
|
|
* This exception applies only to the code released by the
|
|
|
|
|
* Free Software Foundation under the name GUILE. If you copy
|
|
|
|
|
* code from other Free Software Foundation releases into a copy of
|
|
|
|
|
* GUILE, as the General Public License permits, the exception does
|
|
|
|
|
* not apply to the code that you add in this way. To avoid misleading
|
|
|
|
|
* anyone as to the status of such modified files, you must delete
|
|
|
|
|
* this exception notice from them.
|
|
|
|
|
*
|
|
|
|
|
* If you write modifications of your own for GUILE, it is your choice
|
|
|
|
|
* whether to permit this exception to apply to your modifications.
|
1997-05-26 22:34:48 +00:00
|
|
|
* If you do not wish that, delete this exception notice. */
|
1996-12-08 16:52:38 +00:00
|
|
|
|
1999-12-12 02:36:16 +00:00
|
|
|
|
|
|
|
|
|
1996-12-08 16:52:38 +00:00
|
|
|
/* "dynl.c" dynamically link&load object files.
|
|
|
|
|
Author: Aubrey Jaffer
|
|
|
|
|
Modified for libguile by Marius Vollmer */
|
|
|
|
|
|
1998-05-02 22:26:44 +00:00
|
|
|
#if 0 /* Disabled until we know for sure that it isn't needed */
|
1997-01-18 11:40:31 +00:00
|
|
|
/* XXX - This is only here to drag in a definition of __eprintf. This
|
|
|
|
|
is needed for proper operation of dynamic linking. The real
|
|
|
|
|
solution would probably be a shared libgcc. */
|
|
|
|
|
|
|
|
|
|
#undef NDEBUG
|
|
|
|
|
#include <assert.h>
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
maybe_drag_in_eprintf ()
|
|
|
|
|
{
|
|
|
|
|
assert (!maybe_drag_in_eprintf);
|
|
|
|
|
}
|
1998-05-02 22:26:44 +00:00
|
|
|
#endif
|
1997-01-18 11:40:31 +00:00
|
|
|
|
1997-01-20 19:11:41 +00:00
|
|
|
#include <stdio.h>
|
2001-01-26 17:30:54 +00:00
|
|
|
#include <string.h>
|
|
|
|
|
|
2000-04-21 14:16:44 +00:00
|
|
|
#include "libguile/_scm.h"
|
|
|
|
|
#include "libguile/dynl.h"
|
|
|
|
|
#include "libguile/smob.h"
|
|
|
|
|
#include "libguile/keywords.h"
|
|
|
|
|
#include "libguile/ports.h"
|
|
|
|
|
#include "libguile/strings.h"
|
2001-06-03 23:31:14 +00:00
|
|
|
#include "libguile/deprecation.h"
|
2002-01-22 23:31:39 +00:00
|
|
|
#include "libguile/lang.h"
|
2000-04-21 14:16:44 +00:00
|
|
|
#include "libguile/validate.h"
|
1999-12-18 23:33:15 +00:00
|
|
|
|
2000-10-30 11:42:26 +00:00
|
|
|
/* Create a new C argv array from a scheme list of strings. */
|
|
|
|
|
/* Dirk:FIXME:: A quite similar function is implemented in posix.c */
|
|
|
|
|
/* Dirk:FIXME:: In case of assertion errors, we get memory leaks */
|
|
|
|
|
|
1996-12-08 16:52:38 +00:00
|
|
|
/* Converting a list of SCM strings into a argv-style array. You must
|
|
|
|
|
have ints disabled for the whole lifetime of the created argv (from
|
|
|
|
|
before MAKE_ARGV_FROM_STRINGLIST until after
|
|
|
|
|
MUST_FREE_ARGV). Atleast this is was the documentation for
|
|
|
|
|
MAKARGVFROMSTRS says, it isn't really used that way.
|
|
|
|
|
|
2000-10-30 11:42:26 +00:00
|
|
|
This code probably belongs into strings.c
|
|
|
|
|
(Dirk: IMO strings.c is not the right place.) */
|
1996-12-08 16:52:38 +00:00
|
|
|
|
|
|
|
|
static char **
|
* gc.h, gc.c (scm_gc_sweep): Issue deprecation warning when
non-zero is returned from a port or smob free function.
(scm_malloc, scm_realloc, scm_strndup, scm_strdup,
scm_gc_register_collectable_memory,
scm_gc_unregister_collectable_memory, scm_gc_malloc,
scm_gc_realloc, scm_gc_free, scm_gc_strndup, scm_gc_strdup): New.
* backtrace.c, continuations.c, convert.i.c, coop-threads.c,
debug-malloc.c, dynl.c, environments.c, environments.h,
extensions.c, filesys.c, fports.c, gc.c, gc.h, gh_data.c, goops.c,
guardians.c, hooks.c, init.c, keywords.c, load.c, numbers.c,
ports.c, posix.c, procs.c, rdelim.c, regex-posix.c, root.c,
smob.c, stime.c, strings.c, struct.c, struct.h, symbols.c, unif.c,
vectors.c, weaks.c: Use scm_gc_malloc/scm_malloc and
scm_gc_free/free instead of scm_must_malloc and scm_must_free, as
appropriate. Return zero from smob and port free functions.
* debug-malloc.c (scm_malloc_reregister): Handle "old == NULL".
* fports.c (scm_setvbuf): Reset read buffer to saved values when
it is pointing to the putback buffer.
2002-02-11 18:06:50 +00:00
|
|
|
scm_make_argv_from_stringlist (SCM args, int *argcp, const char *subr,
|
|
|
|
|
int argn)
|
1996-12-08 16:52:38 +00:00
|
|
|
{
|
2000-03-14 06:39:37 +00:00
|
|
|
char **argv;
|
2000-10-30 11:42:26 +00:00
|
|
|
int argc;
|
|
|
|
|
int i;
|
2000-03-14 06:39:37 +00:00
|
|
|
|
|
|
|
|
argc = scm_ilength (args);
|
2000-10-30 11:42:26 +00:00
|
|
|
SCM_ASSERT (argc >= 0, args, argn, subr);
|
* gc.h, gc.c (scm_gc_sweep): Issue deprecation warning when
non-zero is returned from a port or smob free function.
(scm_malloc, scm_realloc, scm_strndup, scm_strdup,
scm_gc_register_collectable_memory,
scm_gc_unregister_collectable_memory, scm_gc_malloc,
scm_gc_realloc, scm_gc_free, scm_gc_strndup, scm_gc_strdup): New.
* backtrace.c, continuations.c, convert.i.c, coop-threads.c,
debug-malloc.c, dynl.c, environments.c, environments.h,
extensions.c, filesys.c, fports.c, gc.c, gc.h, gh_data.c, goops.c,
guardians.c, hooks.c, init.c, keywords.c, load.c, numbers.c,
ports.c, posix.c, procs.c, rdelim.c, regex-posix.c, root.c,
smob.c, stime.c, strings.c, struct.c, struct.h, symbols.c, unif.c,
vectors.c, weaks.c: Use scm_gc_malloc/scm_malloc and
scm_gc_free/free instead of scm_must_malloc and scm_must_free, as
appropriate. Return zero from smob and port free functions.
* debug-malloc.c (scm_malloc_reregister): Handle "old == NULL".
* fports.c (scm_setvbuf): Reset read buffer to saved values when
it is pointing to the putback buffer.
2002-02-11 18:06:50 +00:00
|
|
|
argv = (char **) scm_malloc ((argc + 1) * sizeof (char *));
|
2002-01-22 23:31:39 +00:00
|
|
|
for (i = 0; !SCM_NULL_OR_NIL_P (args); args = SCM_CDR (args), ++i) {
|
2000-10-30 11:42:26 +00:00
|
|
|
SCM arg = SCM_CAR (args);
|
* validate.h
(SCM_NUM2{SIZE,PTRDIFF,SHORT,USHORT,BITS,UBITS,INT,UINT}[_DEF]):
new macros.
* unif.h: type renaming:
scm_array -> scm_array_t
scm_array_dim -> scm_array_dim_t
the old names are deprecated, all in-Guile uses changed.
* tags.h (scm_ubits_t): new typedef, representing unsigned
scm_bits_t.
* stacks.h: type renaming:
scm_info_frame -> scm_info_frame_t
scm_stack -> scm_stack_t
the old names are deprecated, all in-Guile uses changed.
* srcprop.h: type renaming:
scm_srcprops -> scm_srcprops_t
scm_srcprops_chunk -> scm_srcprops_chunk_t
the old names are deprecated, all in-Guile uses changed.
* gsubr.c, procs.c, print.c, ports.c, read.c, rdelim.c, ramap.c,
rw.c, smob.c, sort.c, srcprop.c, stacks.c, strings.c, strop.c,
strorder.c, strports.c, struct.c, symbols.c, unif.c, values.c,
vectors.c, vports.c, weaks.c:
various int/size_t -> size_t/scm_bits_t changes.
* random.h: type renaming:
scm_rstate -> scm_rstate_t
scm_rng -> scm_rng_t
scm_i_rstate -> scm_i_rstate_t
the old names are deprecated, all in-Guile uses changed.
* procs.h: type renaming:
scm_subr_entry -> scm_subr_entry_t
the old name is deprecated, all in-Guile uses changed.
* options.h (scm_option_t.val): unsigned long -> scm_bits_t.
type renaming:
scm_option -> scm_option_t
the old name is deprecated, all in-Guile uses changed.
* objects.c: various long -> scm_bits_t changes.
(scm_i_make_class_object): flags: unsigned long -> scm_ubits_t
* numbers.h (SCM_FIXNUM_BIT): deprecated, renamed to
SCM_I_FIXNUM_BIT.
* num2integral.i.c: new file, multiply included by numbers.c, used
to "templatize" the various integral <-> num conversion routines.
* numbers.c (scm_mkbig, scm_big2num, scm_adjbig, scm_normbig,
scm_copybig, scm_2ulong2big, scm_dbl2big, scm_big2dbl):
deprecated.
(scm_i_mkbig, scm_i_big2inum, scm_i_adjbig, scm_i_normbig,
scm_i_copybig, scm_i_short2big, scm_i_ushort2big, scm_i_int2big,
scm_i_uint2big, scm_i_long2big, scm_i_ulong2big, scm_i_bits2big,
scm_i_ubits2big, scm_i_size2big, scm_i_ptrdiff2big,
scm_i_long_long2big, scm_i_ulong_long2big, scm_i_dbl2big,
scm_i_big2dbl, scm_short2num, scm_ushort2num, scm_int2num,
scm_uint2num, scm_bits2num, scm_ubits2num, scm_size2num,
scm_ptrdiff2num, scm_num2short, scm_num2ushort, scm_num2int,
scm_num2uint, scm_num2bits, scm_num2ubits, scm_num2ptrdiff,
scm_num2size): new functions.
* modules.c (scm_module_reverse_lookup): i, n: int -> scm_bits_t.x
* load.c: change int -> size_t in various places (where the
variable is used to store a string length).
(search-path): call scm_done_free, not scm_done_malloc.
* list.c (scm_ilength): return a scm_bits_t, not long.
some other {int,long} -> scm_bits_t changes.
* hashtab.c: various [u]int -> scm_bits_t changes.
scm_ihashx_closure -> scm_ihashx_closure_t (and made a typedef).
(scm_ihashx): n: uint -> scm_bits_t
use scm_bits2num instead of scm_ulong2num.
* gsubr.c: various int -> scm_bits_t changes.
* gh_data.c (gh_scm2double): no loss of precision any more.
* gh.h (gh_str2scm): len: int -> size_t
(gh_{get,set}_substr): start: int -> scm_bits_t,
len: int -> size_t
(gh_<num>2scm): n: int -> scm_bits_t
(gh_*vector_length): return scm_[u]size_t, not unsigned long.
(gh_length): return scm_bits_t, not unsigned long.
* fports.h: type renaming:
scm_fport -> scm_fport_t
the old name is deprecated, all in-Guile uses changed.
* fports.c (fport_fill_input): count: int -> scm_bits_t
(fport_flush): init_size, remaining, count: int -> scm_bits_t
* debug.h (scm_lookup_cstr, scm_lookup_soft, scm_evstr): removed
those prototypes, as the functions they prototype don't exist.
* fports.c (default_buffer_size): int -> size_t
(scm_fport_buffer_add): read_size, write_size: int -> scm_bits_t
default_size: int -> size_t
(scm_setvbuf): csize: int -> scm_bits_t
* fluids.c (n_fluids): int -> scm_bits_t
(grow_fluids): old_length, i: int -> scm_bits_t
(next_fluid_num, scm_fluid_ref, scm_fluid_set_x): n: int ->
scm_bits_t
(scm_c_with_fluids): flen, vlen: int -> scm_bits_t
* filesys.c (s_scm_open_fdes): changed calls to SCM_NUM2LONG to
the new and shiny SCM_NUM2INT.
* extensions.c: extension -> extension_t (and made a typedef).
* eval.h (SCM_IFRAME): cast to scm_bits_t, not int. just so
there are no nasty surprises if/when the various deeply magic tag
bits move somewhere else.
* eval.c: changed the locals used to store results of SCM_IFRAME,
scm_ilength and such to be of type scm_bits_t (and not int/long).
(iqq): depth, edepth: int -> scm_bits_t
(scm_eval_stack): int -> scm_bits_t
(SCM_CEVAL): various vars are not scm_bits_t instead of int.
(check_map_args, scm_map, scm_for_each): len: long -> scm_bits_t
i: int -> scm_bits_t
* environments.c: changed the many calls to scm_ulong2num to
scm_ubits2num.
(import_environment_fold): proc_as_ul: ulong -> scm_ubits_t
* dynwind.c (scm_dowinds): delta: long -> scm_bits_t
* debug.h: type renaming:
scm_debug_info -> scm_debug_info_t
scm_debug_frame -> scm_debug_frame_t
the old names are deprecated, all in-Guile uses changed.
(scm_debug_eframe_size): int -> scm_bits_t
* debug.c (scm_init_debug): use scm_c_define instead of the
deprecated scm_define.
* continuations.h: type renaming:
scm_contregs -> scm_contregs_t
the old name is deprecated, all in-Guile uses changed.
(scm_contregs_t.num_stack_items): size_t -> scm_bits_t
(scm_contregs_t.num_stack_items): ulong -> scm_ubits_t
* continuations.c (scm_make_continuation): change the type of
stack_size form long to scm_bits_t.
* ports.h: type renaming:
scm_port_rw_active -> scm_port_rw_active_t (and made a typedef)
scm_port -> scm_port_t
scm_ptob_descriptor -> scm_ptob_descriptor_t
the old names are deprecated, all in-Guile uses changed.
(scm_port_t.entry): int -> scm_bits_t.
(scm_port_t.line_number): int -> long.
(scm_port_t.putback_buf_size): int -> size_t.
* __scm.h (long_long, ulong_long): deprecated (they pollute the
global namespace and have little value besides that).
(SCM_BITS_LENGTH): new, is the bit size of scm_bits_t (i.e. of an
SCM handle).
(ifdef spaghetti): include sys/types.h and sys/stdtypes.h, if they
exist (for size_t & ptrdiff_t)
(scm_sizet): deprecated.
* Makefile.am (noinst_HEADERS): add num2integral.i.c
2001-05-24 00:50:51 +00:00
|
|
|
size_t len;
|
2000-10-30 11:42:26 +00:00
|
|
|
char *dst;
|
|
|
|
|
char *src;
|
|
|
|
|
|
|
|
|
|
SCM_ASSERT (SCM_STRINGP (arg), args, argn, subr);
|
|
|
|
|
len = SCM_STRING_LENGTH (arg);
|
2000-11-22 11:20:03 +00:00
|
|
|
src = SCM_STRING_CHARS (arg);
|
* gc.h, gc.c (scm_gc_sweep): Issue deprecation warning when
non-zero is returned from a port or smob free function.
(scm_malloc, scm_realloc, scm_strndup, scm_strdup,
scm_gc_register_collectable_memory,
scm_gc_unregister_collectable_memory, scm_gc_malloc,
scm_gc_realloc, scm_gc_free, scm_gc_strndup, scm_gc_strdup): New.
* backtrace.c, continuations.c, convert.i.c, coop-threads.c,
debug-malloc.c, dynl.c, environments.c, environments.h,
extensions.c, filesys.c, fports.c, gc.c, gc.h, gh_data.c, goops.c,
guardians.c, hooks.c, init.c, keywords.c, load.c, numbers.c,
ports.c, posix.c, procs.c, rdelim.c, regex-posix.c, root.c,
smob.c, stime.c, strings.c, struct.c, struct.h, symbols.c, unif.c,
vectors.c, weaks.c: Use scm_gc_malloc/scm_malloc and
scm_gc_free/free instead of scm_must_malloc and scm_must_free, as
appropriate. Return zero from smob and port free functions.
* debug-malloc.c (scm_malloc_reregister): Handle "old == NULL".
* fports.c (scm_setvbuf): Reset read buffer to saved values when
it is pointing to the putback buffer.
2002-02-11 18:06:50 +00:00
|
|
|
dst = (char *) scm_malloc (len + 1);
|
2000-10-30 11:42:26 +00:00
|
|
|
memcpy (dst, src, len);
|
|
|
|
|
dst[len] = 0;
|
2000-03-14 06:39:37 +00:00
|
|
|
argv[i] = dst;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (argcp)
|
|
|
|
|
*argcp = argc;
|
|
|
|
|
argv[argc] = 0;
|
|
|
|
|
return argv;
|
1996-12-08 16:52:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
* gc.h, gc.c (scm_gc_sweep): Issue deprecation warning when
non-zero is returned from a port or smob free function.
(scm_malloc, scm_realloc, scm_strndup, scm_strdup,
scm_gc_register_collectable_memory,
scm_gc_unregister_collectable_memory, scm_gc_malloc,
scm_gc_realloc, scm_gc_free, scm_gc_strndup, scm_gc_strdup): New.
* backtrace.c, continuations.c, convert.i.c, coop-threads.c,
debug-malloc.c, dynl.c, environments.c, environments.h,
extensions.c, filesys.c, fports.c, gc.c, gc.h, gh_data.c, goops.c,
guardians.c, hooks.c, init.c, keywords.c, load.c, numbers.c,
ports.c, posix.c, procs.c, rdelim.c, regex-posix.c, root.c,
smob.c, stime.c, strings.c, struct.c, struct.h, symbols.c, unif.c,
vectors.c, weaks.c: Use scm_gc_malloc/scm_malloc and
scm_gc_free/free instead of scm_must_malloc and scm_must_free, as
appropriate. Return zero from smob and port free functions.
* debug-malloc.c (scm_malloc_reregister): Handle "old == NULL".
* fports.c (scm_setvbuf): Reset read buffer to saved values when
it is pointing to the putback buffer.
2002-02-11 18:06:50 +00:00
|
|
|
scm_free_argv (char **argv)
|
1996-12-08 16:52:38 +00:00
|
|
|
{
|
2000-03-14 06:39:37 +00:00
|
|
|
char **av = argv;
|
|
|
|
|
while (*av)
|
|
|
|
|
free (*(av++));
|
|
|
|
|
free (argv);
|
1996-12-08 16:52:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Dispatch to the system dependent files
|
1997-01-18 11:40:31 +00:00
|
|
|
*
|
1997-06-16 19:09:11 +00:00
|
|
|
* They define some static functions. These functions are called with
|
|
|
|
|
* deferred interrupts. When they want to throw errors, they are
|
|
|
|
|
* expected to insert a SCM_ALLOW_INTS before doing the throw. It
|
|
|
|
|
* might work to throw an error while interrupts are deferred (because
|
|
|
|
|
* they will be unconditionally allowed the next time a SCM_ALLOW_INTS
|
|
|
|
|
* is executed, SCM_DEFER_INTS and SCM_ALLOW_INTS do not nest).
|
1996-12-08 16:52:38 +00:00
|
|
|
*/
|
|
|
|
|
|
2000-01-10 00:36:26 +00:00
|
|
|
#ifdef DYNAMIC_LINKING
|
|
|
|
|
|
2000-06-02 23:33:10 +00:00
|
|
|
#include "libltdl/ltdl.h"
|
2000-01-10 00:36:26 +00:00
|
|
|
|
|
|
|
|
static void *
|
2000-05-18 08:47:52 +00:00
|
|
|
sysdep_dynl_link (const char *fname, const char *subr)
|
2000-01-10 00:36:26 +00:00
|
|
|
{
|
2000-03-14 06:39:37 +00:00
|
|
|
lt_dlhandle handle;
|
|
|
|
|
handle = lt_dlopenext (fname);
|
2000-01-10 00:36:26 +00:00
|
|
|
if (NULL == handle)
|
|
|
|
|
{
|
2000-12-05 03:04:20 +00:00
|
|
|
SCM fn;
|
|
|
|
|
SCM msg;
|
|
|
|
|
|
2000-01-10 00:36:26 +00:00
|
|
|
SCM_ALLOW_INTS;
|
2000-12-05 03:04:20 +00:00
|
|
|
fn = scm_makfrom0str (fname);
|
|
|
|
|
msg = scm_makfrom0str (lt_dlerror ());
|
* list.h (scm_list_1, scm_list_2, scm_list_3, scm_list_4, scm_list_5,
scm_list_n): New functions.
(SCM_LIST0, SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4, SCM_LIST5,
SCM_LIST6, SCM_LIST7, SCM_LIST8, SCM_LIST9, scm_listify): Deprecated.
(lots of files): Use the new functions.
* goops.c (CALL_GF1, CALL_GF2, CALL_GF3, CALL_GF4): Use scm_call_N.
* strings.c: #include "libguile/deprecation.h".
2001-06-28 01:11:59 +00:00
|
|
|
scm_misc_error (subr, "file: ~S, message: ~S", scm_list_2 (fn, msg));
|
2000-01-10 00:36:26 +00:00
|
|
|
}
|
|
|
|
|
return (void *) handle;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
sysdep_dynl_unlink (void *handle, const char *subr)
|
|
|
|
|
{
|
|
|
|
|
if (lt_dlclose ((lt_dlhandle) handle))
|
|
|
|
|
{
|
|
|
|
|
SCM_ALLOW_INTS;
|
2000-03-14 06:39:37 +00:00
|
|
|
scm_misc_error (subr, (char *) lt_dlerror (), SCM_EOL);
|
2000-01-10 00:36:26 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void *
|
|
|
|
|
sysdep_dynl_func (const char *symb, void *handle, const char *subr)
|
|
|
|
|
{
|
|
|
|
|
void *fptr;
|
|
|
|
|
|
|
|
|
|
fptr = lt_dlsym ((lt_dlhandle) handle, symb);
|
|
|
|
|
if (!fptr)
|
|
|
|
|
{
|
|
|
|
|
SCM_ALLOW_INTS;
|
2000-03-14 06:39:37 +00:00
|
|
|
scm_misc_error (subr, (char *) lt_dlerror (), SCM_EOL);
|
2000-01-10 00:36:26 +00:00
|
|
|
}
|
|
|
|
|
return fptr;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
sysdep_dynl_init ()
|
|
|
|
|
{
|
|
|
|
|
lt_dlinit ();
|
|
|
|
|
}
|
|
|
|
|
|
1996-12-08 16:52:38 +00:00
|
|
|
#else
|
1997-01-20 19:11:41 +00:00
|
|
|
|
|
|
|
|
/* no dynamic linking available, throw errors. */
|
|
|
|
|
|
|
|
|
|
static void
|
1999-12-12 02:36:16 +00:00
|
|
|
sysdep_dynl_init (void)
|
1997-01-20 19:11:41 +00:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
1999-06-21 14:50:19 +00:00
|
|
|
no_dynl_error (const char *subr)
|
1997-01-20 19:11:41 +00:00
|
|
|
{
|
1997-06-16 19:09:11 +00:00
|
|
|
SCM_ALLOW_INTS;
|
|
|
|
|
scm_misc_error (subr, "dynamic linking not available", SCM_EOL);
|
1997-01-20 19:11:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void *
|
2000-05-18 08:47:52 +00:00
|
|
|
sysdep_dynl_link (const char *filename, const char *subr)
|
1997-01-20 19:11:41 +00:00
|
|
|
{
|
2000-03-14 06:39:37 +00:00
|
|
|
no_dynl_error (subr);
|
|
|
|
|
return NULL;
|
1997-01-20 19:11:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
1999-06-21 14:50:19 +00:00
|
|
|
sysdep_dynl_unlink (void *handle,
|
|
|
|
|
const char *subr)
|
1997-01-20 19:11:41 +00:00
|
|
|
{
|
2000-03-14 06:39:37 +00:00
|
|
|
no_dynl_error (subr);
|
1997-01-20 19:11:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void *
|
1999-06-21 14:50:19 +00:00
|
|
|
sysdep_dynl_func (const char *symbol,
|
|
|
|
|
void *handle,
|
|
|
|
|
const char *subr)
|
1997-01-20 19:11:41 +00:00
|
|
|
{
|
2000-03-14 06:39:37 +00:00
|
|
|
no_dynl_error (subr);
|
|
|
|
|
return NULL;
|
1997-01-20 19:11:41 +00:00
|
|
|
}
|
|
|
|
|
|
1997-01-18 11:40:31 +00:00
|
|
|
#endif
|
|
|
|
|
|
2001-06-14 19:50:43 +00:00
|
|
|
scm_t_bits scm_tc16_dynamic_obj;
|
1997-01-18 11:40:31 +00:00
|
|
|
|
2000-05-04 08:07:18 +00:00
|
|
|
#define DYNL_FILENAME(x) (SCM_CELL_OBJECT_1 (x))
|
|
|
|
|
#define DYNL_HANDLE(x) ((void *) SCM_CELL_WORD_2 (x))
|
|
|
|
|
#define SET_DYNL_HANDLE(x, v) (SCM_SET_CELL_WORD_2 ((x), (v)))
|
2000-03-14 06:39:37 +00:00
|
|
|
|
|
|
|
|
|
1997-01-18 11:40:31 +00:00
|
|
|
static SCM
|
2000-12-08 17:32:56 +00:00
|
|
|
dynl_obj_mark (SCM ptr)
|
1997-01-18 11:40:31 +00:00
|
|
|
{
|
2000-03-14 06:39:37 +00:00
|
|
|
return DYNL_FILENAME (ptr);
|
1997-07-18 14:31:06 +00:00
|
|
|
}
|
|
|
|
|
|
2000-12-08 17:32:56 +00:00
|
|
|
|
1997-01-18 11:40:31 +00:00
|
|
|
static int
|
2000-12-08 17:32:56 +00:00
|
|
|
dynl_obj_print (SCM exp, SCM port, scm_print_state *pstate)
|
1997-01-18 11:40:31 +00:00
|
|
|
{
|
2000-03-14 06:39:37 +00:00
|
|
|
scm_puts ("#<dynamic-object ", port);
|
|
|
|
|
scm_iprin1 (DYNL_FILENAME (exp), port, pstate);
|
|
|
|
|
if (DYNL_HANDLE (exp) == NULL)
|
|
|
|
|
scm_puts (" (unlinked)", port);
|
|
|
|
|
scm_putc ('>', port);
|
|
|
|
|
return 1;
|
1997-01-18 11:40:31 +00:00
|
|
|
}
|
|
|
|
|
|
1999-06-21 15:16:54 +00:00
|
|
|
|
2000-05-18 08:47:52 +00:00
|
|
|
SCM_DEFINE (scm_dynamic_link, "dynamic-link", 1, 0, 0,
|
2001-04-03 13:19:05 +00:00
|
|
|
(SCM filename),
|
|
|
|
|
"Open the dynamic library called @var{filename}. A library\n"
|
|
|
|
|
"handle representing the opened library is returned; this handle\n"
|
|
|
|
|
"should be used as the @var{dobj} argument to the following\n"
|
|
|
|
|
"functions.")
|
1999-12-12 02:36:16 +00:00
|
|
|
#define FUNC_NAME s_scm_dynamic_link
|
1997-01-18 11:40:31 +00:00
|
|
|
{
|
2000-03-14 06:39:37 +00:00
|
|
|
void *handle;
|
1997-01-18 11:40:31 +00:00
|
|
|
|
2001-04-03 13:19:05 +00:00
|
|
|
SCM_VALIDATE_STRING (1, filename);
|
|
|
|
|
handle = sysdep_dynl_link (SCM_STRING_CHARS (filename), FUNC_NAME);
|
|
|
|
|
SCM_RETURN_NEWSMOB2 (scm_tc16_dynamic_obj, SCM_UNPACK (filename), handle);
|
1997-01-18 11:40:31 +00:00
|
|
|
}
|
1999-12-12 02:36:16 +00:00
|
|
|
#undef FUNC_NAME
|
1997-01-18 11:40:31 +00:00
|
|
|
|
|
|
|
|
|
2000-01-05 19:05:23 +00:00
|
|
|
SCM_DEFINE (scm_dynamic_object_p, "dynamic-object?", 1, 0, 0,
|
1999-12-12 02:36:16 +00:00
|
|
|
(SCM obj),
|
* alist.c, chars.c, debug.c, dynl.c, dynwind.c, error.c, eval.c,
evalext.c, filesys.c, gc.c, hash.c, hashtab.c, ioext.c,
keywords.c, list.c, load.c, macros.c, net_db.c, numbers.c,
objprop.c, ports.c, posix.c, print.c, procprop.c, procs.c,
ramap.c, regex-posix.c, root.c, scmsigs.c, simpos.c, socket.c,
stacks.c, stime.c, strings.c, strop.c, strports.c, struct.c,
symbols.c, throw.c, unif.c, vectors.c, version.c, vports.c,
weaks.c: Converted docstrings to ANSI C format.
2000-01-18 11:24:03 +00:00
|
|
|
"Return @code{#t} if @var{obj} is a dynamic library handle, or @code{#f}\n"
|
|
|
|
|
"otherwise.")
|
1999-12-12 02:36:16 +00:00
|
|
|
#define FUNC_NAME s_scm_dynamic_object_p
|
1997-01-18 11:40:31 +00:00
|
|
|
{
|
2000-12-08 17:32:56 +00:00
|
|
|
return SCM_BOOL (SCM_TYP16_PREDICATE (scm_tc16_dynamic_obj, obj));
|
1997-01-18 11:40:31 +00:00
|
|
|
}
|
1999-12-12 02:36:16 +00:00
|
|
|
#undef FUNC_NAME
|
1997-01-18 11:40:31 +00:00
|
|
|
|
2000-05-04 08:07:18 +00:00
|
|
|
|
2000-01-05 19:05:23 +00:00
|
|
|
SCM_DEFINE (scm_dynamic_unlink, "dynamic-unlink", 1, 0, 0,
|
1999-12-12 02:36:16 +00:00
|
|
|
(SCM dobj),
|
2000-05-04 08:07:18 +00:00
|
|
|
"Unlink the indicated object file from the application. The\n"
|
2001-04-03 13:19:05 +00:00
|
|
|
"argument @var{dobj} must have been obtained by a call to\n"
|
2000-05-04 08:07:18 +00:00
|
|
|
"@code{dynamic-link}. After @code{dynamic-unlink} has been\n"
|
2001-04-03 13:19:05 +00:00
|
|
|
"called on @var{dobj}, its content is no longer accessible.")
|
1999-12-12 02:36:16 +00:00
|
|
|
#define FUNC_NAME s_scm_dynamic_unlink
|
1997-01-18 11:40:31 +00:00
|
|
|
{
|
2000-03-14 06:39:37 +00:00
|
|
|
/*fixme* GC-problem */
|
2000-05-04 08:07:18 +00:00
|
|
|
SCM_VALIDATE_SMOB (SCM_ARG1, dobj, dynamic_obj);
|
|
|
|
|
if (DYNL_HANDLE (dobj) == NULL) {
|
|
|
|
|
SCM_MISC_ERROR ("Already unlinked: ~S", dobj);
|
|
|
|
|
} else {
|
|
|
|
|
SCM_DEFER_INTS;
|
|
|
|
|
sysdep_dynl_unlink (DYNL_HANDLE (dobj), FUNC_NAME);
|
|
|
|
|
SET_DYNL_HANDLE (dobj, NULL);
|
|
|
|
|
SCM_ALLOW_INTS;
|
|
|
|
|
return SCM_UNSPECIFIED;
|
|
|
|
|
}
|
1997-01-18 11:40:31 +00:00
|
|
|
}
|
1999-12-12 02:36:16 +00:00
|
|
|
#undef FUNC_NAME
|
1997-01-18 11:40:31 +00:00
|
|
|
|
2000-05-04 08:07:18 +00:00
|
|
|
|
2000-01-05 19:05:23 +00:00
|
|
|
SCM_DEFINE (scm_dynamic_func, "dynamic-func", 2, 0, 0,
|
2000-10-30 11:42:26 +00:00
|
|
|
(SCM name, SCM dobj),
|
|
|
|
|
"Search the dynamic object @var{dobj} for the C function\n"
|
|
|
|
|
"indicated by the string @var{name} and return some Scheme\n"
|
|
|
|
|
"handle that can later be used with @code{dynamic-call} to\n"
|
|
|
|
|
"actually call the function.\n\n"
|
* alist.c, chars.c, debug.c, dynl.c, dynwind.c, error.c, eval.c,
evalext.c, filesys.c, gc.c, hash.c, hashtab.c, ioext.c,
keywords.c, list.c, load.c, macros.c, net_db.c, numbers.c,
objprop.c, ports.c, posix.c, print.c, procprop.c, procs.c,
ramap.c, regex-posix.c, root.c, scmsigs.c, simpos.c, socket.c,
stacks.c, stime.c, strings.c, strop.c, strports.c, struct.c,
symbols.c, throw.c, unif.c, vectors.c, version.c, vports.c,
weaks.c: Converted docstrings to ANSI C format.
2000-01-18 11:24:03 +00:00
|
|
|
"Regardless whether your C compiler prepends an underscore @samp{_} to\n"
|
|
|
|
|
"the global names in a program, you should @strong{not} include this\n"
|
|
|
|
|
"underscore in @var{function}. Guile knows whether the underscore is\n"
|
2000-08-11 15:12:37 +00:00
|
|
|
"needed or not and will add it when necessary.")
|
1999-12-12 02:36:16 +00:00
|
|
|
#define FUNC_NAME s_scm_dynamic_func
|
1997-01-18 11:40:31 +00:00
|
|
|
{
|
2000-10-30 11:42:26 +00:00
|
|
|
/* The returned handle is formed by casting the address of the function to a
|
|
|
|
|
* long value and converting this to a scheme number
|
|
|
|
|
*/
|
|
|
|
|
|
2000-03-14 06:39:37 +00:00
|
|
|
void (*func) ();
|
1997-01-18 11:40:31 +00:00
|
|
|
|
2000-10-30 11:42:26 +00:00
|
|
|
SCM_VALIDATE_STRING (1, name);
|
2000-03-14 06:39:37 +00:00
|
|
|
/*fixme* GC-problem */
|
2000-05-04 08:07:18 +00:00
|
|
|
SCM_VALIDATE_SMOB (SCM_ARG2, dobj, dynamic_obj);
|
|
|
|
|
if (DYNL_HANDLE (dobj) == NULL) {
|
|
|
|
|
SCM_MISC_ERROR ("Already unlinked: ~S", dobj);
|
|
|
|
|
} else {
|
2000-09-26 18:37:26 +00:00
|
|
|
char *chars;
|
|
|
|
|
|
2000-05-04 08:07:18 +00:00
|
|
|
SCM_DEFER_INTS;
|
2000-10-30 11:42:26 +00:00
|
|
|
chars = SCM_STRING_CHARS (name);
|
2000-09-26 18:37:26 +00:00
|
|
|
func = (void (*) ()) sysdep_dynl_func (chars, DYNL_HANDLE (dobj), FUNC_NAME);
|
2000-05-04 08:07:18 +00:00
|
|
|
SCM_ALLOW_INTS;
|
|
|
|
|
return scm_ulong2num ((unsigned long) func);
|
|
|
|
|
}
|
1997-01-18 11:40:31 +00:00
|
|
|
}
|
1999-12-12 02:36:16 +00:00
|
|
|
#undef FUNC_NAME
|
1997-01-18 11:40:31 +00:00
|
|
|
|
2000-05-04 08:07:18 +00:00
|
|
|
|
2000-01-05 19:05:23 +00:00
|
|
|
SCM_DEFINE (scm_dynamic_call, "dynamic-call", 2, 0, 0,
|
1999-12-12 02:36:16 +00:00
|
|
|
(SCM func, SCM dobj),
|
2001-04-03 13:19:05 +00:00
|
|
|
"Call the C function indicated by @var{func} and @var{dobj}.\n"
|
|
|
|
|
"The function is passed no arguments and its return value is\n"
|
|
|
|
|
"ignored. When @var{function} is something returned by\n"
|
|
|
|
|
"@code{dynamic-func}, call that function and ignore @var{dobj}.\n"
|
|
|
|
|
"When @var{func} is a string , look it up in @var{dynobj}; this\n"
|
|
|
|
|
"is equivalent to\n"
|
* alist.c, chars.c, debug.c, dynl.c, dynwind.c, error.c, eval.c,
evalext.c, filesys.c, gc.c, hash.c, hashtab.c, ioext.c,
keywords.c, list.c, load.c, macros.c, net_db.c, numbers.c,
objprop.c, ports.c, posix.c, print.c, procprop.c, procs.c,
ramap.c, regex-posix.c, root.c, scmsigs.c, simpos.c, socket.c,
stacks.c, stime.c, strings.c, strop.c, strports.c, struct.c,
symbols.c, throw.c, unif.c, vectors.c, version.c, vports.c,
weaks.c: Converted docstrings to ANSI C format.
2000-01-18 11:24:03 +00:00
|
|
|
"@smallexample\n"
|
2001-04-03 13:19:05 +00:00
|
|
|
"(dynamic-call (dynamic-func @var{func} @var{dobj} #f))\n"
|
* alist.c, chars.c, debug.c, dynl.c, dynwind.c, error.c, eval.c,
evalext.c, filesys.c, gc.c, hash.c, hashtab.c, ioext.c,
keywords.c, list.c, load.c, macros.c, net_db.c, numbers.c,
objprop.c, ports.c, posix.c, print.c, procprop.c, procs.c,
ramap.c, regex-posix.c, root.c, scmsigs.c, simpos.c, socket.c,
stacks.c, stime.c, strings.c, strop.c, strports.c, struct.c,
symbols.c, throw.c, unif.c, vectors.c, version.c, vports.c,
weaks.c: Converted docstrings to ANSI C format.
2000-01-18 11:24:03 +00:00
|
|
|
"@end smallexample\n\n"
|
|
|
|
|
"Interrupts are deferred while the C function is executing (with\n"
|
2000-08-11 15:12:37 +00:00
|
|
|
"@code{SCM_DEFER_INTS}/@code{SCM_ALLOW_INTS}).")
|
1999-12-12 02:36:16 +00:00
|
|
|
#define FUNC_NAME s_scm_dynamic_call
|
1997-01-18 11:40:31 +00:00
|
|
|
{
|
2000-03-14 06:39:37 +00:00
|
|
|
void (*fptr) ();
|
|
|
|
|
|
2000-10-30 11:42:26 +00:00
|
|
|
if (SCM_STRINGP (func))
|
2000-03-14 06:39:37 +00:00
|
|
|
func = scm_dynamic_func (func, dobj);
|
|
|
|
|
fptr = (void (*) ()) SCM_NUM2ULONG (1, func);
|
|
|
|
|
SCM_DEFER_INTS;
|
|
|
|
|
fptr ();
|
|
|
|
|
SCM_ALLOW_INTS;
|
|
|
|
|
return SCM_UNSPECIFIED;
|
1997-01-18 11:40:31 +00:00
|
|
|
}
|
1999-12-12 02:36:16 +00:00
|
|
|
#undef FUNC_NAME
|
1997-01-18 11:40:31 +00:00
|
|
|
|
2000-01-05 19:05:23 +00:00
|
|
|
SCM_DEFINE (scm_dynamic_args_call, "dynamic-args-call", 3, 0, 0,
|
1999-12-12 02:36:16 +00:00
|
|
|
(SCM func, SCM dobj, SCM args),
|
2001-04-03 13:19:05 +00:00
|
|
|
"Call the C function indicated by @var{func} and @var{dobj},\n"
|
|
|
|
|
"just like @code{dynamic-call}, but pass it some arguments and\n"
|
|
|
|
|
"return its return value. The C function is expected to take\n"
|
|
|
|
|
"two arguments and return an @code{int}, just like @code{main}:\n"
|
* alist.c, chars.c, debug.c, dynl.c, dynwind.c, error.c, eval.c,
evalext.c, filesys.c, gc.c, hash.c, hashtab.c, ioext.c,
keywords.c, list.c, load.c, macros.c, net_db.c, numbers.c,
objprop.c, ports.c, posix.c, print.c, procprop.c, procs.c,
ramap.c, regex-posix.c, root.c, scmsigs.c, simpos.c, socket.c,
stacks.c, stime.c, strings.c, strop.c, strports.c, struct.c,
symbols.c, throw.c, unif.c, vectors.c, version.c, vports.c,
weaks.c: Converted docstrings to ANSI C format.
2000-01-18 11:24:03 +00:00
|
|
|
"@smallexample\n"
|
|
|
|
|
"int c_func (int argc, char **argv);\n"
|
|
|
|
|
"@end smallexample\n\n"
|
2001-04-03 13:19:05 +00:00
|
|
|
"The parameter @var{args} must be a list of strings and is\n"
|
|
|
|
|
"converted into an array of @code{char *}. The array is passed\n"
|
|
|
|
|
"in @var{argv} and its size in @var{argc}. The return value is\n"
|
|
|
|
|
"converted to a Scheme number and returned from the call to\n"
|
|
|
|
|
"@code{dynamic-args-call}.")
|
1999-12-12 02:36:16 +00:00
|
|
|
#define FUNC_NAME s_scm_dynamic_args_call
|
1997-01-18 11:40:31 +00:00
|
|
|
{
|
2000-03-14 06:39:37 +00:00
|
|
|
int (*fptr) (int argc, char **argv);
|
|
|
|
|
int result, argc;
|
|
|
|
|
char **argv;
|
|
|
|
|
|
2000-10-30 11:42:26 +00:00
|
|
|
if (SCM_STRINGP (func))
|
2000-03-14 06:39:37 +00:00
|
|
|
func = scm_dynamic_func (func, dobj);
|
|
|
|
|
|
|
|
|
|
fptr = (int (*) (int, char **)) SCM_NUM2ULONG (1, func);
|
|
|
|
|
SCM_DEFER_INTS;
|
|
|
|
|
argv = scm_make_argv_from_stringlist (args, &argc, FUNC_NAME, SCM_ARG3);
|
|
|
|
|
result = (*fptr) (argc, argv);
|
* gc.h, gc.c (scm_gc_sweep): Issue deprecation warning when
non-zero is returned from a port or smob free function.
(scm_malloc, scm_realloc, scm_strndup, scm_strdup,
scm_gc_register_collectable_memory,
scm_gc_unregister_collectable_memory, scm_gc_malloc,
scm_gc_realloc, scm_gc_free, scm_gc_strndup, scm_gc_strdup): New.
* backtrace.c, continuations.c, convert.i.c, coop-threads.c,
debug-malloc.c, dynl.c, environments.c, environments.h,
extensions.c, filesys.c, fports.c, gc.c, gc.h, gh_data.c, goops.c,
guardians.c, hooks.c, init.c, keywords.c, load.c, numbers.c,
ports.c, posix.c, procs.c, rdelim.c, regex-posix.c, root.c,
smob.c, stime.c, strings.c, struct.c, struct.h, symbols.c, unif.c,
vectors.c, weaks.c: Use scm_gc_malloc/scm_malloc and
scm_gc_free/free instead of scm_must_malloc and scm_must_free, as
appropriate. Return zero from smob and port free functions.
* debug-malloc.c (scm_malloc_reregister): Handle "old == NULL".
* fports.c (scm_setvbuf): Reset read buffer to saved values when
it is pointing to the putback buffer.
2002-02-11 18:06:50 +00:00
|
|
|
scm_free_argv (argv);
|
2000-03-14 06:39:37 +00:00
|
|
|
SCM_ALLOW_INTS;
|
|
|
|
|
|
|
|
|
|
return SCM_MAKINUM (0L + result);
|
1997-01-18 11:40:31 +00:00
|
|
|
}
|
1999-12-12 02:36:16 +00:00
|
|
|
#undef FUNC_NAME
|
1997-01-18 11:40:31 +00:00
|
|
|
|
1996-12-08 16:52:38 +00:00
|
|
|
void
|
|
|
|
|
scm_init_dynamic_linking ()
|
|
|
|
|
{
|
2000-03-14 06:39:37 +00:00
|
|
|
scm_tc16_dynamic_obj = scm_make_smob_type ("dynamic-object", 0);
|
2000-12-08 17:32:56 +00:00
|
|
|
scm_set_smob_mark (scm_tc16_dynamic_obj, dynl_obj_mark);
|
|
|
|
|
scm_set_smob_print (scm_tc16_dynamic_obj, dynl_obj_print);
|
2000-03-14 06:39:37 +00:00
|
|
|
sysdep_dynl_init ();
|
2000-04-21 14:16:44 +00:00
|
|
|
#include "libguile/dynl.x"
|
1996-12-08 16:52:38 +00:00
|
|
|
}
|
2000-03-19 19:01:16 +00:00
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
Local Variables:
|
|
|
|
|
c-file-style: "gnu"
|
|
|
|
|
End:
|
|
|
|
|
*/
|