Use external strings to store the contents of Edwin buffers. Edwin can
authorTaylor R. Campbell <net/mumble/campbell>
Sun, 1 Apr 2007 17:33:07 +0000 (17:33 +0000)
committerTaylor R. Campbell <net/mumble/campbell>
Sun, 1 Apr 2007 17:33:07 +0000 (17:33 +0000)
commitf88f54bdfe00ece27a6cd666eb1eceff48e42a17
tree751bc870d0e72d5392a31982c38fff840f668672
parent8d1030c25e6fffda34abbea9c4bafb5741176c9c
Use external strings to store the contents of Edwin buffers.  Edwin can
now edit files and buffers up to 32 MB without occupying more than a
small and (roughly) constant amount of space in the Scheme heap.

New procedures in the system global environment:

  EXTERNAL-STRING-DESCRIPTOR (Edwin needs this to initialize the group
    structure so that the microcode can get at it.)
  XSTRING-FILL!
  XSTRING-REF
  XSTRING-SET!
  XSUBSTRING (This was in imail/imail-util.scm.)
  XSUBSTRING-FILL!
  XSUBSTRING-FIND-NEXT-CHAR
  XSUBSTRING-FIND-NEXT-CHAR-CI
  XSUBSTRING-FIND-NEXT-CHAR-IN-SET
  XSUBSTRING-FIND-PREVIOUS-CHAR
  XSUBSTRING-FIND-PREVIOUS-CHAR-CI
  XSUBSTRING-FIND-PREVIOUS-CHAR-IN-SET

(There is probably a better way to deal with most of the above
procedures -- I expect that wouldn't hurt just to fold them into the
string operations by similar names, since we already check argument
types in those operations.  This kludginess works for now, though.)
15 files changed:
v7/src/edwin/bufwin.scm
v7/src/edwin/fileio.scm
v7/src/edwin/grpops.scm
v7/src/edwin/image.scm
v7/src/edwin/search.scm
v7/src/edwin/struct.scm
v7/src/edwin/utils.scm
v7/src/imail/imail-util.scm
v7/src/microcode/edwin.h
v7/src/microcode/prims.h
v7/src/microcode/rgxprim.c
v7/src/microcode/string.c
v7/src/microcode/syntax.c
v7/src/microcode/term.c
v7/src/runtime/runtime.pkg