Implement strings and symbols as list of characters [WAS: c-string].
authorJan Nieuwenhuizen <janneke@gnu.org>
Tue, 25 Oct 2016 14:50:19 +0000 (16:50 +0200)
committerJan Nieuwenhuizen <janneke@gnu.org>
Mon, 12 Dec 2016 19:33:48 +0000 (20:33 +0100)
commit16f678a1582943e57415516833506f710eb46600
treed66732c1ac07f72f62f7b6d7561057d3c5a0ef8e
parent266c66e40c09a3a728bde69f3a6286e30898390e
Implement strings and symbols as list of characters [WAS: c-string].

* mes.c (scm_t): Add string field.
  (make_string, internal_lookup_symbol, internal_make_symbol,
  make_symbol, lookup, readword): Take scm*.  Update callers.
  (display_helper): Support string field.
  (append_char): New function.
  (readstring): Use it.  Produce scm*.
  (cstring_to_list): New function.
  (add_environment, internal_make_symbol): Use it.
  (list_of_char_equal_p): New function.
  (internal_lookup_symbol): Use it.
* lib.c (list_ref): New function.
* string.c (string_ref): Use it.
  (string, string_append, string_length, substring, number_to_string,
  string_to_symbol, symbol_to_string): Update to list-of-characters
  implementation.
lib.c
mes.c
string.c