2018-11-11 15:25:36 +00:00
|
|
|
/* -*-comment-start: "//";comment-end:""-*-
|
|
|
|
* GNU Mes --- Maxwell Equations of Software
|
core: Prepare for M2-Planet 1.7.0.
* src/eval-apply.c (expand_variable_, apply_builtin): Declare variables
at toplevel.
* src/gc.c (gc_cellcpy, gc_loop, gc_dump_arena): Likewise.
* src/hash.c (hash_table_printer): Likewise.
* src/lib.c (equal2_p): Likewise.
* src/math.c (greater_p, less_p, is_p, minus, plus, divide, multiply,
logand, logior, logxor): Likewise.
* src/posix.c (current_input_port, execl_): Likewise.
* src/reader.c (reader_read_string): Likewise.
* src/stack.c (make_stack): Likewise.
* src/string.c (list_to_cstring, bytes_to_list, string_append):
Likewise.
* src/struct.c (make_struct): Likewise.
* src/vector.c (vector_to_list): Likewise.
2020-12-29 12:38:38 +00:00
|
|
|
* Copyright © 2016,2017,2018,2019,2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
2018-11-11 15:25:36 +00:00
|
|
|
*
|
|
|
|
* This file is part of GNU Mes.
|
|
|
|
*
|
|
|
|
* GNU Mes 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 3 of the License, or (at
|
|
|
|
* your option) any later version.
|
|
|
|
*
|
|
|
|
* GNU Mes 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 GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2019-06-08 13:36:22 +00:00
|
|
|
#include "mes/lib.h"
|
|
|
|
#include "mes/mes.h"
|
|
|
|
|
|
|
|
#include <limits.h>
|
|
|
|
#include <string.h>
|
|
|
|
|
2018-12-15 09:34:57 +00:00
|
|
|
void
|
core: Use casting functions.
Silence all casting errors by using casting functions.
* src/cc.c (cast_charp_to_scmp, cast_charp_to_scmpp,
cast_voidp_to_charp, cast_scmp_to_long, cast_scmp_to_charp): New function.
* src/m2.c (cast_charp_to_scmp, cast_charp_to_scmpp,
cast_voidp_to_charp, cast_scmp_to_long, cast_scmp_to_charp): New function.
* include/mes/mes.h: Declare them.
(struct scm): Add car_value, cdr_value, function.
(g_continuations): Change to long.
* src/mes.c: Silence all casting errors by using casting functions.
2020-10-18 13:44:49 +00:00
|
|
|
assert_max_string (size_t i, char const *msg, char const *string)
|
2018-12-15 09:34:57 +00:00
|
|
|
{
|
2019-02-10 05:56:06 +00:00
|
|
|
if (i > MAX_STRING)
|
2018-12-15 09:34:57 +00:00
|
|
|
{
|
|
|
|
eputs (msg);
|
|
|
|
eputs (":string too long[");
|
|
|
|
eputs (itoa (i));
|
|
|
|
eputs ("]:");
|
core: Use casting functions.
Silence all casting errors by using casting functions.
* src/cc.c (cast_charp_to_scmp, cast_charp_to_scmpp,
cast_voidp_to_charp, cast_scmp_to_long, cast_scmp_to_charp): New function.
* src/m2.c (cast_charp_to_scmp, cast_charp_to_scmpp,
cast_voidp_to_charp, cast_scmp_to_long, cast_scmp_to_charp): New function.
* include/mes/mes.h: Declare them.
(struct scm): Add car_value, cdr_value, function.
(g_continuations): Change to long.
* src/mes.c: Silence all casting errors by using casting functions.
2020-10-18 13:44:49 +00:00
|
|
|
char *p = cast_voidp_to_charp (string);
|
|
|
|
p[MAX_STRING - 1] = 0;
|
|
|
|
eputs (p);
|
2018-12-15 09:34:57 +00:00
|
|
|
error (cell_symbol_system_error, cell_f);
|
|
|
|
}
|
|
|
|
}
|
2018-11-11 15:25:36 +00:00
|
|
|
|
2019-05-18 11:27:42 +00:00
|
|
|
char const *
|
2020-10-18 09:34:32 +00:00
|
|
|
list_to_cstring (struct scm *list, size_t *size)
|
2018-11-11 15:25:36 +00:00
|
|
|
{
|
|
|
|
size_t i = 0;
|
2018-12-15 09:34:57 +00:00
|
|
|
char *p = g_buf;
|
core: Prepare for M2-Planet 1.7.0.
* src/eval-apply.c (expand_variable_, apply_builtin): Declare variables
at toplevel.
* src/gc.c (gc_cellcpy, gc_loop, gc_dump_arena): Likewise.
* src/hash.c (hash_table_printer): Likewise.
* src/lib.c (equal2_p): Likewise.
* src/math.c (greater_p, less_p, is_p, minus, plus, divide, multiply,
logand, logior, logxor): Likewise.
* src/posix.c (current_input_port, execl_): Likewise.
* src/reader.c (reader_read_string): Likewise.
* src/stack.c (make_stack): Likewise.
* src/string.c (list_to_cstring, bytes_to_list, string_append):
Likewise.
* src/struct.c (make_struct): Likewise.
* src/vector.c (vector_to_list): Likewise.
2020-12-29 12:38:38 +00:00
|
|
|
struct scm *x;
|
2018-11-11 15:25:36 +00:00
|
|
|
while (list != cell_nil)
|
|
|
|
{
|
2018-12-15 09:34:57 +00:00
|
|
|
if (i > MAX_STRING)
|
|
|
|
assert_max_string (i, "list_to_string", g_buf);
|
core: Prepare for M2-Planet 1.7.0.
* src/eval-apply.c (expand_variable_, apply_builtin): Declare variables
at toplevel.
* src/gc.c (gc_cellcpy, gc_loop, gc_dump_arena): Likewise.
* src/hash.c (hash_table_printer): Likewise.
* src/lib.c (equal2_p): Likewise.
* src/math.c (greater_p, less_p, is_p, minus, plus, divide, multiply,
logand, logior, logxor): Likewise.
* src/posix.c (current_input_port, execl_): Likewise.
* src/reader.c (reader_read_string): Likewise.
* src/stack.c (make_stack): Likewise.
* src/string.c (list_to_cstring, bytes_to_list, string_append):
Likewise.
* src/struct.c (make_struct): Likewise.
* src/vector.c (vector_to_list): Likewise.
2020-12-29 12:38:38 +00:00
|
|
|
x = car (list);
|
2020-10-18 09:34:32 +00:00
|
|
|
g_buf[i] = x->value;
|
2020-04-20 17:47:18 +00:00
|
|
|
i = i + 1;
|
2018-11-11 15:25:36 +00:00
|
|
|
list = cdr (list);
|
|
|
|
}
|
2018-12-15 09:34:57 +00:00
|
|
|
g_buf[i] = 0;
|
2020-04-20 17:47:18 +00:00
|
|
|
size[0] = i;
|
|
|
|
|
2018-12-15 09:34:57 +00:00
|
|
|
return g_buf;
|
2018-11-11 15:25:36 +00:00
|
|
|
}
|
|
|
|
|
2020-10-18 09:34:32 +00:00
|
|
|
struct scm *
|
|
|
|
string_equal_p (struct scm *a, struct scm *b) /*:((name . "string=?")) */
|
2018-11-11 15:25:36 +00:00
|
|
|
{
|
2020-10-18 09:34:32 +00:00
|
|
|
if (!((a->type == TSTRING && b->type == TSTRING) || (a->type == TKEYWORD || b->type == TKEYWORD)))
|
2018-11-11 15:25:36 +00:00
|
|
|
{
|
2019-05-18 11:27:42 +00:00
|
|
|
eputs ("type a: ");
|
2020-10-18 09:34:32 +00:00
|
|
|
eputs (itoa (a->type));
|
2019-05-18 11:27:42 +00:00
|
|
|
eputs ("\n");
|
|
|
|
eputs ("type b: ");
|
2020-10-18 09:34:32 +00:00
|
|
|
eputs (itoa (b->type));
|
2019-05-18 11:27:42 +00:00
|
|
|
eputs ("\n");
|
|
|
|
eputs ("a= ");
|
|
|
|
write_error_ (a);
|
|
|
|
eputs ("\n");
|
|
|
|
eputs ("b= ");
|
|
|
|
write_error_ (b);
|
|
|
|
eputs ("\n");
|
2020-10-18 09:34:32 +00:00
|
|
|
assert_msg ((a->type == TSTRING && b->type == TSTRING) || (a->type == TKEYWORD || b->type == TKEYWORD), "(a->type == TSTRING && b->type == TSTRING) || (a->type == TKEYWORD || b->type == TKEYWORD)");
|
2018-11-11 15:25:36 +00:00
|
|
|
}
|
2020-07-16 19:43:29 +00:00
|
|
|
if (a == b)
|
2018-12-27 15:48:45 +00:00
|
|
|
return cell_t;
|
2020-10-18 09:34:32 +00:00
|
|
|
if (a->string == b->string)
|
2020-07-16 19:43:29 +00:00
|
|
|
return cell_t;
|
2020-10-18 09:34:32 +00:00
|
|
|
if (a->length == 0 && b->length == 0)
|
2020-07-16 19:43:29 +00:00
|
|
|
return cell_t;
|
2020-10-18 09:34:32 +00:00
|
|
|
if (a->length == b->length)
|
|
|
|
if (memcmp (cell_bytes (a->string), cell_bytes (b->string), a->length) == 0)
|
2020-07-16 19:43:29 +00:00
|
|
|
return cell_t;
|
2020-04-20 17:47:18 +00:00
|
|
|
|
2018-11-11 15:25:36 +00:00
|
|
|
return cell_f;
|
|
|
|
}
|
|
|
|
|
2020-10-18 09:34:32 +00:00
|
|
|
struct scm *
|
|
|
|
symbol_to_string (struct scm *symbol)
|
2018-11-11 15:25:36 +00:00
|
|
|
{
|
2020-10-18 09:34:32 +00:00
|
|
|
return make_cell (TSTRING, symbol->car, symbol->cdr);
|
2018-11-11 15:25:36 +00:00
|
|
|
}
|
|
|
|
|
2020-10-18 09:34:32 +00:00
|
|
|
struct scm *
|
|
|
|
symbol_to_keyword (struct scm *symbol)
|
2018-11-11 15:25:36 +00:00
|
|
|
{
|
2020-10-18 09:34:32 +00:00
|
|
|
return make_cell (TKEYWORD, symbol->car, symbol->cdr);
|
2018-11-11 15:25:36 +00:00
|
|
|
}
|
|
|
|
|
2020-10-18 09:34:32 +00:00
|
|
|
struct scm *
|
|
|
|
keyword_to_string (struct scm *keyword)
|
2018-11-11 15:25:36 +00:00
|
|
|
{
|
2020-10-18 09:34:32 +00:00
|
|
|
return make_cell (TSTRING, keyword->car, keyword->cdr);
|
2018-11-11 15:25:36 +00:00
|
|
|
}
|
|
|
|
|
2020-10-18 09:34:32 +00:00
|
|
|
struct scm *
|
|
|
|
string_to_symbol (struct scm *string)
|
2018-11-11 15:25:36 +00:00
|
|
|
{
|
2020-10-18 09:34:32 +00:00
|
|
|
struct scm *x = hash_ref (g_symbols, string, cell_f);
|
2018-11-11 15:25:36 +00:00
|
|
|
if (x == cell_f)
|
|
|
|
x = make_symbol (string);
|
|
|
|
return x;
|
|
|
|
}
|
|
|
|
|
2020-10-18 09:34:32 +00:00
|
|
|
struct scm *
|
|
|
|
make_symbol (struct scm *string)
|
2018-11-11 15:25:36 +00:00
|
|
|
{
|
core: Use casting functions.
Silence all casting errors by using casting functions.
* src/cc.c (cast_charp_to_scmp, cast_charp_to_scmpp,
cast_voidp_to_charp, cast_scmp_to_long, cast_scmp_to_charp): New function.
* src/m2.c (cast_charp_to_scmp, cast_charp_to_scmpp,
cast_voidp_to_charp, cast_scmp_to_long, cast_scmp_to_charp): New function.
* include/mes/mes.h: Declare them.
(struct scm): Add car_value, cdr_value, function.
(g_continuations): Change to long.
* src/mes.c: Silence all casting errors by using casting functions.
2020-10-18 13:44:49 +00:00
|
|
|
struct scm *x = make_pointer_cell (TSYMBOL, string->length, string->string);
|
2018-11-11 15:25:36 +00:00
|
|
|
hash_set_x (g_symbols, string, x);
|
|
|
|
return x;
|
|
|
|
}
|
|
|
|
|
2020-10-18 09:34:32 +00:00
|
|
|
struct scm *
|
2019-05-18 11:27:42 +00:00
|
|
|
bytes_to_list (char const *s, size_t i)
|
2018-11-11 15:25:36 +00:00
|
|
|
{
|
2020-10-18 09:34:32 +00:00
|
|
|
struct scm *p = cell_nil;
|
core: Prepare for M2-Planet 1.7.0.
* src/eval-apply.c (expand_variable_, apply_builtin): Declare variables
at toplevel.
* src/gc.c (gc_cellcpy, gc_loop, gc_dump_arena): Likewise.
* src/hash.c (hash_table_printer): Likewise.
* src/lib.c (equal2_p): Likewise.
* src/math.c (greater_p, less_p, is_p, minus, plus, divide, multiply,
logand, logior, logxor): Likewise.
* src/posix.c (current_input_port, execl_): Likewise.
* src/reader.c (reader_read_string): Likewise.
* src/stack.c (make_stack): Likewise.
* src/string.c (list_to_cstring, bytes_to_list, string_append):
Likewise.
* src/struct.c (make_struct): Likewise.
* src/vector.c (vector_to_list): Likewise.
2020-12-29 12:38:38 +00:00
|
|
|
int c;
|
2020-04-20 17:47:18 +00:00
|
|
|
while (i != 0)
|
2018-11-11 15:25:36 +00:00
|
|
|
{
|
2020-04-20 17:47:18 +00:00
|
|
|
i = i - 1;
|
core: Prepare for M2-Planet 1.7.0.
* src/eval-apply.c (expand_variable_, apply_builtin): Declare variables
at toplevel.
* src/gc.c (gc_cellcpy, gc_loop, gc_dump_arena): Likewise.
* src/hash.c (hash_table_printer): Likewise.
* src/lib.c (equal2_p): Likewise.
* src/math.c (greater_p, less_p, is_p, minus, plus, divide, multiply,
logand, logior, logxor): Likewise.
* src/posix.c (current_input_port, execl_): Likewise.
* src/reader.c (reader_read_string): Likewise.
* src/stack.c (make_stack): Likewise.
* src/string.c (list_to_cstring, bytes_to_list, string_append):
Likewise.
* src/struct.c (make_struct): Likewise.
* src/vector.c (vector_to_list): Likewise.
2020-12-29 12:38:38 +00:00
|
|
|
c = (0x100 + s[i]) % 0x100;
|
core: Remove macros from cell creation: make_char .. make_string.
* src/gc.c (make_char, make_continuation, make_macro, make_number,
make_ref, make_string0, make_string_port): New function.
(make_string): Move from string.c.
* include/mes/macros.h (MAKE_CHAR, MAKE_CONTINUATION, MAKE_MACRO,
MAKE_NUMBER, MAKE_REF, MAKE_STRING0, MAKE_STRING_PORT): Remove macro.
Update users.
* include/mes/m2.h: Likewise.
2020-05-18 20:35:12 +00:00
|
|
|
p = cons (make_char (c), p);
|
2018-11-11 15:25:36 +00:00
|
|
|
}
|
|
|
|
return p;
|
|
|
|
}
|
|
|
|
|
2020-10-18 09:34:32 +00:00
|
|
|
struct scm *
|
2019-05-18 11:27:42 +00:00
|
|
|
cstring_to_list (char const *s)
|
2018-11-11 15:25:36 +00:00
|
|
|
{
|
|
|
|
return bytes_to_list (s, strlen (s));
|
|
|
|
}
|
|
|
|
|
2020-10-18 09:34:32 +00:00
|
|
|
struct scm *
|
2018-11-11 15:25:36 +00:00
|
|
|
cstring_to_symbol (char const *s)
|
|
|
|
{
|
2020-10-18 09:34:32 +00:00
|
|
|
struct scm *string = make_string0 (s);
|
2018-11-11 15:25:36 +00:00
|
|
|
return string_to_symbol (string);
|
|
|
|
}
|
|
|
|
|
2020-10-18 09:34:32 +00:00
|
|
|
struct scm *
|
|
|
|
string_to_list (struct scm *string)
|
2018-11-11 15:25:36 +00:00
|
|
|
{
|
2020-10-18 09:34:32 +00:00
|
|
|
return bytes_to_list (cell_bytes (string->string), string->length);
|
2018-11-11 15:25:36 +00:00
|
|
|
}
|
|
|
|
|
2020-10-18 09:34:32 +00:00
|
|
|
struct scm *
|
|
|
|
list_to_string (struct scm *list)
|
2018-11-11 15:25:36 +00:00
|
|
|
{
|
|
|
|
size_t size;
|
|
|
|
char const *s = list_to_cstring (list, &size);
|
|
|
|
return make_string (s, size);
|
|
|
|
}
|
|
|
|
|
2020-10-18 09:34:32 +00:00
|
|
|
struct scm *
|
|
|
|
read_string (struct scm *port) /*:((arity . n)) */
|
2018-11-11 15:25:36 +00:00
|
|
|
{
|
2019-03-02 11:35:18 +00:00
|
|
|
int fd = __stdin;
|
2020-10-18 09:34:32 +00:00
|
|
|
if (port->type == TPAIR)
|
2020-07-17 12:30:01 +00:00
|
|
|
{
|
2020-10-18 09:34:32 +00:00
|
|
|
struct scm *p = car (port);
|
|
|
|
if (p->type == TNUMBER)
|
|
|
|
__stdin = p->value;
|
2020-07-17 12:30:01 +00:00
|
|
|
}
|
2018-11-11 15:25:36 +00:00
|
|
|
int c = readchar ();
|
|
|
|
size_t i = 0;
|
|
|
|
while (c != -1)
|
|
|
|
{
|
2018-12-15 09:34:57 +00:00
|
|
|
if (i > MAX_STRING)
|
|
|
|
assert_max_string (i, "read_string", g_buf);
|
2020-04-20 17:47:18 +00:00
|
|
|
g_buf[i] = c;
|
|
|
|
i = i + 1;
|
2018-11-11 15:25:36 +00:00
|
|
|
c = readchar ();
|
|
|
|
}
|
2018-12-15 09:34:57 +00:00
|
|
|
g_buf[i] = 0;
|
2019-03-02 11:35:18 +00:00
|
|
|
__stdin = fd;
|
2018-12-15 09:34:57 +00:00
|
|
|
return make_string (g_buf, i);
|
2018-11-11 15:25:36 +00:00
|
|
|
}
|
2018-11-15 22:09:56 +00:00
|
|
|
|
2020-10-18 09:34:32 +00:00
|
|
|
struct scm *
|
|
|
|
string_append (struct scm *x) /*:((arity . n)) */
|
2018-11-15 22:09:56 +00:00
|
|
|
{
|
2019-02-15 08:28:46 +00:00
|
|
|
char *p = g_buf;
|
2018-12-15 09:34:57 +00:00
|
|
|
g_buf[0] = 0;
|
2018-11-15 22:09:56 +00:00
|
|
|
size_t size = 0;
|
core: Prepare for M2-Planet 1.7.0.
* src/eval-apply.c (expand_variable_, apply_builtin): Declare variables
at toplevel.
* src/gc.c (gc_cellcpy, gc_loop, gc_dump_arena): Likewise.
* src/hash.c (hash_table_printer): Likewise.
* src/lib.c (equal2_p): Likewise.
* src/math.c (greater_p, less_p, is_p, minus, plus, divide, multiply,
logand, logior, logxor): Likewise.
* src/posix.c (current_input_port, execl_): Likewise.
* src/reader.c (reader_read_string): Likewise.
* src/stack.c (make_stack): Likewise.
* src/string.c (list_to_cstring, bytes_to_list, string_append):
Likewise.
* src/struct.c (make_struct): Likewise.
* src/vector.c (vector_to_list): Likewise.
2020-12-29 12:38:38 +00:00
|
|
|
struct scm *string;
|
2018-11-15 22:09:56 +00:00
|
|
|
while (x != cell_nil)
|
|
|
|
{
|
core: Prepare for M2-Planet 1.7.0.
* src/eval-apply.c (expand_variable_, apply_builtin): Declare variables
at toplevel.
* src/gc.c (gc_cellcpy, gc_loop, gc_dump_arena): Likewise.
* src/hash.c (hash_table_printer): Likewise.
* src/lib.c (equal2_p): Likewise.
* src/math.c (greater_p, less_p, is_p, minus, plus, divide, multiply,
logand, logior, logxor): Likewise.
* src/posix.c (current_input_port, execl_): Likewise.
* src/reader.c (reader_read_string): Likewise.
* src/stack.c (make_stack): Likewise.
* src/string.c (list_to_cstring, bytes_to_list, string_append):
Likewise.
* src/struct.c (make_struct): Likewise.
* src/vector.c (vector_to_list): Likewise.
2020-12-29 12:38:38 +00:00
|
|
|
string = x->car;
|
2020-10-18 09:34:32 +00:00
|
|
|
assert_msg (string->type == TSTRING, "string->type == TSTRING");
|
|
|
|
memcpy (p, cell_bytes (string->string), string->length + 1);
|
|
|
|
p = p + string->length;
|
|
|
|
size = size + string->length;
|
2018-12-15 09:34:57 +00:00
|
|
|
if (size > MAX_STRING)
|
|
|
|
assert_max_string (size, "string_append", g_buf);
|
2020-10-18 09:34:32 +00:00
|
|
|
x = x->cdr;
|
2018-11-15 22:09:56 +00:00
|
|
|
}
|
2018-12-15 09:34:57 +00:00
|
|
|
return make_string (g_buf, size);
|
2018-11-15 22:09:56 +00:00
|
|
|
}
|
2018-11-15 22:51:29 +00:00
|
|
|
|
2020-10-18 09:34:32 +00:00
|
|
|
struct scm *
|
|
|
|
string_length (struct scm *string)
|
2018-11-15 22:51:29 +00:00
|
|
|
{
|
2020-10-18 09:34:32 +00:00
|
|
|
assert_msg (string->type == TSTRING, "string->type == TSTRING");
|
|
|
|
return make_number (string->length);
|
2018-11-15 22:51:29 +00:00
|
|
|
}
|
2018-11-15 23:15:50 +00:00
|
|
|
|
2020-10-18 09:34:32 +00:00
|
|
|
struct scm *
|
|
|
|
string_ref (struct scm *str, struct scm *k)
|
2018-11-15 23:15:50 +00:00
|
|
|
{
|
2020-10-18 09:34:32 +00:00
|
|
|
assert_msg (str->type == TSTRING, "str->type == TSTRING");
|
|
|
|
assert_msg (k->type == TNUMBER, "k->type == TNUMBER");
|
|
|
|
size_t size = str->length;
|
|
|
|
size_t i = k->value;
|
2018-12-15 09:34:57 +00:00
|
|
|
if (i > size)
|
core: Remove macros from cell creation: make_char .. make_string.
* src/gc.c (make_char, make_continuation, make_macro, make_number,
make_ref, make_string0, make_string_port): New function.
(make_string): Move from string.c.
* include/mes/macros.h (MAKE_CHAR, MAKE_CONTINUATION, MAKE_MACRO,
MAKE_NUMBER, MAKE_REF, MAKE_STRING0, MAKE_STRING_PORT): Remove macro.
Update users.
* include/mes/m2.h: Likewise.
2020-05-18 20:35:12 +00:00
|
|
|
error (cell_symbol_system_error, cons (make_string0 ("value out of range"), k));
|
2020-10-18 09:34:32 +00:00
|
|
|
char const *p = cell_bytes (str->string);
|
core: Remove macros from cell creation: make_char .. make_string.
* src/gc.c (make_char, make_continuation, make_macro, make_number,
make_ref, make_string0, make_string_port): New function.
(make_string): Move from string.c.
* include/mes/macros.h (MAKE_CHAR, MAKE_CONTINUATION, MAKE_MACRO,
MAKE_NUMBER, MAKE_REF, MAKE_STRING0, MAKE_STRING_PORT): Remove macro.
Update users.
* include/mes/m2.h: Likewise.
2020-05-18 20:35:12 +00:00
|
|
|
return make_char (p[i]);
|
2018-11-15 23:15:50 +00:00
|
|
|
}
|