Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!ux1.cso.uiuc.edu!ux1.cso.uiuc.edu!m.cs.uiuc.edu!gillies From: gillies@m.cs.uiuc.edu Newsgroups: comp.editors Subject: Re: Orphaned Response Message-ID: <37200022@m.cs.uiuc.edu> Date: 6 Feb 90 07:28:00 GMT References: <1558@aber-cs.UUCP> Lines: 21 Nf-ID: #R:aber-cs.UUCP:1558:m.cs.uiuc.edu:37200022:000:1105 Nf-From: m.cs.uiuc.edu!gillies Feb 6 01:28:00 1990 sjs@spectral.ctt.bellcore.com (Stan Switzer) writes: >On another point, handling text and simple structural features like >paragraphs in the buffer-gap scheme seems pretty straight forward. >How about handling font and size changes, underlining, figures, >buttons, tabs and other active areas? I can see several ways to go >with this. Can anybody shed some light on this for me? I believe the first editor to handle multiple character styles was Bravo, from Xerox (1976). It used "pieces". A piece editor stores your file as a (linked) list of pieces. A piece is a (ptr,lth) tuple. For plain text, a file initially is just one (ptr,lth). As you make changes, the pieces are split, the linked list grows, and the lth's shorten. When you write the file out to disk, the file once again become a single piece (i.e. a form of garbage collection). This is a marvelous way to handle megabyte or gigabyte files. It is easy to enhance pieces to make them triples: (ptr, lth, style). This is how Bravo was written. I suspect it's also how MS-Word works (MS-Word was designed by one of Bravo's authors).