diff --git a/log/tools/munch b/log/tools/munch index f8fe11b66079bc85d389c412fb9913c205bbcfa9..40a4269495a1a71606e6543b447771d53174340a 100755 --- a/log/tools/munch +++ b/log/tools/munch @@ -1,7 +1,7 @@ #!/bin/sh # create an initialization table from a list of .o files -# use for linux, SunOS and 68K/based HPUX machines; for other machines, +# use for linux for other machines, # rename the appropriate munch.XXXX files to be munch pattern=$1 @@ -17,8 +17,7 @@ echo '' sed -n -e 's/^[^U]*[_ ]\('$pattern'\).*$/extern void \1();/p' munch.temp | sort echo '' echo 'struct ext_proc ext_proc_table[] = {' -cat munch.temp | sed -n -e 's/^[^U]*[_ ]\('$pattern'\).*$/ "\1", \1,/p' | sort -echo ' NULL, NULL' +cat munch.temp | sed -n -e 's/^[^U]*[_ ]\('$pattern'\).*$/ \{"\1", \1\},/p' | sort +echo '{NULL, NULL}' echo '};' echo '' - diff --git a/psys/src/mylib.c b/psys/src/mylib.c index 513af0d21ad7ae715a89db40793f85ceeac10261..7e59c7b1ac62439d4b789d06795f279a1737909b 100644 --- a/psys/src/mylib.c +++ b/psys/src/mylib.c @@ -23,7 +23,7 @@ #include <p2c/p2c.h> #include <p2c/mylib.h> - + #include <X11/X.h> #include <X11/Xutil.h> #include <X11/cursorfont.h> @@ -40,7 +40,7 @@ typedef struct { Window window; } GR_CURRENT; -#ifdef RGBFILE +#ifdef RGBFILE /* In case someone wants to implement reading RGB from a file like Magic does. */ unsigned long grPixels[256]; @@ -121,7 +121,7 @@ extern int nc_initialized; y = m_down-(y); \ else if (trans) \ GeneralUnTransform(&(x), &(y)); -#define pi 3.1415926535897932384626433833 +#define pi 3.1415926535897932384626433833 #define dr 0.0174532925199433 #define WinBorder 1 #define WinDepth 4 @@ -402,7 +402,7 @@ int colorset; int i; if ((colorset >= ColorSets) || (colorset < 0)) - fprintf(stderr, + fprintf(stderr, "Mylib: m_choosecolors received colorset #%d\n", colorset); else { if ((! BlackAndWhite) && (grCurrent.depth <=8)) { @@ -450,7 +450,7 @@ void DisplayInitialize() char * m_usrfont; if (nc_text_in_window == 1 && (ep = getenv("AUTORAISE")) != NULL) { - if (strcicmp(ep, "true") == 0) + if (strcicmp(ep, "true") == 0) m_autoraise = true; else if (strcicmp(ep, "false") == 0) m_autoraise = false; @@ -503,7 +503,7 @@ void DisplayInitialize() grvisual = XDefaultVisual(m_display, screennum); grtemplate.screen = screennum; - grtemplate.depth = 0; + grtemplate.depth = 0; grvisual_get = XGetVisualInfo(m_display,(long) 0x0, &grtemplate, &gritems); if(grvisual_get == NULL) { fprintf(stderr, "Could not obtain Visual Info from Server %s. Will attempt default.\n", @@ -564,7 +564,7 @@ printf("log_color: %s visual_table: %d %d %d %d %d %d %d\n", log_color, visual_t if(strncmp(log_color, "16bit", 5) == 0) gritems = visual_table[5]; if(strncmp(log_color, "24bit", 5) == 0) gritems = visual_table[6]; /* I think bw will work with Staticgray, Grayscale, Staticcolor or Pseudocolor */ - if(strncmp(log_color, "bw", 2) == 0) { + if(strncmp(log_color, "bw", 2) == 0) { gritems = visual_table[3]; if(gritems == -1) gritems= visual_table[0]; if(gritems == -1) gritems= visual_table[1]; @@ -613,18 +613,18 @@ printf("log_color: %s visual_table: %d %d %d %d %d %d %d\n", log_color, visual_t Xfprintf(stderr, "bwdef: %s\n", bwdef); - if ((ScrDepth < 4) || + if ((ScrDepth < 4) || ((bwdef != NULL) && (!strcmp(bwdef, "black_and_white"))) || !strcmp(log_color,"bw")) { /* Assuming black-and-white */ BlackAndWhite = True; - } - else + } + else { - Xfprintf(stderr, "if (! XAllocColorCells())...\n"); + Xfprintf(stderr, "if (! XAllocColorCells())...\n"); if (! XAllocColorCells(m_display, colormap, True, plane_masks, - WinDepth, &pixel, 1)) + WinDepth, &pixel, 1)) { numcolors = DefaultVisual(m_display, DefaultScreen(m_display))->map_entries; @@ -665,7 +665,7 @@ printf("log_color: %s visual_table: %d %d %d %d %d %d %d\n", log_color, visual_t else { plane_mask = m_colors[0][(1<<WinDepth)-1].pixel - pixel; } - if (! BlackAndWhite) { + if (! BlackAndWhite) { Xfprintf(stderr, "XStoreColors()\n"); XStoreColors(m_display, colormap, m_colors[0], ColorsInSet); Xfprintf(stderr, "XSetWindowColormap()\n"); @@ -681,8 +681,8 @@ printf("log_color: %s visual_table: %d %d %d %d %d %d %d\n", log_color, visual_t DefaultVisual(m_display, DefaultScreen(m_display)), AllocNone); for (i=0; i < usableColors; i++) colors[i].pixel = i; - XQueryColors(m_display, XDefaultColormap(m_display, - screennum), colors, usableColors); + XQueryColors(m_display, XDefaultColormap(m_display, + screennum), colors, usableColors); realColors = (basepixel+colorCount > usableColors)? usableColors-basepixel: @@ -827,11 +827,11 @@ void WindowInitialize() /* This next section allows entries in .Xdefaults to set initial - size and position of the mylib window. + size and position of the mylib window. Jim Clark 7/13/92 */ usrgeo = XGetDefault (m_display, "mylib", "geometry"); - + if (usrgeo == NULL) { WinSizeHints.flags |= PPosition; @@ -854,7 +854,7 @@ void WindowInitialize() Xfprintf(stderr, "m_window = XCreateWindow()\n"); m_window = XCreateWindow(m_display, root, WinX, WinY, WinW, WinH, WinBorder, - CopyFromParent, InputOutput, + CopyFromParent, InputOutput, DefaultVisual(m_display, screennum), WinAttrMask, &WinAttr); @@ -1139,11 +1139,11 @@ void WindowInitialize() XWindowEvent(m_display, m_window, ExposureMask, &event); } - - + + #define LINESTIPPLELENGTH 4 - - + + static unsigned char dotted[LINESTIPPLELENGTH] = {2, 1, 2, 1}; static unsigned char dot_dashed[LINESTIPPLELENGTH] = {3, 4, 3, 1}; static unsigned char sh_dashed[LINESTIPPLELENGTH] = {4, 3, 4, 3}; @@ -1158,7 +1158,7 @@ static unsigned char *FigureOutBWLine(r, g, b) { /* This is just a matter of taste */ - if ((r > 10) && (g == 0) && (b == 0)) + if ((r > 10) && (g == 0) && (b == 0)) /* red */ return lo_dashed; else if ((r > 11) && (g > 12) && (b == 0)) @@ -1210,7 +1210,7 @@ int full; default_linestyle[0] = lo_dashed; /* m_red 1 */ - Xfprintf(stderr, + Xfprintf(stderr, "XSetForeground(m_display,gc[m_red], WhitePixel(m_display,screennum))\n"); XSetForeground(m_display,gc[m_red],WhitePixel(m_display,screennum)); XSetDashes(m_display, gc[m_red], 0, (char*)lo_dashed, LINESTIPPLELENGTH); @@ -1222,9 +1222,9 @@ int full; "XSetForeground(m_display,gc[m_green],WhitePixel(m_display,screennum))\n"); XSetForeground(m_display,gc[m_green],WhitePixel(m_display,screennum)); default_linestyle[2] = NULL; - + /* m_yellow 3 */ - Xfprintf(stderr, + Xfprintf(stderr, "XSetForeground(m_display,gc[m_yellow],WhitePixel(m_display,screennum))\n" ); XSetForeground(m_display,gc[m_yellow],WhitePixel(m_display,screennum)); @@ -1235,34 +1235,34 @@ int full; default_linestyle[3] = sh_dashed; /* m_blue 4 */ - Xfprintf(stderr, + Xfprintf(stderr, "XSetForeground(m_display,gc[m_blue],WhitePixel(m_display,screennum))\n"); XSetForeground(m_display,gc[m_blue],WhitePixel(m_display,screennum)); default_linestyle[4] = NULL; /* m_purple 5 */ - Xfprintf(stderr, + Xfprintf(stderr, "XSetForeground(m_display,gc[m_purple],WhitePixel(m_display,screennum))\n" ); XSetForeground(m_display,gc[m_purple],WhitePixel(m_display,screennum)); default_linestyle[5] = NULL; - - + + /* m_cyan 6 */ - Xfprintf(stderr, + Xfprintf(stderr, "XSetForeground(m_display,gc[m_cyan],WhitePixel(m_display,screennum))\n" ); XSetForeground(m_display,gc[m_cyan],WhitePixel(m_display,screennum)); default_linestyle[6] = NULL; - + /* m_white 7 */ - Xfprintf(stderr, + Xfprintf(stderr, "XSetForeground(m_display,gc[m_white],WhitePixel(m_display,screennum))\n"); XSetForeground(m_display,gc[m_white],WhitePixel(m_display,screennum)); default_linestyle[7] = NULL; - - Xfprintf(stderr, + + Xfprintf(stderr, "XSetForeground(m_display,gc[8],WhitePixel(m_display,screennum))\n"); XSetForeground(m_display,gc[8],WhitePixel(m_display,screennum)); default_linestyle[8] = NULL; @@ -1282,14 +1282,14 @@ int full; XSetForeground(m_display,gc[15],WhitePixel(m_display,screennum)); default_linestyle[15] = NULL; - } - else + } + else { m_maxcolor = (1L << WinDepth) - 1; for (i = 0; i < ColorsInSet; i++) { Xfprintf(stderr, "XSetPlaneMask(m_display, gc[%d])\n", i); XSetPlaneMask(m_display, gc[i], plane_mask); - + Xfprintf(stderr, "XSetForeground(m_display, gc[%d])\n", i); XSetForeground(m_display, gc[i], m_colors[0][i].pixel); } @@ -1681,16 +1681,16 @@ void m_noclip() Xfprintf(stderr, "XSetClipMask(m_display, gc[%d])\n", i); XSetClipMask(m_display, gc[i], None); } - + Xfprintf(stderr, "XSetClipMask(m_display, newgrid->gc1)\n"); XSetClipMask(m_display, newgrid->gc1, None); - + Xfprintf(stderr, "XSetClipMask(m_display, newgrid->gc2)\n"); XSetClipMask(m_display, newgrid->gc2, None); - + Xfprintf(stderr, "XSetClipMask(m_display, oldgrid->gc1)\n"); XSetClipMask(m_display, oldgrid->gc1, None); - + Xfprintf(stderr, "XSetClipMask(m_display, oldgrid->gc2)\n"); XSetClipMask(m_display, oldgrid->gc2, None); m_clip_x1 = 0; @@ -1705,7 +1705,7 @@ int xx, yx, xy, yy, d, ax, ay; { flip = 0; trans = 1; - + Mfprintf(stderr, "m_transform(%d, %d, %d, %d, %d, %d, %d)\n", xx, yx, xy, yy, d, ax, ay ); @@ -1786,7 +1786,7 @@ static void turncursoron() if (cursor_is_on) { Xfprintf(stderr, "XCopyArea() (turncursoron)\n"); XCopyArea(m_display, m_window, UnderCursor, CursorGC, - cursx-cursors[curcursor].xoff, cursy-cursors[curcursor].yoff, + cursx-cursors[curcursor].xoff, cursy-cursors[curcursor].yoff, cursors[curcursor].w, cursors[curcursor].h, 0, 0); Xfprintf(stderr, "XCopyArea() (turncursoron)\n"); XCopyArea(m_display, cursors[curcursor].c1, m_window, CursorGC2, 0, 0, @@ -1832,7 +1832,7 @@ int x, y; cursy = y; Xfprintf(stderr, "XCopyArea() (m_cursor)\n"); XCopyArea(m_display, m_window, UnderCursor, CursorGC, - cursx-cursors[curcursor].xoff, cursy-cursors[curcursor].yoff, + cursx-cursors[curcursor].xoff, cursy-cursors[curcursor].yoff, cursors[curcursor].w, cursors[curcursor].h, 0, 0); Xfprintf(stderr, "XCopyArea() (m_cursor)\n"); XCopyArea(m_display, cursors[curcursor].c1, m_window, CursorGC2, 0, 0, @@ -1890,7 +1890,7 @@ int n; newcursor = XCreateFontCursor(m_display, xcursors[n].cursor); XRecolorCursor(m_display, newcursor, &m_colors[0][xcursors[n].color], &m_colors[0][m_black]); - + XDefineCursor(m_display, m_window, newcursor); } */ @@ -1918,7 +1918,7 @@ int c; XSetFunction(m_display, gc[i], GXcopy); break; case m_xor: - if ((BlackAndWhite) && + if ((BlackAndWhite) && (WhitePixel(m_display,screennum) == 0)) { Xfprintf(stderr, "XSetFunction(m_display, gc[%d], GXequiv)\n", i); XSetFunction(m_display, gc[i], GXequiv); @@ -1962,7 +1962,7 @@ int c; break; case m_xor: - if ((BlackAndWhite) && + if ((BlackAndWhite) && (WhitePixel(m_display,screennum) == 0)) { Xfprintf(stderr, "XSetFunction(m_display, newgrid->gc1, GXequiv)\n"); XSetFunction(m_display, newgrid->gc1, GXequiv); @@ -1971,7 +1971,7 @@ int c; } else { Xfprintf(stderr, "XSetFunction(m_display, newgrid->gc1, GXxor)\n"); XSetFunction(m_display, newgrid->gc1, GXxor); - + Xfprintf(stderr, "XSetFunction(m_display, oldgrid->gc1, GXxor)\n"); XSetFunction(m_display, oldgrid->gc1, GXxor); } @@ -2184,7 +2184,7 @@ m_colorarray r, g, b; if ((!BlackAndWhite) && (grCurrent.depth <= 8)){ Xfprintf(stderr, "XStoreColors()\n"); XStoreColors(m_display, colormap, m_colors[ColorSets], m_maxcolor+1); - } + } #else if(!BlackAndWhite) { Xfprintf(stderr, "XStoreColors()\n"); @@ -2319,7 +2319,7 @@ static int linestyles[16] = { }; static int currentlinestyle = 0; static int linewidth = 0; - + void m_linestyle(s) int s; { @@ -2339,7 +2339,7 @@ int s; XSetLineAttributes(m_display, gc[i], linewidth, LineSolid, CapButt, JoinMiter); else { - XSetDashes(m_display, gc[i], 0, + XSetDashes(m_display, gc[i], 0, (char*)default_linestyle[i], LINESTIPPLELENGTH); XSetLineAttributes(m_display,gc[i],linewidth,LineDoubleDash, CapButt,JoinMiter); @@ -2365,10 +2365,10 @@ int s; else { if ((onoff == -1) && (!(st & (1 << 15)))) firstisoff = 1; - + onoff = (st & (1 << 15)); dashlist[++j] = 1; - + } } if (firstisoff) { @@ -2379,7 +2379,7 @@ int s; for (i = 0; i <= j; i++) dashlist[i] = dashlist[i+1]; } - + if (! (j % 2)) dashlist[0] += dashlist[j--]; if (! currentlinestyle) { @@ -2389,7 +2389,7 @@ int s; XSetLineAttributes(m_display, gc[i], linewidth, LineOnOffDash, CapButt, JoinMiter); else { - XSetDashes(m_display, gc[i], 0, + XSetDashes(m_display, gc[i], 0, (char*)default_linestyle[i], LINESTIPPLELENGTH); XSetLineAttributes(m_display,gc[i],linewidth,LineDoubleDash, CapButt,JoinMiter); @@ -2397,16 +2397,16 @@ int s; } Xfprintf(stderr, "XSetLineAttributes(m_display, newgrid->gc1)\n"); XSetLineAttributes(m_display, newgrid->gc1, linewidth, LineOnOffDash, - CapButt, JoinMiter); + CapButt, JoinMiter); Xfprintf(stderr, "XSetLineAttributes(m_display, newgrid->gc2)\n"); XSetLineAttributes(m_display, newgrid->gc2, linewidth, LineOnOffDash, - CapButt, JoinMiter); + CapButt, JoinMiter); Xfprintf(stderr, "XSetLineAttributes(m_display, oldgrid->gc1)\n"); XSetLineAttributes(m_display, oldgrid->gc1, linewidth, LineOnOffDash, - CapButt, JoinMiter); + CapButt, JoinMiter); Xfprintf(stderr, "XSetLineAttributes(m_display, oldgrid->gc2)\n"); XSetLineAttributes(m_display, oldgrid->gc2, linewidth, LineOnOffDash, - CapButt, JoinMiter); + CapButt, JoinMiter); } for (i = 0; i < ColorsInSet; i++) { Xfprintf(stderr, "XSetDashes(m_display, gc[%d])\n", i); @@ -2508,7 +2508,7 @@ int w; XSetLineAttributes(m_display, gc[i], linewidth, LineSolid, CapButt, JoinMiter); else { - XSetDashes(m_display, gc[i], 0, + XSetDashes(m_display, gc[i], 0, (char*)default_linestyle[i], LINESTIPPLELENGTH); XSetLineAttributes(m_display,gc[i],linewidth,LineDoubleDash, CapButt,JoinMiter); @@ -2572,7 +2572,7 @@ void m_nolinewidth() XSetLineAttributes(m_display, gc[i], linewidth, LineSolid, CapButt, JoinMiter); else { - XSetDashes(m_display, gc[i], 0, + XSetDashes(m_display, gc[i], 0, (char*)default_linestyle[i], LINESTIPPLELENGTH); XSetLineAttributes(m_display, gc[i], linewidth, LineDoubleDash, CapButt, JoinMiter); @@ -2649,15 +2649,15 @@ int x1, y1, x2, y2; int oc1 = 0, oc2 = 0; int val; static int table[9][9] = { - 0, 0, 0, 0, 1, 2, 0, 4, 4, - 0, 0, 0, 4, 1, 5, 4, 1, 5, - 0, 0, 0, 2, 1, 0, 5, 5, 0, - 0, 2, 2, 0, 1, 1, 0, 4, 4, - 1, 1, 1, 1, 1, 1, 1, 1, 1, - 2, 2, 0, 1, 1, 0, 5, 5, 0, - 0, 4, 4, 0, 1, 4, 0, 0, 0, - 4, 1, 5, 4, 1, 5, 0, 0, 0, - 5, 5, 0, 5, 1, 0, 0, 0, 0 + {0, 0, 0, 0, 1, 2, 0, 4, 4}, + {0, 0, 0, 4, 1, 5, 4, 1, 5}, + {0, 0, 0, 2, 1, 0, 5, 5, 0}, + {0, 2, 2, 0, 1, 1, 0, 4, 4}, + {1, 1, 1, 1, 1, 1, 1, 1, 1}, + {2, 2, 0, 1, 1, 0, 5, 5, 0}, + {0, 4, 4, 0, 1, 4, 0, 0, 0}, + {4, 1, 5, 4, 1, 5, 0, 0, 0}, + {5, 5, 0, 5, 1, 0, 0, 0, 0} }; if (x1 > m_clip_x2) @@ -2909,7 +2909,7 @@ int x1, y1, x2, y2; if (cursor_is_on) turncursoroff(); #endif - + #ifdef EXTRA_BUFFERING if (x1 == x2) if (y1 == y2) @@ -2978,7 +2978,7 @@ int x1, y1, x2, y2; if (cursor_is_on) turncursoroff(); #endif - + #ifdef EXTRA_BUFFERING if (x1 == x2) if (y1 == y2) @@ -3104,10 +3104,10 @@ int x1, y1, x2, y2, dx, dy, ax, ay; Xfprintf(stderr, "newgrid->p2 = XCreatePixmap()\n"); newgrid->p2 = XCreatePixmap(m_display, m_window, 60/dx*dx, 60/dy*dy, RealWinDepth); newgrid->color = currentcolor; - + Xfprintf(stderr, "gc2 = XCreateGC()\n"); gc2 = XCreateGC(m_display, newgrid->p1, 0, NULL); - + Xfprintf(stderr, "XSetForeground(m_display, gc2, 0)\n"); XSetForeground(m_display, gc2, 0); Xfprintf(stderr, "XFillRectangle()\n"); @@ -3430,7 +3430,7 @@ long chord; rcc1, rcs1, rsc1, rss1, rcc2, rcs2, rsc2, rss2, temp; long q, quad1, quad2, chx, chy; int rotflag; - + Mfprintf(stderr, "m_drawarc(%ld, %ld, %ld, %ld, %f, %f, %f, %ld)\n", x, y, rx, ry, theta1, theta2, rotate, chord); @@ -3438,13 +3438,13 @@ long chord; if (cursor_is_on) turncursoroff(); #endif - + if (rx < 0 && ry < 0) { temp = theta1; theta1 = theta2; theta2 = temp; } - + if (!(theta1 < theta2 && rx && ry)) return; if (rx < 0) @@ -3600,7 +3600,7 @@ long chord; if (cursor_is_on) turncursoroff(); #endif - + if (rx < 0 && ry < 0) { temp = theta1; theta1 = theta2; @@ -3699,7 +3699,7 @@ int x1, y1, x2, y2, rx, ry, c; y = MIN(y1,y2); wid = x1+x2-x-x; hei = y1+y2-y-y; - + if (currentcolor != m_trans) { Xfprintf(stderr, "XFillRectangle()\n"); XFillRectangle(m_display, m_window, gc[currentcolor], x, y, wid+1, hei+1); @@ -3749,7 +3749,7 @@ int x1, y1, x2, y2, rx, ry, c1, c2; y = MIN(y1,y2); wid = x1+x2-x-x; hei = y1+y2-y-y; - + if (c2 != m_trans) { Xfprintf(stderr, "XFillRectangle()\n"); XFillRectangle(m_display, m_window, gc[c2], x, y, wid+1, hei+1); @@ -3858,7 +3858,7 @@ int x1, y1, x2, y2, x3, y3, x4, y4; bezthresh = 2500; dobezier((x1<<4)+8, (y1<<4)+8, (x2<<4)+8, (y2<<4)+8, (x3<<4)+8, (y3<<4)+8, (x4<<4)+8, (y4<<4)+8, (x4<<4)+8, (y4<<4)+8); - + #ifdef SAVECURSOR if (cursor_is_on) turncursoron(); @@ -3940,7 +3940,7 @@ int x1, y1, x2, y2, x3, y3, x4, y4, thresh; dobezier((x1<<4)+8, (y1<<4)+8, (x2<<4)+8, (y2<<4)+8, (x3<<4)+8, (y3<<4)+8, (x4<<4)+8, (y4<<4)+8, (x4<<4)+8, (y4<<4)+8); - + curx = x4; cury = y4; @@ -3997,7 +3997,7 @@ struct LOC_polycurve *LINK_polycurve; (y1 + y2 * 2 + y3 * 3 + y4 * 4 + y5 * 5) / 32, (x2 + x3 * 3 + x4 * 6 + x5 * 10) / 32, (y2 + y3 * 3 + y4 * 6 + y5 * 10) / 32, - (x3 + x4 * 4 + x5 * 10) / 32, + (x3 + x4 * 4 + x5 * 10) / 32, (y3 + y4 * 4 + y5 * 10) / 32, (x4 + x5 * 5) / 32, (y4 + y5 * 5) / 32, @@ -4018,11 +4018,11 @@ double x0, y0, x1, y1, x2, y2, x3, y3, x4, y4, x5, y5; (long)floor(SCALE * y1 + 0.5), (long)floor(SCALE * x2 + 0.5), (long)floor(SCALE * y2 + 0.5), - (long)floor(SCALE * x3 + 0.5), + (long)floor(SCALE * x3 + 0.5), (long)floor(SCALE * y3 + 0.5), - (long)floor(SCALE * x4 + 0.5), + (long)floor(SCALE * x4 + 0.5), (long)floor(SCALE * y4 + 0.5), - (long)floor(SCALE * x5 + 0.5), + (long)floor(SCALE * x5 + 0.5), (long)floor(SCALE * y5 + 0.5), &V_polycurve); } @@ -4479,7 +4479,7 @@ char *f, *str; int x1, y1, x2, y2; m_picturevar *p; { - + */ /* Added these two functions for auto raise and lower support for X11. @@ -4514,7 +4514,7 @@ void m_alpha_on() { changes.sibling = m_window; changes.stack_mode = Above; - + XConfigureWindow(m_display, nc_window, CWStackMode, &changes); } return; @@ -4585,7 +4585,7 @@ m_tablet_info *pen; pen->y = mouse.y; pen->ax = mouse.ax; pen->ay = mouse.ay; - } + } } else { pen->dn = 0; pen->up = 0; @@ -4617,7 +4617,7 @@ m_tablet_info *pen; m_readpen(pen); /* fprintf(stderr, "m_cursor(%d, %d) from m_trackpen\n", pen->x, pen->y); */ - m_cursor(pen->x, pen->y); + m_cursor(pen->x, pen->y); } void m_trackpen2(pen) @@ -4641,7 +4641,7 @@ m_tablet_info *pen; found = XCheckMaskEvent(m_display, ButtonPressMask | PointerMotionMask, &event); if (found) { - if (event.type == ButtonPress) + if (event.type == ButtonPress) break; } else break; @@ -4653,7 +4653,7 @@ m_tablet_info *pen; pen->up = 0; pen->near_ = ! (event.xbutton.state & Button3Mask) && ! (event.xbutton.button == Button3); - + if (nc_initialized) { if (event.xany.window == m_window) { parent = nc_window; @@ -4788,7 +4788,7 @@ int m_pollkbd() KeySym sym; Kfprintf(stderr, "m_pollkbd()\n"); - + #ifdef EXTRA_BUFFERING flush_buffers(); #endif /* EXTRA_BUFFERING */ @@ -4800,7 +4800,7 @@ int m_pollkbd() return(0); /* sleep(1) could be added here for load-average problem */ /* but may be too drastic (MDG) */ switch (event.type) { - case KeyPress: + case KeyPress: if (XLookupString((XKeyEvent *)&event, buf, 10, &sym, NULL)) { Xfprintf(stderr, "XPutBackEvent() (m_pollkbd() Key event)\n"); XPutBackEvent(m_display, &event); @@ -4922,7 +4922,7 @@ uchar m_inkeyn() XPutBackEvent(m_display, &event); return(buf[0]); } - } else if ((event.type == Expose) && + } else if ((event.type == Expose) && (event.xexpose.window == m_window) && (event.xexpose.count == 0)) { Xfprintf(stderr, "XPutBackEvent() (m_inkeyn() expose event)\n"); @@ -5078,13 +5078,13 @@ char *prompt; fprintf(stderr, " in window %d\n", event.xany.window); */ if (XLookupString((XKeyEvent *)&event, buf, 10, &sym, NULL)) { - if ((buf[0] == 'y') || (buf[0] == 'Y')) + if ((buf[0] == 'y') || (buf[0] == 'Y')) { done = 1; return_value = 1; - } - else - if ((buf[0] == 'n') || (buf[0] == 'N')) + } + else + if ((buf[0] == 'n') || (buf[0] == 'N')) { done = 1; return_value = 0; @@ -5222,4 +5222,3 @@ void m_drawchar(cp) void* *cp; { } -