From 94f29d39ab51e8353c5894749c46b7bbed27fecc Mon Sep 17 00:00:00 2001 From: Mike Small Date: Tue, 14 Aug 2018 00:38:38 -0400 Subject: [PATCH] Remove title squeeze and window highlight options. 1. Always squeeze title and on left. 2. Always highlight windows and their titles. --- man/twmruined.man | 77 +-- src/add_window.c | 170 +------ src/gram.c | 1151 ++++++++++++++++++++------------------------- src/gram.h | 98 ++-- src/gram.y | 56 +-- src/menus.c | 18 +- src/parse.c | 56 --- src/parse.h | 3 - src/resize.c | 4 +- src/screen.h | 7 - src/twm.c | 15 +- src/twm.h | 10 +- 12 files changed, 589 insertions(+), 1076 deletions(-) diff --git a/man/twmruined.man b/man/twmruined.man index 14d3f82..9d5f6cd 100644 --- a/man/twmruined.man +++ b/man/twmruined.man @@ -243,14 +243,13 @@ different types of windows. For example: The default is "black". .IP "\fBBorderTileBackground\fP \fIstring\fP [{ \fIwincolorlist\fP }]" 8 This variable specifies the default background color in the gray pattern -used in unhighlighted borders (only if \fBNoHighlight\fP hasn't been set), +used in unhighlighted borders, and may only be given within a \fBColor\fP, \fBGrayscale\fP or \fBMonochrome\fP list. The optional \fIwincolorlist\fP allows per-window colors to be specified. The default is "white". .IP "\fBBorderTileForeground\fP \fIstring\fP [{ \fIwincolorlist\fP }]" 8 This variable specifies the default foreground color in the gray pattern -used in unhighlighted borders (only -if \fBNoHighlight\fP hasn't been set), and may only be given within a +used in unhighlighted borders, and may only be given within a \fBColor\fP, \fBGrayscale\fP or \fBMonochrome\fP list. The optional \fIwincolorlist\fP allows per-window colors to be specified. The default is "black". .IP "\fBBorderWidth\fP \fIpixels\fP" 8 @@ -364,11 +363,6 @@ information windows. The default is "black". .IP "\fBDontMoveOff\fP" 8 This variable indicates that windows should not be allowed to be moved off the screen. It can be overridden by the \fBf.forcemove\fP function. -.IP "\fBDontSqueezeTitle\fP [{ \fIwin-list\fP }] " 8 -This variable indicates that titlebars should not be squeezed to their -minimum size as described under \fBSqueezeTitle\fP below. -If the optional window list is supplied, only those windows will be -prevented from being squeezed. .IP "\fBForceIcons\fP" 8 This variable indicates that icon pixmaps specified in the \fBIcons\fP variable should override any client-supplied pixmaps. @@ -515,14 +509,6 @@ file contains a completely new set of bindings and definitions. .IP "\fBNoGrabServer\fP" 8 This variable indicates that \fItwmruined\fP should not grab the server when popping up menus and moving opaque windows. -.IP "\fBNoHighlight\fP [{ \fIwin-list\fP }]" 8 -This variable indicates that borders should not be highlighted to track the -location of the pointer. If the optional \fIwin-list\fP is given, highlighting -will only be disabled for those windows. -When the border is highlighted, it will -be drawn in the current \fBBorderColor\fP. When the border is not -highlighted, it will be stippled with a gray pattern using the -current \fBBorderTileForeground\fP and \fBBorderTileBackground\fP colors. .IP "\fBNoMenuShadows\fP" 8 This variable indicates that menus should not have drop shadows drawn behind them. This is typically used with slower servers since it speeds up menu @@ -564,30 +550,11 @@ the pointer is moved quickly and \fItwmruined\fP is slow to respond, input can b directed to the old window instead of the new. This option is typically used to prevent this ``input lag'' and to work around bugs in older applications that have problems with focus events. -.IP "\fBNoTitleHighlight\fP [{ \fIwin-list\fP }]" 8 -This variable indicates that the highlight area of the titlebar, which is -used to indicate the window that currently has the input focus, should not -be displayed. If the optional \fIwin-list\fP is given, only those windows -will not have highlight areas. This and the \fBSqueezeTitle\fP options -can be set to substantially reduce the amount of screen space required by -titlebars. .IP "\fBOpaqueMove\fP" 8 This variable indicates that the \fBf.move\fP function should actually move the window instead of just an outline so that the user can immediately see what the window will look like in the new position. This option is typically used on fast displays (particularly if \fBNoGrabServer\fP is set). -.IP "\fBPixmaps\fP { \fIpixmaps\fP }" 8 -This variable specifies a list of pixmaps that define the appearance of various -images. Each entry is a keyword indicating the pixmap to set, followed by a -string giving the name of the bitmap file. The following pixmaps -may be specified: -.EX 0 -\fBPixmaps\fP -{ - TitleHighlight "gray1" -} -.EE -The default for \fITitleHighlight\fP is to use an even stipple pattern. .IP "\fBPriority\fP \fIpriority\fP" 8 This variable sets \fItwmruined\fP's priority. \fIpriority\fP should be an unquoted, signed number (e.g. 999). This variable has an effect only @@ -627,36 +594,6 @@ For example: .EE This would place on the root window 3 pixel values for borders and titlebars, as well as the three color strings, all taken from the default colormap. -.IP "\fBSqueezeTitle\fP [{ \fIsqueeze-list\fP }] " 8 -This variable indicates that \fItwmruined\fP should attempt to use the SHAPE -extension to make titlebars occupy only as much screen space as they need, -rather than extending all the way across the top of the window. -The optional \fIsqueeze-list\fP -may be used to control the location of the squeezed titlebar along the -top of the window. It contains entries of the form: -.EX 0 - "\fIname\fP" \fIjustification\fP \fInum\fP \fIdenom\fP -.EE -where \fIname\fP is a window name, \fIjustification\fP is either \fBleft\fP, -\fBcenter\fP, or \fBright\fP, and \fInum\fP and \fIdenom\fP -are numbers specifying a ratio giving the relative position about which -the titlebar is justified. The ratio is measured from left to right if -the numerator is positive, and right to left if negative. A denominator -of 0 indicates that the numerator should be measured in pixels. For -convenience, the ratio 0/0 is the same as 1/2 for \fBcenter\fP and -1/1 -for \fBright\fP. For example: -.EX 0 -\fBSqueezeTitle\fP -{ - "XTerm" left 0 0 - "xterm1" left 1 3 - "xterm2" left 2 3 - "oclock" center 0 0 - "emacs" right 0 0 -} -.EE -The \fBDontSqueezeTitle\fP list can be used to turn off squeezing on -certain titles. .IP "\fBStartIconified\fP [{ \fIwin-list\fP }] " 8 This variable indicates that client windows should initially be left as icons until explicitly deiconified by the user. If the optional \fIwin-list\fP @@ -847,9 +784,6 @@ the \fBSelect\fP cursor and the next window to receive a button press will be chosen: .IP "\fB!\fP \fIstring\fP" 8 This is an abbreviation for \fBf.exec\fP \fIstring\fP. -.\"OBSOLETE - use a clipboard client -.\".IP "\fB^\fP \fIstring\fP" 8 -.\"This is an abbreviation for \fBf.cut\fP \fIstring\fP. .IP "\fBf.autoraise\fP" 8 This function toggles whether or not the selected window is raised whenever entered by the pointer. See the description of the variable \fBAutoRaise\fP. @@ -872,13 +806,6 @@ A pointer driven keyboard focus will install a private colormap upon entry of the window owning the colormap. Using the click to type model, private colormaps will not be installed until the user presses a mouse button on the target window. -.\"OBSOLETE - should go away and use a clipboard. -.\".IP "\fBf.cut\fP \fIstring\fP" 8 -.\"This function places the specified \fIstring\fP (followed by a newline -.\"character) into the root window property CUT_BUFFER0. -.\".IP "\fBf.cutfile\fP" 8 -.\"This function reads the file indicated by the contents of the CUT_BUFFER0 -.\"window property and replaces the cut buffer. .IP "\fBf.deiconify\fP" 8 This function deiconifies the selected window. If the window is not an icon, this function does nothing. diff --git a/src/add_window.c b/src/add_window.c index e5f3fab..333d6be 100644 --- a/src/add_window.c +++ b/src/add_window.c @@ -272,18 +272,10 @@ AddWindow(Window w) tmp_win->full_name = strdup(tmp_win->name); namelen = strlen (tmp_win->name); - tmp_win->highlight = Scr->Highlight && - (!(short)(long) LookInList(Scr->NoHighlight, tmp_win->full_name, - &tmp_win->class)); - tmp_win->stackmode = Scr->StackMode && (!(short)(long) LookInList(Scr->NoStackModeL, tmp_win->full_name, &tmp_win->class)); - tmp_win->titlehighlight = Scr->TitleHighlight && - (!(short)(long) LookInList(Scr->NoTitleHighlight, tmp_win->full_name, - &tmp_win->class)); - tmp_win->auto_raise = (short)(long) LookInList(Scr->AutoRaise, tmp_win->full_name, &tmp_win->class); @@ -303,25 +295,7 @@ AddWindow(Window w) tmp_win->ring.next = tmp_win->ring.prev = NULL; tmp_win->ring.cursor_valid = False; - tmp_win->squeeze_info = NULL; - /* - * get the squeeze information; note that this does not have to be freed - * since it is coming from the screen list - */ - if (HasShape) { - if (!LookInList (Scr->DontSqueezeTitleL, tmp_win->full_name, - &tmp_win->class)) { - tmp_win->squeeze_info = (SqueezeInfo *) - LookInList (Scr->SqueezeTitleL, tmp_win->full_name, - &tmp_win->class); - if (!tmp_win->squeeze_info) { - static SqueezeInfo default_squeeze = { J_LEFT, 0, 0 }; - if (Scr->SqueezeTitle) - tmp_win->squeeze_info = &default_squeeze; - } - } - } - + tmp_win->squeeze = HasShape; tmp_win->old_bw = tmp_win->attr.border_width; if (Scr->ClientBorderWidth) { @@ -820,25 +794,20 @@ AddWindow(Window w) } else { tmp_win->title_w = 0; - tmp_win->squeeze_info = NULL; + tmp_win->squeeze = False; } - if (tmp_win->highlight) - { - tmp_win->gray = XCreatePixmapFromBitmapData(dpy, Scr->Root, + tmp_win->gray = XCreatePixmapFromBitmapData(dpy, Scr->Root, gray_bits, gray_width, gray_height, tmp_win->border_tile.fore, tmp_win->border_tile.back, Scr->d_depth); - SetBorder (tmp_win, False); - } - else - tmp_win->gray = None; + SetBorder (tmp_win, False); if (tmp_win->title_w) { CreateWindowTitlebarButtons (tmp_win); - ComputeTitleLocation (tmp_win); + ComputeTitleLocation(tmp_win); XMoveWindow (dpy, tmp_win->title_w, tmp_win->title_x, tmp_win->title_y); XDefineCursor(dpy, tmp_win->title_w, Scr->TitleCursor); @@ -863,10 +832,10 @@ AddWindow(Window w) unsigned wws, hws, wbs, hbs; int boundingShaped, clipShaped; - XShapeSelectInput (dpy, tmp_win->w, ShapeNotifyMask); - XShapeQueryExtents (dpy, tmp_win->w, - &boundingShaped, &xws, &yws, &wws, &hws, - &clipShaped, &xbs, &ybs, &wbs, &hbs); + XShapeSelectInput(dpy, tmp_win->w, ShapeNotifyMask); + XShapeQueryExtents(dpy, tmp_win->w, + &boundingShaped, &xws, &yws, &wws, &hws, + &clipShaped, &xbs, &ybs, &wbs, &hbs); tmp_win->wShaped = boundingShaped; } @@ -1059,68 +1028,23 @@ GrabKeys(TwmWindow *tmp_win) static Window CreateHighlightWindow (TwmWindow *tmp_win) { - XSetWindowAttributes attributes; /* attributes for create windows */ - Pixmap pm = None; - GC gc; - XGCValues gcv; - unsigned long valuemask; + XSetWindowAttributes attributes; int h = (Scr->TitleHeight - 2 * Scr->FramePadding); Window w; - - /* - * If a special highlight pixmap was given, use that. Otherwise, - * use a nice, even gray pattern. The old horizontal lines look really - * awful on interlaced monitors (as well as resembling other looks a - * little bit too closely), but can be used by putting - * - * Pixmaps { TitleHighlight "hline2" } - * - * (or whatever the horizontal line bitmap is named) in the startup - * file. If all else fails, use the foreground color to look like a - * solid line. - */ - if (!Scr->hilitePm) { - Scr->hilitePm = XCreateBitmapFromData (dpy, tmp_win->title_w, - gray_bits, gray_width, - gray_height); - Scr->hilite_pm_width = gray_width; - Scr->hilite_pm_height = gray_height; - } - if (Scr->hilitePm) { - pm = XCreatePixmap (dpy, tmp_win->title_w, - Scr->hilite_pm_width, Scr->hilite_pm_height, - Scr->d_depth); - gcv.foreground = tmp_win->title.fore; - gcv.background = tmp_win->title.back; - gcv.graphics_exposures = False; - gc = XCreateGC (dpy, pm, - (GCForeground|GCBackground|GCGraphicsExposures), - &gcv); - if (gc) { - XCopyPlane (dpy, Scr->hilitePm, pm, gc, 0, 0, - Scr->hilite_pm_width, Scr->hilite_pm_height, - 0, 0, 1); - XFreeGC (dpy, gc); - } else { - XFreePixmap (dpy, pm); - pm = None; - } - } - if (pm) { - valuemask = CWBackPixmap; - attributes.background_pixmap = pm; - } else { - valuemask = CWBackPixel; - attributes.background_pixel = tmp_win->title.fore; - } + /* Use an even gray pattern. */ + Scr->hilitePm = XCreateBitmapFromData (dpy, tmp_win->title_w, + gray_bits, gray_width, + gray_height); + Scr->hilite_pm_width = gray_width; + Scr->hilite_pm_height = gray_height; + attributes.background_pixel = tmp_win->title.fore; w = XCreateWindow (dpy, tmp_win->title_w, 0, Scr->FramePadding, (unsigned int) Scr->TBInfo.width, (unsigned int) h, (unsigned int) 0, Scr->d_depth, (unsigned int) CopyFromParent, - Scr->d_visual, valuemask, &attributes); - if (pm) XFreePixmap (dpy, pm); + Scr->d_visual, CWBackPixel, &attributes); return w; } @@ -1139,7 +1063,6 @@ void ComputeCommonTitleOffsets (void) Scr->TBInfo.rightoff += (Scr->ButtonIndent + ((Scr->TBInfo.nright * buttonwidth) - Scr->TBInfo.pad)); - return; } void ComputeWindowTitleOffsets (TwmWindow *tmp_win, int width, Bool squeeze) @@ -1148,15 +1071,15 @@ void ComputeWindowTitleOffsets (TwmWindow *tmp_win, int width, Bool squeeze) if (tmp_win->hilite_w || Scr->TBInfo.nright > 0) tmp_win->highlightx += Scr->TitlePadding; tmp_win->rightx = width - Scr->TBInfo.rightoff; - if (squeeze && tmp_win->squeeze_info) { + if (squeeze && tmp_win->squeeze) { int rx = (tmp_win->highlightx + (tmp_win->hilite_w ? Scr->TBInfo.width * 2 : 0) + (Scr->TBInfo.nright > 0 ? Scr->TitlePadding : 0) + Scr->FramePadding); - if (rx < tmp_win->rightx) tmp_win->rightx = rx; + if (rx < tmp_win->rightx) + tmp_win->rightx = rx; } - return; } @@ -1165,57 +1088,14 @@ void ComputeWindowTitleOffsets (TwmWindow *tmp_win, int width, Bool squeeze) * into account since we want (0,0) of the title window to line up with (0,0) * of the frame window. */ -void ComputeTitleLocation (register TwmWindow *tmp) +void ComputeTitleLocation(TwmWindow *tmp) { tmp->title_x = -tmp->frame_bw; tmp->title_y = -tmp->frame_bw; - - if (tmp->squeeze_info) { - register SqueezeInfo *si = tmp->squeeze_info; - int basex; - int maxwidth = tmp->frame_width; - int tw = tmp->title_width; - - /* - * figure label base from squeeze info (justification fraction) - */ - if (si->denom == 0) { /* num is pixel based */ - if ((basex = si->num) == 0) { /* look for special cases */ - switch (si->justify) { - case J_RIGHT: - basex = maxwidth; - break; - case J_CENTER: - basex = maxwidth / 2; - break; - } - } - } else { /* num/denom is fraction */ - basex = ((si->num * maxwidth) / si->denom); - if (si->num < 0) basex += maxwidth; - } - - /* - * adjust for left (nop), center, right justify and clip - */ - switch (si->justify) { - case J_CENTER: - basex -= tw / 2; - break; - case J_RIGHT: - basex -= tw - 1; - break; - } - if (basex > maxwidth - tw + 1) - basex = maxwidth - tw + 1; - if (basex < 0) basex = 0; - - tmp->title_x = basex - tmp->frame_bw; - } } -static void CreateWindowTitlebarButtons (TwmWindow *tmp_win) +static void CreateWindowTitlebarButtons(TwmWindow *tmp_win) { unsigned long valuemask; /* mask for create windows */ XSetWindowAttributes attributes; /* attributes for create windows */ @@ -1282,13 +1162,11 @@ static void CreateWindowTitlebarButtons (TwmWindow *tmp_win) } } - tmp_win->hilite_w = (tmp_win->titlehighlight - ? CreateHighlightWindow (tmp_win) : None); + tmp_win->hilite_w = CreateHighlightWindow(tmp_win); XMapSubwindows(dpy, tmp_win->title_w); if (tmp_win->hilite_w) XUnmapWindow(dpy, tmp_win->hilite_w); - return; } diff --git a/src/gram.c b/src/gram.c index 4ed09c9..c60cb4b 100644 --- a/src/gram.c +++ b/src/gram.c @@ -69,171 +69,153 @@ typedef union #define ALL 267 #define OR 268 #define CURSORS 269 -#define PIXMAPS 270 -#define ICONS 271 -#define COLOR 272 -#define SAVECOLOR 273 -#define MONOCHROME 274 -#define FUNCTION 275 -#define WINDOW_FUNCTION 276 -#define ZOOM 277 -#define MAKE_TITLE 278 -#define GRAYSCALE 279 -#define NO_TITLE 280 -#define AUTO_RAISE 281 -#define NO_HILITE 282 -#define ICON_REGION 283 -#define META 284 -#define SHIFT 285 -#define LOCK 286 -#define CONTROL 287 -#define WINDOW 288 -#define TITLE 289 -#define ICON 290 -#define ROOT 291 -#define FRAME 292 -#define COLON 293 -#define EQUALS 294 -#define SQUEEZE_TITLE 295 -#define DONT_SQUEEZE_TITLE 296 -#define START_ICONIFIED 297 -#define NO_TITLE_HILITE 298 -#define TITLE_HILITE 299 -#define MOVE 300 -#define RESIZE 301 -#define WAIT 302 -#define SELECT 303 -#define KILL 304 -#define LEFT_TITLEBUTTON 305 -#define RIGHT_TITLEBUTTON 306 -#define NUMBER 307 -#define KEYWORD 308 -#define NKEYWORD 309 -#define CKEYWORD 310 -#define CLKEYWORD 311 -#define FKEYWORD 312 -#define FSKEYWORD 313 -#define SKEYWORD 314 -#define DKEYWORD 315 -#define JKEYWORD 316 -#define WINDOW_RING 317 -#define WARP_CURSOR 318 -#define ERRORTOKEN 319 -#define NO_STACKMODE 320 -#define STRING 321 +#define ICONS 270 +#define COLOR 271 +#define SAVECOLOR 272 +#define MONOCHROME 273 +#define FUNCTION 274 +#define WINDOW_FUNCTION 275 +#define ZOOM 276 +#define MAKE_TITLE 277 +#define GRAYSCALE 278 +#define NO_TITLE 279 +#define AUTO_RAISE 280 +#define ICON_REGION 281 +#define META 282 +#define SHIFT 283 +#define LOCK 284 +#define CONTROL 285 +#define WINDOW 286 +#define TITLE 287 +#define ICON 288 +#define ROOT 289 +#define FRAME 290 +#define COLON 291 +#define EQUALS 292 +#define START_ICONIFIED 293 +#define MOVE 294 +#define RESIZE 295 +#define WAIT 296 +#define SELECT 297 +#define KILL 298 +#define LEFT_TITLEBUTTON 299 +#define RIGHT_TITLEBUTTON 300 +#define NUMBER 301 +#define KEYWORD 302 +#define NKEYWORD 303 +#define CKEYWORD 304 +#define CLKEYWORD 305 +#define FKEYWORD 306 +#define FSKEYWORD 307 +#define SKEYWORD 308 +#define DKEYWORD 309 +#define JKEYWORD 310 +#define WINDOW_RING 311 +#define WARP_CURSOR 312 +#define ERRORTOKEN 313 +#define NO_STACKMODE 314 +#define STRING 315 #define YYERRCODE 256 const short yylhs[] = { -1, - 0, 22, 22, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 23, - 6, 6, 24, 6, 6, 25, 6, 6, 26, 6, - 6, 27, 6, 28, 6, 29, 6, 30, 6, 31, - 6, 32, 6, 34, 6, 35, 6, 36, 6, 6, - 37, 6, 6, 6, 38, 6, 6, 39, 6, 11, - 12, 13, 20, 21, 40, 40, 43, 43, 43, 43, - 43, 43, 41, 41, 44, 44, 44, 44, 44, 44, - 44, 42, 42, 45, 45, 45, 45, 45, 45, 45, - 45, 2, 46, 46, 47, 3, 48, 48, 49, 49, - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, - 49, 49, 49, 49, 49, 49, 49, 49, 4, 50, - 50, 15, 51, 15, 15, 5, 52, 52, 53, 53, - 7, 54, 54, 55, 14, 56, 14, 14, 58, 14, - 57, 57, 8, 59, 59, 60, 33, 61, 61, 62, - 9, 63, 63, 64, 10, 65, 65, 66, 66, 16, - 16, 19, 19, 19, 17, 1, 18, + 0, 20, 20, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 21, 5, 5, + 22, 5, 5, 23, 5, 24, 5, 25, 5, 26, + 5, 27, 5, 28, 5, 30, 5, 31, 5, 32, + 5, 5, 33, 5, 5, 5, 34, 5, 5, 35, + 5, 10, 11, 12, 18, 19, 36, 36, 39, 39, + 39, 39, 39, 39, 37, 37, 40, 40, 40, 40, + 40, 40, 40, 38, 38, 41, 41, 41, 41, 41, + 41, 41, 41, 2, 42, 42, 43, 43, 43, 43, + 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, + 43, 43, 43, 43, 43, 43, 3, 44, 44, 13, + 45, 13, 13, 4, 46, 46, 47, 47, 6, 48, + 48, 49, 7, 50, 50, 51, 29, 52, 52, 53, + 8, 54, 54, 55, 9, 56, 56, 57, 57, 14, + 14, 17, 17, 17, 15, 1, 16, }; const short yylen[] = { 2, - 1, 0, 2, 1, 1, 1, 1, 1, 6, 2, - 1, 2, 2, 4, 4, 2, 2, 2, 2, 0, - 3, 1, 0, 3, 1, 0, 3, 1, 0, 3, - 1, 0, 3, 0, 3, 0, 3, 0, 9, 0, - 4, 0, 4, 0, 3, 0, 3, 0, 3, 2, - 0, 3, 2, 2, 0, 3, 1, 0, 3, 1, - 2, 2, 6, 6, 0, 2, 1, 1, 1, 1, - 2, 1, 0, 2, 1, 1, 1, 1, 1, 1, - 1, 0, 2, 1, 1, 1, 1, 1, 1, 1, - 1, 3, 0, 2, 2, 3, 0, 2, 3, 2, + 1, 0, 2, 1, 1, 1, 1, 6, 2, 1, + 2, 4, 4, 2, 2, 2, 2, 0, 3, 1, + 0, 3, 1, 0, 3, 0, 3, 0, 3, 0, + 9, 0, 4, 0, 4, 0, 3, 0, 3, 0, + 3, 2, 0, 3, 2, 2, 0, 3, 1, 0, + 3, 1, 2, 2, 6, 6, 0, 2, 1, 1, + 1, 1, 2, 1, 0, 2, 1, 1, 1, 1, + 1, 1, 1, 0, 2, 1, 1, 1, 1, 1, + 1, 1, 1, 3, 0, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, - 3, 2, 3, 2, 3, 2, 3, 2, 3, 0, - 2, 2, 0, 4, 2, 3, 0, 2, 1, 1, - 3, 0, 2, 2, 1, 0, 5, 1, 0, 3, - 0, 5, 3, 0, 2, 1, 3, 0, 2, 2, + 3, 2, 3, 2, 3, 2, 3, 0, 2, 2, + 0, 4, 2, 3, 0, 2, 1, 1, 3, 0, + 2, 2, 3, 0, 2, 1, 3, 0, 2, 2, 3, 0, 2, 1, 3, 0, 2, 2, 7, 1, 2, 1, 2, 2, 2, 1, 1, }; const short yydefred[] = { 2, - 0, 0, 4, 0, 0, 0, 0, 0, 44, 46, - 0, 51, 0, 0, 0, 32, 48, 0, 36, 0, - 0, 0, 0, 34, 0, 0, 0, 60, 0, 0, - 58, 0, 0, 166, 0, 3, 5, 6, 7, 8, - 0, 0, 167, 165, 160, 0, 53, 97, 13, 93, - 12, 0, 0, 127, 50, 0, 42, 54, 10, 0, + 0, 0, 4, 0, 0, 0, 0, 36, 38, 0, + 43, 0, 0, 0, 24, 40, 0, 28, 0, 26, + 0, 0, 52, 0, 0, 50, 0, 0, 146, 0, + 3, 5, 6, 7, 0, 0, 147, 145, 140, 0, + 45, 85, 11, 0, 0, 115, 42, 0, 34, 46, + 9, 0, 0, 0, 0, 0, 0, 0, 0, 54, + 53, 0, 0, 0, 57, 16, 57, 14, 15, 17, + 0, 0, 141, 0, 128, 37, 108, 39, 0, 44, + 0, 124, 25, 41, 22, 29, 0, 27, 0, 0, + 51, 48, 19, 0, 0, 0, 136, 33, 84, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, + 0, 0, 114, 118, 117, 116, 132, 35, 0, 0, + 12, 13, 64, 0, 60, 61, 62, 74, 58, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 62, 61, 0, 0, 0, 65, 18, 65, 16, - 17, 19, 0, 0, 161, 0, 0, 148, 45, 120, - 47, 0, 52, 0, 144, 33, 49, 30, 37, 24, - 0, 141, 140, 35, 21, 0, 0, 59, 56, 27, - 0, 0, 0, 156, 41, 96, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 98, 92, 0, 94, - 0, 0, 126, 130, 129, 128, 152, 43, 0, 0, - 0, 14, 15, 72, 0, 68, 69, 70, 82, 66, - 73, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 95, 147, 0, 149, 119, 0, 0, - 121, 0, 143, 146, 145, 0, 137, 0, 71, 0, - 0, 0, 155, 0, 157, 113, 105, 101, 103, 99, - 107, 109, 111, 115, 117, 150, 125, 0, 151, 154, - 153, 9, 0, 89, 90, 84, 85, 86, 87, 88, - 0, 91, 83, 80, 81, 75, 76, 77, 78, 79, - 0, 74, 38, 0, 158, 0, 0, 0, 162, 0, - 64, 63, 0, 0, 132, 124, 163, 164, 142, 39, - 0, 0, 0, 131, 0, 133, 0, 134, 159, + 0, 0, 127, 0, 129, 107, 0, 0, 109, 0, + 123, 126, 125, 0, 63, 0, 0, 0, 135, 0, + 137, 101, 93, 89, 91, 87, 95, 97, 99, 103, + 105, 130, 113, 0, 131, 134, 133, 8, 81, 82, + 76, 77, 78, 79, 80, 0, 83, 75, 72, 73, + 67, 68, 69, 70, 71, 0, 66, 30, 0, 138, + 0, 56, 55, 0, 0, 120, 112, 31, 0, 0, + 0, 119, 0, 121, 0, 122, 139, }; const short yydgoto[] = { 1, - 35, 51, 49, 91, 55, 36, 236, 96, 138, 115, - 37, 38, 39, 40, 171, 47, 41, 44, 230, 82, - 78, 2, 69, 64, 76, 62, 60, 68, 63, 233, - 84, 94, 89, 52, 53, 61, 56, 75, 74, 111, - 181, 180, 150, 222, 213, 87, 130, 86, 127, 132, - 226, 92, 136, 242, 246, 66, 141, 67, 139, 175, - 131, 167, 172, 201, 153, 185, + 30, 43, 78, 47, 31, 207, 83, 118, 98, 32, + 33, 34, 149, 41, 35, 38, 0, 70, 66, 2, + 64, 54, 52, 57, 55, 204, 72, 81, 76, 44, + 45, 53, 48, 63, 62, 94, 157, 156, 129, 197, + 188, 74, 110, 112, 201, 79, 116, 210, 214, 119, + 153, 111, 145, 150, 177, 132, 161, }; const short yysindex[] = { 0, - 0, -92, 0, -305, -288, -298, -236, -222, 0, 0, - -221, 0, -305, -298, -288, 0, 0, 0, 0, 0, - -305, 0, 0, 0, 0, -305, -305, 0, -288, -305, - 0, 0, 0, 0, -265, 0, 0, 0, 0, 0, - -261, -227, 0, 0, 0, -305, 0, 0, 0, 0, - 0, -219, -218, 0, 0, -218, 0, 0, 0, -214, - -218, -214, -214, -214, -271, -203, -214, -214, -214, -238, - -237, 0, 0, -214, -214, -214, 0, 0, 0, 0, - 0, 0, -305, -196, 0, -160, -246, 0, 0, 0, - 0, -256, 0, -195, 0, 0, 0, 0, 0, 0, - -252, 0, 0, 0, 0, -298, -298, 0, 0, 0, - -193, -53, -229, 0, 0, 0, -305, -305, -305, -305, - -305, -305, -305, -305, -305, -305, 0, 0, -305, 0, - -253, -224, 0, 0, 0, 0, 0, 0, -251, -288, - -250, 0, 0, 0, -288, 0, 0, 0, 0, 0, - 0, -305, -248, -305, -305, -305, -305, -305, -305, -305, - -305, -305, -305, 0, 0, -305, 0, 0, -305, -305, - 0, -254, 0, 0, 0, -288, 0, -244, 0, -243, - -44, -194, 0, -228, 0, 0, 0, 0, 0, 0, + 0, -223, 0, -311, -282, -293, -235, 0, 0, -234, + 0, -311, -293, -282, 0, 0, 0, 0, -311, 0, + -311, -311, 0, -282, -311, 0, 0, 0, 0, -266, + 0, 0, 0, 0, -197, -232, 0, 0, 0, -311, + 0, 0, 0, -229, -228, 0, 0, -228, 0, 0, + 0, -227, -228, -227, -227, -274, -227, -254, -250, 0, + 0, -227, -227, -227, 0, 0, 0, 0, 0, 0, + -311, -214, 0, -108, 0, 0, 0, 0, -242, 0, + -213, 0, 0, 0, 0, 0, -264, 0, -293, -293, + 0, 0, 0, -66, -47, -226, 0, 0, 0, -311, + -311, -311, -311, -311, -311, -311, -311, -311, -311, 0, + -255, -221, 0, 0, 0, 0, 0, 0, -253, -282, + 0, 0, 0, -282, 0, 0, 0, 0, 0, 0, + -311, -251, -311, -311, -311, -311, -311, -311, -311, -311, + -311, -311, 0, -311, 0, 0, -311, -311, 0, -238, + 0, 0, 0, -282, 0, -119, -1, -201, 0, -225, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, -225, 0, 0, 0, 0, 0, 0, 0, - -298, 0, 0, 0, 0, 0, 0, 0, 0, 0, - -298, 0, 0, -305, 0, -188, -288, -288, 0, -288, - 0, 0, -196, -217, 0, 0, 0, 0, 0, 0, - -305, -247, -183, 0, -305, 0, -298, 0, 0,}; + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -293, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -293, 0, 0, -311, 0, + -183, 0, 0, -214, -198, 0, 0, 0, -311, -249, + -182, 0, -311, 0, -293, 0, 0,}; const short yyrindex[] = { 0, - 0, 83, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 458, 0, 0, 1, 0, 67, - 0, 133, 199, 0, 266, 0, 0, 0, 0, 0, - 0, 332, 398, 0, 0, 0, 0, 0, 0, 0, - 0, -168, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 90, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 175, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 61, 121, 0, 0, + 0, 0, 0, 0, 0, -163, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -242,232 +224,173 @@ const short yyrindex[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, -33, 0, 0, 0, 0, 0, - 0, 0, 0, 499, 519, 535, 552, 568, 585, 601, - 618, 634, 651, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, -23, 0, 0, 0, 0, 0, 0, + 0, 0, -64, -48, 204, 218, 259, 271, 312, 324, + 365, 377, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, -230, 0, 0, + 0, 0, 0, -233, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0,}; + 0, 0, 0, 0, 0, 0, 0,}; const short yygindex[] = { 0, - -4, 0, 0, -43, 0, 0, 0, 226, 0, -143, - 0, 0, 0, 0, 0, -11, 0, -9, 0, 0, + -4, 0, -42, 0, 0, 0, 62, 0, -98, 0, + 0, 0, 0, -3, 0, -12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, + 0, 0, 0, 0, 0, 44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, }; -#define YYTABLESIZE 955 +#define YYTABLESIZE 675 const short yytable[] = - { 42, - 31, 133, 58, 199, 165, 59, 173, 177, 57, 183, - 244, 128, 93, 45, 46, 34, 65, 97, 43, 72, - 48, 70, 71, 204, 205, 73, 123, 122, 77, 81, - 224, 83, 79, 168, 50, 54, 80, 88, 90, 227, - 228, 85, 95, 101, 206, 207, 208, 209, 210, 211, - 45, 46, 129, 102, 134, 106, 107, 45, 46, 34, - 114, 137, 140, 152, 34, 223, 25, 34, 235, 34, - 34, 203, 34, 34, 144, 241, 247, 34, 113, 122, - 122, 43, 1, 45, 46, 169, 170, 135, 40, 240, - 145, 146, 147, 148, 142, 143, 112, 116, 0, 149, - 0, 117, 118, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 154, 155, 156, 157, 158, 159, 160, 161, - 162, 163, 0, 0, 164, 0, 166, 0, 119, 120, - 176, 121, 135, 0, 174, 179, 178, 0, 0, 122, - 123, 124, 125, 126, 0, 0, 0, 182, 184, 186, - 187, 188, 189, 190, 191, 192, 193, 194, 195, 0, - 200, 196, 0, 3, 197, 198, 202, 0, 0, 4, - 5, 6, 225, 0, 0, 212, 7, 8, 9, 10, - 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, - 21, 0, 0, 229, 0, 0, 0, 0, 138, 231, - 0, 0, 22, 23, 24, 25, 0, 0, 0, 232, - 0, 0, 26, 27, 144, 28, 29, 237, 238, 234, - 239, 30, 214, 215, 31, 32, 0, 33, 34, 0, - 145, 146, 147, 148, 67, 249, 243, 245, 0, 151, - 248, 0, 0, 216, 217, 218, 219, 220, 221, 0, - 67, 67, 67, 67, 0, 0, 31, 29, 0, 67, - 0, 0, 31, 31, 31, 22, 0, 0, 0, 31, - 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, - 31, 31, 31, 31, 0, 0, 0, 98, 99, 100, - 0, 0, 103, 104, 105, 31, 31, 31, 31, 108, - 109, 110, 0, 0, 0, 31, 31, 0, 31, 31, - 0, 0, 0, 0, 31, 0, 0, 31, 31, 0, - 31, 31, 25, 23, 0, 0, 0, 0, 25, 25, - 25, 57, 0, 0, 0, 25, 25, 25, 25, 25, - 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, + { 36, + 23, 51, 143, 29, 151, 80, 159, 49, 212, 50, + 84, 60, 39, 40, 56, 113, 58, 59, 37, 175, + 61, 42, 46, 111, 110, 65, 71, 75, 77, 82, + 68, 69, 3, 199, 87, 73, 146, 89, 4, 5, + 6, 90, 97, 117, 120, 7, 8, 9, 10, 11, + 12, 13, 14, 15, 16, 17, 18, 19, 198, 29, + 49, 29, 114, 29, 131, 29, 96, 39, 40, 20, + 110, 110, 29, 206, 115, 21, 22, 215, 23, 24, + 39, 40, 147, 148, 25, 121, 122, 26, 27, 1, + 28, 29, 209, 32, 67, 133, 134, 135, 136, 137, + 138, 139, 140, 141, 142, 208, 144, 154, 39, 40, + 95, 155, 0, 0, 152, 85, 86, 29, 88, 0, + 20, 0, 0, 91, 92, 93, 158, 160, 162, 163, + 164, 165, 166, 167, 168, 169, 170, 171, 0, 172, + 0, 178, 173, 174, 0, 0, 176, 179, 180, 99, + 0, 187, 0, 100, 101, 0, 200, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 181, 182, 183, 184, + 185, 186, 0, 0, 10, 0, 0, 0, 102, 103, + 0, 104, 202, 0, 0, 105, 106, 107, 108, 109, + 0, 0, 203, 102, 205, 29, 0, 102, 102, 0, + 0, 123, 0, 0, 211, 213, 0, 0, 216, 94, + 0, 217, 0, 94, 94, 124, 125, 126, 127, 0, + 123, 0, 102, 102, 128, 102, 0, 0, 0, 102, + 102, 102, 102, 102, 124, 125, 126, 127, 94, 94, + 0, 94, 0, 130, 59, 94, 94, 94, 94, 94, + 0, 0, 0, 0, 0, 0, 23, 21, 59, 59, + 59, 59, 23, 23, 23, 189, 190, 59, 0, 23, + 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, + 23, 23, 0, 0, 191, 192, 193, 194, 195, 196, + 0, 0, 0, 23, 0, 0, 0, 0, 0, 23, + 23, 0, 23, 23, 0, 0, 0, 0, 23, 0, + 0, 23, 23, 0, 23, 23, 49, 47, 0, 0, + 0, 0, 49, 49, 49, 0, 0, 0, 0, 49, + 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, + 49, 49, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 49, 0, 0, 0, 0, 0, 49, + 49, 0, 49, 49, 0, 0, 0, 0, 49, 0, + 0, 49, 49, 0, 49, 49, 20, 18, 0, 0, + 0, 0, 20, 20, 20, 0, 0, 0, 0, 20, + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 20, 0, 0, 0, 0, 0, 20, + 20, 0, 20, 20, 0, 0, 0, 0, 20, 0, + 10, 20, 20, 0, 20, 20, 10, 10, 10, 0, + 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, + 0, 90, 0, 0, 0, 90, 90, 10, 0, 0, + 0, 0, 0, 10, 10, 92, 10, 10, 0, 92, + 92, 0, 10, 0, 0, 10, 10, 0, 10, 10, + 90, 90, 0, 90, 0, 0, 0, 90, 90, 90, + 90, 90, 0, 0, 92, 92, 0, 92, 0, 0, + 0, 92, 92, 92, 92, 92, 88, 0, 0, 0, + 88, 88, 0, 0, 0, 0, 0, 0, 96, 0, + 0, 0, 96, 96, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 88, 88, 0, 88, 0, + 0, 0, 88, 88, 88, 88, 88, 96, 96, 0, + 96, 0, 0, 0, 96, 96, 96, 96, 96, 98, + 0, 0, 0, 98, 98, 0, 0, 0, 0, 0, + 0, 100, 0, 0, 0, 100, 100, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 98, 98, + 0, 98, 0, 0, 0, 98, 98, 98, 98, 98, + 100, 100, 0, 100, 0, 0, 0, 100, 100, 100, + 100, 100, 104, 0, 0, 0, 104, 104, 0, 0, + 0, 0, 0, 0, 106, 0, 0, 0, 106, 106, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 25, 25, 25, 25, 0, 0, 0, 0, 0, - 0, 25, 25, 0, 25, 25, 0, 0, 0, 0, - 25, 0, 0, 25, 25, 0, 25, 25, 135, 136, - 0, 0, 0, 0, 135, 135, 135, 28, 0, 0, - 0, 135, 135, 135, 135, 135, 135, 135, 135, 135, - 135, 135, 135, 135, 135, 135, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 135, 135, 135, - 135, 0, 0, 0, 0, 0, 0, 135, 135, 0, - 135, 135, 0, 0, 0, 0, 135, 0, 0, 135, - 135, 0, 135, 135, 138, 139, 0, 11, 0, 0, - 138, 138, 138, 0, 0, 0, 0, 138, 138, 138, - 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, - 138, 138, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 138, 138, 138, 138, 0, 0, 0, - 0, 0, 0, 138, 138, 0, 138, 138, 0, 0, - 0, 0, 138, 0, 0, 138, 138, 0, 138, 138, - 0, 22, 20, 0, 0, 0, 0, 22, 22, 22, - 0, 0, 0, 0, 22, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 22, 22, 22, 22, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 22, 22, 22, 22, 0, 0, 0, 0, 0, 0, - 22, 22, 0, 22, 22, 0, 0, 0, 0, 22, - 0, 0, 22, 22, 0, 22, 22, 57, 55, 0, - 0, 0, 0, 57, 57, 57, 0, 0, 0, 0, - 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, - 57, 57, 57, 57, 57, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 57, 57, 57, 57, - 0, 0, 0, 0, 0, 0, 57, 57, 0, 57, - 57, 0, 0, 0, 0, 57, 0, 0, 57, 57, - 0, 57, 57, 28, 26, 0, 0, 0, 0, 28, - 28, 28, 0, 0, 0, 0, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, - 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 28, 28, 28, 28, 0, 0, 0, 0, - 0, 0, 28, 28, 0, 28, 28, 0, 0, 0, - 0, 28, 0, 11, 28, 28, 0, 28, 28, 11, - 11, 11, 0, 0, 0, 0, 11, 11, 11, 11, - 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, - 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 11, 11, 11, 11, 114, 0, 0, 0, - 114, 114, 11, 11, 0, 11, 11, 0, 0, 0, - 0, 11, 0, 0, 11, 11, 106, 11, 11, 0, - 106, 106, 0, 0, 0, 0, 0, 114, 114, 0, - 114, 0, 102, 0, 0, 0, 102, 102, 114, 114, - 114, 114, 114, 0, 0, 0, 0, 106, 106, 104, - 106, 0, 0, 104, 104, 0, 0, 0, 106, 106, - 106, 106, 106, 102, 102, 100, 102, 0, 0, 100, - 100, 0, 0, 0, 102, 102, 102, 102, 102, 0, - 104, 104, 108, 104, 0, 0, 108, 108, 0, 0, - 0, 104, 104, 104, 104, 104, 100, 100, 110, 100, - 0, 0, 110, 110, 0, 0, 0, 100, 100, 100, - 100, 100, 0, 108, 108, 112, 108, 0, 0, 112, - 112, 0, 0, 0, 108, 108, 108, 108, 108, 110, - 110, 116, 110, 0, 0, 116, 116, 0, 0, 0, - 110, 110, 110, 110, 110, 0, 112, 112, 118, 112, - 0, 0, 118, 118, 0, 0, 0, 112, 112, 112, - 112, 112, 116, 116, 0, 116, 0, 0, 0, 0, - 0, 0, 0, 116, 116, 116, 116, 116, 0, 118, - 118, 0, 118, 0, 0, 0, 0, 0, 0, 0, - 118, 118, 118, 118, 118, + 0, 104, 104, 0, 104, 0, 0, 0, 104, 104, + 104, 104, 104, 106, 106, 0, 106, 0, 0, 0, + 106, 106, 106, 106, 106, }; const short yycheck[] = { 4, - 0, 258, 14, 258, 258, 15, 258, 258, 13, 258, - 258, 258, 56, 312, 313, 321, 21, 61, 307, 29, - 257, 26, 27, 267, 268, 30, 257, 258, 294, 41, - 259, 259, 294, 258, 257, 257, 41, 257, 257, 265, - 266, 46, 257, 315, 288, 289, 290, 291, 292, 293, - 312, 313, 299, 257, 311, 294, 294, 312, 313, 321, - 257, 257, 315, 293, 321, 260, 0, 321, 257, 321, - 321, 316, 321, 321, 268, 293, 260, 321, 83, 310, - 311, 307, 0, 312, 313, 310, 311, 92, 257, 233, - 284, 285, 286, 287, 106, 107, 79, 258, -1, 293, - -1, 262, 263, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 117, 118, 119, 120, 121, 122, 123, 124, - 125, 126, -1, -1, 129, -1, 131, -1, 289, 290, - 140, 292, 0, -1, 139, 145, 141, -1, -1, 300, - 301, 302, 303, 304, -1, -1, -1, 152, 153, 154, - 155, 156, 157, 158, 159, 160, 161, 162, 163, -1, - 172, 166, -1, 256, 169, 170, 176, -1, -1, 262, - 263, 264, 184, -1, -1, 180, 269, 270, 271, 272, - 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, - 283, -1, -1, 203, -1, -1, -1, -1, 0, 211, - -1, -1, 295, 296, 297, 298, -1, -1, -1, 221, - -1, -1, 305, 306, 268, 308, 309, 227, 228, 224, - 230, 314, 267, 268, 317, 318, -1, 320, 321, -1, - 284, 285, 286, 287, 268, 247, 241, 242, -1, 293, - 245, -1, -1, 288, 289, 290, 291, 292, 293, -1, - 284, 285, 286, 287, -1, -1, 256, 257, -1, 293, - -1, -1, 262, 263, 264, 0, -1, -1, -1, 269, + 0, 14, 258, 315, 258, 48, 258, 12, 258, 13, + 53, 24, 306, 307, 19, 258, 21, 22, 301, 258, + 25, 257, 257, 257, 258, 292, 259, 257, 257, 257, + 35, 35, 256, 259, 309, 40, 258, 292, 262, 263, + 264, 292, 257, 257, 309, 269, 270, 271, 272, 273, + 274, 275, 276, 277, 278, 279, 280, 281, 260, 315, + 0, 315, 305, 315, 291, 315, 71, 306, 307, 293, + 304, 305, 315, 257, 79, 299, 300, 260, 302, 303, + 306, 307, 304, 305, 308, 89, 90, 311, 312, 0, + 314, 315, 291, 257, 292, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 204, 111, 120, 306, 307, + 67, 124, -1, -1, 119, 54, 55, 315, 57, -1, + 0, -1, -1, 62, 63, 64, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, -1, 144, + -1, 154, 147, 148, -1, -1, 150, 267, 268, 258, + -1, 156, -1, 262, 263, -1, 160, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 286, 287, 288, 289, + 290, 291, -1, -1, 0, -1, -1, -1, 287, 288, + -1, 290, 186, -1, -1, 294, 295, 296, 297, 298, + -1, -1, 196, 258, 199, 315, -1, 262, 263, -1, + -1, 268, -1, -1, 209, 210, -1, -1, 213, 258, + -1, 215, -1, 262, 263, 282, 283, 284, 285, -1, + 268, -1, 287, 288, 291, 290, -1, -1, -1, 294, + 295, 296, 297, 298, 282, 283, 284, 285, 287, 288, + -1, 290, -1, 291, 268, 294, 295, 296, 297, 298, + -1, -1, -1, -1, -1, -1, 256, 257, 282, 283, + 284, 285, 262, 263, 264, 267, 268, 291, -1, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, - 280, 281, 282, 283, -1, -1, -1, 62, 63, 64, - -1, -1, 67, 68, 69, 295, 296, 297, 298, 74, - 75, 76, -1, -1, -1, 305, 306, -1, 308, 309, - -1, -1, -1, -1, 314, -1, -1, 317, 318, -1, - 320, 321, 256, 257, -1, -1, -1, -1, 262, 263, - 264, 0, -1, -1, -1, 269, 270, 271, 272, 273, - 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, + 280, 281, -1, -1, 286, 287, 288, 289, 290, 291, + -1, -1, -1, 293, -1, -1, -1, -1, -1, 299, + 300, -1, 302, 303, -1, -1, -1, -1, 308, -1, + -1, 311, 312, -1, 314, 315, 256, 257, -1, -1, + -1, -1, 262, 263, 264, -1, -1, -1, -1, 269, + 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, + 280, 281, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 293, -1, -1, -1, -1, -1, 299, + 300, -1, 302, 303, -1, -1, -1, -1, 308, -1, + -1, 311, 312, -1, 314, 315, 256, 257, -1, -1, + -1, -1, 262, 263, 264, -1, -1, -1, -1, 269, + 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, + 280, 281, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 293, -1, -1, -1, -1, -1, 299, + 300, -1, 302, 303, -1, -1, -1, -1, 308, -1, + 256, 311, 312, -1, 314, 315, 262, 263, 264, -1, + -1, -1, -1, 269, 270, 271, 272, 273, 274, 275, + 276, 277, 278, 279, 280, 281, -1, -1, -1, -1, + -1, 258, -1, -1, -1, 262, 263, 293, -1, -1, + -1, -1, -1, 299, 300, 258, 302, 303, -1, 262, + 263, -1, 308, -1, -1, 311, 312, -1, 314, 315, + 287, 288, -1, 290, -1, -1, -1, 294, 295, 296, + 297, 298, -1, -1, 287, 288, -1, 290, -1, -1, + -1, 294, 295, 296, 297, 298, 258, -1, -1, -1, + 262, 263, -1, -1, -1, -1, -1, -1, 258, -1, + -1, -1, 262, 263, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 287, 288, -1, 290, -1, + -1, -1, 294, 295, 296, 297, 298, 287, 288, -1, + 290, -1, -1, -1, 294, 295, 296, 297, 298, 258, + -1, -1, -1, 262, 263, -1, -1, -1, -1, -1, + -1, 258, -1, -1, -1, 262, 263, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 287, 288, + -1, 290, -1, -1, -1, 294, 295, 296, 297, 298, + 287, 288, -1, 290, -1, -1, -1, 294, 295, 296, + 297, 298, 258, -1, -1, -1, 262, 263, -1, -1, + -1, -1, -1, -1, 258, -1, -1, -1, 262, 263, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 295, 296, 297, 298, -1, -1, -1, -1, -1, - -1, 305, 306, -1, 308, 309, -1, -1, -1, -1, - 314, -1, -1, 317, 318, -1, 320, 321, 256, 257, - -1, -1, -1, -1, 262, 263, 264, 0, -1, -1, - -1, 269, 270, 271, 272, 273, 274, 275, 276, 277, - 278, 279, 280, 281, 282, 283, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 295, 296, 297, - 298, -1, -1, -1, -1, -1, -1, 305, 306, -1, - 308, 309, -1, -1, -1, -1, 314, -1, -1, 317, - 318, -1, 320, 321, 256, 257, -1, 0, -1, -1, - 262, 263, 264, -1, -1, -1, -1, 269, 270, 271, - 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, - 282, 283, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 295, 296, 297, 298, -1, -1, -1, - -1, -1, -1, 305, 306, -1, 308, 309, -1, -1, - -1, -1, 314, -1, -1, 317, 318, -1, 320, 321, - -1, 256, 257, -1, -1, -1, -1, 262, 263, 264, - -1, -1, -1, -1, 269, 270, 271, 272, 273, 274, - 275, 276, 277, 278, 279, 280, 281, 282, 283, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 295, 296, 297, 298, -1, -1, -1, -1, -1, -1, - 305, 306, -1, 308, 309, -1, -1, -1, -1, 314, - -1, -1, 317, 318, -1, 320, 321, 256, 257, -1, - -1, -1, -1, 262, 263, 264, -1, -1, -1, -1, - 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, - 279, 280, 281, 282, 283, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 295, 296, 297, 298, - -1, -1, -1, -1, -1, -1, 305, 306, -1, 308, - 309, -1, -1, -1, -1, 314, -1, -1, 317, 318, - -1, 320, 321, 256, 257, -1, -1, -1, -1, 262, - 263, 264, -1, -1, -1, -1, 269, 270, 271, 272, - 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, - 283, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 295, 296, 297, 298, -1, -1, -1, -1, - -1, -1, 305, 306, -1, 308, 309, -1, -1, -1, - -1, 314, -1, 256, 317, 318, -1, 320, 321, 262, - 263, 264, -1, -1, -1, -1, 269, 270, 271, 272, - 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, - 283, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 295, 296, 297, 298, 258, -1, -1, -1, - 262, 263, 305, 306, -1, 308, 309, -1, -1, -1, - -1, 314, -1, -1, 317, 318, 258, 320, 321, -1, - 262, 263, -1, -1, -1, -1, -1, 289, 290, -1, - 292, -1, 258, -1, -1, -1, 262, 263, 300, 301, - 302, 303, 304, -1, -1, -1, -1, 289, 290, 258, - 292, -1, -1, 262, 263, -1, -1, -1, 300, 301, - 302, 303, 304, 289, 290, 258, 292, -1, -1, 262, - 263, -1, -1, -1, 300, 301, 302, 303, 304, -1, - 289, 290, 258, 292, -1, -1, 262, 263, -1, -1, - -1, 300, 301, 302, 303, 304, 289, 290, 258, 292, - -1, -1, 262, 263, -1, -1, -1, 300, 301, 302, - 303, 304, -1, 289, 290, 258, 292, -1, -1, 262, - 263, -1, -1, -1, 300, 301, 302, 303, 304, 289, - 290, 258, 292, -1, -1, 262, 263, -1, -1, -1, - 300, 301, 302, 303, 304, -1, 289, 290, 258, 292, - -1, -1, 262, 263, -1, -1, -1, 300, 301, 302, - 303, 304, 289, 290, -1, 292, -1, -1, -1, -1, - -1, -1, -1, 300, 301, 302, 303, 304, -1, 289, - 290, -1, 292, -1, -1, -1, -1, -1, -1, -1, - 300, 301, 302, 303, 304, + -1, 287, 288, -1, 290, -1, -1, -1, 294, 295, + 296, 297, 298, 287, 288, -1, 290, -1, -1, -1, + 294, 295, 296, 297, 298, }; #define YYFINAL 1 #ifndef YYDEBUG #define YYDEBUG 0 #endif -#define YYMAXTOKEN 321 +#define YYMAXTOKEN 315 #if YYDEBUG const char * const yyname[] = { @@ -478,15 +401,14 @@ const char * const yyname[] = 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"LB","RB","LP","RP","MENUS", -"MENU","BUTTON","DEFAULT_FUNCTION","PLUS","MINUS","ALL","OR","CURSORS", -"PIXMAPS","ICONS","COLOR","SAVECOLOR","MONOCHROME","FUNCTION","WINDOW_FUNCTION", -"ZOOM","MAKE_TITLE","GRAYSCALE","NO_TITLE","AUTO_RAISE","NO_HILITE", -"ICON_REGION","META","SHIFT","LOCK","CONTROL","WINDOW","TITLE","ICON","ROOT", -"FRAME","COLON","EQUALS","SQUEEZE_TITLE","DONT_SQUEEZE_TITLE","START_ICONIFIED", -"NO_TITLE_HILITE","TITLE_HILITE","MOVE","RESIZE","WAIT","SELECT","KILL", -"LEFT_TITLEBUTTON","RIGHT_TITLEBUTTON","NUMBER","KEYWORD","NKEYWORD","CKEYWORD", -"CLKEYWORD","FKEYWORD","FSKEYWORD","SKEYWORD","DKEYWORD","JKEYWORD", -"WINDOW_RING","WARP_CURSOR","ERRORTOKEN","NO_STACKMODE","STRING", +"MENU","BUTTON","DEFAULT_FUNCTION","PLUS","MINUS","ALL","OR","CURSORS","ICONS", +"COLOR","SAVECOLOR","MONOCHROME","FUNCTION","WINDOW_FUNCTION","ZOOM", +"MAKE_TITLE","GRAYSCALE","NO_TITLE","AUTO_RAISE","ICON_REGION","META","SHIFT", +"LOCK","CONTROL","WINDOW","TITLE","ICON","ROOT","FRAME","COLON","EQUALS", +"START_ICONIFIED","MOVE","RESIZE","WAIT","SELECT","KILL","LEFT_TITLEBUTTON", +"RIGHT_TITLEBUTTON","NUMBER","KEYWORD","NKEYWORD","CKEYWORD","CLKEYWORD", +"FKEYWORD","FSKEYWORD","SKEYWORD","DKEYWORD","JKEYWORD","WINDOW_RING", +"WARP_CURSOR","ERRORTOKEN","NO_STACKMODE","STRING", }; const char * const yyrule[] = {"$accept : twmrc", @@ -497,11 +419,9 @@ const char * const yyrule[] = "stmt : noarg", "stmt : sarg", "stmt : narg", -"stmt : squeeze", "stmt : ICON_REGION string DKEYWORD DKEYWORD number number", "stmt : ZOOM number", "stmt : ZOOM", -"stmt : PIXMAPS pixmap_list", "stmt : CURSORS cursor_list", "stmt : LEFT_TITLEBUTTON string EQUALS action", "stmt : RIGHT_TITLEBUTTON string EQUALS action", @@ -510,45 +430,39 @@ const char * const yyrule[] = "stmt : string fullkey", "stmt : button full", "$$1 :", -"stmt : NO_TITLE_HILITE $$1 win_list", -"stmt : NO_TITLE_HILITE", -"$$2 :", -"stmt : NO_HILITE $$2 win_list", -"stmt : NO_HILITE", -"$$3 :", -"stmt : NO_STACKMODE $$3 win_list", +"stmt : NO_STACKMODE $$1 win_list", "stmt : NO_STACKMODE", -"$$4 :", -"stmt : NO_TITLE $$4 win_list", +"$$2 :", +"stmt : NO_TITLE $$2 win_list", "stmt : NO_TITLE", +"$$3 :", +"stmt : MAKE_TITLE $$3 win_list", +"$$4 :", +"stmt : START_ICONIFIED $$4 win_list", "$$5 :", -"stmt : MAKE_TITLE $$5 win_list", +"stmt : AUTO_RAISE $$5 win_list", "$$6 :", -"stmt : START_ICONIFIED $$6 win_list", +"stmt : MENU string LP string COLON string RP $$6 menu", "$$7 :", -"stmt : AUTO_RAISE $$7 win_list", +"stmt : MENU string $$7 menu", "$$8 :", -"stmt : MENU string LP string COLON string RP $$8 menu", +"stmt : FUNCTION string $$8 function", "$$9 :", -"stmt : MENU string $$9 menu", +"stmt : ICONS $$9 icon_list", "$$10 :", -"stmt : FUNCTION string $$10 function", +"stmt : COLOR $$10 color_list", "$$11 :", -"stmt : ICONS $$11 icon_list", -"$$12 :", -"stmt : COLOR $$12 color_list", -"$$13 :", -"stmt : GRAYSCALE $$13 color_list", +"stmt : GRAYSCALE $$11 color_list", "stmt : SAVECOLOR save_color_list", -"$$14 :", -"stmt : MONOCHROME $$14 color_list", +"$$12 :", +"stmt : MONOCHROME $$12 color_list", "stmt : DEFAULT_FUNCTION action", "stmt : WINDOW_FUNCTION action", -"$$15 :", -"stmt : WARP_CURSOR $$15 win_list", +"$$13 :", +"stmt : WARP_CURSOR $$13 win_list", "stmt : WARP_CURSOR", -"$$16 :", -"stmt : WINDOW_RING $$16 win_list", +"$$14 :", +"stmt : WINDOW_RING $$14 win_list", "noarg : KEYWORD", "sarg : SKEYWORD string", "narg : NKEYWORD number", @@ -581,10 +495,6 @@ const char * const yyrule[] = "contextkey : ALL", "contextkey : OR", "contextkey : string", -"pixmap_list : LB pixmap_entries RB", -"pixmap_entries :", -"pixmap_entries : pixmap_entries pixmap_entry", -"pixmap_entry : TITLE_HILITE string", "cursor_list : LB cursor_entries RB", "cursor_entries :", "cursor_entries : cursor_entries cursor_entry", @@ -612,8 +522,8 @@ const char * const yyrule[] = "color_entries :", "color_entries : color_entries color_entry", "color_entry : CLKEYWORD string", -"$$17 :", -"color_entry : CLKEYWORD string $$17 win_color_list", +"$$15 :", +"color_entry : CLKEYWORD string $$15 win_color_list", "color_entry : CKEYWORD string", "save_color_list : LB s_color_entries RB", "s_color_entries :", @@ -624,14 +534,6 @@ const char * const yyrule[] = "win_color_entries :", "win_color_entries : win_color_entries win_color_entry", "win_color_entry : string string", -"squeeze : SQUEEZE_TITLE", -"$$18 :", -"squeeze : SQUEEZE_TITLE $$18 LB win_sqz_entries RB", -"squeeze : DONT_SQUEEZE_TITLE", -"$$19 :", -"squeeze : DONT_SQUEEZE_TITLE $$19 win_list", -"win_sqz_entries :", -"win_sqz_entries : win_sqz_entries string JKEYWORD signed_number number", "win_list : LB win_entries RB", "win_entries :", "win_entries : win_entries win_entry", @@ -685,7 +587,7 @@ short *yysslim; YYSTYPE *yyvs; unsigned int yystacksize; int yyparse(void); -#line 612 "gram.y" +#line 568 "gram.y" static void yyerror(const char *s) { @@ -905,7 +807,7 @@ twmrc_error_prefix (void) { fprintf (stderr, "%s: line %d: ", ProgramName, yylineno); } -#line 901 "gram.c" +#line 803 "gram.c" /* allocate initial stack or double stack size, up to YYMAXDEPTH */ static int yygrowstack(void) { @@ -1099,12 +1001,12 @@ yyreduce: memset(&yyval, 0, sizeof yyval); switch (yyn) { -case 9: -#line 148 "gram.y" +case 8: +#line 146 "gram.y" { AddIconRegion(yyvsp[-4].ptr, yyvsp[-3].num, yyvsp[-2].num, yyvsp[-1].num, yyvsp[0].num); } break; -case 10: -#line 149 "gram.y" +case 9: +#line 147 "gram.y" { if (Scr->FirstTime) { Scr->DoZoom = TRUE; @@ -1112,40 +1014,36 @@ case 10: } } break; -case 11: -#line 155 "gram.y" +case 10: +#line 153 "gram.y" { if (Scr->FirstTime) Scr->DoZoom = TRUE; } break; +case 11: +#line 155 "gram.y" +{} +break; case 12: -#line 157 "gram.y" -{} -break; -case 13: -#line 158 "gram.y" -{} -break; -case 14: -#line 159 "gram.y" +#line 156 "gram.y" { GotTitleButton (yyvsp[-2].ptr, yyvsp[0].num, False); } break; -case 15: -#line 162 "gram.y" +case 13: +#line 159 "gram.y" { GotTitleButton (yyvsp[-2].ptr, yyvsp[0].num, True); } break; -case 16: -#line 165 "gram.y" +case 14: +#line 162 "gram.y" { root = GetRoot(yyvsp[0].ptr, NULLSTR, NULLSTR); Scr->Mouse[yyvsp[-1].num][C_ROOT][0].func = F_MENU; Scr->Mouse[yyvsp[-1].num][C_ROOT][0].menu = root; } break; -case 17: -#line 169 "gram.y" +case 15: +#line 166 "gram.y" { Scr->Mouse[yyvsp[-1].num][C_ROOT][0].func = yyvsp[0].num; if (yyvsp[0].num == F_MENU) { @@ -1163,101 +1061,83 @@ case 17: pull = NULL; } break; -case 18: -#line 185 "gram.y" +case 16: +#line 182 "gram.y" { GotKey(yyvsp[-1].ptr, yyvsp[0].num); } break; -case 19: -#line 186 "gram.y" +case 17: +#line 183 "gram.y" { GotButton(yyvsp[-1].num, yyvsp[0].num); } break; -case 20: -#line 187 "gram.y" -{ list = &Scr->NoTitleHighlight; } -break; -case 22: -#line 189 "gram.y" -{ if (Scr->FirstTime) - Scr->TitleHighlight = FALSE; } -break; -case 23: -#line 191 "gram.y" -{ list = &Scr->NoHighlight; } -break; -case 25: -#line 193 "gram.y" -{ if (Scr->FirstTime) - Scr->Highlight = FALSE; } -break; -case 26: -#line 195 "gram.y" +case 18: +#line 184 "gram.y" { list = &Scr->NoStackModeL; } break; -case 28: -#line 197 "gram.y" +case 20: +#line 186 "gram.y" { if (Scr->FirstTime) Scr->StackMode = FALSE; } break; -case 29: -#line 199 "gram.y" +case 21: +#line 188 "gram.y" { list = &Scr->NoTitle; } break; -case 31: -#line 201 "gram.y" +case 23: +#line 190 "gram.y" { if (Scr->FirstTime) Scr->NoTitlebar = TRUE; } break; -case 32: -#line 203 "gram.y" +case 24: +#line 192 "gram.y" { list = &Scr->MakeTitle; } break; -case 34: -#line 205 "gram.y" +case 26: +#line 194 "gram.y" { list = &Scr->StartIconified; } break; -case 36: -#line 207 "gram.y" +case 28: +#line 196 "gram.y" { list = &Scr->AutoRaise; } break; -case 38: -#line 209 "gram.y" +case 30: +#line 198 "gram.y" { root = GetRoot(yyvsp[-5].ptr, yyvsp[-3].ptr, yyvsp[-1].ptr); } break; -case 39: -#line 211 "gram.y" +case 31: +#line 200 "gram.y" { root->real_menu = TRUE;} break; -case 40: -#line 212 "gram.y" +case 32: +#line 201 "gram.y" { root = GetRoot(yyvsp[0].ptr, NULLSTR, NULLSTR); } break; -case 41: -#line 213 "gram.y" +case 33: +#line 202 "gram.y" { root->real_menu = TRUE; } break; -case 42: -#line 214 "gram.y" +case 34: +#line 203 "gram.y" { root = GetRoot(yyvsp[0].ptr, NULLSTR, NULLSTR); } break; -case 44: -#line 216 "gram.y" +case 36: +#line 205 "gram.y" { list = &Scr->IconNames; } break; -case 46: -#line 218 "gram.y" +case 38: +#line 207 "gram.y" { color = COLOR; } break; -case 48: -#line 220 "gram.y" +case 40: +#line 209 "gram.y" { color = GRAYSCALE; } break; -case 51: -#line 224 "gram.y" +case 43: +#line 213 "gram.y" { color = MONOCHROME; } break; -case 53: -#line 226 "gram.y" +case 45: +#line 215 "gram.y" { Scr->DefaultFunction.func = yyvsp[0].num; if (yyvsp[0].num == F_MENU) { @@ -1275,8 +1155,8 @@ case 53: pull = NULL; } break; -case 54: -#line 242 "gram.y" +case 46: +#line 231 "gram.y" { Scr->WindowFunction.func = yyvsp[0].num; root = GetRoot(TWM_ROOT,NULLSTR,NULLSTR); Scr->WindowFunction.item = @@ -1286,21 +1166,21 @@ case 54: pull = NULL; } break; -case 55: -#line 250 "gram.y" +case 47: +#line 239 "gram.y" { list = &Scr->WarpCursorL; } break; -case 57: -#line 252 "gram.y" +case 49: +#line 241 "gram.y" { if (Scr->FirstTime) Scr->WarpCursor = TRUE; } break; -case 58: -#line 254 "gram.y" +case 50: +#line 243 "gram.y" { list = &Scr->WindowRingL; } break; -case 60: -#line 259 "gram.y" +case 52: +#line 248 "gram.y" { if (!do_single_keyword (yyvsp[0].num)) { twmrc_error_prefix(); fprintf (stderr, @@ -1310,8 +1190,8 @@ case 60: } } break; -case 61: -#line 269 "gram.y" +case 53: +#line 258 "gram.y" { if (!do_string_keyword (yyvsp[-1].num, yyvsp[0].ptr)) { twmrc_error_prefix(); fprintf (stderr, @@ -1321,8 +1201,8 @@ case 61: } } break; -case 62: -#line 279 "gram.y" +case 54: +#line 268 "gram.y" { if (!do_number_keyword (yyvsp[-1].num, yyvsp[0].num)) { twmrc_error_prefix(); fprintf (stderr, @@ -1332,32 +1212,32 @@ case 62: } } break; -case 63: -#line 291 "gram.y" +case 55: +#line 280 "gram.y" { yyval.num = yyvsp[0].num; } break; -case 64: -#line 294 "gram.y" +case 56: +#line 283 "gram.y" { yyval.num = yyvsp[0].num; } break; -case 67: -#line 301 "gram.y" +case 59: +#line 290 "gram.y" { mods |= Mod1Mask; } break; -case 68: -#line 302 "gram.y" +case 60: +#line 291 "gram.y" { mods |= ShiftMask; } break; -case 69: -#line 303 "gram.y" +case 61: +#line 292 "gram.y" { mods |= LockMask; } break; -case 70: -#line 304 "gram.y" +case 62: +#line 293 "gram.y" { mods |= ControlMask; } break; -case 71: -#line 305 "gram.y" +case 63: +#line 294 "gram.y" { if (yyvsp[0].num < 1 || yyvsp[0].num > 5) { twmrc_error_prefix(); fprintf (stderr, @@ -1369,176 +1249,172 @@ case 71: } } break; -case 72: -#line 315 "gram.y" +case 64: +#line 304 "gram.y" { } break; -case 75: -#line 322 "gram.y" +case 67: +#line 311 "gram.y" { cont |= C_WINDOW_BIT; } break; -case 76: -#line 323 "gram.y" +case 68: +#line 312 "gram.y" { cont |= C_TITLE_BIT; } break; -case 77: -#line 324 "gram.y" +case 69: +#line 313 "gram.y" { cont |= C_ICON_BIT; } break; -case 78: -#line 325 "gram.y" +case 70: +#line 314 "gram.y" { cont |= C_ROOT_BIT; } break; -case 79: -#line 326 "gram.y" +case 71: +#line 315 "gram.y" { cont |= C_FRAME_BIT; } break; -case 80: -#line 327 "gram.y" +case 72: +#line 316 "gram.y" { cont |= C_ALL_BITS; } break; -case 81: -#line 328 "gram.y" +case 73: +#line 317 "gram.y" { } break; -case 84: -#line 335 "gram.y" +case 76: +#line 324 "gram.y" { cont |= C_WINDOW_BIT; } break; -case 85: -#line 336 "gram.y" +case 77: +#line 325 "gram.y" { cont |= C_TITLE_BIT; } break; -case 86: -#line 337 "gram.y" +case 78: +#line 326 "gram.y" { cont |= C_ICON_BIT; } break; -case 87: -#line 338 "gram.y" +case 79: +#line 327 "gram.y" { cont |= C_ROOT_BIT; } break; -case 88: -#line 339 "gram.y" +case 80: +#line 328 "gram.y" { cont |= C_FRAME_BIT; } break; -case 89: -#line 340 "gram.y" +case 81: +#line 329 "gram.y" { cont |= C_ALL_BITS; } break; -case 90: -#line 341 "gram.y" +case 82: +#line 330 "gram.y" { } break; -case 91: -#line 342 "gram.y" +case 83: +#line 331 "gram.y" { Name = yyvsp[0].ptr; cont |= C_NAME_BIT; } break; -case 95: -#line 353 "gram.y" -{ SetHighlightPixmap (yyvsp[0].ptr); } -break; -case 99: -#line 364 "gram.y" +case 87: +#line 341 "gram.y" { NewBitmapCursor(&Scr->FrameCursor, yyvsp[-1].ptr, yyvsp[0].ptr); } break; -case 100: -#line 366 "gram.y" +case 88: +#line 343 "gram.y" { NewFontCursor(&Scr->FrameCursor, yyvsp[0].ptr); } break; -case 101: -#line 368 "gram.y" +case 89: +#line 345 "gram.y" { NewBitmapCursor(&Scr->TitleCursor, yyvsp[-1].ptr, yyvsp[0].ptr); } break; -case 102: -#line 370 "gram.y" +case 90: +#line 347 "gram.y" { NewFontCursor(&Scr->TitleCursor, yyvsp[0].ptr); } break; -case 103: -#line 372 "gram.y" +case 91: +#line 349 "gram.y" { NewBitmapCursor(&Scr->IconCursor, yyvsp[-1].ptr, yyvsp[0].ptr); } break; -case 104: -#line 374 "gram.y" +case 92: +#line 351 "gram.y" { NewFontCursor(&Scr->IconCursor, yyvsp[0].ptr); } break; -case 105: -#line 376 "gram.y" +case 93: +#line 353 "gram.y" { NewBitmapCursor(&Scr->ButtonCursor, yyvsp[-1].ptr, yyvsp[0].ptr); } break; -case 106: -#line 378 "gram.y" +case 94: +#line 355 "gram.y" { NewFontCursor(&Scr->ButtonCursor, yyvsp[0].ptr); } break; -case 107: -#line 380 "gram.y" +case 95: +#line 357 "gram.y" { NewBitmapCursor(&Scr->MoveCursor, yyvsp[-1].ptr, yyvsp[0].ptr); } break; -case 108: -#line 382 "gram.y" +case 96: +#line 359 "gram.y" { NewFontCursor(&Scr->MoveCursor, yyvsp[0].ptr); } break; -case 109: -#line 384 "gram.y" +case 97: +#line 361 "gram.y" { NewBitmapCursor(&Scr->ResizeCursor, yyvsp[-1].ptr, yyvsp[0].ptr); } break; -case 110: -#line 386 "gram.y" +case 98: +#line 363 "gram.y" { NewFontCursor(&Scr->ResizeCursor, yyvsp[0].ptr); } break; -case 111: -#line 388 "gram.y" +case 99: +#line 365 "gram.y" { NewBitmapCursor(&Scr->WaitCursor, yyvsp[-1].ptr, yyvsp[0].ptr); } break; -case 112: -#line 390 "gram.y" +case 100: +#line 367 "gram.y" { NewFontCursor(&Scr->WaitCursor, yyvsp[0].ptr); } break; -case 113: -#line 392 "gram.y" +case 101: +#line 369 "gram.y" { NewBitmapCursor(&Scr->MenuCursor, yyvsp[-1].ptr, yyvsp[0].ptr); } break; -case 114: -#line 394 "gram.y" +case 102: +#line 371 "gram.y" { NewFontCursor(&Scr->MenuCursor, yyvsp[0].ptr); } break; -case 115: -#line 396 "gram.y" +case 103: +#line 373 "gram.y" { NewBitmapCursor(&Scr->SelectCursor, yyvsp[-1].ptr, yyvsp[0].ptr); } break; -case 116: -#line 398 "gram.y" +case 104: +#line 375 "gram.y" { NewFontCursor(&Scr->SelectCursor, yyvsp[0].ptr); } break; -case 117: -#line 400 "gram.y" +case 105: +#line 377 "gram.y" { NewBitmapCursor(&Scr->DestroyCursor, yyvsp[-1].ptr, yyvsp[0].ptr); } break; -case 118: -#line 402 "gram.y" +case 106: +#line 379 "gram.y" { NewFontCursor(&Scr->DestroyCursor, yyvsp[0].ptr); } break; -case 122: -#line 414 "gram.y" +case 110: +#line 391 "gram.y" { if (!do_colorlist_keyword (yyvsp[-1].num, color, yyvsp[0].ptr)) { twmrc_error_prefix(); @@ -1549,9 +1425,9 @@ case 122: } } break; -case 123: -#line 423 "gram.y" -{ list = do_colorlist_keyword(yyvsp[-1].num,color, +case 111: +#line 400 "gram.y" +{ list = do_colorlist_keyword(yyvsp[-1].num, color, yyvsp[0].ptr); if (!list) { twmrc_error_prefix(); @@ -1562,12 +1438,12 @@ case 123: } } break; -case 124: -#line 433 "gram.y" +case 112: +#line 410 "gram.y" { /* No action */; } break; -case 125: -#line 434 "gram.y" +case 113: +#line 411 "gram.y" { if (!do_color_keyword (yyvsp[-1].num, color, yyvsp[0].ptr)) { twmrc_error_prefix(); @@ -1578,76 +1454,47 @@ case 125: } } break; -case 129: -#line 452 "gram.y" +case 117: +#line 429 "gram.y" { do_string_savecolor(color, yyvsp[0].ptr); } break; -case 130: -#line 453 "gram.y" +case 118: +#line 430 "gram.y" { do_var_savecolor(yyvsp[0].num); } break; -case 134: -#line 463 "gram.y" +case 122: +#line 440 "gram.y" { if (Scr->FirstTime && color == Scr->Monochrome) AddToList(list, yyvsp[-1].ptr, yyvsp[0].ptr); } break; -case 135: -#line 468 "gram.y" -{ - if (HasShape) Scr->SqueezeTitle = TRUE; - } -break; -case 136: -#line 471 "gram.y" -{ list = &Scr->SqueezeTitleL; - if (HasShape && Scr->SqueezeTitle == -1) - Scr->SqueezeTitle = TRUE; - } -break; -case 138: -#line 476 "gram.y" -{ Scr->SqueezeTitle = FALSE; } -break; -case 139: -#line 477 "gram.y" -{ list = &Scr->DontSqueezeTitleL; } -break; -case 142: -#line 482 "gram.y" -{ - if (Scr->FirstTime) { - do_squeeze_entry (list, yyvsp[-3].ptr, yyvsp[-2].num, yyvsp[-1].num, yyvsp[0].num); - } - } -break; -case 146: -#line 496 "gram.y" +case 126: +#line 452 "gram.y" { if (Scr->FirstTime) AddToList(list, yyvsp[0].ptr, 0); } break; -case 150: -#line 508 "gram.y" +case 130: +#line 464 "gram.y" { if (Scr->FirstTime) AddToList(list, yyvsp[-1].ptr, yyvsp[0].ptr); } break; -case 154: -#line 518 "gram.y" +case 134: +#line 474 "gram.y" { AddToMenu(root, "", Action, NULL, yyvsp[0].num, NULLSTR, NULLSTR); Action = ""; } break; -case 158: -#line 531 "gram.y" +case 138: +#line 487 "gram.y" { AddToMenu(root, yyvsp[-1].ptr, Action, pull, yyvsp[0].num, NULLSTR, NULLSTR); Action = ""; pull = NULL; } break; -case 159: -#line 536 "gram.y" +case 139: +#line 492 "gram.y" { AddToMenu(root, yyvsp[-6].ptr, Action, pull, yyvsp[0].num, yyvsp[-4].ptr, yyvsp[-2].ptr); @@ -1655,12 +1502,12 @@ case 159: pull = NULL; } break; -case 160: -#line 544 "gram.y" +case 140: +#line 500 "gram.y" { yyval.num = yyvsp[0].num; } break; -case 161: -#line 545 "gram.y" +case 141: +#line 501 "gram.y" { yyval.num = yyvsp[-1].num; Action = yyvsp[0].ptr; @@ -1700,20 +1547,20 @@ case 161: } /* end switch */ } break; -case 162: -#line 586 "gram.y" +case 142: +#line 542 "gram.y" { yyval.num = yyvsp[0].num; } break; -case 163: -#line 587 "gram.y" +case 143: +#line 543 "gram.y" { yyval.num = yyvsp[0].num; } break; -case 164: -#line 588 "gram.y" +case 144: +#line 544 "gram.y" { yyval.num = -(yyvsp[0].num); } break; -case 165: -#line 591 "gram.y" +case 145: +#line 547 "gram.y" { yyval.num = yyvsp[0].num; if (yyvsp[0].num == 0) yyerror("bad button 0"); @@ -1725,18 +1572,18 @@ case 165: } } break; -case 166: -#line 603 "gram.y" +case 146: +#line 559 "gram.y" { ptr = strdup(yyvsp[0].ptr); RemoveDQuote(ptr); yyval.ptr = ptr; } break; -case 167: -#line 608 "gram.y" +case 147: +#line 564 "gram.y" { yyval.num = yyvsp[0].num; } break; -#line 1732 "gram.c" +#line 1579 "gram.c" } yyssp -= yym; yystate = *yyssp; diff --git a/src/gram.h b/src/gram.h index 1caa9ff..00e47ae 100644 --- a/src/gram.h +++ b/src/gram.h @@ -11,58 +11,52 @@ #define ALL 267 #define OR 268 #define CURSORS 269 -#define PIXMAPS 270 -#define ICONS 271 -#define COLOR 272 -#define SAVECOLOR 273 -#define MONOCHROME 274 -#define FUNCTION 275 -#define WINDOW_FUNCTION 276 -#define ZOOM 277 -#define MAKE_TITLE 278 -#define GRAYSCALE 279 -#define NO_TITLE 280 -#define AUTO_RAISE 281 -#define NO_HILITE 282 -#define ICON_REGION 283 -#define META 284 -#define SHIFT 285 -#define LOCK 286 -#define CONTROL 287 -#define WINDOW 288 -#define TITLE 289 -#define ICON 290 -#define ROOT 291 -#define FRAME 292 -#define COLON 293 -#define EQUALS 294 -#define SQUEEZE_TITLE 295 -#define DONT_SQUEEZE_TITLE 296 -#define START_ICONIFIED 297 -#define NO_TITLE_HILITE 298 -#define TITLE_HILITE 299 -#define MOVE 300 -#define RESIZE 301 -#define WAIT 302 -#define SELECT 303 -#define KILL 304 -#define LEFT_TITLEBUTTON 305 -#define RIGHT_TITLEBUTTON 306 -#define NUMBER 307 -#define KEYWORD 308 -#define NKEYWORD 309 -#define CKEYWORD 310 -#define CLKEYWORD 311 -#define FKEYWORD 312 -#define FSKEYWORD 313 -#define SKEYWORD 314 -#define DKEYWORD 315 -#define JKEYWORD 316 -#define WINDOW_RING 317 -#define WARP_CURSOR 318 -#define ERRORTOKEN 319 -#define NO_STACKMODE 320 -#define STRING 321 +#define ICONS 270 +#define COLOR 271 +#define SAVECOLOR 272 +#define MONOCHROME 273 +#define FUNCTION 274 +#define WINDOW_FUNCTION 275 +#define ZOOM 276 +#define MAKE_TITLE 277 +#define GRAYSCALE 278 +#define NO_TITLE 279 +#define AUTO_RAISE 280 +#define ICON_REGION 281 +#define META 282 +#define SHIFT 283 +#define LOCK 284 +#define CONTROL 285 +#define WINDOW 286 +#define TITLE 287 +#define ICON 288 +#define ROOT 289 +#define FRAME 290 +#define COLON 291 +#define EQUALS 292 +#define START_ICONIFIED 293 +#define MOVE 294 +#define RESIZE 295 +#define WAIT 296 +#define SELECT 297 +#define KILL 298 +#define LEFT_TITLEBUTTON 299 +#define RIGHT_TITLEBUTTON 300 +#define NUMBER 301 +#define KEYWORD 302 +#define NKEYWORD 303 +#define CKEYWORD 304 +#define CLKEYWORD 305 +#define FKEYWORD 306 +#define FSKEYWORD 307 +#define SKEYWORD 308 +#define DKEYWORD 309 +#define JKEYWORD 310 +#define WINDOW_RING 311 +#define WARP_CURSOR 312 +#define ERRORTOKEN 313 +#define NO_STACKMODE 314 +#define STRING 315 #ifndef YYSTYPE_DEFINED #define YYSTYPE_DEFINED typedef union diff --git a/src/gram.y b/src/gram.y index d4d446c..6612b3e 100644 --- a/src/gram.y +++ b/src/gram.y @@ -110,13 +110,12 @@ static void yyerror ( const char *s ); }; %token LB RB LP RP MENUS MENU BUTTON DEFAULT_FUNCTION PLUS MINUS -%token ALL OR CURSORS PIXMAPS ICONS COLOR SAVECOLOR MONOCHROME FUNCTION +%token ALL OR CURSORS ICONS COLOR SAVECOLOR MONOCHROME FUNCTION %token WINDOW_FUNCTION ZOOM %token MAKE_TITLE GRAYSCALE -%token NO_TITLE AUTO_RAISE NO_HILITE ICON_REGION +%token NO_TITLE AUTO_RAISE ICON_REGION %token META SHIFT LOCK CONTROL WINDOW TITLE ICON ROOT FRAME -%token COLON EQUALS SQUEEZE_TITLE DONT_SQUEEZE_TITLE -%token START_ICONIFIED NO_TITLE_HILITE TITLE_HILITE +%token COLON EQUALS START_ICONIFIED %token MOVE RESIZE WAIT SELECT KILL LEFT_TITLEBUTTON RIGHT_TITLEBUTTON %token NUMBER KEYWORD NKEYWORD CKEYWORD CLKEYWORD FKEYWORD FSKEYWORD %token SKEYWORD DKEYWORD JKEYWORD WINDOW_RING WARP_CURSOR ERRORTOKEN @@ -124,9 +123,9 @@ static void yyerror ( const char *s ); %token STRING %type string -%type pixmap_list cursor_list color_list save_color_list stmt +%type cursor_list color_list save_color_list stmt %type win_color_list win_list function menu -%type noarg sarg error narg squeeze color_entry +%type noarg sarg error narg color_entry %type action button number signed_number full fullkey %start twmrc @@ -143,7 +142,6 @@ stmt : error | noarg | sarg | narg - | squeeze | ICON_REGION string DKEYWORD DKEYWORD number number { AddIconRegion($2, $3, $4, $5, $6); } | ZOOM number { if (Scr->FirstTime) @@ -154,7 +152,6 @@ stmt : error } | ZOOM { if (Scr->FirstTime) Scr->DoZoom = TRUE; } - | PIXMAPS pixmap_list {} | CURSORS cursor_list {} | LEFT_TITLEBUTTON string EQUALS action { GotTitleButton ($2, $4, False); @@ -184,14 +181,6 @@ stmt : error } | string fullkey { GotKey($1, $2); } | button full { GotButton($1, $2); } - | NO_TITLE_HILITE { list = &Scr->NoTitleHighlight; } - win_list - | NO_TITLE_HILITE { if (Scr->FirstTime) - Scr->TitleHighlight = FALSE; } - | NO_HILITE { list = &Scr->NoHighlight; } - win_list - | NO_HILITE { if (Scr->FirstTime) - Scr->Highlight = FALSE; } | NO_STACKMODE { list = &Scr->NoStackModeL; } win_list | NO_STACKMODE { if (Scr->FirstTime) @@ -342,18 +331,6 @@ contextkey : WINDOW { cont |= C_WINDOW_BIT; } | string { Name = $1; cont |= C_NAME_BIT; } ; - -pixmap_list : LB pixmap_entries RB - ; - -pixmap_entries : /* Empty */ - | pixmap_entries pixmap_entry - ; - -pixmap_entry : TITLE_HILITE string { SetHighlightPixmap ($2); } - ; - - cursor_list : LB cursor_entries RB ; @@ -420,7 +397,7 @@ color_entry : CLKEYWORD string { if (!do_colorlist_keyword ($1, color, ParseError = 1; } } - | CLKEYWORD string { list = do_colorlist_keyword($1,color, + | CLKEYWORD string { list = do_colorlist_keyword($1, color, $2); if (!list) { twmrc_error_prefix(); @@ -465,27 +442,6 @@ win_color_entry : string string { if (Scr->FirstTime && AddToList(list, $1, $2); } ; -squeeze : SQUEEZE_TITLE { - if (HasShape) Scr->SqueezeTitle = TRUE; - } - | SQUEEZE_TITLE { list = &Scr->SqueezeTitleL; - if (HasShape && Scr->SqueezeTitle == -1) - Scr->SqueezeTitle = TRUE; - } - LB win_sqz_entries RB - | DONT_SQUEEZE_TITLE { Scr->SqueezeTitle = FALSE; } - | DONT_SQUEEZE_TITLE { list = &Scr->DontSqueezeTitleL; } - win_list - ; - -win_sqz_entries : /* Empty */ - | win_sqz_entries string JKEYWORD signed_number number { - if (Scr->FirstTime) { - do_squeeze_entry (list, $2, $3, $4, $5); - } - } - ; - win_list : LB win_entries RB ; diff --git a/src/menus.c b/src/menus.c index 79a81a0..4283b4b 100644 --- a/src/menus.c +++ b/src/menus.c @@ -2651,16 +2651,14 @@ BumpWindowColormap (TwmWindow *tmp, int inc) void SetBorder (TwmWindow *tmp, Bool onoroff) { - if (tmp->highlight) { - if (onoroff) { - XSetWindowBorder (dpy, tmp->frame, tmp->border); - if (tmp->title_w) - XSetWindowBorder (dpy, tmp->title_w, tmp->border); - } else { - XSetWindowBorderPixmap (dpy, tmp->frame, tmp->gray); - if (tmp->title_w) - XSetWindowBorderPixmap (dpy, tmp->title_w, tmp->gray); - } + if (onoroff) { + XSetWindowBorder (dpy, tmp->frame, tmp->border); + if (tmp->title_w) + XSetWindowBorder (dpy, tmp->title_w, tmp->border); + } else { + XSetWindowBorderPixmap (dpy, tmp->frame, tmp->gray); + if (tmp->title_w) + XSetWindowBorderPixmap (dpy, tmp->title_w, tmp->gray); } } diff --git a/src/parse.c b/src/parse.c index 418251f..a93fe10 100644 --- a/src/parse.c +++ b/src/parse.c @@ -401,7 +401,6 @@ static TwmKeyword keytable[] = { { "defaultfunction", DEFAULT_FUNCTION, 0 }, { "destroy", KILL, 0 }, { "dontmoveoff", KEYWORD, kw0_DontMoveOff }, - { "dontsqueezetitle", DONT_SQUEEZE_TITLE, 0 }, { "east", DKEYWORD, D_EAST }, { "f", FRAME, 0 }, { "f.autoraise", FKEYWORD, F_AUTORAISE }, @@ -499,7 +498,6 @@ static TwmKeyword keytable[] = { { "nobackingstore", KEYWORD, kw0_NoBackingStore }, { "nodefaults", KEYWORD, kw0_NoDefaults }, { "nograbserver", KEYWORD, kw0_NoGrabServer }, - { "nohighlight", NO_HILITE, 0 }, { "nomenushadows", KEYWORD, kw0_NoMenuShadows }, { "noraiseondeiconify", KEYWORD, kw0_NoRaiseOnDeiconify }, { "noraiseonmove", KEYWORD, kw0_NoRaiseOnMove }, @@ -510,10 +508,8 @@ static TwmKeyword keytable[] = { { "nostackmode", NO_STACKMODE, 0 }, { "notitle", NO_TITLE, 0 }, { "notitlefocus", KEYWORD, kw0_NoTitleFocus }, - { "notitlehighlight", NO_TITLE_HILITE, 0 }, { "noversion", KEYWORD, kw0_NoVersion }, { "opaquemove", KEYWORD, kw0_OpaqueMove }, - { "pixmaps", PIXMAPS, 0 }, { "pointerbackground", CKEYWORD, kwc_PointerBackground }, { "pointerforeground", CKEYWORD, kwc_PointerForeground }, { "priority", NKEYWORD, kwn_Priority }, @@ -530,7 +526,6 @@ static TwmKeyword keytable[] = { { "select", SELECT, 0 }, { "shift", SHIFT, 0 }, { "south", DKEYWORD, D_SOUTH }, - { "squeezetitle", SQUEEZE_TITLE, 0 }, { "starticonified", START_ICONIFIED, 0 }, { "t", TITLE, 0 }, { "title", TITLE, 0 }, @@ -538,7 +533,6 @@ static TwmKeyword keytable[] = { { "titlebuttonborderwidth", NKEYWORD, kwn_TitleButtonBorderWidth }, { "titlefont", SKEYWORD, kws_TitleFont }, { "titleforeground", CLKEYWORD, kwcl_TitleForeground }, - { "titlehighlight", TITLE_HILITE, 0 }, { "titlepadding", NKEYWORD, kwn_TitlePadding }, { "unknownicon", SKEYWORD, kws_UnknownIcon }, { "usepposition", SKEYWORD, kws_UsePPosition }, @@ -994,53 +988,3 @@ ParseUsePPosition (char *s) return -1; } - - -/** - * - * \param list squeeze or dont-squeeze list - * \param name window name - * \param justify left, center, or right - * \param num signed num - * \param denom 0 or indicates fraction denom - */ -void -do_squeeze_entry (name_list **list, char *name, int justify, int num, int denom) -{ - int absnum = (num < 0 ? -num : num); - - if (denom < 0) { - twmrc_error_prefix(); - fprintf (stderr, "negative SqueezeTitle denominator %d\n", denom); - return; - } - if (absnum > denom && denom != 0) { - twmrc_error_prefix(); - fprintf (stderr, "SqueezeTitle fraction %d/%d outside window\n", - num, denom); - return; - } - if (denom == 1) { - twmrc_error_prefix(); - fprintf (stderr, "useless SqueezeTitle faction %d/%d, assuming 0/0\n", - num, denom); - num = 0; - denom = 0; - } - - if (HasShape) { - SqueezeInfo *sinfo; - sinfo = malloc (sizeof(SqueezeInfo)); - - if (!sinfo) { - twmrc_error_prefix(); - fprintf (stderr, "unable to allocate %ld bytes for squeeze info\n", - (unsigned long)sizeof(SqueezeInfo)); - return; - } - sinfo->justify = justify; - sinfo->num = num; - sinfo->denom = denom; - AddToList (list, name, (char *) sinfo); - } -} diff --git a/src/parse.h b/src/parse.h index 2f4c6c8..79e718d 100644 --- a/src/parse.h +++ b/src/parse.h @@ -76,9 +76,6 @@ extern int ParseTwmrc ( char *filename ); extern int parse_keyword ( char *s, int *nump ); extern void TwmOutput ( int c ); extern void twmUnput ( int c ); -extern void do_squeeze_entry ( name_list **list, char *name, int justify, - int num, int denom ); - extern int (*twmInputFunc)(void); extern int ConstrainedMoveTime; diff --git a/src/resize.c b/src/resize.c index 689409b..f66842d 100644 --- a/src/resize.c +++ b/src/resize.c @@ -782,7 +782,7 @@ void SetupFrame (TwmWindow *tmp_win, int x, int y, int w, int h, int bw, Bool se ComputeWindowTitleOffsets (tmp_win, xwc.width, True); reShape = (tmp_win->wShaped ? TRUE : FALSE); - if (tmp_win->squeeze_info) /* check for title shaping */ + if (tmp_win->squeeze) /* check for title shaping */ { title_width = tmp_win->rightx + Scr->TBInfo.rightoff; if (title_width < xwc.width) @@ -1023,7 +1023,7 @@ SetFrameShape (TwmWindow *tmp) /* * can optimize rectangular contents window */ - if (tmp->squeeze_info) { + if (tmp->squeeze) { XRectangle newBounding[2]; XRectangle newClip[2]; int fbw2 = 2 * tmp->frame_bw; diff --git a/src/screen.h b/src/screen.h index ea3f91c..edf6bfa 100644 --- a/src/screen.h +++ b/src/screen.h @@ -158,12 +158,8 @@ typedef struct ScreenInfo name_list *MakeTitle; /* list of window names with title bar */ name_list *AutoRaise; /* list of window names to auto-raise */ name_list *IconNames; /* list of window names and icon names */ - name_list *NoHighlight; /* list of windows to not highlight */ name_list *NoStackModeL; /* windows to ignore stack mode requests */ - name_list *NoTitleHighlight;/* list of windows to not highlight the TB*/ name_list *StartIconified; /* windows to start iconic */ - name_list *SqueezeTitleL; /* windows of which to squeeze title */ - name_list *DontSqueezeTitleL; /* windows of which not to squeeze */ name_list *WindowRingL; /* windows in ring */ name_list *WarpCursorL; /* windows to warp cursor to on deiconify */ @@ -216,15 +212,12 @@ typedef struct ScreenInfo short SaveUnder; /* use save under's for menus */ short RandomPlacement; /* randomly place windows that no give hints */ short OpaqueMove; /* move the window rather than outline */ - short Highlight; /* should we highlight the window borders */ short StackMode; /* should we honor stack mode requests */ - short TitleHighlight; /* should we highlight the titlebar */ short MoveDelta; /* number of pixels before f.move starts */ short ZoomCount; /* zoom outline count */ short Shadow; /* show the menu shadow */ short InterpolateMenuColors;/* make pretty menus */ short ClientBorderWidth; /* respect client window border width */ - short SqueezeTitle; /* make title as small as possible */ short HaveFonts; /* set if fonts have been loaded */ short FirstTime; /* first time we've read .twmrc */ short CaseSensitive; /* be case-sensitive when sorting names */ diff --git a/src/twm.c b/src/twm.c index ec34fd1..1957255 100644 --- a/src/twm.c +++ b/src/twm.c @@ -345,7 +345,7 @@ main(int argc, char *argv[]) if (restore_filename) ReadWinConfigFile (restore_filename); - HasShape = XShapeQueryExtension (dpy, &ShapeEventBase, &ShapeErrorBase); + HasShape = XShapeQueryExtension(dpy, &ShapeEventBase, &ShapeErrorBase); HasSync = XSyncQueryExtension(dpy, &SyncEventBase, &SyncErrorBase); TwmContext = XUniqueContext(); MenuContext = XUniqueContext(); @@ -444,12 +444,8 @@ main(int argc, char *argv[]) Scr->MakeTitle = NULL; Scr->AutoRaise = NULL; Scr->IconNames = NULL; - Scr->NoHighlight = NULL; Scr->NoStackModeL = NULL; - Scr->NoTitleHighlight = NULL; Scr->StartIconified = NULL; - Scr->SqueezeTitleL = NULL; - Scr->DontSqueezeTitleL = NULL; Scr->WindowRingL = NULL; Scr->WarpCursorL = NULL; /* remember to put an initialization in InitVariables also @@ -522,7 +518,6 @@ main(int argc, char *argv[]) Scr->siconifyPm = None; Scr->pullPm = None; - Scr->hilitePm = None; Scr->tbpm.xlogo = None; Scr->tbpm.resize = None; Scr->tbpm.question = None; @@ -535,7 +530,6 @@ main(int argc, char *argv[]) /* Parse it once for each screen. */ ParseTwmrc(InitFile); assign_var_savecolor(); /* storeing pixels for twmrc "entities" */ - if (Scr->SqueezeTitle == -1) Scr->SqueezeTitle = FALSE; if (!Scr->HaveFonts) CreateFonts(); CreateGCs(); MakeMenus(); @@ -656,12 +650,8 @@ InitVariables(void) FreeList(&Scr->MakeTitle); FreeList(&Scr->AutoRaise); FreeList(&Scr->IconNames); - FreeList(&Scr->NoHighlight); FreeList(&Scr->NoStackModeL); - FreeList(&Scr->NoTitleHighlight); FreeList(&Scr->StartIconified); - FreeList(&Scr->SqueezeTitleL); - FreeList(&Scr->DontSqueezeTitleL); FreeList(&Scr->WindowRingL); FreeList(&Scr->WarpCursorL); @@ -732,15 +722,12 @@ InitVariables(void) Scr->SaveUnder = TRUE; Scr->RandomPlacement = FALSE; Scr->OpaqueMove = FALSE; - Scr->Highlight = TRUE; Scr->StackMode = TRUE; - Scr->TitleHighlight = TRUE; Scr->MoveDelta = 1; /* so that f.deltastop will work */ Scr->ZoomCount = 8; Scr->Shadow = TRUE; Scr->InterpolateMenuColors = FALSE; Scr->ClientBorderWidth = FALSE; - Scr->SqueezeTitle = -1; Scr->FirstRegion = NULL; Scr->LastRegion = NULL; Scr->FirstTime = TRUE; diff --git a/src/twm.h b/src/twm.h index 78e0444..0c85150 100644 --- a/src/twm.h +++ b/src/twm.h @@ -169,12 +169,6 @@ typedef struct _TBWindow { TitleButton *info; /* description of this window */ } TBWindow; -typedef struct _SqueezeInfo { - int justify; /* left, center, right */ - int num; /* signed pixel count or numerator */ - int denom; /* 0 for pix count or denominator */ -} SqueezeInfo; - #define J_LEFT 1 #define J_CENTER 2 #define J_RIGHT 3 @@ -270,11 +264,9 @@ typedef struct TwmWindow short forced; /* has had an icon forced upon it */ short icon_not_ours; /* icon pixmap or window supplied to us */ short icon_moved; /* user explicitly moved the icon */ - short highlight; /* should highlight this window */ short stackmode; /* honor stackmode requests */ short transient; /* this is a transient window */ Window transientfor; /* window contained in XA_XM_TRANSIENT_FOR */ - short titlehighlight; /* should I highlight the title bar */ int save_frame_x; /* x position of frame */ int save_frame_y; /* y position of frame */ int save_frame_width; /* width of frame */ @@ -284,7 +276,7 @@ typedef struct TwmWindow unsigned long protocols; /* which protocols this window handles */ Colormaps cmaps; /* colormaps for this application */ TBWindow *titlebuttons; - SqueezeInfo *squeeze_info; /* should the title be squeezed? */ + Bool squeeze; /* should the title be squeezed? */ struct { struct TwmWindow *next, *prev; Bool cursor_valid;