
================ sqGnu.h

================ sqUnixAsynchFile.c
8c8
<  * Last edited: Fri Aug 25 15:42:25 2000 by piumarta (Ian Piumarta) on emilia
---
>  * Last edited: Fri Aug 25 20:07:20 2000 by piumarta (Ian Piumarta) on emilia
74d73
<   

================ sqUnixExternalPrims.c
8c8
<  * Last edited: Mon Aug 28 06:30:28 2000 by piumarta (Ian Piumarta) on emilia
---
>  * Last edited: 2000-10-26 14:52:16 by piumarta on emilia.rd.wdi.disney.com
26,29c26,39
<  
< #ifndef RTLD_NOW
< # define RTLD_NOW	1
< # warning: assuming RTLD_NOW should be defined as 1
---
> 
> /* get a value for RTLD_NOW, with increasing levels of desperation... */
> 
> #if !defined(RTLD_NOW)
> # if defined(DL_NOW)
> #   define RTLD_NOW DL_NOW
> # elif defined(RTLD_LAZY)
> #   define RTLD_NOW RTLD_LAZY
> # elif defined(DL_LAZY)
> #   define RTLD_NOW DL_LAZY
> # else
> #   warning: defining RTLD_NOW as 1
> #   define RTLD_NOW 1
> # endif
181a192,212
> 
> 
> #else /* !HAVE_LIBDL */
> 
> 
> 
> int ioLoadModule(char *pluginName)
> {
>   return 0;
> }
> 
> int ioFindExternalFunctionIn(char *lookupName, int moduleHandle)
> {
>   return 0;
> }
> 
> int ioFreeModule(int moduleHandle)
> {
>   return 0;
> }
> 

