home *** CD-ROM | disk | FTP | other *** search
/ rtfm.mit.edu / 2014.07.rtfm.mit.edu.tar / rtfm.mit.edu / pub / interviews-to-g++.diffs < prev    next >
Text File  |  1989-02-26  |  104KB  |  3,829 lines

  1. diff -rc src/bin/idraw/drawing.c /mit/interviews/src/bin/idraw/drawing.c
  2. *** src/bin/idraw/drawing.c    Wed Sep  7 05:23:05 1988
  3. --- /mit/interviews/src/bin/idraw/drawing.c    Fri Feb 24 17:41:16 1989
  4. ***************
  5. *** 23,39 ****
  6.   
  7.   // Import system routines not declared in any standard header file.
  8.   
  9.   extern int access(const char*, int);
  10.   extern int chdir(const char*);
  11.   extern char* getenv(const char*);
  12.   extern char* getwd(char*);
  13. ! // An Orientation specifies a page's orientation (upright or turned).
  14. ! enum Orientation {
  15. !     Portrait,
  16. !     Landscape,
  17. ! };
  18.   
  19.   // Drawing creates the page, selection list, and clipboard filename.
  20.   // It should have gotten w < h, i.e., portrait dimensions.
  21. --- 23,34 ----
  22.   
  23.   // Import system routines not declared in any standard header file.
  24.   
  25. + #ifndef __GNUG__
  26.   extern int access(const char*, int);
  27.   extern int chdir(const char*);
  28.   extern char* getenv(const char*);
  29.   extern char* getwd(char*);
  30. ! #endif
  31.   
  32.   // Drawing creates the page, selection list, and clipboard filename.
  33.   // It should have gotten w < h, i.e., portrait dimensions.
  34. diff -rc src/bin/idraw/drawing.h /mit/interviews/src/bin/idraw/drawing.h
  35. *** src/bin/idraw/drawing.h    Wed Sep  7 05:23:07 1988
  36. --- /mit/interviews/src/bin/idraw/drawing.h    Fri Feb 24 17:39:17 1989
  37. ***************
  38. *** 21,27 ****
  39.   class IFontList;
  40.   class IPattern;
  41.   class IPatternList;
  42. - enum Orientation;
  43.   class PageBoundary;
  44.   class PictSelection;
  45.   class Picture;
  46. --- 21,26 ----
  47. ***************
  48. *** 31,36 ****
  49. --- 30,42 ----
  50.   class State;
  51.   class Transformer;
  52.   class booleanList;
  53. + // An Orientation specifies a page's orientation (upright or turned).
  54. + enum Orientation {
  55. +     Portrait,
  56. +     Landscape,
  57. + };
  58.   
  59.   // A Drawing contains the user's picture and provides the interface
  60.   // through which editing operations modify it.
  61. diff -rc src/bin/idraw/editor.c /mit/interviews/src/bin/idraw/editor.c
  62. *** src/bin/idraw/editor.c    Thu Sep  8 11:18:31 1988
  63. --- /mit/interviews/src/bin/idraw/editor.c    Sun Feb 26 15:42:29 1989
  64. ***************
  65. *** 630,636 ****
  66.   
  67.   void Editor::Checkpoint () {
  68.       if (state->GetModifStatus() == Modified) {
  69. !     char* path = tempnam("./", "idraw");
  70.       boolean successful = drawing->WriteUserPicture(path);
  71.       if (successful) {
  72.           fprintf(stderr, "saved drawing as \"%s\"\n", path);
  73. --- 630,640 ----
  74.   
  75.   void Editor::Checkpoint () {
  76.       if (state->GetModifStatus() == Modified) {
  77. !     char path[64];
  78. !     strcpy(path, "./idrawXXXXXX"); // want a writable string
  79. !     mktemp(path);
  80. ! // Vax 4.3 BSD doesn't seem to have a tempnam function?
  81. ! //    char* path = tempnam("./", "idraw");
  82.       boolean successful = drawing->WriteUserPicture(path);
  83.       if (successful) {
  84.           fprintf(stderr, "saved drawing as \"%s\"\n", path);
  85. ***************
  86. *** 637,643 ****
  87.       } else {
  88.           fprintf(stderr, "sorry, couldn't save drawing as \"%s\"\n", path);
  89.       }
  90. !     delete path;
  91.       } else {
  92.       fprintf(stderr, "drawing was unmodified, didn't save it\n");
  93.       }
  94. --- 641,647 ----
  95.       } else {
  96.           fprintf(stderr, "sorry, couldn't save drawing as \"%s\"\n", path);
  97.       }
  98. ! //    delete path;
  99.       } else {
  100.       fprintf(stderr, "drawing was unmodified, didn't save it\n");
  101.       }
  102. diff -rc src/bin/idraw/errhandler.c /mit/interviews/src/bin/idraw/errhandler.c
  103. *** src/bin/idraw/errhandler.c    Wed Sep  7 05:23:17 1988
  104. --- /mit/interviews/src/bin/idraw/errhandler.c    Sun Feb 26 16:05:55 1989
  105. ***************
  106. *** 8,15 ****
  107. --- 8,17 ----
  108.   // Import external variable _new_handler which stores the handler for
  109.   // out of memory exceptions.
  110.   
  111. + #ifndef __GNUG__
  112.   typedef void (*PFVV)();
  113.   extern PFVV _new_handler;
  114. + #endif
  115.   
  116.   // Define local variable errhandler which stores the current instance
  117.   // of ErrHandler in the program.
  118. ***************
  119. *** 32,40 ****
  120. --- 34,44 ----
  121.   // memory exceptions if it was handling them.
  122.   
  123.   ErrHandler::~ErrHandler () {
  124. + #ifndef __GNUG__
  125.       if (_new_handler == &outofmemory) {
  126.       _new_handler = nil;
  127.       }
  128. + #endif
  129.       if (errhandler == this) {
  130.       errhandler = nil;
  131.       }
  132. ***************
  133. *** 51,57 ****
  134. --- 55,63 ----
  135.   
  136.   ReqErr* ErrHandler::Install () {
  137.       errhandler = this;
  138. + #ifndef __GNUG__
  139.       _new_handler = &outofmemory;
  140. + #endif
  141.   
  142.       return ReqErr::Install();
  143.   }
  144. diff -rc src/bin/idraw/genMakefile /mit/interviews/src/bin/idraw/genMakefile
  145. *** src/bin/idraw/genMakefile    Sat Sep 10 02:48:36 1988
  146. --- /mit/interviews/src/bin/idraw/genMakefile    Sun Feb 26 15:59:29 1989
  147. ***************
  148. *** 15,21 ****
  149.   LD    = "CC"
  150.   LDFLAGS    =
  151.   LIBS    = $L/$M/libgraphic.a $L/$M/libtext.a
  152. ! EXTLIBS    = $L/$D/libInterViews.a -l$$X -lm
  153.   HP300-SYSLIBS = -lBSD
  154.   
  155.   OBJS    =\
  156. --- 15,21 ----
  157.   LD    = "CC"
  158.   LDFLAGS    =
  159.   LIBS    = $L/$M/libgraphic.a $L/$M/libtext.a
  160. ! EXTLIBS    = $L/$D/libInterViews.a -l$$X -lm -lg++
  161.   HP300-SYSLIBS = -lBSD
  162.   
  163.   OBJS    =\
  164. diff -rc src/bin/idraw/grid.c /mit/interviews/src/bin/idraw/grid.c
  165. *** src/bin/idraw/grid.c    Wed Sep  7 05:23:21 1988
  166. --- /mit/interviews/src/bin/idraw/grid.c    Thu Feb 23 21:47:08 1989
  167. ***************
  168. *** 92,105 ****
  169.   }
  170.   
  171.   // drawClipped grids the given area with points if visibility has been
  172. ! // enabled.
  173.   
  174.   void Grid::drawClipped (Canvas* c, Coord l, Coord b, Coord r, Coord t,
  175.   Graphic* gs) {
  176.       if (visibility && gs->GetBrush()->Width() != NO_WIDTH) {
  177.       update(gs);
  178. !     int n = DefinePoints(l, b, r, t);
  179. !     pMultiPoint(c, x, y, n);
  180.       }
  181.   }
  182.   
  183. --- 92,113 ----
  184.   }
  185.   
  186.   // drawClipped grids the given area with points if visibility has been
  187. ! // enabled.  It sents the points in chunks of MAXCHUNK points each
  188. ! // because the MIT X11R3 Sun server will return a protocol error if
  189. ! // idraw sends more than 16381 points at a time.
  190.   
  191.   void Grid::drawClipped (Canvas* c, Coord l, Coord b, Coord r, Coord t,
  192.   Graphic* gs) {
  193.       if (visibility && gs->GetBrush()->Width() != NO_WIDTH) {
  194.       update(gs);
  195. !     int ntotal = DefinePoints(l, b, r, t);
  196. !     int nsent = 0;
  197. !     while (nsent < ntotal) {
  198. !         const int MAXCHUNK = 2000;
  199. !         int nchunk = min(MAXCHUNK, ntotal - nsent);
  200. !         pMultiPoint(c, &x[nsent], &y[nsent], nchunk);
  201. !         nsent += nchunk;
  202. !     }
  203.       }
  204.   }
  205.   
  206. diff -rc src/bin/idraw/highlighter.c /mit/interviews/src/bin/idraw/highlighter.c
  207. *** src/bin/idraw/highlighter.c    Wed Sep  7 05:23:25 1988
  208. --- /mit/interviews/src/bin/idraw/highlighter.c    Fri Feb 24 18:04:06 1989
  209. ***************
  210. *** 87,99 ****
  211.       Interactor::Reconfig();
  212.       if (output != highlight && output != normal) {
  213.       delete highlight;
  214. !     if (hparent != nil && hparent->output == output) {
  215. !         highlight = hparent->GetHighlightPainter();
  216. !         highlight->Reference();
  217. !     } else {        // bite the bullet
  218.           highlight = new Painter(output);
  219.           highlight->SetColors(output->GetBgColor(), output->GetFgColor());
  220. !     }
  221.       normal = output;
  222.       }
  223.       output = highlighted ? highlight : normal;
  224. --- 87,99 ----
  225.       Interactor::Reconfig();
  226.       if (output != highlight && output != normal) {
  227.       delete highlight;
  228. ! //    if (hparent != nil && hparent->output == output) {
  229. ! //        highlight = hparent->GetHighlightPainter();
  230. ! //        highlight->Reference();
  231. ! //    } else {        // bite the bullet
  232.           highlight = new Painter(output);
  233.           highlight->SetColors(output->GetBgColor(), output->GetFgColor());
  234. ! //    }
  235.       normal = output;
  236.       }
  237.       output = highlighted ? highlight : normal;
  238. diff -rc src/bin/idraw/ipaint.c /mit/interviews/src/bin/idraw/ipaint.c
  239. *** src/bin/idraw/ipaint.c    Thu Sep  8 03:07:10 1988
  240. --- /mit/interviews/src/bin/idraw/ipaint.c    Fri Feb 24 18:14:15 1989
  241. ***************
  242. *** 26,32 ****
  243.   
  244.   int IBrush::Width () {
  245.       int width = PBrush::Width();
  246. !     if (value == single) {
  247.       width = 1;
  248.       }
  249.       return width;
  250. --- 26,32 ----
  251.   
  252.   int IBrush::Width () {
  253.       int width = PBrush::Width();
  254. !     if (value == psingle) {
  255.       width = 1;
  256.       }
  257.       return width;
  258. diff -rc src/bin/idraw/listchange.h /mit/interviews/src/bin/idraw/listchange.h
  259. *** src/bin/idraw/listchange.h    Wed Sep  7 05:24:05 1988
  260. --- /mit/interviews/src/bin/idraw/listchange.h    Fri Feb 24 17:55:23 1989
  261. ***************
  262. *** 5,11 ****
  263.   #define listchange_h
  264.   
  265.   #include "list.h"
  266.   // Declare imported types.
  267.   
  268.   class CenterList;
  269. --- 5,12 ----
  270.   #define listchange_h
  271.   
  272.   #include "list.h"
  273. ! #include <InterViews/rubband.h>
  274. !     
  275.   // Declare imported types.
  276.   
  277.   class CenterList;
  278. ***************
  279. *** 22,28 ****
  280.   class IPatternList;
  281.   class Selection;
  282.   class SelectionList;
  283. - enum Side;
  284.   class State;
  285.   
  286.   // ChangeNode stores a change to the Drawing in reversible form and
  287. --- 23,28 ----
  288. diff -rc src/bin/idraw/listibrush.h /mit/interviews/src/bin/idraw/listibrush.h
  289. *** src/bin/idraw/listibrush.h    Wed Sep  7 05:24:09 1988
  290. --- /mit/interviews/src/bin/idraw/listibrush.h    Fri Feb 24 17:35:21 1989
  291. ***************
  292. *** 29,35 ****
  293.   
  294.   inline IBrushNode::IBrushNode (IBrush* b) {
  295.       brush = b;
  296. !     valuep = &brush;
  297.   }
  298.   
  299.   // Define inline access functions to get members' values.
  300. --- 29,35 ----
  301.   
  302.   inline IBrushNode::IBrushNode (IBrush* b) {
  303.       brush = b;
  304. !     valuep = (void**)&brush;
  305.   }
  306.   
  307.   // Define inline access functions to get members' values.
  308. diff -rc src/bin/idraw/listicolor.h /mit/interviews/src/bin/idraw/listicolor.h
  309. *** src/bin/idraw/listicolor.h    Wed Sep  7 05:24:11 1988
  310. --- /mit/interviews/src/bin/idraw/listicolor.h    Fri Feb 24 17:35:33 1989
  311. ***************
  312. *** 29,35 ****
  313.   
  314.   inline IColorNode::IColorNode (IColor* c) {
  315.       color = c;
  316. !     valuep = &color;
  317.   }
  318.   
  319.   // Define inline access functions to get members' values.
  320. --- 29,35 ----
  321.   
  322.   inline IColorNode::IColorNode (IColor* c) {
  323.       color = c;
  324. !     valuep = (void**)&color;
  325.   }
  326.   
  327.   // Define inline access functions to get members' values.
  328. diff -rc src/bin/idraw/listifont.h /mit/interviews/src/bin/idraw/listifont.h
  329. *** src/bin/idraw/listifont.h    Wed Sep  7 05:24:13 1988
  330. --- /mit/interviews/src/bin/idraw/listifont.h    Fri Feb 24 17:35:51 1989
  331. ***************
  332. *** 29,35 ****
  333.   
  334.   inline IFontNode::IFontNode (IFont* f) {
  335.       font = f;
  336. !     valuep = &font;
  337.   }
  338.   
  339.   // Define inline access functions to get members' values.
  340. --- 29,35 ----
  341.   
  342.   inline IFontNode::IFontNode (IFont* f) {
  343.       font = f;
  344. !     valuep = (void**)&font;
  345.   }
  346.   
  347.   // Define inline access functions to get members' values.
  348. diff -rc src/bin/idraw/listintrctr.h /mit/interviews/src/bin/idraw/listintrctr.h
  349. *** src/bin/idraw/listintrctr.h    Wed Sep  7 05:24:14 1988
  350. --- /mit/interviews/src/bin/idraw/listintrctr.h    Sat Feb 25 16:16:00 1989
  351. ***************
  352. *** 29,35 ****
  353.   
  354.   inline InteractorNode::InteractorNode (Interactor* i) {
  355.       interactor = i;
  356. !     valuep = &interactor;
  357.   }
  358.   
  359.   // Define inline access functions to get members' values.
  360. --- 29,35 ----
  361.   
  362.   inline InteractorNode::InteractorNode (Interactor* i) {
  363.       interactor = i;
  364. !     valuep = (void**)&interactor;
  365.   }
  366.   
  367.   // Define inline access functions to get members' values.
  368. diff -rc src/bin/idraw/listipattern.h /mit/interviews/src/bin/idraw/listipattern.h
  369. *** src/bin/idraw/listipattern.h    Wed Sep  7 05:24:16 1988
  370. --- /mit/interviews/src/bin/idraw/listipattern.h    Fri Feb 24 17:36:06 1989
  371. ***************
  372. *** 29,35 ****
  373.   
  374.   inline IPatternNode::IPatternNode (IPattern* p) {
  375.       pattern = p;
  376. !     valuep = &pattern;
  377.   }
  378.   
  379.   // Define inline access functions to get members' values.
  380. --- 29,35 ----
  381.   
  382.   inline IPatternNode::IPatternNode (IPattern* p) {
  383.       pattern = p;
  384. !     valuep = (void**)&pattern;
  385.   }
  386.   
  387.   // Define inline access functions to get members' values.
  388. diff -rc src/bin/idraw/listselectn.h /mit/interviews/src/bin/idraw/listselectn.h
  389. *** src/bin/idraw/listselectn.h    Wed Sep  7 05:24:18 1988
  390. --- /mit/interviews/src/bin/idraw/listselectn.h    Fri Feb 24 17:33:24 1989
  391. ***************
  392. *** 29,35 ****
  393.   
  394.   inline SelectionNode::SelectionNode (Selection* s) {
  395.       selection = s;
  396. !     valuep = &selection;
  397.   }
  398.   
  399.   // Define inline access functions to get members' values.
  400. --- 29,35 ----
  401.   
  402.   inline SelectionNode::SelectionNode (Selection* s) {
  403.       selection = s;
  404. !     valuep = (void**)&selection;
  405.   }
  406.   
  407.   // Define inline access functions to get members' values.
  408. diff -rc src/bin/idraw/slpict.c /mit/interviews/src/bin/idraw/slpict.c
  409. *** src/bin/idraw/slpict.c    Thu Sep  8 03:41:26 1988
  410. --- /mit/interviews/src/bin/idraw/slpict.c    Sat Feb 25 16:47:26 1989
  411. ***************
  412. *** 211,217 ****
  413.       to << "} def\n\n";
  414.       to << "/SetB {\n";
  415.       to << "dup type /nulltype eq {\n";
  416. !     to << "pop true /brushNone idef\n";
  417.       to << "} {\n";
  418.       to << "/brushDashOffset idef\n";
  419.       to << "/brushDashArray idef\n";
  420. --- 211,220 ----
  421.       to << "} def\n\n";
  422.       to << "/SetB {\n";
  423.       to << "dup type /nulltype eq {\n";
  424. !     to << "pop\n";
  425. !     to << "false /brushRightArrow idef\n";
  426. !     to << "false /brushLeftArrow idef\n";
  427. !     to << "true /brushNone idef\n";
  428.       to << "} {\n";
  429.       to << "/brushDashOffset idef\n";
  430.       to << "/brushDashArray idef\n";
  431. ***************
  432. *** 222,235 ****
  433.       to << "} ifelse\n";
  434.       to << "} def\n\n";
  435.       to << "/SetCFg {\n";
  436. -     to << "/fgred idef\n";
  437. -     to << "/fggreen idef\n";
  438.       to << "/fgblue idef\n";
  439.       to << "} def\n\n";
  440.       to << "/SetCBg {\n";
  441. -     to << "/bgred idef\n";
  442. -     to << "/bggreen idef\n";
  443.       to << "/bgblue idef\n";
  444.       to << "} def\n\n";
  445.       to << "/SetF {\n";
  446.       to << "/printSize idef\n";
  447. --- 225,238 ----
  448.       to << "} ifelse\n";
  449.       to << "} def\n\n";
  450.       to << "/SetCFg {\n";
  451.       to << "/fgblue idef\n";
  452. +     to << "/fggreen idef\n";
  453. +     to << "/fgred idef\n";
  454.       to << "} def\n\n";
  455.       to << "/SetCBg {\n";
  456.       to << "/bgblue idef\n";
  457. +     to << "/bggreen idef\n";
  458. +     to << "/bgred idef\n";
  459.       to << "} def\n\n";
  460.       to << "/SetF {\n";
  461.       to << "/printSize idef\n";
  462. ***************
  463. *** 408,418 ****
  464.       to << "/ishow {\n";
  465.       to << "0 begin\n";
  466.       to << "gsave\n";
  467. -     to << "0 2.5 originalCTM dtransform idtransform\n";
  468. -     to << "/yoff exch def\n";
  469. -     to << "/xoff exch def\n";
  470. -     to << "printFont /Courier ne printSize 10 ne and ";
  471. -     to << "{ xoff yoff translate } if\n";
  472.       to << "printFont findfont printSize scalefont setfont\n";
  473.       to << "fgred fggreen fgblue setrgbcolor\n";
  474.       to << "/vertoffset printSize neg def {\n";
  475. --- 411,416 ----
  476. diff -rc src/bin/idraw/string.h /mit/interviews/src/bin/idraw/string.h
  477. *** src/bin/idraw/string.h    Wed Sep  7 05:25:23 1988
  478. --- /mit/interviews/src/bin/idraw/string.h    Fri Feb 24 16:44:20 1989
  479. ***************
  480. *** 4,10 ****
  481.   #ifndef string_h
  482.   #define string_h
  483.   
  484. ! #include <CC/string.h>
  485.   
  486.   // strdup allocates and returns a duplicate of the given string.
  487.   
  488. --- 4,10 ----
  489.   #ifndef string_h
  490.   #define string_h
  491.   
  492. ! #include <std.h>
  493.   
  494.   // strdup allocates and returns a duplicate of the given string.
  495.   
  496. diff -rc src/bin/squares/metaview.c /mit/interviews/src/bin/squares/metaview.c
  497. *** src/bin/squares/metaview.c    Sat Sep 10 02:39:47 1988
  498. --- /mit/interviews/src/bin/squares/metaview.c    Sun Feb 26 20:42:51 1989
  499. ***************
  500. *** 125,135 ****
  501.       w->Remove(this);
  502.   
  503.       if (status == 1) {
  504. !         typeButton->GetValue(type);
  505. !         sizeButton->GetValue(size);
  506.           rightButton->GetValue(right);
  507.           belowButton->GetValue(below);
  508. !         alignButton->GetValue(align);
  509.           vscrollButton->GetValue(vscroll);
  510.           hscrollButton->GetValue(hscroll);
  511.       return true;
  512. --- 125,135 ----
  513.       w->Remove(this);
  514.   
  515.       if (status == 1) {
  516. !         typeButton->GetValue((void*)type);
  517. !         sizeButton->GetValue((void*)size);
  518.           rightButton->GetValue(right);
  519.           belowButton->GetValue(below);
  520. !         alignButton->GetValue((void*)align);
  521.           vscrollButton->GetValue(vscroll);
  522.           hscrollButton->GetValue(hscroll);
  523.       return true;
  524. diff -rc src/include/InterViews/brush.h /mit/interviews/src/include/InterViews/brush.h
  525. *** src/include/InterViews/brush.h    Tue Aug 16 12:54:52 1988
  526. --- /mit/interviews/src/include/InterViews/brush.h    Thu Feb 23 21:54:19 1989
  527. ***************
  528. *** 22,27 ****
  529.   
  530.   inline int Brush::Width () { return width; }
  531.   
  532. ! extern Brush* single;
  533.   
  534.   #endif
  535. --- 22,27 ----
  536.   
  537.   inline int Brush::Width () { return width; }
  538.   
  539. ! extern Brush* Bsingle;
  540.   
  541.   #endif
  542. diff -rc src/include/InterViews/font.h /mit/interviews/src/include/InterViews/font.h
  543. *** src/include/InterViews/font.h    Tue Aug 16 12:55:03 1988
  544. --- /mit/interviews/src/include/InterViews/font.h    Thu Feb 23 21:54:21 1989
  545. ***************
  546. *** 40,45 ****
  547. --- 40,46 ----
  548.       int height;
  549.   
  550.       ~FontRep();
  551. +     FontRep() {};
  552.   };
  553.   
  554.   extern Font* stdfont;
  555. diff -rc src/include/InterViews/interactor.h /mit/interviews/src/include/InterViews/interactor.h
  556. *** src/include/InterViews/interactor.h    Tue Sep  6 13:48:07 1988
  557. --- /mit/interviews/src/include/InterViews/interactor.h    Thu Feb 23 21:54:24 1989
  558. ***************
  559. *** 77,88 ****
  560.       void SetIcon(Interactor*);
  561.       void SetName(const char*);
  562.       void SetCanvasType(CanvasType);
  563. ! protected:
  564.       Shape* shape;            /* desired shape characteristics */
  565.       Canvas* canvas;            /* actual display area */
  566.       Perspective* perspective;        /* portion displayed */
  567. -     Coord xmax;                /* canvas->Width() - 1 */
  568. -     Coord ymax;                /* canvas->Height() - 1 */
  569.       Sensor* input;            /* normal input event interest */
  570.       Painter* output;            /* normal output parameters */
  571.   
  572. --- 77,89 ----
  573.       void SetIcon(Interactor*);
  574.       void SetName(const char*);
  575.       void SetCanvasType(CanvasType);
  576. !     Coord xmax;                /* canvas->Width() - 1 */
  577. !     Coord ymax;                /* canvas->Height() - 1 */
  578.       Shape* shape;            /* desired shape characteristics */
  579. +     virtual void Resize();
  580.       Canvas* canvas;            /* actual display area */
  581. + protected:
  582.       Perspective* perspective;        /* portion displayed */
  583.       Sensor* input;            /* normal input event interest */
  584.       Painter* output;            /* normal output parameters */
  585.   
  586. ***************
  587. *** 92,98 ****
  588.       boolean IsMapped();
  589.       virtual void Redraw(Coord left, Coord bottom, Coord right, Coord top);
  590.       virtual void RedrawList(int n, Coord[], Coord[], Coord[], Coord[]);
  591. -     virtual void Resize();
  592.       void RootConfig(const char*, const char*);
  593.       void SetClassName(const char*);
  594.       void SetInstance(const char*);
  595. --- 93,98 ----
  596. diff -rc src/include/InterViews/painter.h /mit/interviews/src/include/InterViews/painter.h
  597. *** src/include/InterViews/painter.h    Mon Aug 15 04:30:38 1988
  598. --- /mit/interviews/src/include/InterViews/painter.h    Thu Feb 23 21:54:27 1989
  599. ***************
  600. *** 97,104 ****
  601.       void Copy(Painter*);
  602.       void Begin_xor();
  603.       void End_xor();
  604. -     void Map(Canvas*, Coord x, Coord y, Coord& mx, Coord& my);
  605.       void Map(Canvas*, Coord x, Coord y, short& sx, short& sy);
  606.       void MapList(Canvas*, Coord x[], Coord y[], int n, Coord mx[], Coord my[]);
  607.       void MultiLineNoMap(Canvas* c, Coord x[], Coord y[], int n);
  608.       void FillPolygonNoMap(Canvas* c, Coord x[], Coord y[], int n);
  609. --- 97,104 ----
  610.       void Copy(Painter*);
  611.       void Begin_xor();
  612.       void End_xor();
  613.       void Map(Canvas*, Coord x, Coord y, short& sx, short& sy);
  614. +     void Map(Canvas*, Coord x, Coord y, Coord& mx, Coord& my);
  615.       void MapList(Canvas*, Coord x[], Coord y[], int n, Coord mx[], Coord my[]);
  616.       void MultiLineNoMap(Canvas* c, Coord x[], Coord y[], int n);
  617.       void FillPolygonNoMap(Canvas* c, Coord x[], Coord y[], int n);
  618. diff -rc src/include/InterViews/pattern.h /mit/interviews/src/include/InterViews/pattern.h
  619. *** src/include/InterViews/pattern.h    Tue Aug 16 12:55:07 1988
  620. --- /mit/interviews/src/include/InterViews/pattern.h    Fri Feb 24 17:18:00 1989
  621. ***************
  622. *** 7,18 ****
  623.   
  624.   #include <InterViews/resource.h>
  625.   
  626. ! static const int patternHeight = 16;
  627.   static const int patternWidth = 16;
  628.   
  629.   class Pattern : public Resource {
  630.   public:
  631. !     Pattern(int p[patternHeight]);
  632.       Pattern(int dither);
  633.       Pattern(class Bitmap*);
  634.       ~Pattern();
  635. --- 7,22 ----
  636.   
  637.   #include <InterViews/resource.h>
  638.   
  639. ! /*
  640. !  * static const int patternHeight = 16;
  641.   static const int patternWidth = 16;
  642. + */
  643. + #define patternHeight 16
  644. + #define patternWidth 16
  645.   
  646.   class Pattern : public Resource {
  647.   public:
  648. !     Pattern(int *);
  649.       Pattern(int dither);
  650.       Pattern(class Bitmap*);
  651.       ~Pattern();
  652. diff -rc src/include/InterViews/propsheet.h /mit/interviews/src/include/InterViews/propsheet.h
  653. *** src/include/InterViews/propsheet.h    Tue Sep  6 13:48:19 1988
  654. --- /mit/interviews/src/include/InterViews/propsheet.h    Thu Feb 23 21:54:33 1989
  655. ***************
  656. *** 70,95 ****
  657.   extern PropertySheet* properties;
  658.   
  659.   inline void PropertySheet::Put (
  660. !     const char* path, const char* value, const char* type = nil
  661. ! ) {
  662.       DoPut(cur, path, value, type, true);
  663.   }
  664.   
  665.   inline void PropertySheet::PutLower (
  666. !     const char* path, const char* value, const char* type = nil
  667. ! ) {
  668.       DoPut(cur, path, value, type, false);
  669.   }
  670.   
  671.   inline void PropertySheet::PutLocal (
  672. !     PropDir* dir, const char* path, const char* value, const char* type = nil
  673. ! ) {
  674.       DoPut(dir, path, value, type, true);
  675.   }
  676.   
  677.   inline void PropertySheet::PutLocalLower (
  678. !     PropDir* dir, const char* path, const char* value, const char* type = nil
  679. ! ) {
  680.       DoPut(dir, path, value, type, false);
  681.   }
  682.   
  683. --- 70,91 ----
  684.   extern PropertySheet* properties;
  685.   
  686.   inline void PropertySheet::Put (
  687. !     const char* path, const char* value, const char* type) {
  688.       DoPut(cur, path, value, type, true);
  689.   }
  690.   
  691.   inline void PropertySheet::PutLower (
  692. !     const char* path, const char* value, const char* type) {
  693.       DoPut(cur, path, value, type, false);
  694.   }
  695.   
  696.   inline void PropertySheet::PutLocal (
  697. !     PropDir* dir, const char* path, const char* value, const char* type) {
  698.       DoPut(dir, path, value, type, true);
  699.   }
  700.   
  701.   inline void PropertySheet::PutLocalLower (
  702. !     PropDir* dir, const char* path, const char* value, const char* type) {
  703.       DoPut(dir, path, value, type, false);
  704.   }
  705.   
  706. diff -rc src/include/InterViews/Graphic/base.h /mit/interviews/src/include/InterViews/Graphic/base.h
  707. *** src/include/InterViews/Graphic/base.h    Tue Aug 30 02:45:05 1988
  708. --- /mit/interviews/src/include/InterViews/Graphic/base.h    Sat Feb 25 17:06:26 1989
  709. ***************
  710. *** 47,54 ****
  711.       void transform(Coord& x, Coord& y);
  712.       void transform(Coord x, Coord y, Coord& tx, Coord& ty);
  713.       void transform(float x, float y, float& tx, float& ty);
  714. -     void transformList(Coord x[], Coord y[], int n, Coord tx[], Coord ty[]);
  715. -     void transformRect(float,float,float,float,float&,float&,float&,float&);
  716.       void invTransform(Coord& tx, Coord& ty);
  717.       void invTransform(Coord tx, Coord ty, Coord& x, Coord& y);
  718.       void invTransform(float tx, float ty, float& x, float& y);
  719. --- 47,52 ----
  720. ***************
  721. *** 76,83 ****
  722.       /* provide painter-equivalent rendering functions so that users */
  723.       /* won't manipulate the painter directly */
  724.   
  725. !     boolean read(File*);
  726. !     boolean write(File*);
  727.   
  728.       virtual boolean extentCached();
  729.       virtual void uncacheExtent();
  730. --- 74,81 ----
  731.       /* provide painter-equivalent rendering functions so that users */
  732.       /* won't manipulate the painter directly */
  733.   
  734. !     boolean read(GFile*);
  735. !     boolean write(GFile*);
  736.   
  737.       virtual boolean extentCached();
  738.       virtual void uncacheExtent();
  739. ***************
  740. *** 115,120 ****
  741. --- 113,120 ----
  742.       virtual void erase(Canvas*, Graphic*);
  743.       virtual void eraseClipped(Canvas*, Coord,Coord,Coord,Coord, Graphic* gs);
  744.   public:
  745. +     void transformList(Coord x[], Coord y[], int n, Coord tx[], Coord ty[]);
  746. +     void transformRect(float,float,float,float,float&,float&,float&,float&);
  747.       ClassId GetClassId();
  748.       boolean IsA(ClassId);
  749.       Persistent* GetCluster();
  750. ***************
  751. *** 185,192 ****
  752.       Ref brush;
  753.       Ref font;
  754.   protected:
  755. !     boolean read(File*);
  756. !     boolean write(File*);
  757.   public:
  758.       ClassId GetClassId();
  759.       boolean IsA(ClassId);
  760. --- 185,192 ----
  761.       Ref brush;
  762.       Ref font;
  763.   protected:
  764. !     boolean read(GFile*);
  765. !     boolean write(GFile*);
  766.   public:
  767.       ClassId GetClassId();
  768.       boolean IsA(ClassId);
  769. diff -rc src/include/InterViews/Graphic/ellipses.h /mit/interviews/src/include/InterViews/Graphic/ellipses.h
  770. *** src/include/InterViews/Graphic/ellipses.h    Mon Aug 29 20:06:57 1988
  771. --- /mit/interviews/src/include/InterViews/Graphic/ellipses.h    Sat Feb 25 16:56:54 1989
  772. ***************
  773. *** 13,20 ****
  774.       Coord x0, y0;
  775.       int r1, r2;
  776.   
  777. !     boolean read(File*);
  778. !     boolean write(File*);
  779.   
  780.       void getExtent(float&, float&, float&, float&, float&, Graphic*);
  781.       boolean contains(PointObj&, Graphic*);
  782. --- 13,20 ----
  783.       Coord x0, y0;
  784.       int r1, r2;
  785.   
  786. !     boolean read(GFile*);
  787. !     boolean write(GFile*);
  788.   
  789.       void getExtent(float&, float&, float&, float&, float&, Graphic*);
  790.       boolean contains(PointObj&, Graphic*);
  791. diff -rc src/include/InterViews/Graphic/file.h /mit/interviews/src/include/InterViews/Graphic/file.h
  792. *** src/include/InterViews/Graphic/file.h    Fri Aug 12 14:22:36 1988
  793. --- /mit/interviews/src/include/InterViews/Graphic/file.h    Sat Feb 25 16:57:14 1989
  794. ***************
  795. *** 1,20 ****
  796.   /*
  797. !  * File encapsulates standard file operations.
  798.    */
  799.   
  800. ! #ifndef file_h
  801. ! #define file_h
  802.   
  803.   #include <stdio.h>
  804.   #include <InterViews/defs.h>
  805.   
  806. ! class File {
  807.   protected:
  808.       char* name;
  809.       FILE* fd;
  810.   public:
  811. !     File(char* filename);
  812. !     ~File();
  813.       
  814.       char* GetName();
  815.       boolean Exists();
  816. --- 1,20 ----
  817.   /*
  818. !  * GFile encapsulates standard GGFile operations.
  819.    */
  820.   
  821. ! #ifndef GFile_h
  822. ! #define GFile_h
  823.   
  824.   #include <stdio.h>
  825.   #include <InterViews/defs.h>
  826.   
  827. ! class GFile {
  828.   protected:
  829.       char* name;
  830.       FILE* fd;
  831.   public:
  832. !     GFile(char* filename);
  833. !     ~GFile();
  834.       
  835.       char* GetName();
  836.       boolean Exists();
  837. ***************
  838. *** 40,46 ****
  839.       boolean Write(char* string);
  840.       boolean Write(char* string, int count);
  841.       
  842. !     boolean SeekTo(long offset); /* offset bytes from beginning of file */
  843.       boolean SeekToBegin();
  844.       boolean SeekToEnd();
  845.   
  846. --- 40,46 ----
  847.       boolean Write(char* string);
  848.       boolean Write(char* string, int count);
  849.       
  850. !     boolean SeekTo(long offset); /* offset bytes from beginning of GFile */
  851.       boolean SeekToBegin();
  852.       boolean SeekToEnd();
  853.   
  854. diff -rc src/include/InterViews/Graphic/geomobjs.h /mit/interviews/src/include/InterViews/Graphic/geomobjs.h
  855. *** src/include/InterViews/Graphic/geomobjs.h    Mon Aug 29 20:07:05 1988
  856. --- /mit/interviews/src/include/InterViews/Graphic/geomobjs.h    Sat Feb 25 16:57:23 1989
  857. ***************
  858. *** 17,24 ****
  859.   
  860.   class PointObj : public Persistent {
  861.   protected:
  862. !     boolean read(File*);
  863. !     boolean write(File*);
  864.   public:
  865.       ClassId GetClassId();
  866.       boolean IsA(ClassId);
  867. --- 17,24 ----
  868.   
  869.   class PointObj : public Persistent {
  870.   protected:
  871. !     boolean read(GFile*);
  872. !     boolean write(GFile*);
  873.   public:
  874.       ClassId GetClassId();
  875.       boolean IsA(ClassId);
  876. ***************
  877. *** 33,40 ****
  878.   
  879.   class LineObj : public Persistent {
  880.   protected:
  881. !     boolean read(File*);
  882. !     boolean write(File*);
  883.   public:
  884.       ClassId GetClassId();
  885.       boolean IsA(ClassId);
  886. --- 33,40 ----
  887.   
  888.   class LineObj : public Persistent {
  889.   protected:
  890. !     boolean read(GFile*);
  891. !     boolean write(GFile*);
  892.   public:
  893.       ClassId GetClassId();
  894.       boolean IsA(ClassId);
  895. ***************
  896. *** 53,60 ****
  897.   
  898.   class BoxObj : public Persistent {
  899.   protected:
  900. !     boolean read(File*);
  901. !     boolean write(File*);
  902.   public:
  903.       ClassId GetClassId();
  904.       boolean IsA(ClassId);
  905. --- 53,60 ----
  906.   
  907.   class BoxObj : public Persistent {
  908.   protected:
  909. !     boolean read(GFile*);
  910. !     boolean write(GFile*);
  911.   public:
  912.       ClassId GetClassId();
  913.       boolean IsA(ClassId);
  914. ***************
  915. *** 93,100 ****
  916.       );
  917.       void CreateMultiLine(Coord* cpx, Coord* cpy, int cpcount);
  918.   
  919. !     boolean read(File*);
  920. !     boolean write(File*);
  921.   public:
  922.       ClassId GetClassId();
  923.       boolean IsA(ClassId);
  924. --- 93,100 ----
  925.       );
  926.       void CreateMultiLine(Coord* cpx, Coord* cpy, int cpcount);
  927.   
  928. !     boolean read(GFile*);
  929. !     boolean write(GFile*);
  930.   public:
  931.       ClassId GetClassId();
  932.       boolean IsA(ClassId);
  933. diff -rc src/include/InterViews/Graphic/instance.h /mit/interviews/src/include/InterViews/Graphic/instance.h
  934. *** src/include/InterViews/Graphic/instance.h    Mon Aug 29 20:07:08 1988
  935. --- /mit/interviews/src/include/InterViews/Graphic/instance.h    Sat Feb 25 16:57:31 1989
  936. ***************
  937. *** 12,19 ****
  938.       Ref refGr;
  939.       Graphic* getGraphic() { return (Graphic*) refGr(); }
  940.   
  941. !     boolean read(File*);
  942. !     boolean write(File*);
  943.   
  944.       void getExtent(float&, float&, float&, float&, float&, Graphic*);
  945.       boolean contains(PointObj&, Graphic*);
  946. --- 12,19 ----
  947.       Ref refGr;
  948.       Graphic* getGraphic() { return (Graphic*) refGr(); }
  949.   
  950. !     boolean read(GFile*);
  951. !     boolean write(GFile*);
  952.   
  953.       void getExtent(float&, float&, float&, float&, float&, Graphic*);
  954.       boolean contains(PointObj&, Graphic*);
  955. diff -rc src/include/InterViews/Graphic/label.h /mit/interviews/src/include/InterViews/Graphic/label.h
  956. *** src/include/InterViews/Graphic/label.h    Mon Aug 29 20:07:01 1988
  957. --- /mit/interviews/src/include/InterViews/Graphic/label.h    Sat Feb 25 16:57:38 1989
  958. ***************
  959. *** 12,19 ****
  960.   protected:
  961.       char* string;
  962.       int count;
  963. !     boolean read(File*);
  964. !     boolean write(File*);
  965.   
  966.       void getExtent(float&, float&, float&, float&, float&, Graphic*);
  967.       boolean contains(PointObj&, Graphic*);
  968. --- 12,19 ----
  969.   protected:
  970.       char* string;
  971.       int count;
  972. !     boolean read(GFile*);
  973. !     boolean write(GFile*);
  974.   
  975.       void getExtent(float&, float&, float&, float&, float&, Graphic*);
  976.       boolean contains(PointObj&, Graphic*);
  977. diff -rc src/include/InterViews/Graphic/lines.h /mit/interviews/src/include/InterViews/Graphic/lines.h
  978. *** src/include/InterViews/Graphic/lines.h    Mon Aug 29 20:07:11 1988
  979. --- /mit/interviews/src/include/InterViews/Graphic/lines.h    Sat Feb 25 17:28:59 1989
  980. ***************
  981. *** 12,19 ****
  982.   protected:
  983.       Coord x, y;
  984.   
  985. !     boolean read(File*);
  986. !     boolean write(File*);
  987.   
  988.       void getExtent(float&, float&, float&, float&, float&, Graphic*);
  989.       boolean contains(PointObj&, Graphic*);
  990. --- 12,19 ----
  991.   protected:
  992.       Coord x, y;
  993.   
  994. !     boolean read(GFile*);
  995. !     boolean write(GFile*);
  996.   
  997.       void getExtent(float&, float&, float&, float&, float&, Graphic*);
  998.       boolean contains(PointObj&, Graphic*);
  999. ***************
  1000. *** 38,45 ****
  1001.   protected:
  1002.       Coord x0, y0, x1, y1;
  1003.   
  1004. !     boolean read(File*);
  1005. !     boolean write(File*);
  1006.   
  1007.       void getExtent(float&, float&, float&, float&, float&, Graphic*);
  1008.       boolean contains(PointObj&, Graphic*);
  1009. --- 38,45 ----
  1010.   protected:
  1011.       Coord x0, y0, x1, y1;
  1012.   
  1013. !     boolean read(GFile*);
  1014. !     boolean write(GFile*);
  1015.   
  1016.       void getExtent(float&, float&, float&, float&, float&, Graphic*);
  1017.       boolean contains(PointObj&, Graphic*);
  1018. ***************
  1019. *** 66,73 ****
  1020.       Coord* x, *y;
  1021.       int count;
  1022.   
  1023. !     boolean read(File*);
  1024. !     boolean write(File*);
  1025.   
  1026.       boolean extentCached();
  1027.       void cacheExtent(float, float, float, float, float);
  1028. --- 66,73 ----
  1029.       Coord* x, *y;
  1030.       int count;
  1031.   
  1032. !     boolean read(GFile*);
  1033. !     boolean write(GFile*);
  1034.   
  1035.       boolean extentCached();
  1036.       void cacheExtent(float, float, float, float, float);
  1037. diff -rc src/include/InterViews/Graphic/objman.h /mit/interviews/src/include/InterViews/Graphic/objman.h
  1038. *** src/include/InterViews/Graphic/objman.h    Mon Aug 29 20:07:15 1988
  1039. --- /mit/interviews/src/include/InterViews/Graphic/objman.h    Sat Feb 25 17:34:41 1989
  1040. ***************
  1041. *** 9,15 ****
  1042.   #include <InterViews/defs.h>
  1043.   
  1044.   class Cache;
  1045. ! class File;
  1046.   class Ref;
  1047.   class RefList;
  1048.   
  1049. --- 9,15 ----
  1050.   #include <InterViews/defs.h>
  1051.   
  1052.   class Cache;
  1053. ! class GFile;
  1054.   class Ref;
  1055.   class RefList;
  1056.   
  1057. ***************
  1058. *** 32,38 ****
  1059.   
  1060.       char filename [NAMESIZE];   /* we'll gag if names get too big */
  1061.       Cache* objCache;
  1062. !     File* objMap, *objStore;
  1063.   
  1064.       RefList* root;
  1065.   
  1066. --- 32,38 ----
  1067.   
  1068.       char filename [NAMESIZE];   /* we'll gag if names get too big */
  1069.       Cache* objCache;
  1070. !     GFile* objMap, *objStore;
  1071.   
  1072.       RefList* root;
  1073.   
  1074. ***************
  1075. *** 39,46 ****
  1076.       ObjOffset getOffset(UID uid) { return (uid >> 1) * sizeof(ObjOffset); }
  1077.       boolean seek(UID uid);    /* moves to proper position in objStore */
  1078.       UID nextUID() { return lastuid += 2; }
  1079. !     boolean read(File*);
  1080. !     boolean write(File*);
  1081.   public:
  1082.       ClassId GetClassId();
  1083.       boolean IsA(ClassId);
  1084. --- 39,46 ----
  1085.       ObjOffset getOffset(UID uid) { return (uid >> 1) * sizeof(ObjOffset); }
  1086.       boolean seek(UID uid);    /* moves to proper position in objStore */
  1087.       UID nextUID() { return lastuid += 2; }
  1088. !     boolean read(GFile*);
  1089. !     boolean write(GFile*);
  1090.   public:
  1091.       ClassId GetClassId();
  1092.       boolean IsA(ClassId);
  1093. diff -rc src/include/InterViews/Graphic/persistent.h /mit/interviews/src/include/InterViews/Graphic/persistent.h
  1094. *** src/include/InterViews/Graphic/persistent.h    Mon Aug 29 20:07:22 1988
  1095. --- /mit/interviews/src/include/InterViews/Graphic/persistent.h    Sat Feb 25 16:58:44 1989
  1096. ***************
  1097. *** 14,20 ****
  1098.   
  1099.   extern ObjectMan* TheManager;        /* the well-known global object manager */
  1100.   
  1101. ! class File;
  1102.   
  1103.   typedef unsigned UID;
  1104.   #define INVALIDUID    1
  1105. --- 14,20 ----
  1106.   
  1107.   extern ObjectMan* TheManager;        /* the well-known global object manager */
  1108.   
  1109. ! class GFile;
  1110.   
  1111.   typedef unsigned UID;
  1112.   #define INVALIDUID    1
  1113. ***************
  1114. *** 31,40 ****
  1115.       void Panic(const char*);
  1116.       void Fatal(const char*);
  1117.   
  1118. !     virtual boolean write(File*);
  1119. !     virtual boolean read(File*);
  1120. !     virtual boolean writeObjects(File*);
  1121. !     virtual boolean readObjects(File*);
  1122.       virtual boolean initialize();
  1123.   public:
  1124.       virtual ClassId GetClassId();
  1125. --- 31,40 ----
  1126.       void Panic(const char*);
  1127.       void Fatal(const char*);
  1128.   
  1129. !     virtual boolean write(GFile*);
  1130. !     virtual boolean read(GFile*);
  1131. !     virtual boolean writeObjects(GFile*);
  1132. !     virtual boolean readObjects(GFile*);
  1133.       virtual boolean initialize();
  1134.   public:
  1135.       virtual ClassId GetClassId();
  1136. diff -rc src/include/InterViews/Graphic/picture.h /mit/interviews/src/include/InterViews/Graphic/picture.h
  1137. *** src/include/InterViews/Graphic/picture.h    Mon Aug 29 20:07:18 1988
  1138. --- /mit/interviews/src/include/InterViews/Graphic/picture.h    Sat Feb 25 16:59:00 1989
  1139. ***************
  1140. *** 15,24 ****
  1141.       RefList* refList, *cur;
  1142.       Graphic* getGraphic(RefList* r) { return (Graphic*) (*r)(); }
  1143.   
  1144. !     boolean read(File*);
  1145. !     boolean write(File*);
  1146. !     boolean readObjects(File*);
  1147. !     boolean writeObjects(File*);
  1148.       
  1149.       boolean extentCached();
  1150.       void cacheExtent(float, float, float, float, float);
  1151. --- 15,24 ----
  1152.       RefList* refList, *cur;
  1153.       Graphic* getGraphic(RefList* r) { return (Graphic*) (*r)(); }
  1154.   
  1155. !     boolean read(GFile*);
  1156. !     boolean write(GFile*);
  1157. !     boolean readObjects(GFile*);
  1158. !     boolean writeObjects(GFile*);
  1159.       
  1160.       boolean extentCached();
  1161.       void cacheExtent(float, float, float, float, float);
  1162. diff -rc src/include/InterViews/Graphic/polygons.h /mit/interviews/src/include/InterViews/Graphic/polygons.h
  1163. *** src/include/InterViews/Graphic/polygons.h    Mon Aug 29 20:07:31 1988
  1164. --- /mit/interviews/src/include/InterViews/Graphic/polygons.h    Sat Feb 25 16:59:11 1989
  1165. ***************
  1166. *** 12,19 ****
  1167.       Ref patbr;
  1168.       Coord x0, y0, x1, y1;
  1169.   
  1170. !     boolean read(File*);
  1171. !     boolean write(File*);
  1172.   
  1173.       void getExtent(float&, float&, float&, float&, float&, Graphic*);
  1174.       boolean contains(PointObj&, Graphic*);
  1175. --- 12,19 ----
  1176.       Ref patbr;
  1177.       Coord x0, y0, x1, y1;
  1178.   
  1179. !     boolean read(GFile*);
  1180. !     boolean write(GFile*);
  1181.   
  1182.       void getExtent(float&, float&, float&, float&, float&, Graphic*);
  1183.       boolean contains(PointObj&, Graphic*);
  1184. diff -rc src/include/InterViews/Graphic/ppaint.h /mit/interviews/src/include/InterViews/Graphic/ppaint.h
  1185. *** src/include/InterViews/Graphic/ppaint.h    Mon Aug 29 20:07:26 1988
  1186. --- /mit/interviews/src/include/InterViews/Graphic/ppaint.h    Sat Feb 25 16:59:20 1989
  1187. ***************
  1188. *** 16,23 ****
  1189.   class PColor : public Persistent {
  1190.   protected:
  1191.       Color* value;
  1192. !     boolean read(File*);
  1193. !     boolean write(File*);
  1194.   public:
  1195.       ClassId GetClassId();
  1196.       boolean IsA(ClassId);
  1197. --- 16,23 ----
  1198.   class PColor : public Persistent {
  1199.   protected:
  1200.       Color* value;
  1201. !     boolean read(GFile*);
  1202. !     boolean write(GFile*);
  1203.   public:
  1204.       ClassId GetClassId();
  1205.       boolean IsA(ClassId);
  1206. ***************
  1207. *** 40,47 ****
  1208.   protected:
  1209.       int data [patternHeight];
  1210.       Pattern* value;
  1211. !     boolean read(File*);
  1212. !     boolean write(File*);
  1213.   public:
  1214.       ClassId GetClassId();
  1215.       boolean IsA(ClassId);
  1216. --- 40,47 ----
  1217.   protected:
  1218.       int data [patternHeight];
  1219.       Pattern* value;
  1220. !     boolean read(GFile*);
  1221. !     boolean write(GFile*);
  1222.   public:
  1223.       ClassId GetClassId();
  1224.       boolean IsA(ClassId);
  1225. ***************
  1226. *** 61,68 ****
  1227.   protected:
  1228.       int p;
  1229.       Brush* value;
  1230. !     boolean read(File*);
  1231. !     boolean write(File*);
  1232.   public:
  1233.       ClassId GetClassId();
  1234.       boolean IsA(ClassId);
  1235. --- 61,68 ----
  1236.   protected:
  1237.       int p;
  1238.       Brush* value;
  1239. !     boolean read(GFile*);
  1240. !     boolean write(GFile*);
  1241.   public:
  1242.       ClassId GetClassId();
  1243.       boolean IsA(ClassId);
  1244. ***************
  1245. *** 81,88 ****
  1246.       char* name;
  1247.       int count;
  1248.       Font* value;
  1249. !     boolean read(File*);
  1250. !     boolean write(File*);
  1251.   public:
  1252.       ClassId GetClassId();
  1253.       boolean IsA(ClassId);
  1254. --- 81,88 ----
  1255.       char* name;
  1256.       int count;
  1257.       Font* value;
  1258. !     boolean read(GFile*);
  1259. !     boolean write(GFile*);
  1260.   public:
  1261.       ClassId GetClassId();
  1262.       boolean IsA(ClassId);
  1263. diff -rc src/include/InterViews/Graphic/ref.h /mit/interviews/src/include/InterViews/Graphic/ref.h
  1264. *** src/include/InterViews/Graphic/ref.h    Fri Aug 12 14:22:57 1988
  1265. --- /mit/interviews/src/include/InterViews/Graphic/ref.h    Sat Feb 25 16:59:44 1989
  1266. ***************
  1267. *** 49,58 ****
  1268.       boolean operator==(Ref r);
  1269.       boolean operator!=(Ref r);
  1270.   
  1271. !     boolean Write(File*);        /* write uid + cluster bit */
  1272. !     boolean Read(File*);        /* read uid + cluster bit */
  1273. !     boolean WriteObjects(File*);    /* write object if not head of a cluster */
  1274. !     boolean ReadObjects(File*);        /* read object if not head of a cluster */
  1275.   };
  1276.   
  1277.   inline boolean Ref::inMemory () {
  1278. --- 49,58 ----
  1279.       boolean operator==(Ref r);
  1280.       boolean operator!=(Ref r);
  1281.   
  1282. !     boolean Write(GFile*);        /* write uid + cluster bit */
  1283. !     boolean Read(GFile*);        /* read uid + cluster bit */
  1284. !     boolean WriteObjects(GFile*);    /* write object if not head of a cluster */
  1285. !     boolean ReadObjects(GFile*);        /* read object if not head of a cluster */
  1286.   };
  1287.   
  1288.   inline boolean Ref::inMemory () {
  1289. ***************
  1290. *** 105,120 ****
  1291.       return ! (*this == r);
  1292.   }
  1293.   
  1294. ! inline boolean Ref::Write (File* f) {
  1295.       unref();
  1296.       return f->Write(uid);
  1297.   }
  1298.   
  1299. ! inline boolean Ref::Read (File* f) {
  1300.       return f->Read(uid);
  1301.   }
  1302.   
  1303. ! inline boolean Ref::WriteObjects (File* f) {
  1304.       if (isCluster()) {
  1305.       return true;        /* if it's the head of a cluster, we're not */
  1306.                   /* responsible for writing it out */
  1307. --- 105,120 ----
  1308.       return ! (*this == r);
  1309.   }
  1310.   
  1311. ! inline boolean Ref::Write (GFile* f) {
  1312.       unref();
  1313.       return f->Write(uid);
  1314.   }
  1315.   
  1316. ! inline boolean Ref::Read (GFile* f) {
  1317.       return f->Read(uid);
  1318.   }
  1319.   
  1320. ! inline boolean Ref::WriteObjects (GFile* f) {
  1321.       if (isCluster()) {
  1322.       return true;        /* if it's the head of a cluster, we're not */
  1323.                   /* responsible for writing it out */
  1324. ***************
  1325. *** 127,133 ****
  1326.       return true;
  1327.   }
  1328.   
  1329. ! inline boolean Ref::ReadObjects (File*) {
  1330.       if (!isCluster()) {
  1331.       (void*) refObjects();
  1332.       }
  1333. --- 127,133 ----
  1334.       return true;
  1335.   }
  1336.   
  1337. ! inline boolean Ref::ReadObjects (GFile*) {
  1338.       if (!isCluster()) {
  1339.       (void*) refObjects();
  1340.       }
  1341. diff -rc src/include/InterViews/Graphic/reflist.h /mit/interviews/src/include/InterViews/Graphic/reflist.h
  1342. *** src/include/InterViews/Graphic/reflist.h    Fri Aug 12 14:22:59 1988
  1343. --- /mit/interviews/src/include/InterViews/Graphic/reflist.h    Sat Feb 25 16:59:56 1989
  1344. ***************
  1345. *** 33,42 ****
  1346.       RefList* Next() { return next; }
  1347.       RefList* Prev() { return prev; }
  1348.   
  1349. !     boolean Write(File*);
  1350. !     boolean Read(File*);
  1351. !     boolean WriteObjects(File*);
  1352. !     boolean ReadObjects(File*);
  1353.   
  1354.       RefList* operator[](int count);
  1355.   };
  1356. --- 33,42 ----
  1357.       RefList* Next() { return next; }
  1358.       RefList* Prev() { return prev; }
  1359.   
  1360. !     boolean Write(GFile*);
  1361. !     boolean Read(GFile*);
  1362. !     boolean WriteObjects(GFile*);
  1363. !     boolean ReadObjects(GFile*);
  1364.   
  1365.       RefList* operator[](int count);
  1366.   };
  1367. diff -rc src/include/InterViews/Graphic/util.h /mit/interviews/src/include/InterViews/Graphic/util.h
  1368. *** src/include/InterViews/Graphic/util.h    Fri Aug 12 14:23:02 1988
  1369. --- /mit/interviews/src/include/InterViews/Graphic/util.h    Fri Feb 24 15:48:31 1989
  1370. ***************
  1371. *** 8,14 ****
  1372.   #include <math.h>
  1373.   #include <InterViews/defs.h>
  1374.   
  1375. ! extern void bcopy(void*, void*, int);
  1376.   
  1377.   inline float fmax(float a, float b) { return (a >= b) ? a : b; }
  1378.   inline float fmin(float a, float b) { return (a >= b) ? b : a; }
  1379. --- 8,16 ----
  1380.   #include <math.h>
  1381.   #include <InterViews/defs.h>
  1382.   
  1383. ! #ifndef __GNUG__
  1384. ! extern "C" void bcopy(void*, void*, int);
  1385. ! #endif
  1386.   
  1387.   inline float fmax(float a, float b) { return (a >= b) ? a : b; }
  1388.   inline float fmin(float a, float b) { return (a >= b) ? b : a; }
  1389. ***************
  1390. *** 30,39 ****
  1391.       return sqrt(float(square(x0 - x1) + square(y0 - y1)));
  1392.   }
  1393.   
  1394. ! inline void CopyArray (Coord* x, Coord* y, int n, Coord* newx, Coord* newy) {
  1395.       bcopy(x, newx, n * sizeof(Coord));
  1396.       bcopy(y, newy, n * sizeof(Coord));
  1397.   }
  1398.   
  1399.   inline void Midpoint (
  1400.       double x0, double y0, double x1, double y1, double& mx, double& my
  1401. --- 32,44 ----
  1402.       return sqrt(float(square(x0 - x1) + square(y0 - y1)));
  1403.   }
  1404.   
  1405. ! /*inline void CopyArray (Coord* x, Coord* y, int n, Coord* newx, Coord* newy) {
  1406.       bcopy(x, newx, n * sizeof(Coord));
  1407.       bcopy(y, newy, n * sizeof(Coord));
  1408.   }
  1409. + */
  1410. + #define CopyArray(x,y,n,newx,newy) do {bcopy(x,newx,n*sizeof(Coord));bcopy(y,newy,n*sizeof(Coord));} while(0)
  1411.   
  1412.   inline void Midpoint (
  1413.       double x0, double y0, double x1, double y1, double& mx, double& my
  1414. diff -rc src/include/InterViews/Text/stringedit.h /mit/interviews/src/include/InterViews/Text/stringedit.h
  1415. *** src/include/InterViews/Text/stringedit.h    Sat Sep  3 14:58:25 1988
  1416. --- /mit/interviews/src/include/InterViews/Text/stringedit.h    Fri Feb 24 17:24:23 1989
  1417. ***************
  1418. *** 18,24 ****
  1419.   public:
  1420.       StringEdit(const char* sample, int border = 3);
  1421.       StringEdit(const char* name, const char* sample, int border = 3);
  1422. !     StringEdit(const char* sample, Painter * = stdpaint, int border = 3);
  1423.   
  1424.       void Extra(int);
  1425.       void Flash(int);
  1426. --- 18,24 ----
  1427.   public:
  1428.       StringEdit(const char* sample, int border = 3);
  1429.       StringEdit(const char* name, const char* sample, int border = 3);
  1430. !     StringEdit(const char* sample, Painter *, int border = 3);
  1431.   
  1432.       void Extra(int);
  1433.       void Flash(int);
  1434. diff -rc src/include/InterViews/Text/text.h /mit/interviews/src/include/InterViews/Text/text.h
  1435. *** src/include/InterViews/Text/text.h    Mon Jun 13 12:55:31 1988
  1436. --- /mit/interviews/src/include/InterViews/Text/text.h    Thu Feb 23 21:57:32 1989
  1437. ***************
  1438. *** 16,31 ****
  1439.   class Text {
  1440.   friend class Layout;
  1441.   protected:
  1442.       void * context;
  1443.       Composition * parent;
  1444.       Text * next;
  1445. -     int size;
  1446.       virtual boolean Overflows( Layout * );
  1447.       virtual void Draw( Layout * ) { }
  1448. -     virtual void Locate( Coord &x1, Coord &y1, Coord &x2, Coord &y2 );
  1449. -     virtual void Undraw();
  1450. - public:
  1451.       Text( void * context=SELF );
  1452.       ~Text();
  1453.       virtual Text * Copy() { return nil; }
  1454. --- 16,30 ----
  1455.   class Text {
  1456.   friend class Layout;
  1457.   protected:
  1458. +     virtual void Locate( Coord &x1, Coord &y1, Coord &x2, Coord &y2 );
  1459. +     virtual void Undraw();
  1460. + public:
  1461.       void * context;
  1462. +     int size;
  1463.       Composition * parent;
  1464.       Text * next;
  1465.       virtual boolean Overflows( Layout * );
  1466.       virtual void Draw( Layout * ) { }
  1467.       Text( void * context=SELF );
  1468.       ~Text();
  1469.       virtual Text * Copy() { return nil; }
  1470. diff -rc src/include/InterViews/X11/Xlib.h /mit/interviews/src/include/InterViews/X11/Xlib.h
  1471. *** src/include/InterViews/X11/Xlib.h    Wed Jul 27 00:37:31 1988
  1472. --- /mit/interviews/src/include/InterViews/X11/Xlib.h    Thu Feb 23 21:57:54 1989
  1473. ***************
  1474. *** 203,208 ****
  1475. --- 203,211 ----
  1476.    * Xlib operations.
  1477.    */
  1478.   
  1479. + #ifndef __GNUG__
  1480. + extern "C" {
  1481. + #endif
  1482.   Display* XOpenDisplay(const char*);
  1483.   char* XDisplayName(Display*);
  1484.   void XCloseDisplay(Display*);
  1485. ***************
  1486. *** 579,582 ****
  1487. --- 582,588 ----
  1488.       Display*, KeySym, KeySym[], int, unsigned char*, int nbytes
  1489.   );
  1490.   
  1491. + #ifndef __GNUG__
  1492. + } // extern "C"
  1493. + #endif
  1494.   #endif
  1495. diff -rc src/include/InterViews/X11/Xutil.h /mit/interviews/src/include/InterViews/X11/Xutil.h
  1496. *** src/include/InterViews/X11/Xutil.h    Fri Jul  8 16:25:25 1988
  1497. --- /mit/interviews/src/include/InterViews/X11/Xutil.h    Thu Feb 23 21:58:02 1989
  1498. ***************
  1499. *** 37,42 ****
  1500. --- 37,45 ----
  1501.   #undef delete
  1502.   #undef virtual
  1503.   
  1504. + #ifndef __GNUG__
  1505. + extern "C" {
  1506. + #endif
  1507.   void XGetSizeHints(Display*, Window, XSizeHints&, Atom);
  1508.   void XSetSizeHints(Display*, Window, XSizeHints&, Atom);
  1509.   
  1510. ***************
  1511. *** 66,69 ****
  1512. --- 69,75 ----
  1513.       unsigned long, int format
  1514.   );
  1515.   
  1516. + #ifndef __GNUG__
  1517. + } // extern "C"
  1518. + #endif
  1519.   #endif
  1520. diff -rc src/libInterViews/X11-graphics.c /mit/interviews/src/libInterViews/X11-graphics.c
  1521. *** src/libInterViews/X11-graphics.c    Sat Sep 10 05:02:28 1988
  1522. --- /mit/interviews/src/libInterViews/X11-graphics.c    Thu Feb 23 21:53:20 1989
  1523. ***************
  1524. *** 56,72 ****
  1525.       return (data[Index(x, y)] & Bit(x, y)) != 0;
  1526.   }
  1527.   
  1528. ! Bitmap::Bitmap (const char* filename) {
  1529. !     extern int XReadBitmapFile(
  1530.       Display*, Drawable, const char*,
  1531. !     int& width, int& height, Pixmap&,
  1532.       int* x_hot, int* y_hot
  1533.       );
  1534.   
  1535.       Init();
  1536.       XReadBitmapFile(
  1537.       _World_dpy, _World_root, filename, width, height,
  1538. !     (Pixmap)pixmap, nil, nil
  1539.       );
  1540.   }
  1541.   
  1542. --- 56,78 ----
  1543.       return (data[Index(x, y)] & Bit(x, y)) != 0;
  1544.   }
  1545.   
  1546. ! #ifndef __GNUG__
  1547. ! extern "C" {
  1548. ! #endif
  1549. !     int XReadBitmapFile(
  1550.       Display*, Drawable, const char*,
  1551. !     int& width, int& height, Pixmap*,
  1552.       int* x_hot, int* y_hot
  1553.       );
  1554. + #ifndef __GNUG__
  1555. + }
  1556. + #endif
  1557.   
  1558. + Bitmap::Bitmap (const char* filename) {
  1559.       Init();
  1560.       XReadBitmapFile(
  1561.       _World_dpy, _World_root, filename, width, height,
  1562. !     (Pixmap)&pixmap, nil, nil
  1563.       );
  1564.   }
  1565.   
  1566. ***************
  1567. *** 106,112 ****
  1568.    * class Brush
  1569.    */
  1570.   
  1571. ! static Pixmap MakeStipple(int[patternHeight]);
  1572.   
  1573.   Brush::Brush (int p, int w) {
  1574.       int r[patternHeight];
  1575. --- 112,118 ----
  1576.    * class Brush
  1577.    */
  1578.   
  1579. ! static Pixmap MakeStipple(int *);
  1580.   
  1581.   Brush::Brush (int p, int w) {
  1582.       int r[patternHeight];
  1583. ***************
  1584. *** 184,190 ****
  1585.       src++, dst++
  1586.       ) {
  1587.       if (isupper(*src)) {
  1588. !         *dst = _tolower(*src);
  1589.       } else {
  1590.           *dst = *src;
  1591.       }
  1592. --- 190,196 ----
  1593.       src++, dst++
  1594.       ) {
  1595.       if (isupper(*src)) {
  1596. !         *dst = tolower(*src);
  1597.       } else {
  1598.           *dst = *src;
  1599.       }
  1600. ***************
  1601. *** 197,203 ****
  1602.       } else if (strcmp(colorname, "white") == 0) {
  1603.       c.pixel = WhitePixel(_World_dpy, _World_screen);
  1604.       XQueryColor(_World_dpy, _World_cmap, c);
  1605. !     } else if (!XLookupColor(_World_dpy, _World_cmap, name, c, exact)) {
  1606.       pixel = -1;
  1607.       return;
  1608.       }
  1609. --- 203,211 ----
  1610.       } else if (strcmp(colorname, "white") == 0) {
  1611.       c.pixel = WhitePixel(_World_dpy, _World_screen);
  1612.       XQueryColor(_World_dpy, _World_cmap, c);
  1613. !     } else if (XAllocNamedColor(_World_dpy, _World_cmap, name, c, exact)) {
  1614. !     allocated = true;
  1615. !     } else {
  1616.       pixel = -1;
  1617.       return;
  1618.       }
  1619. ***************
  1620. *** 614,619 ****
  1621. --- 622,634 ----
  1622.       XSetPlaneMask(_World_dpy, rep->gc, m);
  1623.   }
  1624.   
  1625. + void Painter::Map (Canvas* c, Coord x, Coord y, short& sx, short& sy) {
  1626. +     Coord mx = sx, my = sy;
  1627. +     Map(c, x, y, mx, my);
  1628. +     sx = mx; sy = my;
  1629. + }
  1630.   void Painter::Map (Canvas* c, Coord x, Coord y, Coord& mx, Coord& my) {
  1631.       if (matrix == nil) {
  1632.       mx = x; my = y;
  1633. ***************
  1634. *** 727,733 ****
  1635.   
  1636.       v = AllocPts(n);
  1637.       for (i = 0; i < n; i++) {
  1638. !     Map(c, x[i], y[i], v[i].x, v[i].y);
  1639.       }
  1640.       XDrawPoints(_World_dpy, (Drawable)c->id, rep->gc, v, n, CoordModeOrigin);
  1641.       FreePts(v);
  1642. --- 742,748 ----
  1643.   
  1644.       v = AllocPts(n);
  1645.       for (i = 0; i < n; i++) {
  1646. !     Map(c, x[i], y[i], (short &) v[i].x, (short &) v[i].y);
  1647.       }
  1648.       XDrawPoints(_World_dpy, (Drawable)c->id, rep->gc, v, n, CoordModeOrigin);
  1649.       FreePts(v);
  1650. ***************
  1651. *** 738,744 ****
  1652.   
  1653.       Map(c, x1, y1, mx1, my1);
  1654.       Map(c, x2, y2, mx2, my2);
  1655. !     rep->Prepare(PaintLines, br->info, single->info);
  1656.       XDrawLine(_World_dpy, (Drawable)c->id, rep->gc, mx1, my1, mx2, my2);
  1657.   }
  1658.   
  1659. --- 753,759 ----
  1660.   
  1661.       Map(c, x1, y1, mx1, my1);
  1662.       Map(c, x2, y2, mx2, my2);
  1663. !     rep->Prepare(PaintLines, br->info, Bsingle->info);
  1664.       XDrawLine(_World_dpy, (Drawable)c->id, rep->gc, mx1, my1, mx2, my2);
  1665.   }
  1666.   
  1667. ***************
  1668. *** 765,771 ****
  1669.       }
  1670.       w = right - left;
  1671.       h = bottom - top;
  1672. !     rep->Prepare(PaintLines, br->info, single->info);
  1673.       XDrawRectangle(_World_dpy, (Drawable)c->id, rep->gc, left, top, w, h);
  1674.       }
  1675.   }
  1676. --- 780,786 ----
  1677.       }
  1678.       w = right - left;
  1679.       h = bottom - top;
  1680. !     rep->Prepare(PaintLines, br->info, Bsingle->info);
  1681.       XDrawRectangle(_World_dpy, (Drawable)c->id, rep->gc, left, top, w, h);
  1682.       }
  1683.   }
  1684. ***************
  1685. *** 815,821 ****
  1686.   
  1687.       Map(c, x-r, y+r, left, top);
  1688.       int d = r+r;
  1689. !     rep->Prepare(PaintLines, br->info, single->info);
  1690.       XDrawArc(
  1691.           _World_dpy, (Drawable)c->id, rep->gc, left, top, d, d, 0, 360*64
  1692.       );
  1693. --- 830,836 ----
  1694.   
  1695.       Map(c, x-r, y+r, left, top);
  1696.       int d = r+r;
  1697. !     rep->Prepare(PaintLines, br->info, Bsingle->info);
  1698.       XDrawArc(
  1699.           _World_dpy, (Drawable)c->id, rep->gc, left, top, d, d, 0, 360*64
  1700.       );
  1701. ***************
  1702. *** 845,851 ****
  1703.       for (i = 0; i < n; i++) {
  1704.       Map(c, x[i], y[i], v[i].x, v[i].y);
  1705.       }
  1706. !     rep->Prepare(PaintLines, br->info, single->info);
  1707.       XDrawLines(_World_dpy, (Drawable)c->id, rep->gc, v, n, CoordModeOrigin);
  1708.       FreePts(v);
  1709.   }
  1710. --- 860,866 ----
  1711.       for (i = 0; i < n; i++) {
  1712.       Map(c, x[i], y[i], v[i].x, v[i].y);
  1713.       }
  1714. !     rep->Prepare(PaintLines, br->info, Bsingle->info);
  1715.       XDrawLines(_World_dpy, (Drawable)c->id, rep->gc, v, n, CoordModeOrigin);
  1716.       FreePts(v);
  1717.   }
  1718. ***************
  1719. *** 859,865 ****
  1720.       v[i].x = x[i];
  1721.       v[i].y = y[i];
  1722.       }
  1723. !     rep->Prepare(PaintLines, br->info, single->info);
  1724.       XDrawLines(_World_dpy, (Drawable)c->id, rep->gc, v, n, CoordModeOrigin);
  1725.       FreePts(v);
  1726.   }
  1727. --- 874,880 ----
  1728.       v[i].x = x[i];
  1729.       v[i].y = y[i];
  1730.       }
  1731. !     rep->Prepare(PaintLines, br->info, Bsingle->info);
  1732.       XDrawLines(_World_dpy, (Drawable)c->id, rep->gc, v, n, CoordModeOrigin);
  1733.       FreePts(v);
  1734.   }
  1735. ***************
  1736. *** 876,882 ****
  1737.       v[i] = v[0];
  1738.       ++i;
  1739.       }
  1740. !     rep->Prepare(PaintLines, br->info, single->info);
  1741.       XDrawLines(_World_dpy, (Drawable)c->id, rep->gc, v, i, CoordModeOrigin);
  1742.       FreePts(v);
  1743.   }
  1744. --- 891,897 ----
  1745.       v[i] = v[0];
  1746.       ++i;
  1747.       }
  1748. !     rep->Prepare(PaintLines, br->info, Bsingle->info);
  1749.       XDrawLines(_World_dpy, (Drawable)c->id, rep->gc, v, i, CoordModeOrigin);
  1750.       FreePts(v);
  1751.   }
  1752. ***************
  1753. *** 985,991 ****
  1754.       return XCreateBitmapFromData(_World_dpy, _World_root, data, 32, 32);
  1755.   }
  1756.   
  1757. ! Pattern::Pattern (int p[patternHeight]) {
  1758.       info = (void*)MakeStipple(p);
  1759.   }
  1760.   
  1761. --- 1000,1006 ----
  1762.       return XCreateBitmapFromData(_World_dpy, _World_root, data, 32, 32);
  1763.   }
  1764.   
  1765. ! Pattern::Pattern (int *p) {
  1766.       info = (void*)MakeStipple(p);
  1767.   }
  1768.   
  1769. diff -rc src/libInterViews/X11-windows.c /mit/interviews/src/libInterViews/X11-windows.c
  1770. *** src/libInterViews/X11-windows.c    Fri Sep  2 03:15:46 1988
  1771. --- /mit/interviews/src/libInterViews/X11-windows.c    Thu Feb 23 21:53:27 1989
  1772. ***************
  1773. *** 78,84 ****
  1774.           case NoExpose:
  1775.           return;
  1776.           case Expose:
  1777. !         if (assocTable->Find(i, xe.xexpose.window)) {
  1778.               i->Redraw(
  1779.               xe.xexpose.x,
  1780.               height - xe.xexpose.y - xe.xexpose.height,
  1781. --- 78,84 ----
  1782.           case NoExpose:
  1783.           return;
  1784.           case Expose:
  1785. !         if (assocTable->Find((TableValue &)i, xe.xexpose.window)) {
  1786.               i->Redraw(
  1787.               xe.xexpose.x,
  1788.               height - xe.xexpose.y - xe.xexpose.height,
  1789. ***************
  1790. *** 88,94 ****
  1791.           }
  1792.           break;
  1793.           case GraphicsExpose:
  1794. !         if (assocTable->Find(i, xe.xgraphicsexpose.drawable)) {
  1795.               i->Redraw(
  1796.               xe.xgraphicsexpose.x,
  1797.               height - xe.xgraphicsexpose.y -
  1798. --- 88,94 ----
  1799.           }
  1800.           break;
  1801.           case GraphicsExpose:
  1802. !         if (assocTable->Find((TableValue &)i, xe.xgraphicsexpose.drawable)) {
  1803.               i->Redraw(
  1804.               xe.xgraphicsexpose.x,
  1805.               height - xe.xgraphicsexpose.y -
  1806. ***************
  1807. *** 183,189 ****
  1808.       XNextEvent(_World_dpy, xe);
  1809.       switch (xe.type) {
  1810.       case Expose:
  1811. !         if (assocTable->Find(i, xe.xexpose.window)) {
  1812.           i->SendRedraw(
  1813.               xe.xexpose.x, xe.xexpose.y,
  1814.               xe.xexpose.width, xe.xexpose.height, xe.xexpose.count
  1815. --- 183,189 ----
  1816.       XNextEvent(_World_dpy, xe);
  1817.       switch (xe.type) {
  1818.       case Expose:
  1819. !         if (assocTable->Find((TableValue &)i, xe.xexpose.window)) {
  1820.           i->SendRedraw(
  1821.               xe.xexpose.x, xe.xexpose.y,
  1822.               xe.xexpose.width, xe.xexpose.height, xe.xexpose.count
  1823. ***************
  1824. *** 191,197 ****
  1825.           }
  1826.           return false;
  1827.       case ConfigureNotify:
  1828. !         if (assocTable->Find(i, xe.xconfigure.window)) {
  1829.           i->SendResize(
  1830.               xe.xconfigure.x, xe.xconfigure.y,
  1831.               xe.xconfigure.width, xe.xconfigure.height
  1832. --- 191,197 ----
  1833.           }
  1834.           return false;
  1835.       case ConfigureNotify:
  1836. !         if (assocTable->Find((TableValue &)i, xe.xconfigure.window)) {
  1837.           i->SendResize(
  1838.               xe.xconfigure.x, xe.xconfigure.y,
  1839.               xe.xconfigure.width, xe.xconfigure.height
  1840. ***************
  1841. *** 241,247 ****
  1842.           return false;
  1843.       }
  1844.       /* only input events should get here */
  1845. !     if (!assocTable->Find(i, w) ||
  1846.       i->cursensor == nil || !i->cursensor->Interesting(&xe, e)
  1847.       ) {
  1848.       return false;
  1849. --- 241,247 ----
  1850.           return false;
  1851.       }
  1852.       /* only input events should get here */
  1853. !     if (!assocTable->Find((TableValue &)i, w) ||
  1854.       i->cursensor == nil || !i->cursensor->Interesting(&xe, e)
  1855.       ) {
  1856.       return false;
  1857. ***************
  1858. *** 354,360 ****
  1859.       );
  1860.       e.x = x;
  1861.       e.y = ymax - y;
  1862. !     if (!assocTable->Find(e.w, root)) {
  1863.       e.w = nil;
  1864.       }
  1865.       e.wx = root_x;
  1866. --- 354,360 ----
  1867.       );
  1868.       e.x = x;
  1869.       e.y = ymax - y;
  1870. !     if (!assocTable->Find((TableValue &)e.w, root)) {
  1871.       e.w = nil;
  1872.       }
  1873.       e.wx = root_x;
  1874. ***************
  1875. *** 507,515 ****
  1876.       /* default is to do nothing */
  1877.   }
  1878.   
  1879. ! static void DoXError (Display* errdisplay, XErrorEvent* e) {
  1880. !     extern void XGetErrorText(Display*, int, char*, int);
  1881.   
  1882.       register ReqErr* r = errhandler;
  1883.       if (r != nil) {
  1884.       r->msgid = e->serial;
  1885. --- 507,521 ----
  1886.       /* default is to do nothing */
  1887.   }
  1888.   
  1889. ! #ifndef __GNUG__
  1890. ! extern "C" {
  1891. ! #endif
  1892. !     void XGetErrorText(Display*, int, char*, int);
  1893. ! #ifndef __GNUG__
  1894. ! }
  1895. ! #endif
  1896.   
  1897. + static void DoXError (Display* errdisplay, XErrorEvent* e) {
  1898.       register ReqErr* r = errhandler;
  1899.       if (r != nil) {
  1900.       r->msgid = e->serial;
  1901. ***************
  1902. *** 522,531 ****
  1903.       }
  1904.   }
  1905.   
  1906. ! ReqErr* ReqErr::Install () {
  1907. !     typedef void XHandler(Display*, XErrorEvent*);
  1908. !     extern void XSetErrorHandler(XHandler*);
  1909.   
  1910.       if (errhandler == nil) {
  1911.       XSetErrorHandler(DoXError);
  1912.       }
  1913. --- 528,543 ----
  1914.       }
  1915.   }
  1916.   
  1917. ! typedef void XHandler(Display*, XErrorEvent*);
  1918. ! #ifndef __GNUG__
  1919. ! extern "C" {
  1920. ! #endif
  1921. !     void XSetErrorHandler(XHandler*);
  1922. ! #ifndef __GNUG__
  1923. ! }
  1924. ! #endif
  1925.   
  1926. + ReqErr* ReqErr::Install () {
  1927.       if (errhandler == nil) {
  1928.       XSetErrorHandler(DoXError);
  1929.       }
  1930. ***************
  1931. *** 672,678 ****
  1932.       wtype, CopyFromParent, m, &a
  1933.       );
  1934.       i->canvas = new Canvas((void*)w);
  1935. !     assocTable->Insert(w, i);
  1936.       c = i->GetCursor();
  1937.       if (c != nil) {
  1938.       XDefineCursor(_World_dpy, w, (XCursor)c->Id());
  1939. --- 684,690 ----
  1940.       wtype, CopyFromParent, m, &a
  1941.       );
  1942.       i->canvas = new Canvas((void*)w);
  1943. !     assocTable->Insert(w, (TableValue &)i);
  1944.       c = i->GetCursor();
  1945.       if (c != nil) {
  1946.       XDefineCursor(_World_dpy, w, (XCursor)c->Id());
  1947. ***************
  1948. *** 700,706 ****
  1949.       return (
  1950.       (xe.type == MapNotify && xe.xmap.window == x->w) ||
  1951.       (xe.type == ConfigureNotify && xe.xconfigure.window == x->w) ||
  1952. !     (xe.type == Expose && assocTable->Find(x->i, xe.xexpose.window))
  1953.       );
  1954.   }
  1955.   
  1956. --- 712,718 ----
  1957.       return (
  1958.       (xe.type == MapNotify && xe.xmap.window == x->w) ||
  1959.       (xe.type == ConfigureNotify && xe.xconfigure.window == x->w) ||
  1960. !     (xe.type == Expose && assocTable->Find((TableValue &)x->i, xe.xexpose.window))
  1961.       );
  1962.   }
  1963.   
  1964. ***************
  1965. *** 803,809 ****
  1966.           e.eventType = MotionEvent;
  1967.           e.x = x->xmotion.x;
  1968.           e.y = x->xmotion.y;
  1969. !         if (!assocTable->Find(e.w, x->xmotion.root)) {
  1970.           e.w = nil;
  1971.           }
  1972.           e.wx = x->xmotion.x_root;
  1973. --- 815,821 ----
  1974.           e.eventType = MotionEvent;
  1975.           e.x = x->xmotion.x;
  1976.           e.y = x->xmotion.y;
  1977. !         if (!assocTable->Find((TableValue &)e.w, x->xmotion.root)) {
  1978.           e.w = nil;
  1979.           }
  1980.           e.wx = x->xmotion.x_root;
  1981. ***************
  1982. *** 864,870 ****
  1983.       timestamp = k->time;
  1984.       x = k->x;
  1985.       y = k->y;
  1986. !     if (!assocTable->Find(w, k->root)) {
  1987.       w = nil;
  1988.       }
  1989.       wx = k->x_root;
  1990. --- 876,882 ----
  1991.       timestamp = k->time;
  1992.       x = k->x;
  1993.       y = k->y;
  1994. !     if (!assocTable->Find((TableValue &)w, k->root)) {
  1995.       w = nil;
  1996.       }
  1997.       wx = k->x_root;
  1998. ***************
  1999. *** 937,943 ****
  2000.       inches = inch;
  2001.       point = 72.07/inch;
  2002.       points = point;
  2003. !     assocTable->Insert(rep->root, this);
  2004.       xmax = canvas->width - 1;
  2005.       ymax = canvas->height - 1;
  2006.   
  2007. --- 949,955 ----
  2008.       inches = inch;
  2009.       point = 72.07/inch;
  2010.       points = point;
  2011. !     assocTable->Insert((TableValue &)rep->root, this);
  2012.       xmax = canvas->width - 1;
  2013.       ymax = canvas->height - 1;
  2014.   
  2015. ***************
  2016. *** 1077,1082 ****
  2017. --- 1089,1098 ----
  2018.       ButtonPressMask|ButtonReleaseMask|OwnerGrabButtonMask|
  2019.       PointerMotionMask|PointerMotionHintMask;
  2020.   
  2021. + #ifndef __GNUG__
  2022. + extern "C" int sleep(unsigned);
  2023. + #endif
  2024.   void WorldView::GrabMouse (Cursor* c) {
  2025.       while (
  2026.       XGrabPointer(
  2027. ***************
  2028. *** 1196,1202 ****
  2029.       RemoteInteractor i, Coord& x1, Coord& y1, Coord& x2, Coord& y2
  2030.   ) {
  2031.       Window root;
  2032. !     int x, y, w, h, bw, d;
  2033.   
  2034.       XGetGeometry(_World_dpy, (Window)i, root, x, y, w, h, bw, d);
  2035.       x1 = x;
  2036. --- 1212,1219 ----
  2037.       RemoteInteractor i, Coord& x1, Coord& y1, Coord& x2, Coord& y2
  2038.   ) {
  2039.       Window root;
  2040. !     int x, y;
  2041. !     unsigned int w, h, bw, d;
  2042.   
  2043.       XGetGeometry(_World_dpy, (Window)i, root, x, y, w, h, bw, d);
  2044.       x1 = x;
  2045. diff -rc src/libInterViews/deck.c /mit/interviews/src/libInterViews/deck.c
  2046. *** src/libInterViews/deck.c    Wed Aug 10 12:20:14 1988
  2047. --- /mit/interviews/src/libInterViews/deck.c    Thu Feb 23 21:28:40 1989
  2048. ***************
  2049. *** 101,106 ****
  2050. --- 101,107 ----
  2051.       cards->prev = c;
  2052.           ++perspective->width;
  2053.           ++perspective->height;
  2054. +     FixPerspective();
  2055.       }
  2056.   }
  2057.   
  2058. ***************
  2059. *** 108,116 ****
  2060. --- 109,120 ----
  2061.       Card* card = cards->next;
  2062.       while (card != cards) {
  2063.       if (card->i == i) {
  2064. +             card->prev->next = card->next;
  2065. +             card->next->prev = card->prev;
  2066.           delete card;
  2067.               --perspective->width;
  2068.               --perspective->height;
  2069. +         FixPerspective();
  2070.           break;
  2071.       } else {
  2072.           card = card->next;
  2073. diff -rc src/libInterViews/interactor.c /mit/interviews/src/libInterViews/interactor.c
  2074. *** src/libInterViews/interactor.c    Fri Sep  9 13:16:50 1988
  2075. --- /mit/interviews/src/libInterViews/interactor.c    Thu Feb 23 21:53:32 1989
  2076. ***************
  2077. *** 122,133 ****
  2078.    * if desired.  Return true if the event is NOT an input event.
  2079.    */
  2080.   
  2081.   boolean Interactor::Select (Event& e) {
  2082.   #if defined(no_select)
  2083.       /* systems that do not have select */
  2084.       return false;
  2085.   #else
  2086. -     extern int select(int, int*, int, int, struct timeval*);
  2087.       register Sensor* s;
  2088.       unsigned d, dmask, m, rd;
  2089.       struct timeval tv, * t;
  2090. --- 122,138 ----
  2091.    * if desired.  Return true if the event is NOT an input event.
  2092.    */
  2093.   
  2094. + extern
  2095. + #ifndef __GNUG__
  2096. + "C"
  2097. + #endif
  2098. + int select(int, int*, int, int, struct timeval*);
  2099.   boolean Interactor::Select (Event& e) {
  2100.   #if defined(no_select)
  2101.       /* systems that do not have select */
  2102.       return false;
  2103.   #else
  2104.       register Sensor* s;
  2105.       unsigned d, dmask, m, rd;
  2106.       struct timeval tv, * t;
  2107. diff -rc src/libInterViews/menu.c /mit/interviews/src/libInterViews/menu.c
  2108. *** src/libInterViews/menu.c    Fri Sep  9 16:41:11 1988
  2109. --- /mit/interviews/src/libInterViews/menu.c    Thu Feb 23 21:53:37 1989
  2110. ***************
  2111. *** 22,28 ****
  2112.       Init();
  2113.   }
  2114.   
  2115. ! Menu::Menu (Sensor* in, Painter* out, boolean persist = true) : (in, out) {
  2116.       persistent = persist;
  2117.       Init();
  2118.   }
  2119. --- 22,28 ----
  2120.       Init();
  2121.   }
  2122.   
  2123. ! Menu::Menu (Sensor* in, Painter* out, boolean persist) : (in, out) {
  2124.       persistent = persist;
  2125.       Init();
  2126.   }
  2127. diff -rc src/libInterViews/paint.c /mit/interviews/src/libInterViews/paint.c
  2128. *** src/libInterViews/paint.c    Tue Aug  2 00:32:10 1988
  2129. --- /mit/interviews/src/libInterViews/paint.c    Thu Feb 23 21:53:41 1989
  2130. ***************
  2131. *** 18,24 ****
  2132.    * class Brush
  2133.    */
  2134.   
  2135. ! Brush* single;
  2136.   
  2137.   /*
  2138.    * class Color
  2139. --- 18,24 ----
  2140.    * class Brush
  2141.    */
  2142.   
  2143. ! Brush* Bsingle;
  2144.   
  2145.   /*
  2146.    * class Color
  2147. diff -rc src/libInterViews/painter.c /mit/interviews/src/libInterViews/painter.c
  2148. *** src/libInterViews/painter.c    Mon Aug  8 14:06:03 1988
  2149. --- /mit/interviews/src/libInterViews/painter.c    Thu Feb 23 21:53:45 1989
  2150. ***************
  2151. *** 23,29 ****
  2152.       lightgray = new Pattern(0x8020);
  2153.       gray = new Pattern(0xa5a5);
  2154.       darkgray = new Pattern(0xfafa);
  2155. !     single = new Brush(0xffff, 0);
  2156.       }
  2157.       foreground = nil;
  2158.       background = nil;
  2159. --- 23,29 ----
  2160.       lightgray = new Pattern(0x8020);
  2161.       gray = new Pattern(0xa5a5);
  2162.       darkgray = new Pattern(0xfafa);
  2163. !     Bsingle = new Brush(0xffff, 0);
  2164.       }
  2165.       foreground = nil;
  2166.       background = nil;
  2167. ***************
  2168. *** 34,40 ****
  2169.       SetColors(black, white);
  2170.       SetPattern(solid);
  2171.       FillBg(true);
  2172. !     SetBrush(single);
  2173.       SetFont(stdfont);
  2174.       SetOrigin(0, 0);
  2175.       MoveTo(0, 0);
  2176. --- 34,40 ----
  2177.       SetColors(black, white);
  2178.       SetPattern(solid);
  2179.       FillBg(true);
  2180. !     SetBrush(Bsingle);
  2181.       SetFont(stdfont);
  2182.       SetOrigin(0, 0);
  2183.       MoveTo(0, 0);
  2184. ***************
  2185. *** 211,217 ****
  2186.   static Coord* llx;
  2187.   static Coord* lly;
  2188.   
  2189. ! extern void bcopy(void*, void*, int);
  2190.   
  2191.   static void GrowBufs (Coord*& b1, Coord*& b2, int& cur) {
  2192.       Coord* newb1;
  2193. --- 211,219 ----
  2194.   static Coord* llx;
  2195.   static Coord* lly;
  2196.   
  2197. ! #ifndef __GNUG__
  2198. ! extern "C" void bcopy(void*, void*, int);
  2199. ! #endif
  2200.   
  2201.   static void GrowBufs (Coord*& b1, Coord*& b2, int& cur) {
  2202.       Coord* newb1;
  2203. ***************
  2204. *** 458,469 ****
  2205.           CreateClosedLineList(bufx, bufy, count);
  2206.           FillPolygonNoMap(c, llx, lly, llcount);
  2207.       }
  2208. - }
  2209. - void Painter::Map (Canvas* c, Coord x, Coord y, short& sx, short& sy) {
  2210. -     Coord cx, cy;
  2211. -     Map(c, x, y, cx, cy);
  2212. -     sx = short(cx);
  2213. -     sy = short(cy);
  2214.   }
  2215. --- 460,463 ----
  2216. diff -rc src/libInterViews/propsheet.c /mit/interviews/src/libInterViews/propsheet.c
  2217. *** src/libInterViews/propsheet.c    Tue Sep  6 13:51:52 1988
  2218. --- /mit/interviews/src/libInterViews/propsheet.c    Thu Feb 23 21:53:49 1989
  2219. ***************
  2220. *** 67,75 ****
  2221.       AttrList* vattrs;
  2222.       DirList* vdirs;
  2223.   
  2224.       PropDir();
  2225.       ~PropDir();
  2226. -     PropDir* MakeDirs(const char*&);
  2227.   };
  2228.   
  2229.   static const int pathClusterSize = 20;
  2230. --- 67,76 ----
  2231.       AttrList* vattrs;
  2232.       DirList* vdirs;
  2233.   
  2234. +     PropDir* MakeDirs(const char*&);
  2235. + public:
  2236.       PropDir();
  2237.       ~PropDir();
  2238.   };
  2239.   
  2240.   static const int pathClusterSize = 20;
  2241. diff -rc src/libInterViews/rubband.c /mit/interviews/src/libInterViews/rubband.c
  2242. *** src/libInterViews/rubband.c    Mon Jul  4 18:22:41 1988
  2243. --- /mit/interviews/src/libInterViews/rubband.c    Thu Feb 23 21:53:51 1989
  2244. ***************
  2245. *** 7,14 ****
  2246. --- 7,20 ----
  2247.   
  2248.   float DEGS_PER_RAD = 180.0 / 3.1415927;
  2249.   float RADS_PER_DEG = 3.1415927 / 180.0;
  2250. + #ifndef __GNUG__
  2251. + extern "C" {
  2252. + #endif
  2253.   extern double atan(double);
  2254.   extern double sqrt(double);
  2255. + #ifndef __GNUG__
  2256. + }
  2257. + #endif
  2258.   
  2259.   float Rubberband::Angle (Coord x0, Coord y0, Coord x1, Coord y1) {
  2260.       float dx, dy, angle;
  2261. diff -rc src/libInterViews/rubcurve.c /mit/interviews/src/libInterViews/rubcurve.c
  2262. *** src/libInterViews/rubcurve.c    Thu Aug  4 13:32:07 1988
  2263. --- /mit/interviews/src/libInterViews/rubcurve.c    Thu Feb 23 21:53:54 1989
  2264. ***************
  2265. *** 5,12 ****
  2266. --- 5,18 ----
  2267.   #include <InterViews/rubcurve.h>
  2268.   #include <InterViews/painter.h>
  2269.   
  2270. + #ifndef __GNUG__
  2271. + extern "C" {
  2272. + #endif
  2273.   extern void bcopy(const void*, void*, int);
  2274.   extern double sqrt(double);
  2275. + #ifndef __GNUG__
  2276. + }
  2277. + #endif
  2278.   
  2279.   inline int abs (int a) {
  2280.       return a > 0 ? a : -a;
  2281. diff -rc src/libInterViews/rubline.c /mit/interviews/src/libInterViews/rubline.c
  2282. *** src/libInterViews/rubline.c    Tue Jan 26 01:06:29 1988
  2283. --- /mit/interviews/src/libInterViews/rubline.c    Thu Feb 23 21:53:56 1989
  2284. ***************
  2285. *** 5,11 ****
  2286. --- 5,17 ----
  2287.   #include <InterViews/rubline.h>
  2288.   #include <InterViews/painter.h>
  2289.   
  2290. + #ifndef __GNUG__
  2291. + extern "C" {
  2292. + #endif
  2293.   extern double sqrt(double);
  2294. + #ifndef __GNUG__
  2295. + }
  2296. + #endif
  2297.   
  2298.   inline int abs (int a) {
  2299.       return a > 0 ? a : -a;
  2300. diff -rc src/libInterViews/rubrect.c /mit/interviews/src/libInterViews/rubrect.c
  2301. *** src/libInterViews/rubrect.c    Fri Jun 17 19:57:46 1988
  2302. --- /mit/interviews/src/libInterViews/rubrect.c    Thu Feb 23 21:53:59 1989
  2303. ***************
  2304. *** 5,11 ****
  2305. --- 5,17 ----
  2306.   #include <InterViews/painter.h>
  2307.   #include <InterViews/rubrect.h>
  2308.   
  2309. + #ifndef __GNUG__
  2310. + extern "C" {
  2311. + #endif
  2312.   extern double sqrt(double);
  2313. + #ifndef __GNUG__
  2314. + }
  2315. + #endif
  2316.   
  2317.   inline int abs (int a) {
  2318.       return a > 0 ? a : -a;
  2319. ***************
  2320. *** 130,138 ****
  2321. --- 136,150 ----
  2322.       switch (side) {
  2323.       case LeftSide:
  2324.       case RightSide:
  2325. +     if (r == l) {
  2326. +         r++;
  2327. +     }
  2328.       return float(nr - nl) / float(r - l);
  2329.       case BottomSide:
  2330.       case TopSide:
  2331. +     if (t == b) {
  2332. +         t++;
  2333. +     }
  2334.       return float(nt - nb) / float(t - b);
  2335.       }
  2336.   }
  2337. diff -rc src/libInterViews/transformer.c /mit/interviews/src/libInterViews/transformer.c
  2338. *** src/libInterViews/transformer.c    Wed Jul 27 00:33:35 1988
  2339. --- /mit/interviews/src/libInterViews/transformer.c    Fri Feb 24 15:58:44 1989
  2340. ***************
  2341. *** 134,185 ****
  2342.       ty = x*mat01 + y*mat11 + mat21;
  2343.   }
  2344.   
  2345.   void Transformer::InvTransform (Coord& tx, Coord& ty) {
  2346. !     float d = float(tx) - mat20;
  2347. !     float fty = float(ty);
  2348.   
  2349. !     fty = (mat00*(fty - mat21) - mat01*d) / Det(this);
  2350. !     tx = round((d - fty*mat10) / mat00);
  2351. !     ty = round(fty);
  2352.   }
  2353.   
  2354.   void Transformer::InvTransform (Coord tx, Coord ty, Coord& x, Coord& y) {
  2355. !     float d = float(tx) - mat20;
  2356. !     float fy = float(ty);
  2357.   
  2358. !     fy = (mat00*(fy - mat21) - mat01*d) / Det(this);
  2359. !     x = round((d - y*mat10) / mat00);
  2360. !     y = round(fy);
  2361.   }
  2362.   
  2363.   void Transformer::InvTransform (float tx, float ty, float& x, float& y) {
  2364. !     float d = tx - mat20;
  2365.   
  2366. !     y = (mat00*(ty - mat21) - mat01*d) / Det(this);
  2367. !     x = (d - y*mat10) / mat00;
  2368. ! }    
  2369. ! void Transformer::TransformList (
  2370. !     Coord x[], Coord y[], int n, Coord tx[], Coord ty[]
  2371. ! ) {
  2372. !     register Coord* ox, * oy, * nx, * ny;
  2373. !     Coord* lim;
  2374. !     lim = &x[n];
  2375. !     for (ox = x, oy = y, nx = tx, ny = ty; ox < lim; ox++, oy++, nx++, ny++) {
  2376. !     Transform(*ox, *oy, *nx, *ny);
  2377. !     }
  2378.   }
  2379.   
  2380.   void Transformer::InvTransformList (
  2381. !     Coord x[], Coord y[], int n, Coord tx[], Coord ty[]
  2382.   ) {
  2383.       register Coord* ox, * oy, * nx, * ny;
  2384.       Coord* lim;
  2385.   
  2386.       lim = &x[n];
  2387. !     for (ox = x, oy = y, nx = tx, ny = ty; ox < lim; ox++, oy++, nx++, ny++) {
  2388. !     InvTransform(*ox, *oy, *nx, *ny);
  2389.       }
  2390.   }
  2391.   
  2392. --- 134,191 ----
  2393.       ty = x*mat01 + y*mat11 + mat21;
  2394.   }
  2395.   
  2396. + /* Added by rfrench */
  2397. + void Transformer::TransformList (Coord x[], Coord y[], int n,
  2398. +                  Coord tx[], Coord ty[])
  2399. + {
  2400. +     int i;
  2401. +     for (i=0; i<n; i++)
  2402. +     Transform(x[i], y[i], tx[i], tx[i]);
  2403. + }
  2404.   void Transformer::InvTransform (Coord& tx, Coord& ty) {
  2405. !     float d = Det(this);
  2406. !     float a = (float(tx) - mat20) / d;
  2407. !     float b = (float(ty) - mat21) / d;
  2408.   
  2409. !     tx = round(a*mat11 - b*mat10);
  2410. !     ty = round(b*mat00 - a*mat01);
  2411.   }
  2412.   
  2413.   void Transformer::InvTransform (Coord tx, Coord ty, Coord& x, Coord& y) {
  2414. !     float d = Det(this);
  2415. !     float a = (float(tx) - mat20) / d;
  2416. !     float b = (float(ty) - mat21) / d;
  2417.   
  2418. !     x = round(a*mat11 - b*mat10);
  2419. !     y = round(b*mat00 - a*mat01);
  2420.   }
  2421.   
  2422.   void Transformer::InvTransform (float tx, float ty, float& x, float& y) {
  2423. !     float d = Det(this);
  2424. !     float a = (tx - mat20) / d;
  2425. !     float b = (ty - mat21) / d;
  2426.   
  2427. !     x = a*mat11 - b*mat10;
  2428. !     y = b*mat00 - a*mat01;
  2429.   }
  2430.   
  2431.   void Transformer::InvTransformList (
  2432. !     Coord tx[], Coord ty[], int n, Coord x[], Coord y[]
  2433.   ) {
  2434.       register Coord* ox, * oy, * nx, * ny;
  2435.       Coord* lim;
  2436. +     float a, b, d = Det(this);
  2437.   
  2438.       lim = &x[n];
  2439. !     for (ox = tx, oy = ty, nx = x, ny = y; ox < lim; ox++, oy++, nx++, ny++) {
  2440. !         a = (float(*ox) - mat20) / d;
  2441. !         b = (float(*oy) - mat21) / d;
  2442. !         *nx = round(a*mat11 - b*mat10);
  2443. !         *ny = round(b*mat00 - a*mat01);
  2444.       }
  2445.   }
  2446.   
  2447. diff -rc src/libInterViews/tray.c /mit/interviews/src/libInterViews/tray.c
  2448. *** src/libInterViews/tray.c    Sat Sep 10 02:41:38 1988
  2449. --- /mit/interviews/src/libInterViews/tray.c    Thu Feb 23 21:38:44 1989
  2450. ***************
  2451. *** 1398,1411 ****
  2452.       hnodes->FindElements(tray, ltray, rtray);
  2453.       vnodes->FindElements(tray, btray, ttray);
  2454.   
  2455. !     ltray->combinable = rtray->combinable = false;
  2456. !     btray->combinable = ttray->combinable = false;
  2457.   
  2458.       Solve(hnodes, lmagic, rmagic, 0, s->width, s->hshrink, s->hstretch);
  2459.       Solve(vnodes, bmagic, tmagic, 0, s->height, s->vshrink, s->vstretch);
  2460.   
  2461. !     ltray->combinable = rtray->combinable = true;
  2462. !     btray->combinable = ttray->combinable = true;
  2463.   }
  2464.   
  2465.   void TSolver::GetPlacement (
  2466. --- 1398,1415 ----
  2467.       hnodes->FindElements(tray, ltray, rtray);
  2468.       vnodes->FindElements(tray, btray, ttray);
  2469.   
  2470. !     if (ltray != nil) {
  2471. !     ltray->combinable = rtray->combinable = false;
  2472. !     btray->combinable = ttray->combinable = false;
  2473. !     }
  2474.   
  2475.       Solve(hnodes, lmagic, rmagic, 0, s->width, s->hshrink, s->hstretch);
  2476.       Solve(vnodes, bmagic, tmagic, 0, s->height, s->vshrink, s->vstretch);
  2477.   
  2478. !     if (ltray != nil) {
  2479. !     ltray->combinable = rtray->combinable = true;
  2480. !     btray->combinable = ttray->combinable = true;
  2481. !     }
  2482.   }
  2483.   
  2484.   void TSolver::GetPlacement (
  2485. diff -rc src/liballegro/connection.c /mit/interviews/src/liballegro/connection.c
  2486. *** src/liballegro/connection.c    Wed May 25 18:42:05 1988
  2487. --- /mit/interviews/src/liballegro/connection.c    Fri Feb 24 00:23:06 1989
  2488. ***************
  2489. *** 12,17 ****
  2490. --- 12,18 ----
  2491.   #include <fcntl.h>
  2492.   #include <string.h>
  2493.   
  2494. + #ifndef __GNUG__
  2495.   extern int socket(int, int, int);
  2496.   extern int bind(int, void*, int);
  2497.   extern int connect(int, ...);
  2498. ***************
  2499. *** 29,34 ****
  2500. --- 30,36 ----
  2501.   extern void bzero(void*, int);
  2502.   extern void perror(const char*);
  2503.   extern void exit(int);
  2504. + #endif
  2505.   
  2506.   inline void fatal (const char* s) {
  2507.       perror(s);
  2508. diff -rc src/libgraphic/base.c /mit/interviews/src/libgraphic/base.c
  2509. *** src/libgraphic/base.c    Tue Aug 30 02:44:33 1988
  2510. --- /mit/interviews/src/libgraphic/base.c    Sat Feb 25 16:49:49 1989
  2511. ***************
  2512. *** 175,181 ****
  2513.       }
  2514.   }
  2515.   
  2516. ! boolean Graphic::read (File* f) {
  2517.       int test;
  2518.       float a[6];
  2519.       Ref dummy;        /* dummy origin ref for backward compatibility */
  2520. --- 175,181 ----
  2521.       }
  2522.   }
  2523.   
  2524. ! boolean Graphic::read (GFile* f) {
  2525.       int test;
  2526.       float a[6];
  2527.       Ref dummy;        /* dummy origin ref for backward compatibility */
  2528. ***************
  2529. *** 192,198 ****
  2530.       return ok;
  2531.   }
  2532.   
  2533. ! boolean Graphic::write (File* f) {
  2534.       float a[6];
  2535.       Ref dummy;        /* dummy origin ref for backward compatibility */
  2536.       boolean ok = 
  2537. --- 192,198 ----
  2538.       return ok;
  2539.   }
  2540.   
  2541. ! boolean Graphic::write (GFile* f) {
  2542.       float a[6];
  2543.       Ref dummy;        /* dummy origin ref for backward compatibility */
  2544.       boolean ok = 
  2545. ***************
  2546. *** 711,721 ****
  2547.       }
  2548.   }
  2549.   
  2550. ! boolean FullGraphic::read (File* f) {
  2551.       return Graphic::read(f) && pat.Read(f) && brush.Read(f) && font.Read(f);
  2552.   }
  2553.   
  2554. ! boolean FullGraphic::write (File* f) {
  2555.       return Graphic::write(f) && pat.Write(f) && brush.Write(f) &&font.Write(f);
  2556.   }
  2557.   
  2558. --- 711,721 ----
  2559.       }
  2560.   }
  2561.   
  2562. ! boolean FullGraphic::read (GFile* f) {
  2563.       return Graphic::read(f) && pat.Read(f) && brush.Read(f) && font.Read(f);
  2564.   }
  2565.   
  2566. ! boolean FullGraphic::write (GFile* f) {
  2567.       return Graphic::write(f) && pat.Write(f) && brush.Write(f) &&font.Write(f);
  2568.   }
  2569.   
  2570. diff -rc src/libgraphic/ellipses.c /mit/interviews/src/libgraphic/ellipses.c
  2571. *** src/libgraphic/ellipses.c    Mon Aug 29 20:08:21 1988
  2572. --- /mit/interviews/src/libgraphic/ellipses.c    Sat Feb 25 16:50:48 1989
  2573. ***************
  2574. *** 9,20 ****
  2575.   static const float axis = 0.42;
  2576.   static const float seen = 1.025;
  2577.   
  2578. ! boolean Ellipse::read (File* f) {
  2579.       return Graphic::read(f) && patbr.Read(f) &&
  2580.       f->Read(x0) && f->Read(y0) && f->Read(r1) && f->Read(r2);
  2581.   }
  2582.   
  2583. ! boolean Ellipse::write (File* f) {
  2584.       return Graphic::write(f) && patbr.Write(f) &&
  2585.       f->Write(x0) && f->Write(y0) && f->Write(r1) && f->Write(r2);
  2586.   }
  2587. --- 9,20 ----
  2588.   static const float axis = 0.42;
  2589.   static const float seen = 1.025;
  2590.   
  2591. ! boolean Ellipse::read (GFile* f) {
  2592.       return Graphic::read(f) && patbr.Read(f) &&
  2593.       f->Read(x0) && f->Read(y0) && f->Read(r1) && f->Read(r2);
  2594.   }
  2595.   
  2596. ! boolean Ellipse::write (GFile* f) {
  2597.       return Graphic::write(f) && patbr.Write(f) &&
  2598.       f->Write(x0) && f->Write(y0) && f->Write(r1) && f->Write(r2);
  2599.   }
  2600. diff -rc src/libgraphic/file.c /mit/interviews/src/libgraphic/file.c
  2601. *** src/libgraphic/file.c    Sun Jan 31 20:20:45 1988
  2602. --- /mit/interviews/src/libgraphic/file.c    Sat Feb 25 21:56:30 1989
  2603. ***************
  2604. *** 1,5 ****
  2605.   /*
  2606. !  * Implementation of File class.
  2607.    */
  2608.   
  2609.   #include <string.h>
  2610. --- 1,5 ----
  2611.   /*
  2612. !  * Implementation of GFile class.
  2613.    */
  2614.   
  2615.   #include <string.h>
  2616. ***************
  2617. *** 12,18 ****
  2618.   
  2619.   extern int unlink(const char*);
  2620.   
  2621. ! File::File (char* filename) {
  2622.       name = new char [strlen(filename) + 1];
  2623.       strcpy(name, filename);
  2624.       fd = fopen(name, "r+");
  2625. --- 12,18 ----
  2626.   
  2627.   extern int unlink(const char*);
  2628.   
  2629. ! GFile::GFile (char* filename) {
  2630.       name = new char [strlen(filename) + 1];
  2631.       strcpy(name, filename);
  2632.       fd = fopen(name, "r+");
  2633. ***************
  2634. *** 26,32 ****
  2635.       }
  2636.   }
  2637.   
  2638. ! File::~File () {
  2639.       if (fd != NULL) {
  2640.       (void) fclose(fd);
  2641.       }
  2642. --- 26,32 ----
  2643.       }
  2644.   }
  2645.   
  2646. ! GFile::~GFile () {
  2647.       if (fd != NULL) {
  2648.       (void) fclose(fd);
  2649.       }
  2650. ***************
  2651. *** 33,51 ****
  2652.       delete name;
  2653.   }
  2654.   
  2655. ! char* File::GetName () {
  2656.       return name;
  2657.   }
  2658.   
  2659. ! boolean File::Exists () {
  2660.       return fopen(name, "r") != NULL;
  2661.   }
  2662.   
  2663. ! boolean File::Exists (char* filename) {
  2664.       return fopen(filename, "r") != NULL;
  2665.   }
  2666.   
  2667. ! boolean File::Read (short& i) {
  2668.       int tmp;
  2669.   
  2670.       boolean ok = fread((char*) &tmp, sizeof(int), 1, fd) == 1;
  2671. --- 33,51 ----
  2672.       delete name;
  2673.   }
  2674.   
  2675. ! char* GFile::GetName () {
  2676.       return name;
  2677.   }
  2678.   
  2679. ! boolean GFile::Exists () {
  2680.       return fopen(name, "r") != NULL;
  2681.   }
  2682.   
  2683. ! boolean GFile::Exists (char* filename) {
  2684.       return fopen(filename, "r") != NULL;
  2685.   }
  2686.   
  2687. ! boolean GFile::Read (short& i) {
  2688.       int tmp;
  2689.   
  2690.       boolean ok = fread((char*) &tmp, sizeof(int), 1, fd) == 1;
  2691. ***************
  2692. *** 53,63 ****
  2693.       return ok;
  2694.   }
  2695.   
  2696. ! boolean File::Read (int& i)  {
  2697.       return fread((char*) &i, sizeof(int), 1, fd) == 1; 
  2698.   }
  2699.   
  2700. ! boolean File::Read (float& f) {
  2701.       double tmp;
  2702.       
  2703.       boolean ok = fread((char*) &tmp, sizeof(double), 1, fd) == 1; 
  2704. --- 53,63 ----
  2705.       return ok;
  2706.   }
  2707.   
  2708. ! boolean GFile::Read (int& i)  {
  2709.       return fread((char*) &i, sizeof(int), 1, fd) == 1; 
  2710.   }
  2711.   
  2712. ! boolean GFile::Read (float& f) {
  2713.       double tmp;
  2714.       
  2715.       boolean ok = fread((char*) &tmp, sizeof(double), 1, fd) == 1; 
  2716. ***************
  2717. *** 65,71 ****
  2718.       return ok;
  2719.   }
  2720.   
  2721. ! boolean File::Read (char& c) {
  2722.       int tmp;
  2723.   
  2724.       boolean ok = fread((char*) &tmp, sizeof(int), 1, fd) == 1;
  2725. --- 65,71 ----
  2726.       return ok;
  2727.   }
  2728.   
  2729. ! boolean GFile::Read (char& c) {
  2730.       int tmp;
  2731.   
  2732.       boolean ok = fread((char*) &tmp, sizeof(int), 1, fd) == 1;
  2733. ***************
  2734. *** 73,95 ****
  2735.       return ok;
  2736.   }
  2737.   
  2738. ! boolean File::Read (short* i, int count) {
  2739.       return fread((char*) i, sizeof(short), count, fd) == count; 
  2740.   }
  2741.   
  2742. ! boolean File::Read (int* i, int count) {
  2743.       return fread((char*) i, sizeof(int), count, fd) == count; 
  2744.   }
  2745.   
  2746. ! boolean File::Read (long* i, int count) {
  2747.       return fread((char*) i, sizeof(long), count, fd) == count; 
  2748.   }
  2749.   
  2750. ! boolean File::Read (float* f, int count) {
  2751.       return fread((char*) f, sizeof(float), count, fd) == count; 
  2752.   }
  2753.   
  2754. ! boolean File::Read (char* string) {
  2755.       // will read up to a NULL character or count characters
  2756.       // assumes that there is room to read all count characters
  2757.       // string will be NULL terminated iff NULL was read
  2758. --- 73,95 ----
  2759.       return ok;
  2760.   }
  2761.   
  2762. ! boolean GFile::Read (short* i, int count) {
  2763.       return fread((char*) i, sizeof(short), count, fd) == count; 
  2764.   }
  2765.   
  2766. ! boolean GFile::Read (int* i, int count) {
  2767.       return fread((char*) i, sizeof(int), count, fd) == count; 
  2768.   }
  2769.   
  2770. ! boolean GFile::Read (long* i, int count) {
  2771.       return fread((char*) i, sizeof(long), count, fd) == count; 
  2772.   }
  2773.   
  2774. ! boolean GFile::Read (float* f, int count) {
  2775.       return fread((char*) f, sizeof(float), count, fd) == count; 
  2776.   }
  2777.   
  2778. ! boolean GFile::Read (char* string) {
  2779.       // will read up to a NULL character or count characters
  2780.       // assumes that there is room to read all count characters
  2781.       // string will be NULL terminated iff NULL was read
  2782. ***************
  2783. *** 105,140 ****
  2784.       return false;
  2785.   }
  2786.   
  2787. ! boolean File::Read (char* string, int count) {
  2788.       return fread((char*) string, sizeof(char), count, fd) == count; 
  2789.   }
  2790.   
  2791. ! boolean File::Write (int i) {
  2792.       return fwrite((char*) &i, sizeof(int), 1, fd) == 1; 
  2793.   }
  2794.   
  2795. ! boolean File::Write (float f) {
  2796.       double tmp = double(f);
  2797.       return fwrite((char*) &tmp, sizeof(double), 1, fd) == 1; 
  2798.   }
  2799.   
  2800. ! boolean File::Write (short* i, int count) {
  2801.       return fwrite((char*) i, sizeof(short), count, fd) == count;
  2802.   }
  2803.   
  2804. ! boolean File::Write (int* i, int count) {
  2805.       return fwrite((char*) i, sizeof(int), count, fd) == count; 
  2806.   }
  2807.   
  2808. ! boolean File::Write (long* i, int count) {
  2809.       return fwrite((char*) i, sizeof(long), count, fd) == count; 
  2810.   }
  2811.   
  2812. ! boolean File::Write (float* f, int count) {
  2813.       return fwrite((char*) f, sizeof(float), count, fd) == count; 
  2814.   }
  2815.   
  2816. ! boolean File::Write (char* string) {
  2817.       // write up to and including NULL character
  2818.       // beware of non-terminated strings!
  2819.   
  2820. --- 105,140 ----
  2821.       return false;
  2822.   }
  2823.   
  2824. ! boolean GFile::Read (char* string, int count) {
  2825.       return fread((char*) string, sizeof(char), count, fd) == count; 
  2826.   }
  2827.   
  2828. ! boolean GFile::Write (int i) {
  2829.       return fwrite((char*) &i, sizeof(int), 1, fd) == 1; 
  2830.   }
  2831.   
  2832. ! boolean GFile::Write (float f) {
  2833.       double tmp = double(f);
  2834.       return fwrite((char*) &tmp, sizeof(double), 1, fd) == 1; 
  2835.   }
  2836.   
  2837. ! boolean GFile::Write (short* i, int count) {
  2838.       return fwrite((char*) i, sizeof(short), count, fd) == count;
  2839.   }
  2840.   
  2841. ! boolean GFile::Write (int* i, int count) {
  2842.       return fwrite((char*) i, sizeof(int), count, fd) == count; 
  2843.   }
  2844.   
  2845. ! boolean GFile::Write (long* i, int count) {
  2846.       return fwrite((char*) i, sizeof(long), count, fd) == count; 
  2847.   }
  2848.   
  2849. ! boolean GFile::Write (float* f, int count) {
  2850.       return fwrite((char*) f, sizeof(float), count, fd) == count; 
  2851.   }
  2852.   
  2853. ! boolean GFile::Write (char* string) {
  2854.       // write up to and including NULL character
  2855.       // beware of non-terminated strings!
  2856.   
  2857. ***************
  2858. *** 142,169 ****
  2859.       return fwrite((char*) string, sizeof(char), len, fd) == len;
  2860.   }
  2861.   
  2862. ! boolean File::Write (char* string, int count) {
  2863.       return fwrite((char*) string, sizeof(char), count, fd) == count; 
  2864.   }
  2865.   
  2866.   
  2867. ! boolean File::SeekTo (long offset) {
  2868.       return fseek(fd, offset, FROM_BEGINNING) >= 0; 
  2869.   }    
  2870.   
  2871. ! boolean File::SeekToBegin () {
  2872.       return fseek(fd, 0, FROM_BEGINNING) >= 0; 
  2873.   }
  2874.   
  2875. ! boolean File::SeekToEnd ()  {
  2876.       return fseek(fd, 0, FROM_END) >= 0; 
  2877.   }
  2878.   
  2879. ! long File::CurOffset () {
  2880.       return ftell(fd); 
  2881.   }
  2882.   
  2883. ! boolean File::IsEmpty () {
  2884.       int dummy;
  2885.   
  2886.       if (Read(dummy)) {
  2887. --- 142,169 ----
  2888.       return fwrite((char*) string, sizeof(char), len, fd) == len;
  2889.   }
  2890.   
  2891. ! boolean GFile::Write (char* string, int count) {
  2892.       return fwrite((char*) string, sizeof(char), count, fd) == count; 
  2893.   }
  2894.   
  2895.   
  2896. ! boolean GFile::SeekTo (long offset) {
  2897.       return fseek(fd, offset, FROM_BEGINNING) >= 0; 
  2898.   }    
  2899.   
  2900. ! boolean GFile::SeekToBegin () {
  2901.       return fseek(fd, 0, FROM_BEGINNING) >= 0; 
  2902.   }
  2903.   
  2904. ! boolean GFile::SeekToEnd ()  {
  2905.       return fseek(fd, 0, FROM_END) >= 0; 
  2906.   }
  2907.   
  2908. ! long GFile::CurOffset () {
  2909.       return ftell(fd); 
  2910.   }
  2911.   
  2912. ! boolean GFile::IsEmpty () {
  2913.       int dummy;
  2914.   
  2915.       if (Read(dummy)) {
  2916. ***************
  2917. *** 174,180 ****
  2918.       }
  2919.   }
  2920.   
  2921. ! boolean File::Erase () {
  2922.       return 
  2923.       unlink(name) == 0 && fclose(fd) != EOF && 
  2924.       (fd = fopen(name, "w+")) != NULL;
  2925. --- 174,180 ----
  2926.       }
  2927.   }
  2928.   
  2929. ! boolean GFile::Erase () {
  2930.       return 
  2931.       unlink(name) == 0 && fclose(fd) != EOF && 
  2932.       (fd = fopen(name, "w+")) != NULL;
  2933. diff -rc src/libgraphic/geomobjs.c /mit/interviews/src/libgraphic/geomobjs.c
  2934. *** src/libgraphic/geomobjs.c    Mon Aug 29 20:08:27 1988
  2935. --- /mit/interviews/src/libgraphic/geomobjs.c    Sat Feb 25 16:51:24 1989
  2936. ***************
  2937. *** 13,23 ****
  2938.   
  2939.   extern void bcopy (void*, void*, int);
  2940.   
  2941. ! boolean PointObj::read (File* f) {
  2942.       return Persistent::read(f) && f->Read(x) && f->Read(y);
  2943.   }
  2944.   
  2945. ! boolean PointObj::write (File* f) {
  2946.       return Persistent::write(f) && f->Write(x) && f->Write(y);
  2947.   }
  2948.   
  2949. --- 13,23 ----
  2950.   
  2951.   extern void bcopy (void*, void*, int);
  2952.   
  2953. ! boolean PointObj::read (GFile* f) {
  2954.       return Persistent::read(f) && f->Read(x) && f->Read(y);
  2955.   }
  2956.   
  2957. ! boolean PointObj::write (GFile* f) {
  2958.       return Persistent::write(f) && f->Write(x) && f->Write(y);
  2959.   }
  2960.   
  2961. ***************
  2962. *** 29,40 ****
  2963.       return POINTOBJ==id || Persistent::IsA(id);
  2964.   }
  2965.   
  2966. ! boolean LineObj::read (File* f) {
  2967.       return Persistent::read(f) &&
  2968.       f->Read(p1.x) && f->Read(p1.y) && f->Read(p2.x) && f->Read(p2.y);
  2969.   }
  2970.   
  2971. ! boolean LineObj::write (File* f) {
  2972.       return Persistent::write(f) && 
  2973.       f->Write(p1.x) && f->Write(p1.y) && f->Write(p2.x) && f->Write(p2.y);
  2974.   }
  2975. --- 29,40 ----
  2976.       return POINTOBJ==id || Persistent::IsA(id);
  2977.   }
  2978.   
  2979. ! boolean LineObj::read (GFile* f) {
  2980.       return Persistent::read(f) &&
  2981.       f->Read(p1.x) && f->Read(p1.y) && f->Read(p2.x) && f->Read(p2.y);
  2982.   }
  2983.   
  2984. ! boolean LineObj::write (GFile* f) {
  2985.       return Persistent::write(f) && 
  2986.       f->Write(p1.x) && f->Write(p1.y) && f->Write(p2.x) && f->Write(p2.y);
  2987.   }
  2988. ***************
  2989. *** 56,61 ****
  2990. --- 56,71 ----
  2991.           ((p.y - p1.y)*(p2.x - p1.x) - (p2.y - p1.y)*(p.x - p1.x)) == 0;
  2992.   }
  2993.   
  2994. + inline int signum (int a) {
  2995. +     if (a < 0) {
  2996. +         return -1;
  2997. +     } else if (a > 0) {
  2998. +         return 1;
  2999. +     } else {
  3000. +         return 0;
  3001. +     }
  3002. + }
  3003.   int LineObj::Same (PointObj& p1, PointObj& p2) {
  3004.       Coord dx, dx1, dx2;
  3005.       Coord dy, dy1, dy2;
  3006. ***************
  3007. *** 66,72 ****
  3008.       dy1 = p1.y - this->p1.y;
  3009.       dx2 = p2.x - this->p2.x;
  3010.       dy2 = p2.y - this->p2.y;
  3011. !     return (dx*dy1 - dy*dx1) * (dx*dy2 - dy*dx2);
  3012.   }
  3013.   
  3014.   boolean LineObj::Intersects (LineObj& l) {
  3015. --- 76,82 ----
  3016.       dy1 = p1.y - this->p1.y;
  3017.       dx2 = p2.x - this->p2.x;
  3018.       dy2 = p2.y - this->p2.y;
  3019. !     return signum((dx*dy1 - dy*dx1)) * signum((dx*dy2 - dy*dx2));
  3020.   }
  3021.   
  3022.   boolean LineObj::Intersects (LineObj& l) {
  3023. ***************
  3024. *** 76,87 ****
  3025.       return b1.Intersects(b2) && Same(l.p1, l.p2) <= 0 && l.Same(p1, p2) <= 0;
  3026.   }
  3027.   
  3028. ! boolean BoxObj::read (File* f) {
  3029.       return Persistent::read(f) &&
  3030.       f->Read(left) && f->Read(bottom) && f->Read(right) && f->Read(top);
  3031.   }
  3032.   
  3033. ! boolean BoxObj::write (File* f) {
  3034.       return Persistent::write(f) &&
  3035.       f->Write(left) && f->Write(bottom) && f->Write(right) && f->Write(top);
  3036.   }
  3037. --- 86,97 ----
  3038.       return b1.Intersects(b2) && Same(l.p1, l.p2) <= 0 && l.Same(p1, p2) <= 0;
  3039.   }
  3040.   
  3041. ! boolean BoxObj::read (GFile* f) {
  3042.       return Persistent::read(f) &&
  3043.       f->Read(left) && f->Read(bottom) && f->Read(right) && f->Read(top);
  3044.   }
  3045.   
  3046. ! boolean BoxObj::write (GFile* f) {
  3047.       return Persistent::write(f) &&
  3048.       f->Write(left) && f->Write(bottom) && f->Write(right) && f->Write(top);
  3049.   }
  3050. ***************
  3051. *** 334,340 ****
  3052.       }
  3053.   }
  3054.   
  3055. ! boolean MultiLineObj::read (File* f) {
  3056.       boolean ok = Persistent::read(f) && f->Read(count);
  3057.       if (ok) {
  3058.       delete x;
  3059. --- 344,350 ----
  3060.       }
  3061.   }
  3062.   
  3063. ! boolean MultiLineObj::read (GFile* f) {
  3064.       boolean ok = Persistent::read(f) && f->Read(count);
  3065.       if (ok) {
  3066.       delete x;
  3067. ***************
  3068. *** 346,352 ****
  3069.       return ok;
  3070.   }
  3071.   
  3072. ! boolean MultiLineObj::write (File* f) {
  3073.       return Persistent::write(f) &&
  3074.       f->Write(count) && f->Write(x, count) && f->Write(y, count);
  3075.   }
  3076. --- 356,362 ----
  3077.       return ok;
  3078.   }
  3079.   
  3080. ! boolean MultiLineObj::write (GFile* f) {
  3081.       return Persistent::write(f) &&
  3082.       f->Write(count) && f->Write(x, count) && f->Write(y, count);
  3083.   }
  3084. diff -rc src/libgraphic/instance.c /mit/interviews/src/libgraphic/instance.c
  3085. *** src/libgraphic/instance.c    Mon Aug 29 20:08:35 1988
  3086. --- /mit/interviews/src/libgraphic/instance.c    Sun Feb 26 17:17:15 1989
  3087. ***************
  3088. *** 8,18 ****
  3089.   #include <InterViews/Graphic/grclasses.h>
  3090.   #include <InterViews/Graphic/instance.h>
  3091.   
  3092. ! boolean Instance::read (File* f) {
  3093.       return FullGraphic::read(f) && refGr.Read(f);
  3094.   }
  3095.   
  3096. ! boolean Instance::write (File* f) {
  3097.       return FullGraphic::write(f) && refGr.Write(f);
  3098.   }
  3099.   
  3100. --- 8,18 ----
  3101.   #include <InterViews/Graphic/grclasses.h>
  3102.   #include <InterViews/Graphic/instance.h>
  3103.   
  3104. ! boolean Instance::read (GFile* f) {
  3105.       return FullGraphic::read(f) && refGr.Read(f);
  3106.   }
  3107.   
  3108. ! boolean Instance::write (GFile* f) {
  3109.       return FullGraphic::write(f) && refGr.Write(f);
  3110.   }
  3111.   
  3112. diff -rc src/libgraphic/label.c /mit/interviews/src/libgraphic/label.c
  3113. *** src/libgraphic/label.c    Mon Aug 29 20:08:31 1988
  3114. --- /mit/interviews/src/libgraphic/label.c    Sat Feb 25 16:51:43 1989
  3115. ***************
  3116. *** 64,70 ****
  3117.       strncpy(string, this->string, count);
  3118.   }
  3119.   
  3120. ! boolean Label::read (File* f) {
  3121.       boolean ok;
  3122.       ok = Graphic::read(f) && font.Read(f) && f->Read(count);
  3123.       if (ok) {
  3124. --- 64,70 ----
  3125.       strncpy(string, this->string, count);
  3126.   }
  3127.   
  3128. ! boolean Label::read (GFile* f) {
  3129.       boolean ok;
  3130.       ok = Graphic::read(f) && font.Read(f) && f->Read(count);
  3131.       if (ok) {
  3132. ***************
  3133. *** 75,81 ****
  3134.       return ok;
  3135.   }
  3136.   
  3137. ! boolean Label::write (File* f) {
  3138.       return 
  3139.       Graphic::write(f) && font.Write(f) &&
  3140.       f->Write(count) && f->Write(string, count);
  3141. --- 75,81 ----
  3142.       return ok;
  3143.   }
  3144.   
  3145. ! boolean Label::write (GFile* f) {
  3146.       return 
  3147.       Graphic::write(f) && font.Write(f) &&
  3148.       f->Write(count) && f->Write(string, count);
  3149. diff -rc src/libgraphic/lines.c /mit/interviews/src/libgraphic/lines.c
  3150. *** src/libgraphic/lines.c    Mon Aug 29 20:08:40 1988
  3151. --- /mit/interviews/src/libgraphic/lines.c    Sat Feb 25 16:51:55 1989
  3152. ***************
  3153. *** 8,18 ****
  3154.   
  3155.   extern void bcopy (void*, void*, int);
  3156.   
  3157. ! boolean Point::read (File* f) {
  3158.       return Graphic::read(f) && brush.Read(f) && f->Read(x) && f->Read(y);
  3159.   }
  3160.   
  3161. ! boolean Point::write (File* f) {
  3162.       return Graphic::write(f) && brush.Write(f) && f->Write(x) && f->Write(y);
  3163.   }
  3164.   
  3165. --- 8,18 ----
  3166.   
  3167.   extern void bcopy (void*, void*, int);
  3168.   
  3169. ! boolean Point::read (GFile* f) {
  3170.       return Graphic::read(f) && brush.Read(f) && f->Read(x) && f->Read(y);
  3171.   }
  3172.   
  3173. ! boolean Point::write (GFile* f) {
  3174.       return Graphic::write(f) && brush.Write(f) && f->Write(x) && f->Write(y);
  3175.   }
  3176.   
  3177. ***************
  3178. *** 88,99 ****
  3179.       return (PBrush*) brush();
  3180.   }
  3181.   
  3182. ! boolean Line::read (File* f) {
  3183.       return Graphic::read(f) && brush.Read(f) &&
  3184.       f->Read(x0) && f->Read(y0) && f->Read(x1) && f->Read(y1);
  3185.   }
  3186.   
  3187. ! boolean Line::write (File* f) {
  3188.       return Graphic::write(f) && brush.Write(f) &&
  3189.       f->Write(x0) && f->Write(y0) && f->Write(x1) && f->Write(y1);
  3190.   }
  3191. --- 88,99 ----
  3192.       return (PBrush*) brush();
  3193.   }
  3194.   
  3195. ! boolean Line::read (GFile* f) {
  3196.       return Graphic::read(f) && brush.Read(f) &&
  3197.       f->Read(x0) && f->Read(y0) && f->Read(x1) && f->Read(y1);
  3198.   }
  3199.   
  3200. ! boolean Line::write (GFile* f) {
  3201.       return Graphic::write(f) && brush.Write(f) &&
  3202.       f->Write(x0) && f->Write(y0) && f->Write(x1) && f->Write(y1);
  3203.   }
  3204. ***************
  3205. *** 219,225 ****
  3206.       Graphic::Delete();
  3207.   }
  3208.   
  3209. ! boolean MultiLine::read (File* f) {
  3210.       boolean ok = Graphic::read(f) && patbr.Read(f) && f->Read(count);
  3211.       if (ok) {
  3212.       delete x;
  3213. --- 219,225 ----
  3214.       Graphic::Delete();
  3215.   }
  3216.   
  3217. ! boolean MultiLine::read (GFile* f) {
  3218.       boolean ok = Graphic::read(f) && patbr.Read(f) && f->Read(count);
  3219.       if (ok) {
  3220.       delete x;
  3221. ***************
  3222. *** 231,237 ****
  3223.       return ok;
  3224.   }
  3225.   
  3226. ! boolean MultiLine::write (File* f) {
  3227.       return Graphic::write(f) && patbr.Write(f) && f->Write(count) && 
  3228.       f->Write(x, count) && f->Write(y, count);
  3229.   }
  3230. --- 231,237 ----
  3231.       return ok;
  3232.   }
  3233.   
  3234. ! boolean MultiLine::write (GFile* f) {
  3235.       return Graphic::write(f) && patbr.Write(f) && f->Write(count) && 
  3236.       f->Write(x, count) && f->Write(y, count);
  3237.   }
  3238. diff -rc src/libgraphic/objman.c /mit/interviews/src/libgraphic/objman.c
  3239. *** src/libgraphic/objman.c    Mon Aug 29 20:08:45 1988
  3240. --- /mit/interviews/src/libgraphic/objman.c    Sat Feb 25 16:52:09 1989
  3241. ***************
  3242. *** 19,26 ****
  3243.   ObjectMan* TheManager = nil;        // global object manager object
  3244.                       // (user initialized!)
  3245.   
  3246. - extern int sprintf(char*, const char* ...);
  3247.   static Persistent* ObjectConstruct (ClassId id) {
  3248.       switch (id) {
  3249.       case PERSISTENT:    return new Persistent;
  3250. --- 19,24 ----
  3251. ***************
  3252. *** 53,59 ****
  3253.       return false;
  3254.   }
  3255.   
  3256. ! boolean ObjectMan::read (File* f) {
  3257.       char tmpfilename [NAMESIZE];
  3258.       boolean ok = Persistent::read(f) &&
  3259.       f->Read(tmpfilename) && root->Read(f) && f->Read(lastuid);
  3260. --- 51,57 ----
  3261.       return false;
  3262.   }
  3263.   
  3264. ! boolean ObjectMan::read (GFile* f) {
  3265.       char tmpfilename [NAMESIZE];
  3266.       boolean ok = Persistent::read(f) &&
  3267.       f->Read(tmpfilename) && root->Read(f) && f->Read(lastuid);
  3268. ***************
  3269. *** 71,83 ****
  3270.       strcpy(objStoreName, filename);
  3271.       strcat(objStoreName, OBJSTORE_POSTFIX);
  3272.   
  3273. !     objMap = new File (objMapName);
  3274. !     objStore = new File (objStoreName);
  3275.       }
  3276.       return ok;
  3277.   }
  3278.   
  3279. ! boolean ObjectMan::write (File* f) {
  3280.       boolean ok = Persistent::write(f) && f->Write(filename) && root->Write(f);
  3281.       lastuidOffset = f->CurOffset();
  3282.       ok = ok && f->Write(lastuid);
  3283. --- 69,81 ----
  3284.       strcpy(objStoreName, filename);
  3285.       strcat(objStoreName, OBJSTORE_POSTFIX);
  3286.   
  3287. !     objMap = new GFile (objMapName);
  3288. !     objStore = new GFile (objStoreName);
  3289.       }
  3290.       return ok;
  3291.   }
  3292.   
  3293. ! boolean ObjectMan::write (GFile* f) {
  3294.       boolean ok = Persistent::write(f) && f->Write(filename) && root->Write(f);
  3295.       lastuidOffset = f->CurOffset();
  3296.       ok = ok && f->Write(lastuid);
  3297. ***************
  3298. *** 105,112 ****
  3299.       strcpy(objStoreName, filename);
  3300.       strcat(objStoreName, OBJSTORE_POSTFIX);
  3301.   
  3302. !     objMap = new File (objMapName);
  3303. !     objStore = new File (objStoreName);
  3304.   
  3305.       Ref uid (lastuid = OBJMANUID);
  3306.       root = new RefList;
  3307. --- 103,110 ----
  3308.       strcpy(objStoreName, filename);
  3309.       strcat(objStoreName, OBJSTORE_POSTFIX);
  3310.   
  3311. !     objMap = new GFile (objMapName);
  3312. !     objStore = new GFile (objStoreName);
  3313.   
  3314.       Ref uid (lastuid = OBJMANUID);
  3315.       root = new RefList;
  3316. ***************
  3317. *** 116,122 ****
  3318.           (*userInitializer)(root);    // initialize root object(s)
  3319.       }
  3320.       } else if (
  3321. !     !(seek(OBJMANUID) && objStore->Read(id) && read(objStore))
  3322.       ) {
  3323.       Panic( "can't read root object" );
  3324.       }
  3325. --- 114,120 ----
  3326.           (*userInitializer)(root);    // initialize root object(s)
  3327.       }
  3328.       } else if (
  3329. !     !(seek(OBJMANUID) && objStore->Read((int) id) && read(objStore))
  3330.       ) {
  3331.       Panic( "can't read root object" );
  3332.       }
  3333. ***************
  3334. *** 208,214 ****
  3335.       );
  3336.       }
  3337.       if (
  3338. !     objStore->Read(id)
  3339.       && (ref->refto = Create(id)) != nil
  3340.       && ref->refto->read( objStore )
  3341.       ) {
  3342. --- 206,212 ----
  3343.       );
  3344.       }
  3345.       if (
  3346. !     objStore->Read((int) id)
  3347.       && (ref->refto = Create(id)) != nil
  3348.       && ref->refto->read( objStore )
  3349.       ) {
  3350. ***************
  3351. *** 246,252 ****
  3352.       return
  3353.       objMap->SeekTo( getOffset( uid ) )
  3354.       && objMap->Write( int(currentOffset) )
  3355. !     && objStore->Write( obj->GetClassId() );
  3356.   }
  3357.   
  3358.   
  3359. --- 244,250 ----
  3360.       return
  3361.       objMap->SeekTo( getOffset( uid ) )
  3362.       && objMap->Write( int(currentOffset) )
  3363. !     && objStore->Write( (int) obj->GetClassId() );
  3364.   }
  3365.   
  3366.   
  3367. diff -rc src/libgraphic/persistent.c /mit/interviews/src/libgraphic/persistent.c
  3368. *** src/libgraphic/persistent.c    Mon Aug 29 20:08:53 1988
  3369. --- /mit/interviews/src/libgraphic/persistent.c    Sat Feb 25 16:52:22 1989
  3370. ***************
  3371. *** 29,35 ****
  3372.       return TheManager->GetUID( this );
  3373.   }
  3374.   
  3375. ! boolean Persistent::write (File*) {
  3376.       if (TheManager->Update(this)) {
  3377.       Clean();
  3378.       return true;
  3379. --- 29,35 ----
  3380.       return TheManager->GetUID( this );
  3381.   }
  3382.   
  3383. ! boolean Persistent::write (GFile*) {
  3384.       if (TheManager->Update(this)) {
  3385.       Clean();
  3386.       return true;
  3387. ***************
  3388. *** 38,48 ****
  3389.       }
  3390.   }
  3391.   
  3392. ! boolean Persistent::read (File*) {
  3393.       return true;
  3394.   }
  3395.   
  3396. ! boolean Persistent::readObjects (File*) {
  3397.       return true;
  3398.   }
  3399.   
  3400. --- 38,48 ----
  3401.       }
  3402.   }
  3403.   
  3404. ! boolean Persistent::read (GFile*) {
  3405.       return true;
  3406.   }
  3407.   
  3408. ! boolean Persistent::readObjects (GFile*) {
  3409.       return true;
  3410.   }
  3411.   
  3412. ***************
  3413. *** 80,86 ****
  3414.       return IsDirty() ? TheManager->Store(this) : true;
  3415.   }
  3416.   
  3417. ! boolean Persistent::writeObjects (File* f) {
  3418.       return write(f);
  3419.   }
  3420.   
  3421. --- 80,86 ----
  3422.       return IsDirty() ? TheManager->Store(this) : true;
  3423.   }
  3424.   
  3425. ! boolean Persistent::writeObjects (GFile* f) {
  3426.       return write(f);
  3427.   }
  3428.   
  3429. diff -rc src/libgraphic/picture.c /mit/interviews/src/libgraphic/picture.c
  3430. *** src/libgraphic/picture.c    Tue Aug 30 02:44:41 1988
  3431. --- /mit/interviews/src/libgraphic/picture.c    Sun Feb 26 17:17:36 1989
  3432. ***************
  3433. *** 31,49 ****
  3434.       p->invalidateCaches();
  3435.   }
  3436.   
  3437. ! boolean Picture::read (File* f) {
  3438.       return FullGraphic::read(f) && refList->Read(f);
  3439.   }
  3440.   
  3441. ! boolean Picture::readObjects (File* f) {
  3442.       return FullGraphic::readObjects(f) && refList->ReadObjects(f);
  3443.   }
  3444.   
  3445. ! boolean Picture::write (File* f) {
  3446.       return FullGraphic::write(f) && refList->Write(f);
  3447.   }
  3448.   
  3449. ! boolean Picture::writeObjects (File* f) {
  3450.       return FullGraphic::writeObjects(f) && refList->WriteObjects(f);
  3451.   }
  3452.   
  3453. --- 31,49 ----
  3454.       p->invalidateCaches();
  3455.   }
  3456.   
  3457. ! boolean Picture::read (GFile* f) {
  3458.       return FullGraphic::read(f) && refList->Read(f);
  3459.   }
  3460.   
  3461. ! boolean Picture::readObjects (GFile* f) {
  3462.       return FullGraphic::readObjects(f) && refList->ReadObjects(f);
  3463.   }
  3464.   
  3465. ! boolean Picture::write (GFile* f) {
  3466.       return FullGraphic::write(f) && refList->Write(f);
  3467.   }
  3468.   
  3469. ! boolean Picture::writeObjects (GFile* f) {
  3470.       return FullGraphic::writeObjects(f) && refList->WriteObjects(f);
  3471.   }
  3472.   
  3473. diff -rc src/libgraphic/polygons.c /mit/interviews/src/libgraphic/polygons.c
  3474. *** src/libgraphic/polygons.c    Mon Aug 29 20:09:01 1988
  3475. --- /mit/interviews/src/libgraphic/polygons.c    Sat Feb 25 16:52:54 1989
  3476. ***************
  3477. *** 6,17 ****
  3478.   #include <InterViews/Graphic/grclasses.h>
  3479.   #include <InterViews/Graphic/polygons.h>
  3480.   
  3481. ! boolean Rect::read (File* f) {
  3482.       return Graphic::read(f) && patbr.Read(f) &&
  3483.       f->Read(x0) && f->Read(y0) && f->Read(x1) && f->Read(y1);
  3484.   }
  3485.   
  3486. ! boolean Rect::write (File* f) {
  3487.       return Graphic::write(f) && patbr.Write(f) &&
  3488.       f->Write(x0) && f->Write(y0) && f->Write(x1) && f->Write(y1);
  3489.   }
  3490. --- 6,17 ----
  3491.   #include <InterViews/Graphic/grclasses.h>
  3492.   #include <InterViews/Graphic/polygons.h>
  3493.   
  3494. ! boolean Rect::read (GFile* f) {
  3495.       return Graphic::read(f) && patbr.Read(f) &&
  3496.       f->Read(x0) && f->Read(y0) && f->Read(x1) && f->Read(y1);
  3497.   }
  3498.   
  3499. ! boolean Rect::write (GFile* f) {
  3500.       return Graphic::write(f) && patbr.Write(f) &&
  3501.       f->Write(x0) && f->Write(y0) && f->Write(x1) && f->Write(y1);
  3502.   }
  3503. diff -rc src/libgraphic/ppaint.c /mit/interviews/src/libgraphic/ppaint.c
  3504. *** src/libgraphic/ppaint.c    Tue Sep  6 16:08:31 1988
  3505. --- /mit/interviews/src/libgraphic/ppaint.c    Sat Feb 25 16:53:05 1989
  3506. ***************
  3507. *** 14,22 ****
  3508.   PBrush* pnone;
  3509.   PFont* pstdfont;
  3510.   
  3511. ! extern void bcopy (void*, void*, int);
  3512.   
  3513. ! boolean PColor::read (File* f) {
  3514.       int index, r, g, b;
  3515.       boolean ok = 
  3516.       Persistent::read(f) && 
  3517. --- 14,24 ----
  3518.   PBrush* pnone;
  3519.   PFont* pstdfont;
  3520.   
  3521. ! #ifndef __GNUG__
  3522. ! extern "C" void bcopy (void*, void*, int);
  3523. ! #endif
  3524.   
  3525. ! boolean PColor::read (GFile* f) {
  3526.       int index, r, g, b;
  3527.       boolean ok = 
  3528.       Persistent::read(f) && 
  3529. ***************
  3530. *** 28,34 ****
  3531.       return ok;
  3532.   }
  3533.   
  3534. ! boolean PColor::write (File* f) {
  3535.       int r, g, b;
  3536.       value->Intensities(r, g, b);
  3537.       return 
  3538. --- 30,36 ----
  3539.       return ok;
  3540.   }
  3541.   
  3542. ! boolean PColor::write (GFile* f) {
  3543.       int r, g, b;
  3544.       value->Intensities(r, g, b);
  3545.       return 
  3546. ***************
  3547. *** 69,75 ****
  3548.       Persistent::Delete();
  3549.   }
  3550.   
  3551. ! boolean PPattern::read (File* f) {
  3552.       boolean ok = Persistent::read(f);
  3553.   
  3554.       if (ok) {
  3555. --- 71,77 ----
  3556.       Persistent::Delete();
  3557.   }
  3558.   
  3559. ! boolean PPattern::read (GFile* f) {
  3560.       boolean ok = Persistent::read(f);
  3561.   
  3562.       if (ok) {
  3563. ***************
  3564. *** 82,88 ****
  3565.       return ok;
  3566.   }
  3567.   
  3568. ! boolean PPattern::write (File* f) {
  3569.       return Persistent::write(f) && f->Write(data, patternHeight);
  3570.   }
  3571.   
  3572. --- 84,90 ----
  3573.       return ok;
  3574.   }
  3575.   
  3576. ! boolean PPattern::write (GFile* f) {
  3577.       return Persistent::write(f) && f->Write(data, patternHeight);
  3578.   }
  3579.   
  3580. ***************
  3581. *** 124,136 ****
  3582.       Persistent::Delete();
  3583.   }
  3584.   
  3585. ! boolean PBrush::read (File* f) {
  3586.       int w;
  3587.       boolean ok = Persistent::read(f) && f->Read(w) && f->Read(p);
  3588.       
  3589.       if (ok) {
  3590.       if (w == 1 && p == 0xffff) { 
  3591. !         value = single;        // new brushes don't work on GPX; this
  3592.           value->Reference();        // gives us at least the default
  3593.       } else if (w == NO_WIDTH) {
  3594.           value = nil;
  3595. --- 126,138 ----
  3596.       Persistent::Delete();
  3597.   }
  3598.   
  3599. ! boolean PBrush::read (GFile* f) {
  3600.       int w;
  3601.       boolean ok = Persistent::read(f) && f->Read(w) && f->Read(p);
  3602.       
  3603.       if (ok) {
  3604.       if (w == 1 && p == 0xffff) { 
  3605. !         value = Bsingle;        // new brushes don't work on GPX; this
  3606.           value->Reference();        // gives us at least the default
  3607.       } else if (w == NO_WIDTH) {
  3608.           value = nil;
  3609. ***************
  3610. *** 141,147 ****
  3611.       return ok;
  3612.   }
  3613.   
  3614. ! boolean PBrush::write (File* f) {
  3615.       return Persistent::write(f) && f->Write(value->Width()) && f->Write(p);
  3616.   }
  3617.   
  3618. --- 143,149 ----
  3619.       return ok;
  3620.   }
  3621.   
  3622. ! boolean PBrush::write (GFile* f) {
  3623.       return Persistent::write(f) && f->Write(value->Width()) && f->Write(p);
  3624.   }
  3625.   
  3626. ***************
  3627. *** 160,166 ****
  3628.   PBrush::PBrush (int p, int w) {
  3629.       this->p = p;
  3630.       if (w == 1  && p == 0xffff) { 
  3631. !     value = single;            // new brushes don't work on GPX; this
  3632.       value->Reference();        // gives us at least the default
  3633.       } else if (w == NO_WIDTH) {
  3634.       value = nil;
  3635. --- 162,168 ----
  3636.   PBrush::PBrush (int p, int w) {
  3637.       this->p = p;
  3638.       if (w == 1  && p == 0xffff) { 
  3639. !     value = Bsingle;        // new brushes don't work on GPX; this
  3640.       value->Reference();        // gives us at least the default
  3641.       } else if (w == NO_WIDTH) {
  3642.       value = nil;
  3643. ***************
  3644. *** 174,180 ****
  3645.       Persistent::Delete();
  3646.   }
  3647.   
  3648. ! boolean PFont::read (File* f) {
  3649.       int count;
  3650.       boolean ok = Persistent::read(f) && f->Read(count);
  3651.       
  3652. --- 176,182 ----
  3653.       Persistent::Delete();
  3654.   }
  3655.   
  3656. ! boolean PFont::read (GFile* f) {
  3657.       int count;
  3658.       boolean ok = Persistent::read(f) && f->Read(count);
  3659.       
  3660. ***************
  3661. *** 197,203 ****
  3662.       return ok;
  3663.   }
  3664.   
  3665. ! boolean PFont::write (File* f) {
  3666.       boolean ok = Persistent::write(f) && f->Write(count);
  3667.       if (ok && count > 0) {
  3668.       ok = f->Write(name);
  3669. --- 199,205 ----
  3670.       return ok;
  3671.   }
  3672.   
  3673. ! boolean PFont::write (GFile* f) {
  3674.       boolean ok = Persistent::write(f) && f->Write(count);
  3675.       if (ok && count > 0) {
  3676.       ok = f->Write(name);
  3677. diff -rc src/libgraphic/reflist.c /mit/interviews/src/libgraphic/reflist.c
  3678. *** src/libgraphic/reflist.c    Sun Jan 31 20:21:46 1988
  3679. --- /mit/interviews/src/libgraphic/reflist.c    Sat Feb 25 16:53:21 1989
  3680. ***************
  3681. *** 16,22 ****
  3682.       return nil;
  3683.   }
  3684.   
  3685. ! boolean RefList::Write (File* f) {
  3686.       RefList* i;
  3687.       int count = 0;
  3688.   
  3689. --- 16,22 ----
  3690.       return nil;
  3691.   }
  3692.   
  3693. ! boolean RefList::Write (GFile* f) {
  3694.       RefList* i;
  3695.       int count = 0;
  3696.   
  3697. ***************
  3698. *** 30,36 ****
  3699.       return ok;
  3700.   }
  3701.   
  3702. ! boolean RefList::Read (File* f) {
  3703.       int count;
  3704.       RefList* i;
  3705.   
  3706. --- 30,36 ----
  3707.       return ok;
  3708.   }
  3709.   
  3710. ! boolean RefList::Read (GFile* f) {
  3711.       int count;
  3712.       RefList* i;
  3713.   
  3714. ***************
  3715. *** 43,49 ****
  3716.       return ok;
  3717.   }
  3718.   
  3719. ! boolean RefList::WriteObjects (File* f) {
  3720.       RefList* i;
  3721.       boolean ok = true;
  3722.   
  3723. --- 43,49 ----
  3724.       return ok;
  3725.   }
  3726.   
  3727. ! boolean RefList::WriteObjects (GFile* f) {
  3728.       RefList* i;
  3729.       boolean ok = true;
  3730.   
  3731. ***************
  3732. *** 53,59 ****
  3733.       return ok;
  3734.   }
  3735.   
  3736. ! boolean RefList::ReadObjects (File* f) {
  3737.       RefList* i;
  3738.       boolean ok = true;
  3739.   
  3740. --- 53,59 ----
  3741.       return ok;
  3742.   }
  3743.   
  3744. ! boolean RefList::ReadObjects (GFile* f) {
  3745.       RefList* i;
  3746.       boolean ok = true;
  3747.   
  3748. diff -rc src/libtext/text.c /mit/interviews/src/libtext/text.c
  3749. *** src/libtext/text.c    Sat Jan 30 03:21:08 1988
  3750. --- /mit/interviews/src/libtext/text.c    Thu Feb 23 21:54:09 1989
  3751. ***************
  3752. *** 6,12 ****
  3753.   #include <InterViews/Text/layout.h>
  3754.   
  3755.   #include <string.h>
  3756. ! extern void bcopy(const char* source, char* dest, int count);
  3757.   
  3758.   Text::Text (void* cont) {
  3759.       if (cont == SELF) {
  3760. --- 6,14 ----
  3761.   #include <InterViews/Text/layout.h>
  3762.   
  3763.   #include <string.h>
  3764. ! #ifndef __GNUG__
  3765. ! extern "C" void bcopy(const char* source, char* dest, int count);
  3766. ! #endif
  3767.   
  3768.   Text::Text (void* cont) {
  3769.       if (cont == SELF) {
  3770. diff -rc src/libtext/textblock.c /mit/interviews/src/libtext/textblock.c
  3771. *** src/libtext/textblock.c    Wed Aug 10 13:28:01 1988
  3772. --- /mit/interviews/src/libtext/textblock.c    Thu Feb 23 21:54:12 1989
  3773. ***************
  3774. *** 16,23 ****
  3775. --- 16,29 ----
  3776.   static const int STRETCH = 10;
  3777.   static const float PAGEFRACT = 0.8;
  3778.   
  3779. + #ifndef __GNUG__
  3780. + extern "C" {
  3781. + #endif
  3782.   extern char* memcpy(char* dest, const char* source, int count);
  3783.   extern char* memset(char* dest, int c, int count);
  3784. + #ifndef __GNUG__
  3785. + }
  3786. + #endif
  3787.   
  3788.   TextBlock::TextBlock (int w, int h, Interactor* hand) {
  3789.       layout = nil;
  3790. diff -rc src/libtext/textviewer.c /mit/interviews/src/libtext/textviewer.c
  3791. *** src/libtext/textviewer.c    Wed Jul  6 00:32:44 1988
  3792. --- /mit/interviews/src/libtext/textviewer.c    Thu Feb 23 21:54:17 1989
  3793. ***************
  3794. *** 11,18 ****
  3795. --- 11,22 ----
  3796.   
  3797.   static const float pagefract = 0.8;        // fraction of page to scroll
  3798.   
  3799. + #ifndef __GNUG__
  3800. + extern "C" {
  3801.   extern void bzero(char* dest, int count);
  3802.   extern void bcopy(const char* source, char* dest, int count);
  3803. + }
  3804. + #endif
  3805.   
  3806.   void TPainter::StyledText (Canvas* c, const char* p, int len, StyleSet) {
  3807.       // styles not implemented yet
  3808.