mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-07-01 23:30:28 +02:00
Move internal string interface definitions to internal header
* libguile/strings-internal.h: New file. * libguile/strings.h: Gut. * libguile/Makefile.am: Add new file. * libguile/array-handle.c: * libguile/bytevectors.c: * libguile/foreign.c: * libguile/fports.c: * libguile/hash.c: * libguile/i18n.c: * libguile/init.c: * libguile/intrinsics.c: * libguile/load.c: * libguile/memoize.c: * libguile/numbers.c: * libguile/ports.c: * libguile/posix.c: * libguile/print.c: * libguile/random.c: * libguile/rdelim.c: * libguile/read.c: * libguile/rw.c: * libguile/srfi-13.c: * libguile/srfi-14.c: * libguile/strings.c: * libguile/strports.c: * libguile/struct.c: * libguile/symbols.c: * libguile/throw.c: Include new file.
This commit is contained in:
parent
342a58ad36
commit
4702becf89
28 changed files with 113 additions and 84 deletions
84
libguile/strings-internal.h
Normal file
84
libguile/strings-internal.h
Normal file
|
@ -0,0 +1,84 @@
|
|||
#ifndef SCM_STRINGS_INTERNAL_H
|
||||
#define SCM_STRINGS_INTERNAL_H
|
||||
|
||||
/* Copyright 1995-1998,2000-2001,2004-2006,2008-2011,2013,2015-2019,2022,2025
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of Guile.
|
||||
|
||||
Guile is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU Lesser General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Guile 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 Lesser General Public
|
||||
License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with Guile. If not, see
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
|
||||
|
||||
#include <libguile/strings.h>
|
||||
|
||||
|
||||
|
||||
SCM_INTERNAL SCM scm_nullstr;
|
||||
|
||||
SCM_INTERNAL scm_t_string_failed_conversion_handler
|
||||
scm_i_default_string_failed_conversion_handler (void);
|
||||
|
||||
/* Flags for shared and wide strings. */
|
||||
#define SCM_I_STRINGBUF_F_WIDE 0x400
|
||||
#define SCM_I_STRINGBUF_F_MUTABLE 0x800
|
||||
|
||||
SCM_INTERNAL void scm_i_print_stringbuf (SCM exp, SCM port,
|
||||
scm_print_state *pstate);
|
||||
|
||||
/* internal accessor functions. Arguments must be valid. */
|
||||
|
||||
SCM_INTERNAL SCM scm_i_make_string (size_t len, char **datap,
|
||||
int read_only_p);
|
||||
SCM_INTERNAL SCM scm_i_make_wide_string (size_t len, scm_t_wchar **datap,
|
||||
int read_only_p);
|
||||
SCM_INTERNAL SCM scm_i_substring (SCM str, size_t start, size_t end);
|
||||
SCM_INTERNAL SCM scm_i_substring_read_only (SCM str, size_t start, size_t end);
|
||||
SCM_INTERNAL SCM scm_i_substring_shared (SCM str, size_t start, size_t end);
|
||||
SCM_INTERNAL SCM scm_i_substring_copy (SCM str, size_t start, size_t end);
|
||||
SCM_INTERNAL size_t scm_i_string_length (SCM str);
|
||||
SCM_INTERNAL int scm_i_string_is_mutable (SCM str);
|
||||
SCM_INTERNAL const scm_t_wchar *scm_i_string_wide_chars (SCM str);
|
||||
SCM_INTERNAL const void *scm_i_string_data (SCM str);
|
||||
|
||||
SCM_INTERNAL SCM scm_i_string_start_writing (SCM str);
|
||||
SCM_INTERNAL void scm_i_string_stop_writing (void);
|
||||
SCM_INTERNAL int scm_i_is_narrow_string (SCM str);
|
||||
SCM_INTERNAL scm_t_wchar scm_i_string_ref (SCM str, size_t x);
|
||||
SCM_INTERNAL int scm_i_string_contains_char (SCM str, char c);
|
||||
SCM_INTERNAL int scm_i_string_strcmp (SCM sstr, size_t start_x, const char *cstr);
|
||||
SCM_INTERNAL void scm_i_string_set_x (SCM str, size_t p, scm_t_wchar chr);
|
||||
|
||||
SCM_INTERNAL SCM scm_i_make_symbol (SCM name, scm_t_bits flags,
|
||||
unsigned long hash);
|
||||
SCM_INTERNAL const char *scm_i_symbol_chars (SCM sym);
|
||||
SCM_INTERNAL const scm_t_wchar *scm_i_symbol_wide_chars (SCM sym);
|
||||
SCM_INTERNAL size_t scm_i_symbol_length (SCM sym);
|
||||
SCM_INTERNAL int scm_i_is_narrow_symbol (SCM str);
|
||||
SCM_INTERNAL int scm_i_try_narrow_string (SCM str);
|
||||
SCM_INTERNAL SCM scm_i_symbol_substring (SCM sym, size_t start, size_t end);
|
||||
SCM_INTERNAL scm_t_wchar scm_i_symbol_ref (SCM sym, size_t x);
|
||||
SCM_INTERNAL void scm_encoding_error (const char *subr, int err,
|
||||
const char *message, SCM port, SCM chr);
|
||||
SCM_INTERNAL void scm_decoding_error (const char *subr, int err,
|
||||
const char *message, SCM port);
|
||||
|
||||
SCM_INTERNAL void scm_i_get_substring_spec (size_t len,
|
||||
SCM start, size_t *cstart,
|
||||
SCM end, size_t *cend);
|
||||
|
||||
SCM_INTERNAL void scm_init_strings (void);
|
||||
|
||||
#endif /* SCM_STRINGS_INTERNAL_H */
|
Loading…
Add table
Add a link
Reference in a new issue