================ sqUnixFile.c
8c8
<  * Last edited: 2001-02-07 11:06:09 by piumarta on rnd10-51.rd.wdi.disney.com
---
>  * Last edited: Wed Sep 27 15:32:08 2000 by piumarta (Ian Piumarta) on emilia
58,59c58,59
< int  lastIndex;
< DIR *openDir;
---
> int  lastIndex= -1;
> DIR *openDir= 0;
148c148,151
<     rewinddir(openDir);	/* really rewind it, and read to the index */
---
>     {
>       rewinddir(openDir);	/* really rewind it, and read to the index */
>       lastIndex= index;
>     }
218,224d220
<   return true;
< }
< 
< 
< int dir_GetMacFileTypeAndCreator(char *filename, int filenameSize,
< 				 char *fType, char *fCreator)
< {

================ sqUnixJoystickTablet.c

================ sqUnixMIDI.c

================ sqUnixMozilla.c

================ sqUnixSerial.c
5c5
<  * Last edited: Fri Aug 25 23:05:15 2000 by piumarta (Ian Piumarta) on grimmy
---
>  * Last edited: Wed Sep  6 03:39:38 2000 by piumarta (Ian Piumarta) on emilia
234d233
< 	flags.c_cflag &= ~CRTSCTS;
238c237,248
< 	if (inFlowCtrl == 2 || outFlowCtrl == 2) flags.c_cflag |= CRTSCTS;
---
> 
> #	if defined(CRTSCTS)
> 	flags.c_cflag &= ~CRTSCTS;
>  	if (inFlowCtrl == 2 || outFlowCtrl == 2) flags.c_cflag |= CRTSCTS;
> #	else   /* not defined in IRIX!? */
> 	if (inFlowCtrl == 2 || outFlowCtrl == 2)
> 	{
> 		fprintf(stderr, "CRTSCTS not supported.\n");
> 		success(false);
> 		return 0;
> 	}
> #	endif

================ sqUnixSocket.c

================ sqUnixSound.c
8c8
<  * Last edited: 2001-02-07 11:05:10 by piumarta on rnd10-51.rd.wdi.disney.com
---
>  * Last edited: 2000-11-16 12:12:50 by piumarta on emilia.rd.wdi.disney.com
93c93
<   if (info.fragments > HWM_FRAGMENTS)
---
>   if (info.fragments > 0)
174c174
< # if 0
---
> # if 1
186c186
<     int format= AFMT_S16_LE;  
---
>     int format= AFMT_S16_LE;
426,436d425
< void snd_Volume(double *left, double *right)
< {
<   return 0;
< }
< 
< 
< void snd_SetVolume(double left, double right)
< {
<   return 0;
< }
< 
468,472d456
< void snd_Volume(double *left, double *right)
<      FAIL(0)
< void snd_SetVolume(double left, double right)
<      FAIL(0)
< 

================ sqXWindow.c
8c8
<  * Last edited: 2001-02-07 11:02:52 by piumarta on rnd10-51.rd.wdi.disney.com
---
>  * Last edited: 2000-11-16 13:46:43 by piumarta on emilia.rd.wdi.disney.com
19c19,20
<  * Support for European accented characters in selections contributed by:
---
>  * Support for European accented characters in selections, and
>  * Support for displays shallower than 8 bits contributed by:
42a44,47
> /* if defined then the main Squeak window is a subwindow in an
>    invisible enclosing InputOutput window.  helps integrate the
>    Mozilla plugin stuff and fullscreen mode. */
> 
90c95
< # undef USE_INTERNAL_IMAGE
---
> # define USE_INTERNAL_IMAGE
148c153,154
< #define xClassName	"Squeak"
---
> #define xResClass	"Squeak"
> #define xResName	"squeak"
152c158
< int		isConnectedToXServer=0;	/* True when connected to an X server */
---
> int		 isConnectedToXServer=0;/* True when connected to an X server */
153a160
> Window		 stParent= null;	/* Squeak parent window */
157a165,166
> int		 scrW= 0;
> int		 scrH= 0;
187a197,207
> 
> /* window states */
> #define	WIN_NORMAL	0
> #define	WIN_CHANGED	1
> #define	WIN_ZOOMED	2
> int	windowState=	WIN_CHANGED;
> 
> #define noteWindowChange() \
>   if (windowState == WIN_NORMAL) \
>     windowState= WIN_CHANGED;
> 
195c215
< int		 noJitter= 0;
---
> int		 noJitter= 1;
205c225,227
< /* we are interested in these events */
---
> 
> /* we are interested in these events...
>  */
208c230,232
< 			ExposureMask | StructureNotifyMask
---
> 			ExposureMask
> 
> #define	WM_EVENTMASK	StructureNotifyMask
283a308,322
> declareCopyFunction(copyImage1To8); 
> declareCopyFunction(copyImage1To16); 
> declareCopyFunction(copyImage1To24);
> declareCopyFunction(copyImage1To32); 
> 
> declareCopyFunction(copyImage2To8); 
> declareCopyFunction(copyImage2To16); 
> declareCopyFunction(copyImage2To24);
> declareCopyFunction(copyImage2To32); 
> 
> declareCopyFunction(copyImage4To8); 
> declareCopyFunction(copyImage4To16); 
> declareCopyFunction(copyImage4To24);
> declareCopyFunction(copyImage4To32); 
> 
286,287d324
< declareCopyFunction(copyImage16To8);
< declareCopyFunction(copyImage8To32);
289,290c326,329
< declareCopyFunction(copyImage32To8);
< declareCopyFunction(copyImage16To32);
---
> declareCopyFunction(copyImage8To32);
> 
> declareCopyFunction(copyImage16To8);
> declareCopyFunction(copyImage16To16);
291a331,333
> declareCopyFunction(copyImage16To32);
> 
> declareCopyFunction(copyImage32To8);
293,294d334
< declareCopyFunction(copyImage16To16);
< declareCopyFunction(copyImage32To32);
295a336
> declareCopyFunction(copyImage32To32);
435a477
>     XMapWindow(stDisplay, stParent);
457a500
>   stParent= null;
471a515,516
>     if (browserWindow == 0)
>       XDestroyWindow(stDisplay, stParent);
567a613
>     if (ev.type == ConfigureNotify) noteWindowChange();
647,674d692
< /* Returns absolute window position */
< static void getAbsoluteGeometry(int *winX, int* winY, int* winW, int* winH)
< {
<   Window root, win, parent;
<   Window *children;
<   int x, y, w, h, absX, absY;
<   unsigned int b, d, nchildren;
< 
<   absX= absY= 0;
<   win= stWindow;
<   do {
<     XGetGeometry(stDisplay, win, &root, &x, &y, &w, &h, &b, &d);
<     if (win == stWindow) {
<       *winW= w;
<       *winH= h;
<     }
<     absX+= x;
<     absY+= y;
<     XQueryTree(stDisplay, win, &root, &parent, &children, &nchildren);
<     if (children) XFree(children);
<     win= parent;
<   } while (win != root);
<   *winX= absX;
<   *winY= absY;
< }
< 
< #endif /*!HEADLESS*/
< 
676,679c694,704
< /*** event handling ***/
< 
< 
< /* set asynchronous input event semaphore
---
> /* Returns absolute window position.
>  * 
>  * If the Squeak window is `decorated' (border, title bar, etc.) by
>  * the window manager then it will be a subwindow of a larger window
>  * (the `WM window') holding the decorations.  When saving geometry
>  * before going fullscreen we need the width and height of the Squeak
>  * window, but the absolute position of the WM window.  Otherwise the
>  * Squeak window will `creep' down and to the right on the display,
>  * horizontally by the width of the decoration border and vertically
>  * by the decoration border width + title bar height, each time we
>  * toggle fullscreen off.
681c706,707
< int ioSetInputSemaphore(int semaIndex)
---
> static void getAbsoluteGeometry(Display *dpy, Window win,
> 				int *winX, int* winY, int* winW, int* winH)
683,684c709,724
<   success(false);
<   return 0;
---
>   Window root, wmWin;
>   int x, y, w, h;
>   unsigned int b, d;
> 
>   XGetGeometry(dpy, win, &root, &x, &y, winW, winH, &b, &d);
>   do
>     {
>       Window parent, *children;
>       unsigned int nchildren;
>       XQueryTree(dpy, win, &root, &parent, &children, &nchildren);
>       if (children != 0) XFree(children);
>       wmWin=win;
>       win= parent;
>     }
>   while (win != root);
>   XGetGeometry(dpy, wmWin, &root, winX, winY, &w, &h, &b, &d);
687,694c727
< 
< /* retrieve the next input event from the OS
<  */
< int ioGetNextEvent(sqInputEvent *evt)
< {
<   success(false);
<   return 0;
< }
---
> #endif /*!HEADLESS*/
713,715c746
< 
< 
<       XNextEvent(stDisplay, &theEvent);
---
>   XNextEvent(stDisplay, &theEvent);
717,722c748,753
<       switch (theEvent.type)
< 	{
< 	case MotionNotify:
< 	  mousePosition.x= ((XMotionEvent *)&theEvent)->x;
< 	  mousePosition.y= ((XMotionEvent *)&theEvent)->y;
< 	  break;
---
>   switch (theEvent.type)
>     {
>     case MotionNotify:
>       mousePosition.x= ((XMotionEvent *)&theEvent)->x;
>       mousePosition.y= ((XMotionEvent *)&theEvent)->y;
>       break;
724,727c755,758
< 	case ButtonPress:
< 	  recordMouseDown((XButtonEvent *)&theEvent);
< 	  return false;
< 	  break;
---
>     case ButtonPress:
>       recordMouseDown((XButtonEvent *)&theEvent);
>       return false;
>       break;
729,735c760,766
< 	case ButtonRelease:
< 	  recordModifierButtons((XButtonEvent *)&theEvent);
< 	  /* button up on "paste" causes a selection retrieval:
< 	     record the event time in case we need it later */
< 	  stButtonTime= ((XButtonEvent *)&theEvent)->time;
< 	  return false;
< 	  break;
---
>     case ButtonRelease:
>       recordModifierButtons((XButtonEvent *)&theEvent);
>       /* button up on "paste" causes a selection retrieval:
> 	 record the event time in case we need it later */
>       stButtonTime= ((XButtonEvent *)&theEvent)->time;
>       return false;
>       break;
737,742c768,773
< 	case KeyPress:
< 	  recordModifierButtons((XButtonEvent *)&theEvent);
< 	  recordKeystroke((XKeyEvent *)&theEvent);
< 	  /* a key bound to the paste operation causes a selection
< 	     retrieval: record the event time in case we need it later */
< 	  break;
---
>     case KeyPress:
>       recordModifierButtons((XButtonEvent *)&theEvent);
>       recordKeystroke((XKeyEvent *)&theEvent);
>       /* a key bound to the paste operation causes a selection
> 	 retrieval: record the event time in case we need it later */
>       break;
744,746c775,777
< 	case SelectionClear:
< 	  stOwnsSelection= 0;
< 	  break;
---
>     case SelectionClear:
>       stOwnsSelection= 0;
>       break;
748,750c779,781
< 	case SelectionRequest:
< 	  sendSelection(&theEvent.xselectionrequest);
< 	  break;
---
>     case SelectionRequest:
>       sendSelection(&theEvent.xselectionrequest);
>       break;
752,754c783,785
< 	case Expose:
< 	  {
< 	    XExposeEvent *ex= (XExposeEvent *)&theEvent;
---
>     case Expose:
>       {
> 	XExposeEvent *ex= (XExposeEvent *)&theEvent;
756,759c787,791
< 	    if (asyncUpdate) {
< 	      /* wait for pending updates */
< 	      while (completions) HandleEvents();
< 	    }
---
> 	if (asyncUpdate)
> 	  {
> 	    /* wait for pending updates */
> 	    while (completions) HandleEvents();
> 	  }
762,764c794,796
< 	    /* ignore it if there are other exposures upstream */
< 	    if (ex->count == 0)
< 	      fullDisplayUpdate();  /* this makes VM call ioShowDisplay */
---
> 	/* ignore it if there are other exposures upstream */
> 	if (ex->count == 0)
> 	  fullDisplayUpdate();  /* this makes VM call ioShowDisplay */
766c798
< 	    redrawDisplay(ex->x, ex->x + ex->width, ex->y, ex->y + ex->height);
---
> 	redrawDisplay(ex->x, ex->x + ex->width, ex->y, ex->y + ex->height);
768,769c800,801
< 	  }
< 	  break;
---
>       }
>       break;
771,776c803,809
< 	case MapNotify:
< 	  /* The window has just been mapped, possibly for the first
< 	     time: update mousePosition (which otherwise may not be
< 	     set before the first button event). */
< 	  getMousePosition();
< 	  break;
---
>     case MapNotify:
>       /* The window has just been mapped, possibly for the first
> 	 time: update mousePosition (which otherwise may not be
> 	 set before the first button event). */
>       getMousePosition();
>       noteWindowChange();
>       break;
778,783c811,818
< 	case UnmapNotify:
< 	  {
< 	    if (sleepWhenUnmapped)
< 	      do {
< 		XNextEvent(stDisplay, &theEvent);
< 		switch (theEvent.type) {
---
>     case UnmapNotify:
>       {
> 	if (sleepWhenUnmapped)
> 	  do
> 	    {
> 	      XNextEvent(stDisplay, &theEvent);
> 	      switch (theEvent.type)
> 		{
791,794c826,830
< 	      } while (theEvent.type != MapNotify);
< 	    getMousePosition();
< 	  }
< 	  break;
---
> 	    } while (theEvent.type != MapNotify);
> 	getMousePosition();
>       }
>       noteWindowChange();
>       break;
796,798c832,835
<         case ClientMessage:
< 	  if (browserWindow) pluginHandleEvent(&theEvent);
< 	  break;
---
>     case ClientMessage:
>       if (browserWindow != 0)
> 	pluginHandleEvent(&theEvent);
>       break;
800,802c837,842
< 	  /* with the right hook in the VM we could also treat
< 	     StructureNotify here to automatically restore the
< 	     Display when the window size changes */
---
>       /* with the right hook in the VM we could also treat
> 	 ConfigureNotify here to automatically restore the
> 	 Display when the window size changes */
>     case ConfigureNotify:
>       noteWindowChange();
>       break;
805,807c845,847
< 	default:
< 	  if (theEvent.type == completionType) --completions;
< 	  break;
---
>     default:
>       if (theEvent.type == completionType) --completions;
>       break;
809c849
< 	}
---
>     }
1073a1114,1119
>   /* get screen size */
>   scrH= (DisplayHeight(stDisplay, DefaultScreen(stDisplay)));
>   scrW= (DisplayWidth(stDisplay, DefaultScreen(stDisplay)));
>   if ((scrW % sizeof(void *)) != 0)
>     scrW= (scrW / sizeof(void *)) * sizeof(void *);
> 
1158c1204
<     attributes.event_mask= EVENTMASK;
---
>     attributes.event_mask= WM_EVENTMASK;
1162a1209,1221
>     if (browserWindow != 0)
>       stParent= browserWindow;
>     else
>       stParent= XCreateWindow(stDisplay,
> 			      DefaultRootWindow(stDisplay),
> 			      windowBounds.x, windowBounds.y,
> 			      windowBounds.width, windowBounds.height,
> 			      0,
> 			      stDepth, CopyFromParent, stVisual,
> 			      CWEventMask, &attributes);
> 
>     attributes.event_mask= EVENTMASK;
> 
1176,1178c1235,1236
<     stWindow= XCreateWindow(stDisplay,
< 			    browserWindow ? browserWindow : DefaultRootWindow(stDisplay),
< 			    windowBounds.x, windowBounds.y,
---
>     stWindow= XCreateWindow(stDisplay, stParent,
> 			    0, 0,
1180c1238,1239
< 			    browserWindow ? 0 : 1, stDepth, InputOutput, stVisual,
---
> 			    0,
> 			    stDepth, InputOutput, stVisual,
1187,1190c1246,1252
<     classHints->res_name= classHints->res_class= xClassName;
<     XSetClassHint(stDisplay, stWindow, classHints);
<     XStoreName(stDisplay, stWindow, shortImageName);
<     XFree(classHints);
---
>     classHints->res_class= xResClass;
>     classHints->res_name= xResName;
>     if (browserWindow == 0)
>       {
> 	XSetClassHint(stDisplay, stParent, classHints);
> 	XStoreName(stDisplay, stParent, shortImageName);
>       }
1205c1267
<     XSetWMHints(stDisplay, stWindow, wmHints);
---
>     XSetWMHints(stDisplay, stParent, wmHints);
1231c1293
<     XSetTransientForHint(stDisplay, stWindow, DefaultRootWindow(stDisplay));
---
>     XSetTransientForHint(stDisplay, stParent, DefaultRootWindow(stDisplay));
1266,1269c1328,1332
<   if (fullScreen) {
<     width= maxWidth;
<     height= maxHeight;
<   }
---
>   if (fullScreen)
>     {
>       width= maxWidth;
>       height= maxHeight;
>     }
1271c1334
<   XResizeWindow(stDisplay, stWindow, width, height);
---
>   XResizeWindow(stDisplay, stParent, width, height);
1607a1671
> 
1625a1690
> 
1630c1695
<   unsigned int w= 64, h= 64;
---
>   return ((64 << 16) | 64);
1632,1641c1697,1709
<   unsigned int w= 10, h= 10;
<   if (isConnectedToXServer)
<     {
<       Window root;
<       int x, y;
<       unsigned int b, d;
<       XGetGeometry(stDisplay, stWindow, &root, &x, &y, &w, &h, &b, &d);
<     } else {
<       w= h= 64;
<     }
---
>   static unsigned int w= 0, h= 0;
> 
>   if (windowState == WIN_NORMAL)  return (   w << 16) |    h;
>   if (windowState == WIN_ZOOMED)  return (scrW << 16) | scrH;
>   if (!isConnectedToXServer)      return (  64 << 16) |   64;
> 
>   windowState= WIN_NORMAL;
>   {
>     Window root;
>     int x, y;
>     unsigned int b, d;
>     XGetGeometry(stDisplay, stParent, &root, &x, &y, &w, &h, &b, &d);
>   }
1643c1711
<   if (w % sizeof(void *))
---
>   if ((w % sizeof(void *)) != 0)
1645a1714
>       XResizeWindow(stDisplay, stParent, w, h);
1646a1716
>       noteWindowChange();
1647a1718
>   return (w << 16) | h;  /* w is high 16 bits; h is low 16 bits */
1649d1719
<   return (w << 16) | (h & 0xFFFF);  /* w is high 16 bits; h is low 16 bits */
1651a1722
> 
1667a1739
> 
1768c1840,1841
<   ioSetCursorWithMask(cursorBitsIndex, null, offsetX, offsetY);
---
>   if (isConnectedToXServer)
>     ioSetCursorWithMask(cursorBitsIndex, null, offsetX, offsetY);
1772a1846,1852
> static void overrideRedirect(Display *dpy, Window win, int flag)
> {
>   XSetWindowAttributes attrs;
>   attrs.override_redirect= flag;
>   XChangeWindowAttributes(dpy, win, CWOverrideRedirect, &attrs);
> }
> 
1777c1857
<   unsigned int winW, winH, scrW, scrH;
---
>   unsigned int winW, winH;
1779,1825c1859,1884
<   /* get screen size */
<   scrW= (DisplayWidth(stDisplay, DefaultScreen(stDisplay)));
<   scrH= (DisplayHeight(stDisplay, DefaultScreen(stDisplay)));
< 
<   if (fullScreen) {
<     /* setting full-screen mode */
<     if (savedWindowOrigin == -1) {
<       /* EITHER: no previous call, OR: previous call disabled full-screen mode */
<       if (browserWindow) {
< 	/* need extent only */
< 	Window root;
< 	unsigned int b, d;
< 	XGetGeometry(stDisplay, stWindow, &root, &winX, &winY, &winW, &winH, &b, &d);
< 	XReparentWindow(stDisplay, stWindow, root, 0, 0);
<       } else {
< 	/* need absolute coords */
< 	getAbsoluteGeometry(&winX, &winY, &winW, &winH);
<       }
<       /* width must be a multiple of sizeof(void *), or X[Shm]PutImage goes gaga */
<       if ((winW % sizeof(void *)) != 0)
< 	winW= (winW / sizeof(void *)) * sizeof(void *);
<       savedWindowSize= (winW << 16) + (winH & 0xFFFF);
<       savedWindowOrigin= (winX << 16) + (winY & 0xFFFF);
<       if ((scrW % sizeof(void *)) != 0)
< 	scrW= (scrW / sizeof(void *)) * sizeof(void *);
<       XMoveResizeWindow(stDisplay, stWindow, 0, 0, scrW, scrH);
<       /* sync avoids race with ioScreenSize() reading geometry before resize event */
<       XSync(stDisplay, False);
<     }
<   } else {
<     /* reverting to sub-screen mode */
<     if (savedWindowOrigin != -1) { /* previous call enabled full-screen mode */
<       /* get old window size */
<       winW= (unsigned) savedWindowSize >> 16;
<       winH= savedWindowSize & 0xFFFF;
<       /* minimum size is 64 x 64 */
<       winW= (winW > 64) ? winW : 64;
<       winH= (winH > 64) ? winH : 64;
<       /* old origin */
<       winX= savedWindowOrigin >> 16;
<       winY= savedWindowOrigin & 0xFFFF;
<       savedWindowOrigin= -1; /* prevents consecutive full-screen disables */
<       if (browserWindow)
< 	XReparentWindow(stDisplay, stWindow, browserWindow, 0, 0);
<       XMoveResizeWindow(stDisplay, stWindow, winX, winY, winW, winH);
<       /* sync avoids race with ioScreenSize() reading geometry before resize event */
<       XSync(stDisplay, False);
---
>   if (fullScreen)
>     {
>       /* setting full-screen mode */
>       if (savedWindowOrigin == -1)
> 	{
> 	  /* EITHER: no previous call, OR: previous call disabled full-screen mode */
> 	  Window root;
> 	  {
> 	    /* need extent only */
> 	    unsigned int b, d;
> 	    XGetGeometry(stDisplay, stWindow, &root, &winX, &winY, &winW, &winH, &b, &d);
> 	  }
> 	  /* width must be a multiple of sizeof(void *), or X[Shm]PutImage goes gaga */
> 	  if ((winW % sizeof(void *)) != 0)
> 	    winW= (winW / sizeof(void *)) * sizeof(void *);
> 	  savedWindowSize= (winW << 16) + (winH & 0xFFFF);
> 	  savedWindowOrigin= (winX << 16) + (winY & 0xFFFF);
> 	  XSynchronize(stDisplay, True);
> 	  overrideRedirect(stDisplay, stWindow, True);
> 	  XReparentWindow(stDisplay, stWindow, root, 0, 0);
> 	  XResizeWindow(stDisplay, stWindow, scrW, scrH);
> 	  XLowerWindow(stDisplay, stParent);
> 	  XRaiseWindow(stDisplay, stWindow);
> 	  XSynchronize(stDisplay, False);
> 	  windowState= WIN_ZOOMED;
> 	}
1827c1886,1912
<   }
---
>   else
>     {
>       /* reverting to sub-screen mode */
>       if (savedWindowOrigin != -1)
> 	{ /* previous call enabled full-screen mode */
> 	  /* get old window size */
> 	  winW= (unsigned) savedWindowSize >> 16;
> 	  winH= savedWindowSize & 0xFFFF;
> 	  /* minimum size is 64 x 64 */
> 	  winW= (winW > 64) ? winW : 64;
> 	  winH= (winH > 64) ? winH : 64;
> 	  /* old origin */
> 	  winX= savedWindowOrigin >> 16;
> 	  winY= savedWindowOrigin & 0xFFFF;
> 	  savedWindowOrigin= -1; /* prevents consecutive full-screen disables */
> 	  XSynchronize(stDisplay, True);
> 	  XRaiseWindow(stDisplay, stParent);
> 	  XReparentWindow(stDisplay, stWindow, stParent, 0, 0);
> 	  overrideRedirect(stDisplay, stWindow, False);
> 	  XResizeWindow(stDisplay, stWindow, winW, winH);
> 	  XSynchronize(stDisplay, False);
> 	  windowState= WIN_CHANGED;
> 	}
>     }
>   /* sync avoids race with ioScreenSize() reading geometry before resize event */
>   XSync(stDisplay, False);
>   getMousePosition();
1835d1919
< /* shared-memory stuff */
1837c1921,1927
< static void *stMalloc(size_t lbs)
---
> 
> /*** shared-memory stuff ***/
> 
> 
> 
> # ifdef USE_XSHM
> static int xError(Display *dpy, XErrorEvent *evt)
1839,1857c1929,1933
< #ifdef USE_XSHM
<   if (!useXshm)
< #endif
<     return (void *)malloc(lbs);
< #ifdef USE_XSHM
<   if ((stShmInfo.shmid= shmget(IPC_PRIVATE, lbs, IPC_CREAT|0777)) == -1) {
<     perror("shmget");
<     exit(1);
<   }
<   if ((int)(stShmInfo.shmaddr= (char *)shmat(stShmInfo.shmid, 0, 0)) == -1) {
<     perror("shmat");
<     exit(1);
<   }
<   stShmInfo.readOnly= False;
<   if (!XShmAttach(stDisplay, &stShmInfo)) {
<     fprintf(stderr, "XShmAttach: operation failed\n");
<     abort();
<   }
<   return stShmInfo.shmaddr;
---
>   char buf[2048];
>   XGetErrorText(stDisplay, evt->error_code, buf, sizeof(buf));
>   fprintf(stderr, "XShmAttach: %s\n", buf);
>   return 0;
> }
1858a1935,1969
> 
> 
> static void *stMalloc(size_t lbs)
> {
> # ifdef USE_XSHM
>   if (useXshm)
>     {
>       if ((stShmInfo.shmid= shmget(IPC_PRIVATE, lbs, IPC_CREAT|0777)) == -1)
> 	perror("shmget");
>       else
> 	{
> 	  if ((int)(stShmInfo.shmaddr= (char *)shmat(stShmInfo.shmid, 0, 0)) == -1)
> 	    perror("shmat");
> 	  else
> 	    {
> 	      /* temporarily install error handler */
> 	      XErrorHandler prev= XSetErrorHandler(xError);
> 	      int result= 0;
> 	      stShmInfo.readOnly= False;
> 	      result= XShmAttach(stDisplay, &stShmInfo);
> 	      XSync(stDisplay, False);
> 	      XSetErrorHandler(prev);
> 	      if (result == 0)
> 		/* success */
> 		return stShmInfo.shmaddr;
> 	    }
> 	  /* could not attach to allocated shared memory segment */
> 	  shmctl(stShmInfo.shmid, IPC_RMID, 0);
> 	  shmdt(stShmInfo.shmaddr);
> 	}
>       /* could not allocate shared memory segment */
>       useXshm= 0;
>     }
> # endif /* USE_XSHM */
>   return (void *)malloc(lbs);
1860a1972
> 
1883a1996
> 
1898a2012
> 
1918a2033
> 
1933a2049
> 
1946a2063
> 
1957,1962c2074,2080
<   if (!(depth == 8 || depth == 16 || depth == 32))
<   {
<     fprintf(stderr, "depth %d is not supported\n", depth);
<     exit(1);
<     return 0;
<   }
---
>   if (!(depth == 1 || depth == 2 || depth == 4
> 	|| depth == 8 || depth == 16 || depth == 32))
>     {
>       fprintf(stderr, "depth %d is not supported\n", depth);
>       exit(1);
>       return 0;
>     }
1967,1970c2085,2089
<       if (asyncUpdate) {
< 	/* wait for pending updates to complete before freeing the XImage */
< 	while (completions) HandleEvents();
<       }
---
>       if (asyncUpdate)
> 	{
> 	  /* wait for pending updates to complete before freeing the XImage */
> 	  while (completions) HandleEvents();
> 	}
2036a2156,2157
>   if ((affectedR <= affectedL) || (affectedT >= affectedB))
>     return 1;
2040c2161,2245
<       if (depth == 8)
---
>       if (depth == 1)
> 	{
> 	  if (stBitsPerPixel == 8)
> 	    {
> 	      copyImage1To8((int *)dispBitsIndex, (int *)stDisplayBitmap,
> 			    width, height,
> 			    affectedL, affectedT, affectedR, affectedB);
> 	    }
> 	  if (stBitsPerPixel == 16)
> 	    {
> 	      copyImage1To16((int *)dispBitsIndex, (int *)stDisplayBitmap,
> 			     width, height,
> 			     affectedL, affectedT, affectedR, affectedB);
> 	    }
> 	  else if(stBitsPerPixel == 24)
> 	    {
> 	      copyImage1To24((int *)dispBitsIndex, (int *)stDisplayBitmap,
> 			     width, height,
> 			     affectedL, affectedT, affectedR, affectedB);
> 	    }
> 	  else /* stBitsPerPixel == 32 */
> 	    {
> 	      copyImage1To32((int *)dispBitsIndex, (int *)stDisplayBitmap,
> 			     width, height,
> 			     affectedL, affectedT, affectedR, affectedB);
> 	    }
> 	}
>       
>       else if (depth == 2)
> 	{
> 	  if (stBitsPerPixel == 8)
> 	    {
> 	      copyImage2To8((int *)dispBitsIndex, (int *)stDisplayBitmap,
> 			    width, height,
> 			    affectedL, affectedT, affectedR, affectedB);
> 	    }
> 	  if (stBitsPerPixel == 16)
> 	    {
> 	      copyImage2To16((int *)dispBitsIndex, (int *)stDisplayBitmap,
> 			     width, height,
> 			     affectedL, affectedT, affectedR, affectedB);
> 	    }
> 	  else if(stBitsPerPixel == 24)
> 	    {
> 	      copyImage2To24((int *)dispBitsIndex, (int *)stDisplayBitmap,
> 			     width, height,
> 			     affectedL, affectedT, affectedR, affectedB);
> 	    }
> 	  else /* stBitsPerPixel == 32 */
> 	    {
> 	      copyImage2To32((int *)dispBitsIndex, (int *)stDisplayBitmap,
> 			     width, height,
> 			     affectedL, affectedT, affectedR, affectedB);
> 	    }
> 	}
> 
>       else if (depth == 4)
> 	{
> 	  if (stBitsPerPixel == 8)
> 	    {
> 	      copyImage4To8((int *)dispBitsIndex, (int *)stDisplayBitmap,
> 			    width, height,
> 			    affectedL, affectedT, affectedR, affectedB);
> 	    }
> 	  if (stBitsPerPixel == 16)
> 	    {
> 	      copyImage4To16((int *)dispBitsIndex, (int *)stDisplayBitmap,
> 			     width, height,
> 			     affectedL, affectedT, affectedR, affectedB);
> 	    }
> 	  else if(stBitsPerPixel == 24)
> 	    {
> 	      copyImage4To24((int *)dispBitsIndex, (int *)stDisplayBitmap,
> 			     width, height,
> 			     affectedL, affectedT, affectedR, affectedB);
> 	    }
> 	  else /* stBitsPerPixel == 32 */
> 	    {
> 	      copyImage4To32((int *)dispBitsIndex, (int *)stDisplayBitmap,
> 			     width, height,
> 			     affectedL, affectedT, affectedR, affectedB);
> 	    }
> 	}
> 
>       else if (depth == 8)
2142c2347
< # else
---
> # else /* !WORDS_BIGENDIAN */
2154a2360,2369
>       else if (stDisplayBitmap != 0)
> 	{
> 	  /* there is a separate map, so we still need to copy */
> 	  if (depth == 32)
> 	    {
> 	      copyImage32To32Same((int *)dispBitsIndex, (int *)stDisplayBitmap,
> 				  width, height,
> 				  affectedL, affectedT, affectedR, affectedB);
> 	    }
> 	}
2170,2175c2385,2395
<   switch (i) {
<   case 8:
<   case 16:
<   case 32:
<     return true;
<   };
---
>   switch (i)
>     {
>     case 1:
>     case 2:
>     case 4:
>       return stBitsPerPixel == 32;
>     case 8:
>     case 16:
>     case 32:
>       return true;
>     }
2246a2467,2490
> void copyImage1To8(int *fromImageData, int *toImageData,
> 		   int width, int height,
> 		   int affectedL, int affectedT, int affectedR, int affectedB)
> {
>   fprintf(stderr, "depth 1 not yet implemented in 8 bpp\n");
>   exit(1);
> }
> 
> void copyImage2To8(int *fromImageData, int *toImageData,
> 		   int width, int height,
> 		   int affectedL, int affectedT, int affectedR, int affectedB)
> {
>   fprintf(stderr, "depth 2 not yet implemented in 8 bpp\n");
>   exit(1);
> }
> 
> void copyImage4To8(int *fromImageData, int *toImageData,
> 		   int width, int height,
> 		   int affectedL, int affectedT, int affectedR, int affectedB)
> {
>   fprintf(stderr, "depth 4 not yet implemented in 8 bpp\n");
>   exit(1);
> }
> 
2268a2513,2536
> void copyImage1To16(int *fromImageData, int *toImageData,
> 		    int width, int height,
> 		    int affectedL, int affectedT, int affectedR, int affectedB)
> {
>   fprintf(stderr, "depth 1 not yet implemented in 16 bpp\n");
>   exit(1);
> }
> 
> void copyImage2To16(int *fromImageData, int *toImageData,
> 		    int width, int height,
> 		    int affectedL, int affectedT, int affectedR, int affectedB)
> {
>   fprintf(stderr, "depth 2 not yet implemented in 16 bpp\n");
>   exit(1);
> }
> 
> void copyImage4To16(int *fromImageData, int *toImageData,
> 		    int width, int height,
> 		    int affectedL, int affectedT, int affectedR, int affectedB)
> {
>   fprintf(stderr, "depth 4 not yet implemented in 16 bpp\n");
>   exit(1);
> }
> 
2274c2542
<   int scanLine16, firstWord16, lastWord16;
---
>   int scanLine16, firstWord16;
2282d2549
<   lastWord16= scanLine16*affectedT + (bytesPerLine(affectedR, 8) << 1);
2308d2574
<       lastWord16+= scanLine16;
2317c2583
<   int scanLine8, firstWord8, lastWord8;
---
>   int scanLine8, firstWord8;
2330d2595
<   lastWord8= scanLine8*affectedT + (bytesPerLine(affectedR, 16) >> 1);
2354d2618
<       lastWord8+= scanLine8;
2358a2623,2736
> void copyImage1To32(int *fromImageData, int *toImageData,
> 		    int width, int height,
> 		    int affectedL, int affectedT, int affectedR, int affectedB)
> {
>   int scanLine1, firstWord1, firstShift1;
>   int scanLine32, firstWord32, lastWord32;
>   int line;
> 
>   scanLine1= bytesPerLine(width, 1);
>   firstWord1= scanLine1*affectedT + bytesPerLineRD(affectedL, 1);
>   firstShift1= 31 - (affectedL & 31);
> 
>   scanLine32= bytesPerLine(width, 32);
>   firstWord32= scanLine32*affectedT + bytesPerLine(affectedL, 32);
>   lastWord32= scanLine32*affectedT + bytesPerLine(affectedR, 32);
> 
>   for (line= affectedT; line < affectedB; line++)
>     {
>       register unsigned int *from= (unsigned int *)((int)fromImageData+firstWord1);
>       register unsigned int *to= (unsigned int *)((int)toImageData+firstWord32);
>       register unsigned int *limit= (unsigned int *)((int)toImageData+lastWord32);
>       register int shift= firstShift1;
>       while (to < limit)
> 	{
> 	  *to= stColors[(*from >> shift) & 1];
> 	  to++;
> 	  shift--;
> 	  if (shift < 0) {
> 	    shift= 31;
> 	    from++;
> 	  }
> 	}
>       firstWord1+= scanLine1;
>       firstWord32+= scanLine32;
>       lastWord32+= scanLine32;
>     }
> }
> 
> void copyImage2To32(int *fromImageData, int *toImageData,
> 		    int width, int height,
> 		    int affectedL, int affectedT, int affectedR, int affectedB)
> {
>   int scanLine2, firstWord2, firstShift2;
>   int scanLine32, firstWord32, lastWord32;
>   int line;
> 
>   scanLine2= bytesPerLine(width, 2);
>   firstWord2= scanLine2*affectedT + bytesPerLineRD(affectedL, 2);
>   firstShift2= 30 - ((affectedL & 15) * 2);
> 
>   scanLine32= bytesPerLine(width, 32);
>   firstWord32= scanLine32*affectedT + bytesPerLineRD(affectedL, 32);
>   lastWord32= scanLine32*affectedT + bytesPerLineRD(affectedR, 32);
> 
>   for (line= affectedT; line < affectedB; line++)
>     {
>       register unsigned int *from= (unsigned int *)((int)fromImageData+firstWord2);
>       register unsigned int *to= (unsigned int *)((int)toImageData+firstWord32);
>       register unsigned int *limit= (unsigned int *)((int)toImageData+lastWord32);
>       register int shift= firstShift2;
>       while (to < limit)
> 	{
> 	  *to= stColors[(*from >> shift) & 3];
> 	  to++;
> 	  shift-= 2;
> 	  if (shift < 0) {
> 	    shift= 30;
> 	    from++;
> 	  }
> 	}
>       firstWord2+= scanLine2;
>       firstWord32+= scanLine32;
>       lastWord32+= scanLine32;
>     }
> }
> 
> void copyImage4To32(int *fromImageData, int *toImageData,
> 		    int width, int height,
> 		    int affectedL, int affectedT, int affectedR, int affectedB)
> {
>   int scanLine4, firstWord4, firstShift4;
>   int scanLine32, firstWord32, lastWord32;
>   int line;
> 
>   scanLine4= bytesPerLine(width, 4);
>   firstWord4= scanLine4*affectedT + bytesPerLineRD(affectedL, 4);
>   firstShift4= 28 - ((affectedL & 7) * 4);
> 
>   scanLine32= bytesPerLine(width, 32);
>   firstWord32= scanLine32*affectedT + bytesPerLineRD(affectedL, 32);
>   lastWord32= scanLine32*affectedT + bytesPerLineRD(affectedR, 32);
> 
>   for (line= affectedT; line < affectedB; line++)
>     {
>       register unsigned int *from= (unsigned int *)((int)fromImageData+firstWord4);
>       register unsigned int *to= (unsigned int *)((int)toImageData+firstWord32);
>       register unsigned int *limit= (unsigned int *)((int)toImageData+lastWord32);
>       register int shift= firstShift4;
>       while (to < limit)
> 	{
> 	  *to= stColors[(*from >> shift) & 15];
> 	  to++;
> 	  shift-= 4;
> 	  if (shift < 0) {
> 	    shift= 28;
> 	    from++;
> 	  }
> 	}
>       firstWord4+= scanLine4;
>       firstWord32+= scanLine32;
>       lastWord32+= scanLine32;
>     }
> }
> 
2364c2742
<   int scanLine32, firstWord32, lastWord32;
---
>   int scanLine32, firstWord32;
2372d2749
<   lastWord32= scanLine32*affectedT + (bytesPerLine(affectedR, 8) << 2);
2398d2774
<       lastWord32+= scanLine32;
2401a2778,2801
> void copyImage1To24(int *fromImageData, int *toImageData,
> 		    int width, int height,
> 		    int affectedL, int affectedT, int affectedR, int affectedB)
> {
>   fprintf(stderr, "depth 1 not yet implemented in 24 bpp\n");
>   exit(1);
> }
> 
> void copyImage2To24(int *fromImageData, int *toImageData,
> 		    int width, int height,
> 		    int affectedL, int affectedT, int affectedR, int affectedB)
> {
>   fprintf(stderr, "depth 2 not yet implemented in 24 bpp\n");
>   exit(1);
> }
> 
> void copyImage4To24(int *fromImageData, int *toImageData,
> 		    int width, int height,
> 		    int affectedL, int affectedT, int affectedR, int affectedB)
> {
>   fprintf(stderr, "depth 4 not yet implemented in 24 bpp\n");
>   exit(1);
> }
> 
2489c2889
<   int scanLine8, firstWord8, lastWord8;
---
>   int scanLine8, firstWord8;
2502d2901
<   lastWord8= scanLine8*affectedT + (bytesPerLine(affectedR, 32) >> 2);
2519d2917
<     lastWord8+= scanLine8;
2529c2927
<   int scanLine32, firstWord32, lastWord32;
---
>   int scanLine32, firstWord32;
2548d2945
<   lastWord32= scanLine32*affectedT + (bytesPerLine(affectedR, 16) << 1);
2570d2966
<       lastWord32+= scanLine32;
2650c3046
<   int scanLine16, firstWord16, lastWord16;
---
>   int scanLine16, firstWord16;
2669d3064
<   lastWord16= scanLine16*affectedT + (bytesPerLine(affectedR, 32) >> 1);
2685d3079
<       lastWord16+= scanLine16;
2773a3168,3194
> void copyImage32To32Same(int *fromImageData, int *toImageData,
> 			 int width, int height,
> 			 int affectedL, int affectedT, int affectedR, int affectedB)
> {
>   int scanLine32, firstWord32, lastWord32;
>   int line;
> 
>   scanLine32= bytesPerLine(width, 32);
>   firstWord32= scanLine32*affectedT + bytesPerLineRD(affectedL, 32);
>   lastWord32= scanLine32*affectedT + bytesPerLine(affectedR, 32);
> 
>   for (line= affectedT; line < affectedB; line++)
>     {
>       register unsigned int *from= (unsigned int *)((int)fromImageData+firstWord32);
>       register unsigned int *limit= (unsigned int *)((int)fromImageData+lastWord32);
>       register unsigned int *to= (unsigned int *)((int)toImageData+firstWord32);
>       while (from < limit)
> 	{
> 	  *to= *from;
> 	  from++;
> 	  to++;
> 	}
>       firstWord32+= scanLine32;
>       lastWord32+= scanLine32;
>     }
> }
> 
2830,2837d3250
< /*** power management ***/
< 
< int ioDisablePowerManager(int disableIfNonZero)
< {
<   return 0;
< }
< 
< 
2839a3253
> 
2846,2848c3260,3269
<       getcwd(vmPath, sizeof(vmPath));
<       strcat(vmPath, "/");
<       strcat(vmPath, localImageName);
---
>       if (localImageName[0] == '/')
> 	{
> 	  strcpy(vmPath, localImageName);
> 	}
>       else 
> 	{
> 	  getcwd(vmPath, sizeof(vmPath));
> 	  strcat(vmPath, "/");
> 	  strcat(vmPath, localImageName);
> 	}
2898c3319
<   XStoreName(stDisplay, stWindow, imageName);
---
>   XStoreName(stDisplay, stParent, imageName);
2904c3325,3327
< /*** Timing support ***/
---
> 
> /*** Timer support ***/
> 
2912a3336
> 
2947a3372,3373
> 
> 
2949a3376,3377
> 
> 
3049a3478,3479
> 
> 
3051a3482,3483
> 
> 
3056a3489,3490
> 
> 
3058a3493,3494
> 
> 
3112a3549
> 
3114a3552,3553
> 
> 
3120c3559
<       return vmArgVec[-id ];
---
>       return vmArgVec[-id];
3140a3580
>   success(false);
3155a3596,3597
> 
> 
3157a3600,3601
> 
> 
3174c3618
<   printf("  -nojit               disable the dynamic (runtime) compiler\n");
---
>   printf("  -jit                 enable the dynamic (runtime) compiler\n");
3201c3645
<      run squeak (use the '-help' option for more information).
---
>      run squeak (use the `-help' option for more information).
3203c3647
<      that you want to use by default'\n", imageName);
---
>      that you want to use by default.\n", imageName);
3221c3665
<   fprintf(stderr, "default module location: %s/%s*.so\n",
---
>   fprintf(stderr, "default plugin location: %s/%s*.so\n",
3223,3231d3666
<   {
<     static char *ipl[]= {
< #   include "sqUnixInternalPlugins.h"
<       (char *)0 };
<     char **iplp= 0;
<     fprintf(stderr, "internal modules:\n");
<     for (iplp= ipl; *iplp != (char *)0; ++iplp)
<       fprintf(stderr, "  %s\n", *iplp);
<   }
3273a3709
>   if (getenv("SQUEAK_JIT"))		noJitter= 0;
3308a3745
>       else if (!strcmp(arg, "-jit"))		noJitter= 0;
3361a3799
> 
3364a3803
> 
3418a3858,3872
> /* get a value for RTLD_NOW, with increasing levels of desperation... */
> 
> #if !defined(RTLD_NOW)
> # if defined(DL_NOW)
> #   define RTLD_NOW DL_NOW
> # elif defined(RTLD_LAZY)
> #   define RTLD_NOW RTLD_LAZY
> # elif defined(DL_LAZY)
> #   define RTLD_NOW DL_LAZY
> # else
> #   warning: defining RTLD_NOW as 1
> #   define RTLD_NOW 1
> # endif
> #endif
>  
3499d3952
< 
3592,3598c4045,4051
<   if (!noJitter)
<     {
<       extern void *loadExternalFunctionFromModule(char *, char *);
<       /* first try to find an internal dynamic compiler... */
<       void *comp= loadExternalFunctionFromModule("j_interpret", 0);
<       /* ...and if that fails... */
<       if (!comp)
---
>   {
>     /* first try to find an internal dynamic compiler... */
>     int handle= ioLoadModule(0);
>     int comp= ioFindExternalFunctionIn("j_interpret", handle);
>     /* ...and if that fails... */
>     if ((comp == 0) && !noJitter)
>       {
3600,3606c4053,4064
< 	comp= loadExternalFunctionFromModule("j_interpret", "SqueakCompiler");
<       if (comp)
< 	{
< 	  ((void(*)(void))comp)();
< 	  return 0;
< 	}
<     }
---
> 	handle= ioLoadModule("SqueakCompiler");
> 	if (handle != 0)
> 	  comp= ioFindExternalFunctionIn("j_interpret", handle);
>       }
>     if (comp)
>       {
> 	((void(*)(void))comp)();
> 	return 0;
>       }
>     else
>       printf("could not find j_interpret\n");
>   }
3625a4084,4086
> 
>   /*** Isn't this where... ***/
> 

================ sunos.h

================ zipio.c

================ zipio.h

================ zlib.c

================ zlib.h

================ Makefile.in
7c7
< # Last edited: Fri Aug 25 23:44:55 2000 by piumarta (Ian Piumarta) on grimmy
---
> # Last edited: 2000-11-27 11:20:37 by piumarta on emilia.rd.wdi.disney.com
23a24,25
> MAJOR=		@MAJOR@
> MINOR=		@MINOR@
26,27d27
< VM=		squeak$(VERSION)
< 
28a29
> host_cpu=	@host_cpu@
42c43,51
< sqlibdir=	$(libdir)/squeak$(VERSION)
---
> datadir=	@datadir@
> mandir=		@mandir@
> docdir=		@prefix@/doc/squeak-$(VERSION)
> 
> sqlibdir=	$(libdir)/squeak
> vsqlibdir=	$(sqlibdir)/$(VERSION)
> sqdatadir=	$(datadir)/squeak
> vsqdatadir=	$(sqdatadir)/$(VERSION)
> man1dir=	$(mandir)/man1
52a62,63
> MKINSTALLDIRS=	$(SHELL) $(utldir)/mkinstalldirs
> 
54a66
> INSTALL_DATA=	@INSTALL_DATA@
56c68
< MKINSTALLDIRS=	$(SHELL) $(unxdir)/mkinstalldirs
---
> UNINSTALL=	$(SHELL) $(utldir)/uninstall
61a74,75
> LN=		@LN@
> LN_S=		@LN_S@
64c78,79
< DEFS=		@DEFS@ -DUNIX -DSQ_LIBDIR=\"$(sqlibdir)\"
---
> CXX=		@CXX@
> DEFS=		@DEFS@ -DUNIX -DSQ_LIBDIR=\"$(vsqlibdir)\"
67c82
< CFLAGS=		@CFLAGS@
---
> CFLAGS=		@CFLAGS@ @J_CFLAGS@ -funroll-loops
75a91,92
> LTCOMPILEXX=	$(LIBTOOL) --mode=compile $(CXX) $(CFLAGS) $(DEFS) $(INCLUDES) $(CPPFLAGS)
> LINKXX=		$(LIBTOOL) --mode=link $(CXX) $(CFLAGS) $(LDFLAGS)
92a110,112
> DOCFILES=	BUILD.UnixSqueak COPYING COPYRIGHT LICENSE README.CodingStandards
> MANFILES=	squeak.1
> 
95c115
< all : $(VM) modules
---
> all : squeak modules
105,106c125,129
< Makefile : $(MAKEFILE_IN) $(CONFIGURE) $(MKFRAGS)
< 	$(CONFIGURE) --prefix=${prefix} --exec_prefix=${exec_prefix} --bindir=${bindir} --libdir=${libdir}
---
> config.status : $(CONFIGURE) $(MKFRAGS)
> 	$(CONFIGURE) --prefix=${prefix} --exec_prefix=${exec_prefix} --bindir=${bindir} --libdir=${libdir} --mandir=${mandir}
> 
> Makefile : $(MAKEFILE_IN) config.status
> 	CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) ./config.status
109c132
< 	CONFIG_FILES= CONFIG_HEADERS=$@ $(SHELL) ./config.status
---
> 	CONFIG_FILES= CONFIG_HEADERS=sqUnixConfig.h $(SHELL) ./config.status
113,118c136,143
< squeak : $(VM)
< 
< $(VM) : $(UNX_O) $(VER_O) $(GEN_O)
< 	@rm -f $@
< 	$(LINK) -export-dynamic -R$(sqlibdir) -o $@ $(UNX_O) $(VER_O) $(GEN_O) $(LIBS)
< 	$(NM) $@ | grep -w T | sort > $@.map
---
> squeak.a : $(UNX_O) $(VER_O) $(GEN_O)
> 	$(AR) -rc $@.tmp $(UNX_O) $(VER_O) $(GEN_O)
> 	mv $@.tmp $@
> 
> squeak : squeak.a
> 	$(LINK) -export-dynamic -R$(vsqlibdir) -o squeak squeak.a $(LIBS)
> 	$(NM) squeak | grep -w T | sort > squeak.map
> 	chmod +x inisqueak
121a147,149
> inisqueak : $(unxdir)/inisqueak.in
> 	CONFIG_FILES=inisqueak CONFIG_HEADERS= $(SHELL) ./config.status
> 
127c155
< 	$(COMPILE) -c $<
---
> 	$(COMPILE) -c $(VER_C)
129,130c157,158
< $(VER_C) : $(UNX_O) $(GEN_O) $(PLG_O)
< 	$(utldir)/verstamp $@ $(CC)
---
> $(VER_C) : $(UNX_O) $(GEN_O)
> 	$(utldir)/verstamp $(VER_C) $(CC)
133c161
< 	$(COMPILE) -c -o $@ $<
---
> 	$(COMPILE) -c -o interp.o $(gendir)/interp.c
136c164
< 	$(AWK) -f $(GNUIFY) $< > gnuify.out
---
> 	$(AWK) -f $(GNUIFY) $(gendir)/interp.c > gnuify.out
139a168,182
> .force :
> 
> squeak.1 : $(unxdir)/squeak.1
> 	rm -f squeak.1
> 	sed '\
> s,{vsqdatadir},$(vsqdatadir),g;\
> s,{sqdatadir},$(sqdatadir),g;\
> s,{vsqlibdir},$(vsqlibdir),g;\
> s,{sqlibdir},$(sqlibdir),g;\
> s,{bindir},$(bindir),g;\
> s,{docdir},$(docdir),g;\
> s,{mandir},$(man1dir),g;\
> s,{version},$(VERSION),g;\
> s,{major},$(MAJOR),g;' <$(unxdir)/squeak.1 >squeak.1
> 
142c185
< install : squeak_install modules_install
---
> install : squeak_install modules_install doc_install
144,146c187,204
< squeak_install : $(VM) modules_install
< 	$(MKINSTALLDIRS) $(bindir)
< 	$(INSTALL_PROG) $(VM) $(bindir)/$(VM)
---
> uninstall : squeak_uninstall modules_uninstall doc_uninstall
> 
> squeak_install : squeak inisqueak
> 	$(MKINSTALLDIRS) $(DESTDIR)$(vsqlibdir)
> 	$(INSTALL_PROG) squeak $(DESTDIR)$(vsqlibdir)
> 	test -x j3 && $(INSTALL_PROG) squeak $(DESTDIR)$(vsqlibdir)
> 	$(INSTALL_PROG) inisqueak $(DESTDIR)$(vsqlibdir)
> 	$(INSTALL_DATA) squeak.map $(DESTDIR)$(vsqlibdir)
> 	$(MKINSTALLDIRS) $(DESTDIR)$(bindir)
> 	( path=`$(utldir)/relpath $(bindir) $(vsqlibdir)`; \
> 	  cd $(DESTDIR)$(bindir); \
> 	  rm -f squeak inisqueak; \
> 	  $(LN_S) $$path/squeak .; \
> 	  $(LN_S) $$path/inisqueak .; )
> 
> squeak_uninstall :
> 	@$(UNINSTALL) $(DESTDIR)$(vsqlibdir) squeak inisqueak squeak.map
> 	@$(UNINSTALL) $(DESTDIR)$(bindir) squeak inisqueak
149c207
< 	$(MKINSTALLDIRS) $(sqlibdir)
---
> 	$(MKINSTALLDIRS) $(DESTDIR)$(vsqlibdir)
152,153c210,211
< 	    echo "$(LIBTOOL) --mode=install $(INSTALL) $$p $(sqlibdir)/$$p"; \
< 	    $(LIBTOOL) --mode=install $(INSTALL) $$p $(sqlibdir)/$$p; \
---
> 	    echo "$(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(vsqlibdir)/$$p"; \
> 	    $(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(vsqlibdir)/$$p; \
156d213
< 	cp $(VM).map $(sqlibdir)
158,159c215
< uninstall :
< 	rm -f $(bindir)/$(VM)
---
> modules_uninstall :
161,163c217,219
< 	  if test -f $$p; then \
< 	    echo "$(LIBTOOL) --mode=uninstall rm -f $(sqlibdir)/$$p"; \
< 	    $(LIBTOOL) --mode=uninstall rm -f $(sqlibdir)/$$p; \
---
> 	  if test -f $(DESTDIR)/$(vsqlibdir)/$$p; then \
> 	    echo "$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(vsqlibdir)/$$p"; \
> 	    $(LIBTOOL) --mode=uninstall rm -f $$p $(DESTDIR)$(vsqlibdir)/$$p; \
166c222
< 	rm -f $(sqlibdir)/$(VM).map
---
> 	@$(UNINSTALL) $(DESTDIR)$(vsqlibdir)
168c224,231
< # housekeeping
---
> doc_install : squeak.1
> 	$(MKINSTALLDIRS) $(DESTDIR)$(docdir)
> 	@list='$(DOCFILES)'; for f in $$list; do \
> 	  echo $(INSTALL_DATA) $(topdir)/$$f $(DESTDIR)$(docdir); \
> 	  $(INSTALL_DATA) $(topdir)/$$f $(DESTDIR)$(docdir); \
> 	done
> 	$(MKINSTALLDIRS) $(DESTDIR)$(man1dir)
> 	$(INSTALL_DATA) squeak.1 $(DESTDIR)$(man1dir)
170,171c233,252
< distbin distsrc distimg distcheck :
< 	$(MAKE) -f $(topdir)/util/Makefile.dist $@-local
---
> doc_uninstall :
> 	@$(UNINSTALL) $(DESTDIR)$(docdir) $(DOCFILES)
> 	@$(UNINSTALL) $(DESTDIR)$(man1dir) squeak.1
> 
> image_install :
> 	$(MKINSTALLDIRS) $(DESTDIR)$(vsqdatadir)
> 	$(INSTALL_DATA) $(topdir)/Squeak$(VERSION).image $(DESTDIR)$(vsqdatadir)
> 	$(INSTALL_DATA) $(topdir)/Squeak$(VERSION).changes $(DESTDIR)$(vsqdatadir)
> 
> image_uninstall :
> 	@$(UNINSTALL) $(DESTDIR)$(vsqdatadir) Squeak$(VERSION).image Squeak$(VERSION).changes
> 
> sources_install :
> 	$(MKINSTALLDIRS) $(DESTDIR)$(sqdatadir)
> 	$(INSTALL_DATA) $(topdir)/SqueakV$(MAJOR).sources $(DESTDIR)$(sqdatadir)
> 
> sources_uninstall :
> 	@$(UNINSTALL) $(DESTDIR)$(sqdatadir) SqueakV$(MAJOR).sources
> 
> # housekeeping
181c262
< 	rm -f Makefile mh_frag mt_frag
---
> 	rm -f Makefile mh_frag mt_frag inisqueak
184c265,271
< 	rm -f sqUnixConfig.h sqUnixInternalPlugins.h squeak.map
---
> 	rm -f sqUnixConfig.h sqUnixInternalPlugins.h $(VM).map
> 
> # ikp local
> 
> src.rpm arch.rpm image.rpm sources.rpm \
> distbin distsrc distimg distsources distcheck  :
> 	$(MAKE) -f $(topdir)/util/Makefile.dist $@-local
188a276
> 

================ configure.in
1c1
< # configure.in (v3.2) for Unix Squeak
---
> # configure.in (v3.2) for Unix Squeak				-*- sh -*-
9c9
< # Last edited: 2001-02-07 11:58:13 by piumarta on rnd10-51.rd.wdi.disney.com
---
> # Last edited: 2000-11-27 11:22:16 by piumarta on emilia.rd.wdi.disney.com
13c13,14
< VERSION=3.0a
---
> MAJOR=2
> MINOR=8
14a16,19
> VERSION=$MAJOR.$MINOR
> 
> AC_SUBST(MAJOR)
> AC_SUBST(MINOR)
15a21
> 
19a26,27
> host=$host_alias
> host_cpu=`echo $host | sed 's,-.*,,'`
29a38,45
> AC_ARG_WITH(gnu-awk,
> [  --with-gnu-awk          assume that awk is GNU gawk [default=no]],
> GAWK="$withval", GAWK="unknown")
> 
> AC_ARG_WITH(gnu-as,
> [  --with-gnu-as           assume that as is the GNU assembler [default=no]],
> GAS="$withval", GAS="unknown")
> 
31a48
> AC_PROG_CXX
36a54,55
> AC_CHECK_PROG(LN, ln, ln)
> 
40c59,66
< #  Checks for header files.
---
> # Checks for X11
> 
> AC_PATH_XTRA
> 
> LIBS="$X_LIBS $LIBS"
> CFLAGS="$X_CFLAGS $CFLAGS"
> 
> # Checks for header files.
47d72
< AC_PATH_XTRA
67,72d91
< #AC_TRY_COMPILE([#include <ffi.h>],[],
< #  AC_CHECK_LIB(ffi, ffi_call))
< 
< LIBS="$X_LIBS $LIBS"
< CFLAGS="$X_CFLAGS $CFLAGS"
< 
75a95,101
> AC_ARG_ENABLE(jit,
> [  --enable-jit            enable J3 support [default=no]],
> JIT="yes", JIT="no")
> 
> test $JIT = "yes" && J_CFLAGS="-DJ_ENABLED"
> AC_SUBST(J_CFLAGS)
> 
77a104
> AC_GNU_OPT
85c112
< AC_C_BIGENDIAN
---
> AC_C_BYTEORDER
91,92c118,120
< AC_CONFIG_HEADER([sqUnixConfig.h])
< AC_OUTPUT_FRAGS([Makefile],[mh_frag],[mt_frag],$topdir)
---
> AC_CONFIG_HEADER(sqUnixConfig.h)
> AC_MAKE_FRAGS(mh_frag, mt_frag, $topdir)
> AC_OUTPUT(Makefile inisqueak)

================ sqUnixConfig.h.in
8c8
<  * Last edited: 2001-02-07 11:57:45 by piumarta on rnd10-51.rd.wdi.disney.com
---
>  * Last edited: Tue Sep 12 17:45:47 2000 by piumarta (Ian Piumarta) on emilia
66a67
> 
69,76d69
< 
< #ifdef WORDS_BIGENDIAN
< # define HAS_MSB_FIRST
< # define MSB_FIRST
< #else
< # define HAS_LSB_FIRST
< # define LSB_FIRST
< #endif
