hartzell@boulder.colorado.edu (George Hartzell) (12/05/89)
#! /bin/sh # This is a shell archive, meaning: # 1. Remove everything above the #! /bin/sh line. # 2. Save the resulting text in a file. # 3. Execute the file with /bin/sh (not csh) to create the files: # LIB_PATCHES # LIB_UTIL_PATCHES # LIB_XLIB_PATCHES # LIB_XT_PATCHES # This archive created: Mon Dec 4 11:12:01 1989 export PATH; PATH=/bin:$PATH echo shar: extracting "'LIB_PATCHES'" '(723 characters)' if test -f 'LIB_PATCHES' then echo shar: will not over-write existing file "'LIB_PATCHES'" else sed 's/^ X//' << \SHAR_EOF > 'LIB_PATCHES' X*** /tmp/,RCSt1019861 Sun Dec 3 13:28:09 1989 X--- chdir.c Sun Dec 3 13:21:43 1989 X*************** X*** 1,6 **** X--- 1,10 ---- X #include <scheme.h> X X+ #ifndef MIPS_ALLOCA X extern char *getenv(), *alloca(); X+ #else X+ extern char *getenv(); X+ #endif X Object V_Home; X X static Object P_Chdir (argc, argv) Object *argv; { X*************** X*** 11,17 **** X--- 15,28 ---- X dir = argc == 0 ? Val (V_Home) : argv[0]; X Check_Type (dir, T_String); X n = STRING(dir)->size; X+ #ifndef MIPS_ALLOCA X s = alloca (n+1); X+ #else X+ { X+ int mips_alloca_size = n + 1; X+ s = alloca (mips_alloca_size); X+ } X+ #endif X bcopy (STRING(dir)->data, s, n); X s[n] = '\0'; X if (chdir (s) < 0) { SHAR_EOF if test 723 -ne "`wc -c < 'LIB_PATCHES'`" then echo shar: error transmitting "'LIB_PATCHES'" '(should have been 723 characters)' fi fi # end of overwriting check echo shar: extracting "'LIB_UTIL_PATCHES'" '(798 characters)' if test -f 'LIB_UTIL_PATCHES' then echo shar: will not over-write existing file "'LIB_UTIL_PATCHES'" else sed 's/^ X//' << \SHAR_EOF > 'LIB_UTIL_PATCHES' X*** /tmp/,RCSt1019873 Sun Dec 3 13:29:09 1989 X--- string.h Sun Dec 3 13:00:57 1989 X*************** X*** 1,3 **** X--- 1,4 ---- X+ #ifndef MIPS_ALLOCA X #define Make_C_String(from,to) {\ X register _n_;\ X if (TYPE(from) == T_Symbol)\ X*************** X*** 9,11 **** X--- 10,28 ---- X bcopy (STRING(from)->data, to, _n_);\ X to[_n_] = '\0';\ X } X+ #else X+ #define Make_C_String(from,to) {\ X+ register _n_;\ X+ if (TYPE(from) == T_Symbol)\ X+ from = SYMBOL(from)->name;\ X+ else if (TYPE(from) != T_String)\ X+ Wrong_Type_Combination (from, "string or symbol");\ X+ _n_ = STRING(from)->size;\ X+ {\ X+ int mips_alloca_size = _n_ + 1;\ X+ to = alloca (mips_alloca_size);\ X+ }\ X+ bcopy (STRING(from)->data, to, _n_);\ X+ to[_n_] = '\0';\ X+ } X+ #endif SHAR_EOF if test 798 -ne "`wc -c < 'LIB_UTIL_PATCHES'`" then echo shar: error transmitting "'LIB_UTIL_PATCHES'" '(should have been 798 characters)' fi fi # end of overwriting check echo shar: extracting "'LIB_XLIB_PATCHES'" '(8430 characters)' if test -f 'LIB_XLIB_PATCHES' then echo shar: will not over-write existing file "'LIB_XLIB_PATCHES'" else sed 's/^ X//' << \SHAR_EOF > 'LIB_XLIB_PATCHES' X*** /tmp/,RCSt1019820 Sun Dec 3 13:26:10 1989 X--- color.c Sun Dec 3 13:17:36 1989 X*************** X*** 82,88 **** X--- 82,95 ---- X X Check_Type (v, T_Vector); X n = VECTOR(v)->size; X+ #ifndef MIPS_ALLOCA X p = (XColor *)alloca (n * sizeof (XColor)); X+ #else X+ { X+ int mips_alloca_size = n * sizeof(XColor); X+ p = (XColor *)alloca (mips_alloca_size); X+ } X+ #endif X for (i = 0; i < n; i++) X p[i].pixel = Get_Pixel (VECTOR(v)->data[i]); X Disable_Interrupts; X*** /tmp/,RCSt1019823 Sun Dec 3 13:26:10 1989 X--- font.c Sun Dec 3 13:16:54 1989 X*************** X*** 246,259 **** X register char **path; X register i, n; X Object c; X- X Check_Type (d, T_Display); X Check_List (p); X n = Internal_Length (p); X path = (char **)alloca (n * sizeof (char *)); X for (i = 0; i < n; i++, p = Cdr (p)) { X c = Car (p); X Make_C_String (c, path[i]); X } X XSetFontPath (DISPLAY(d)->dpy, path, n); X return Void; X--- 246,273 ---- X register char **path; X register i, n; X Object c; X Check_Type (d, T_Display); X Check_List (p); X n = Internal_Length (p); X+ #ifndef MIPS_ALLOCA X path = (char **)alloca (n * sizeof (char *)); X+ #else X+ { X+ int mips_alloca_size = n * sizeof(char *); X+ path = (char **)alloca (mips_alloca_size); X+ } X+ #endif X for (i = 0; i < n; i++, p = Cdr (p)) { X c = Car (p); X+ #ifndef mips X+ /* this tickles a 2.10 beta compiler bug... gh */ X Make_C_String (c, path[i]); X+ #else X+ { X+ char *tmp = path[i]; X+ Make_C_String (c, tmp); X+ } X+ #endif X } X XSetFontPath (DISPLAY(d)->dpy, path, n); X return Void; X*** /tmp/,RCSt1019826 Sun Dec 3 13:26:10 1989 X--- graphics.c Sun Dec 3 13:14:17 1989 X*************** X*** 63,69 **** X--- 63,76 ---- X if (func == XFillPolygon) X sh = Symbols_To_Bits (shape, 0, Polyshape_Syms); X n = VECTOR(v)->size; X+ #ifndef MIPS_ALLOCA X p = (XPoint *)alloca (n * sizeof (XPoint)); X+ #else X+ { X+ int mips_alloca_size = n * sizeof (XPoint); X+ p = (XPoint *)alloca (mips_alloca_size); X+ } X+ #endif X for (i = 0; i < n; i++) { X Object point = VECTOR(v)->data[i]; X Check_Type (point, T_Pair); X*************** X*** 104,110 **** X--- 111,124 ---- X X Check_Type (gc, T_Gc); X n = VECTOR(v)->size; X+ #ifndef MIPS_ALLOCA X p = (XSegment *)alloca (n * sizeof (XSegment)); X+ #else X+ { X+ int mips_alloca_size = n * sizeof (XSegment); X+ p = (XSegment *)alloca (mips_alloca_size); X+ } X+ #endif X for (i = 0; i < n; i++) { X Object seg = VECTOR(v)->data[i]; X Check_Type (seg, T_Pair); X*************** X*** 147,153 **** X--- 161,174 ---- X X Check_Type (gc, T_Gc); X n = VECTOR(v)->size; X+ #ifndef MIPS_ALLOCA X p = (XRectangle *)alloca (n * sizeof (XRectangle)); X+ #else X+ { X+ int mips_alloca_size = n * sizeof (XRectangle); X+ p = (XRectangle *)alloca (mips_alloca_size); X+ } X+ #endif X for (i = 0; i < n; i++) { X Object rect = VECTOR(v)->data[i]; X Check_Type (rect, T_Pair); X*************** X*** 200,206 **** X--- 221,234 ---- X X Check_Type (gc, T_Gc); X n = VECTOR(v)->size; X+ #ifndef MIPS_ALLOCA X p = (XArc *)alloca (n * sizeof (XArc)); X+ #else X+ { X+ int mips_alloca_size = n * sizeof (XArc); X+ p = (XArc *)alloca (mips_alloca_size); X+ } X+ #endif X for (i = 0; i < n; i++) { X Object arc = VECTOR(v)->data[i]; X Check_Type (arc, T_Pair); X*** /tmp/,RCSt1019829 Sun Dec 3 13:26:11 1989 X--- property.c Sun Dec 3 13:11:47 1989 X*************** X*** 154,160 **** X--- 154,167 ---- X case 16: case 32: X Check_Type (data, T_Vector); X nitems = VECTOR(data)->size; X+ #ifndef MIPS_ALLOCA X buf = alloca (nitems * (f / sizeof (char))); X+ #else X+ { X+ int mips_alloca_size = nitems * (f / sizeof (char)); X+ buf = alloca (mips_alloca_size); X+ } X+ #endif X for (i = 0; i < nitems; i++) { X x = Get_Integer (VECTOR(data)->data[i]); X if (f == 16) { X*************** X*** 186,192 **** X--- 193,206 ---- X Check_Type (w, T_Window); X Check_Type (v, T_Vector); X n = VECTOR(v)->size; X+ #ifndef MIPS_ALLOCA X p = (Atom *)alloca (n * sizeof (Atom)); X+ #else X+ { X+ int mips_alloca_size = n * sizeof (Atom); X+ p = (Atom *)alloca (mips_alloca_size); X+ } X+ #endif X for (i = 0; i < n; i++) { X Object a = VECTOR(v)->data[i]; X Check_Type (a, T_Atom); X*** /tmp/,RCSt1019832 Sun Dec 3 13:26:11 1989 X--- text.c Sun Dec 3 13:10:50 1989 X*************** X*** 56,62 **** X--- 56,69 ---- X n = VECTOR(t)->size; X data = VECTOR(t)->data; X if (Two_Byte (f)) { X+ #ifndef MIPS_ALLOCA X s2 = (XChar2b *)alloca (n * sizeof (XChar2b)); X+ #else X+ { X+ int mips_alloca_size = n * sizeof (XChar2b); X+ s2 = (XChar2b *)alloca (mips_alloca_size); X+ } X+ #endif X for (i = 0; i < n; i++) { X register c = Get_2_Byte_Char (data[i]); X s2[i].byte1 = (c >> 8) & 0xff; X*************** X*** 87,98 **** X--- 94,113 ---- X char *s; X XChar2b *s2; X X+ X Check_Type (gc, T_Gc); X Check_Type (t, T_Vector); X n = VECTOR(t)->size; X data = VECTOR(t)->data; X if (Two_Byte (f)) { X+ #ifndef MIPS_ALLOCA X s2 = (XChar2b *)alloca (n * sizeof (XChar2b)); X+ #else X+ { X+ int mips_alloca_size = n * sizeof (XChar2b); X+ s2 = (XChar2b *)alloca (mips_alloca_size); X+ } X+ #endif X for (i = 0; i < n; i++) { X register c = Get_2_Byte_Char (data[i]); X s2[i].byte1 = (c >> 8) & 0xff; X*************** X*** 127,133 **** X--- 142,155 ---- X return Void; X for (data = VECTOR(t)->data, i = 0, nitems = 1; i < n; i++) X if (TYPE(data[i]) == T_Font) nitems++; X+ #ifndef MIPS_ALLOCA X items = (XTextItem *)alloca (nitems * sizeof (XTextItem)); X+ #else X+ { X+ int mips_alloca_size = nitems * sizeof (XTextItem); X+ items = (XTextItem *)alloca (mips_alloca_size); X+ } X+ #endif X items[0].delta = 0; X items[0].font = None; X for (j = k = i = 0; i <= n; i++) { X*************** X*** 135,142 **** X--- 157,172 ---- X items[j].nchars = i-k; X if (twobyte) { X register XChar2b *p; X+ #ifndef MIPS_ALLOCA X p = ((XTextItem16 *)items)[j].chars = (XChar2b *)alloca X ((i-k) * sizeof (XChar2b)); X+ #else X+ { X+ int mips_alloca_size = ((i-k) * sizeof (XChar2b)); X+ p = ((XTextItem16 *)items)[j].chars = X+ (XChar2b *)alloca(mips_alloca_size); X+ } X+ #endif X for ( ; k < i; k++, p++) { X register c = Get_2_Byte_Char (data[k]); X p->byte1 = (c >> 8) & 0xff; X*************** X*** 144,150 **** X--- 174,187 ---- X } X } else { X register char *p; X+ #ifndef MIPS_ALLOCA X p = items[j].chars = alloca (i-k); X+ #else X+ { X+ int mips_alloca_size = i-k; X+ p = items[j].chars = alloca (mips_alloca_size); X+ } X+ #endif X for ( ; k < i; k++) X *p++ = Get_1_Byte_Char (data[k]); X } X*** /tmp/,RCSt1019835 Sun Dec 3 13:26:11 1989 X--- wm.c Sun Dec 3 13:25:30 1989 X*************** X*** 92,98 **** X--- 92,105 ---- X Check_Type (w, T_Window); X Check_List (cmd); X n = Internal_Length (cmd); X+ #ifndef MIPS_ALLOCA X argv = (char **)alloca (n * sizeof (char *)); X+ #else X+ { X+ int mips_alloca_size = n * sizeof(char *); X+ argv = (char **)alloca (mips_alloca_size); X+ } X+ #endif X for (i = 0; i < n; i++, cmd = Cdr (cmd)) { X c = Car (cmd); X Make_C_String (c, argv[i]); X*************** X*** 188,194 **** X--- 195,208 ---- X Check_Type (w, T_Window); X Check_Type (v, T_Vector); X n = VECTOR(v)->size; X+ #ifndef MIPS_ALLOCA X p = (XIconSize *)alloca (n * sizeof (XIconSize)); X+ #else X+ { X+ int mips_alloca_size = n * sizeof (XIconSize); X+ p = (XIconSize *)alloca (mips_alloca_size); X+ } X+ #endif X for (i = 0; i < n; i++) { X (void)Vector_To_Record (VECTOR(v)->data[i], Icon_Size_Size, X Sym_Icon_Size, Icon_Size_Rec); X*** /tmp/,RCSt1025478 Mon Dec 4 08:51:08 1989 X--- Makefile Mon Dec 4 08:49:24 1989 X*************** X*** 50,56 **** X ../util/objects.o X X ../xlib.o: $(O) X! ld -g -G 0 -r $(O) -lX11; mv a.out ../xlib.o; chmod 644 ../xlib.o X X color.o: $(H) X colormap.o: $(H) X--- 50,58 ---- X ../util/objects.o X X ../xlib.o: $(O) X! ld -g -G 0 -r $(O) -L/usr/local/lib -lX11_G0; mv a.out ../xlib.o; \ X! chmod 644 ../xlib.o X! # ld -g -G 0 -r $(O) -lX11; mv a.out ../xlib.o; chmod 644 ../xlib.o X X color.o: $(H) X colormap.o: $(H) SHAR_EOF if test 8430 -ne "`wc -c < 'LIB_XLIB_PATCHES'`" then echo shar: error transmitting "'LIB_XLIB_PATCHES'" '(should have been 8430 characters)' fi fi # end of overwriting check echo shar: extracting "'LIB_XT_PATCHES'" '(3317 characters)' if test -f 'LIB_XT_PATCHES' then echo shar: will not over-write existing file "'LIB_XT_PATCHES'" else sed 's/^ X//' << \SHAR_EOF > 'LIB_XT_PATCHES' X*** /tmp/,RCSt1019944 Sun Dec 3 13:36:39 1989 X--- callback.c Sun Dec 3 13:35:00 1989 X*************** X*** 71,77 **** X--- 71,84 ---- X Make_C_String (name, s); X Make_Resource_Name (s); X n = Internal_Length (cbl); X+ #ifndef MIPS_ALLOCA X callbacks = (XtCallbackRec *)alloca ((n+1) * sizeof (XtCallbackRec)); X+ #else X+ { X+ int mips_alloca_size = (n+1) * sizeof (XtCallbackRec); X+ callbacks = (XtCallbackRec *)alloca (mips_alloca_size); X+ } X+ #endif X callbacks[n].callback = 0; X callbacks[n].closure = 0; X Fill_Callbacks (cbl, callbacks, n, X*** /tmp/,RCSt1019947 Sun Dec 3 13:36:40 1989 X--- resource.c Sun Dec 3 13:34:06 1989 X*************** X*** 233,239 **** X--- 233,246 ---- X Widget w2; X GC_Node2; X X+ #ifndef MIPS_ALLOCA X argl = (Arg *)alloca (ac * sizeof (Arg)); X+ #else X+ { X+ int mips_alloca_size = ac * sizeof (Arg); X+ argl = (Arg *)alloca (mips_alloca_size); X+ } X+ #endif X Get_All_Resources (w, XtClass (w), &r, &nr, &nc); X /* Note: X * `r' is not freed in case of error. X*** /tmp/,RCSt1019950 Sun Dec 3 13:36:40 1989 X--- widget.c Sun Dec 3 13:34:20 1989 X*************** X*** 127,133 **** X--- 127,140 ---- X X Check_List (children); X n = Internal_Length (children); X+ #ifndef MIPS_ALLOCA X buf = (Widget *)alloca (n * sizeof (Widget)); X+ #else X+ { X+ int mips_alloca_size = n * sizeof (Widget); X+ buf = (Widget *)alloca (mips_alloca_size); X+ } X+ #endif X for (i = 0, tail = children; i < n; i++, tail = Cdr (tail)) { X Object w = Car (tail); X Check_Widget (w); X*** /tmp/,RCSt1019953 Sun Dec 3 13:36:40 1989 X--- xt.h Sun Dec 3 13:32:05 1989 X*************** X*** 59,67 **** X extern XtTranslations Get_Translations(); X X X #define Encode_Arglist(ac,av,to,widget,class) {\ X to = (Arg *)alloca (((ac)+1)/2 * sizeof (Arg));\ X Convert_Args (ac, av, to, widget, class);\ X } X! X #define streq(a,b) (strcmp ((a), (b)) == 0) X--- 59,74 ---- X extern XtTranslations Get_Translations(); X X X+ #ifndef MIPS_ALLOCA X #define Encode_Arglist(ac,av,to,widget,class) {\ X to = (Arg *)alloca (((ac)+1)/2 * sizeof (Arg));\ X Convert_Args (ac, av, to, widget, class);\ X } X! #else X! #define Encode_Arglist(ac,av,to,widget,class) {\ X! int mips_alloca_size = (ac + 1)/2 * sizeof(Arg); \ X! to = (Arg *)alloca (mips_alloca_size);\ X! Convert_Args (ac, av, to, widget, class);\ X! } X! #endif X #define streq(a,b) (strcmp ((a), (b)) == 0) X*** /tmp/,RCSt1025547 Mon Dec 4 08:55:47 1989 X--- Makefile Mon Dec 4 08:54:00 1989 X*************** X*** 33,42 **** X all: ../xt.o ../xt-only.o X X ../xt.o: $(O) ../xlib.o X! ld -r -x $(O) -lXt ../xlib.o -lX11; mv a.out ../xt.o; chmod 644 ../xt.o X X ../xt-only.o: $(O) X! ld -r -x $(O); mv a.out ../xt-only.o; chmod 644 ../xt-only.o X X callback.o: $(H) X class.o: $(H) X--- 33,45 ---- X all: ../xt.o ../xt-only.o X X ../xt.o: $(O) ../xlib.o X! ld -r $(O) -G 0 -L/usr/local/lib -lXt_G0 ../xlib.o -lX11_G0; \ X! mv a.out ../xt.o; chmod 644 ../xt.o X! # ld -r -x $(O) -lXt ../xlib.o -lX11; mv a.out ../xt.o; chmod 644 ../xt.o X X ../xt-only.o: $(O) X! ld -G 0 -r $(O); mv a.out ../xt-only.o; chmod 644 ../xt-only.o X! # ld -r -x $(O); mv a.out ../xt-only.o; chmod 644 ../xt-only.o X X callback.o: $(H) X class.o: $(H) SHAR_EOF if test 3317 -ne "`wc -c < 'LIB_XT_PATCHES'`" then echo shar: error transmitting "'LIB_XT_PATCHES'" '(should have been 3317 characters)' fi fi # end of overwriting check # End of shell archive exit 0 George Hartzell (303) 492-4535 MCD Biology, University of Colorado-Boulder, Boulder, CO 80309 hartzell@Boulder.Colorado.EDU ..!{ncar,nbires}!boulder!hartzell