--- fvwm95-2.0.43ba.orig/configure.in +++ fvwm95-2.0.43ba/configure.in @@ -9,7 +9,7 @@ AC_CONFIG_HEADER(include/FVWMconfig.h) -CFLAGS=-O +#CFLAGS=-O #------------------------------------------------------------------- # @@ -115,7 +115,10 @@ fi AC_CHECK_FUNC(gethostbyname, , AC_CHECK_LIB(nsl, main, [LIBS="$LIBS -lnsl"])) - +# For FvwmConsole +AC_CHECK_LIB(readline, readline, READLINE_LIBRARIES="-lreadline" + AC_DEFINE(HAVE_READLINE), READLINE_LIBRARIES="") +AC_SUBST(READLINE_LIBRARIES) #------------------------------------------------------------------- # # Checks for header files. @@ -143,7 +146,7 @@ # AC_CHECK_FUNCS(select) AC_CHECK_FUNCS(gethostname waitpid sysconf uname) -AC_CHECK_FUNCS(strerror strcasecmp strncasecmp) +AC_CHECK_FUNCS(strerror strcasecmp strncasecmp strtoul) #=================================================================== @@ -165,7 +168,7 @@ fvwm_name="fvwm95" fvwm_rc=".fvwm95rc" -fvwm_icons="$x_includes/X11/bitmaps:$x_includes/X11/pixmaps:$prefix/icons" +fvwm_icons="${x_includes:-/usr/include}/X11/bitmaps:${x_includes:-/usr/include}/X11/pixmaps:$prefix/icons" if test "x$x_libraries" != x ; then x_libraries="-L$x_libraries" --- fvwm95-2.0.43ba.orig/modules/FvwmM4/FvwmM4.c +++ fvwm95-2.0.43ba/modules/FvwmM4/FvwmM4.c @@ -25,6 +25,7 @@ #include <pwd.h> #include <sys/param.h> #include <sys/types.h> +#include <sys/stat.h> #include <sys/socket.h> #include <netdb.h> @@ -80,7 +81,7 @@ Display *dpy; /* which display are we talking to */ char *temp, *s; char *display_name = NULL; - char *filename; + char *filename = NULL; char *tmp_file, read_string[80],delete_string[80]; int i,m4_debug = 0; @@ -159,6 +160,10 @@ else filename = argv[i]; } + if (NULL == filename) { + fprintf(stderr,"FvwmM4: No filename given\n"); + exit(1); + } for(i=0;i<strlen(filename);i++) if((filename[i] == '\n')||(filename[i] == '\r')) @@ -196,6 +201,8 @@ char client[MAXHOSTNAME], server[MAXHOSTNAME], *colon; char ostype[BUFSIZ]; char options[BUFSIZ]; + mode_t oldumask; + int stempfd; static char tmp_name[BUFSIZ]; struct hostent *hostname; char *vc; /* Visual Class */ @@ -210,11 +217,13 @@ strcpy(tmp_name, "/tmp"); } strcat(tmp_name, "/fvwmrcXXXXXX"); - mktemp(tmp_name); + oldumask = umask(0077); + stempfd = mkstemp(tmp_name); + umask(oldumask); - if (*tmp_name == '\0') + if (stempfd == -1) { - perror("mktemp failed in m4_defs"); + perror("mkstemp failed in m4_defs"); exit(0377); } @@ -223,12 +232,13 @@ * open a pipe to the command. */ + close(stempfd); if(m4_prefix) - sprintf(options, "%s --prefix-builtins %s > %s\n", + sprintf(options, "%s --prefix-builtins %s >> %s\n", m4_prog, m4_options, tmp_name); else - sprintf(options, "%s %s > %s\n", + sprintf(options, "%s %s >> %s\n", m4_prog, m4_options, tmp_name); tmpf = popen(options, "w"); @@ -330,6 +340,9 @@ #ifdef XPM strcat(options, "XPM "); #endif +#ifdef I18N + strcat(options, "I18N "); +#endif strcat(options, "M4 "); --- fvwm95-2.0.43ba.orig/modules/FvwmM4/Makefile.in +++ fvwm95-2.0.43ba/modules/FvwmM4/Makefile.in @@ -15,11 +15,11 @@ fvwm_name=@fvwm_name@ # # This is where the modules will be installed -fvwm_dir=@prefix@/lib/X11/@fvwm_name@ -man_dir=@prefix@/man/man1 +fvwm_dir=${prefix}/lib/X11/@fvwm_name@ +man_dir=${prefix}/man/man1 PATH_DEFINES = -DFVWMDIR=\"${fvwm_dir}\" -EXTRA_DEFINES=${PATH_DEFINES} -DXPM -DSHAPE +EXTRA_DEFINES=${PATH_DEFINES} -DXPM -DSHAPE -DI18N # # Libs --- fvwm95-2.0.43ba.orig/modules/FvwmBanner/FvwmBanner.c +++ fvwm95-2.0.43ba/modules/FvwmBanner/FvwmBanner.c @@ -96,7 +96,7 @@ int main(int argc, char **argv) { char *display_name = NULL, *string = NULL; - int retval; + int retval = 0; XGCValues gcv; unsigned long gcm; XEvent Event; @@ -283,7 +283,7 @@ void GetXPMFile(char *file, char *path) { int code; - char *full_file; + char *full_file = NULL; view.attributes.valuemask = XpmReturnPixels| XpmCloseness | XpmExtensions; view.attributes.closeness = 40000 /* Allow for "similar" colors */; --- fvwm95-2.0.43ba.orig/modules/FvwmBanner/Makefile.in +++ fvwm95-2.0.43ba/modules/FvwmBanner/Makefile.in @@ -26,7 +26,10 @@ FVWM_LIBRARY=-l${fvwm_name} LIBS=-L${top_srcdir}/libs ${x_libraries} ${FVWM_LIBRARY} ${XPM_LIBRARY} ${XEXT_LIBRARY} ${X_LIBRARY} -EXTRA_DEFINES=-DXPM -DSHAPE +PATH_DEFINES=-DFVWM_ICONDIR=\"${fvwm_icons}\" \ + -DFVWMDIR=\"${fvwm_dir}\" + +EXTRA_DEFINES=-DXPM -DSHAPE -DI18N ${PATH_DEFINES} CC=@CC@ INCLUDES=-I${top_srcdir}/include ${x_includes} CFLAGS=${INCLUDES} @CFLAGS@ ${EXTRA_DEFINES} --- fvwm95-2.0.43ba.orig/modules/FvwmCpp/FvwmCpp.c +++ fvwm95-2.0.43ba/modules/FvwmCpp/FvwmCpp.c @@ -25,6 +25,7 @@ #include <pwd.h> #include <sys/param.h> #include <sys/types.h> +#include <sys/stat.h> #include <sys/socket.h> #include <netdb.h> @@ -79,7 +80,7 @@ Display *dpy; /* which display are we talking to */ char *temp, *s; char *display_name = NULL; - char *filename; + char *filename = NULL; char *tmp_file, read_string[80],delete_string[80]; int i,cpp_debug = 0; @@ -141,6 +142,11 @@ filename = argv[i]; } + if (NULL == filename) + { + fprintf(stderr, "FvwmCpp: no filename given\n"); + exit(1); + } for(i=0;i<strlen(filename);i++) if((filename[i] == '\n')||(filename[i] == '\r')) { @@ -177,6 +183,8 @@ char client[MAXHOSTNAME], server[MAXHOSTNAME], *colon; char ostype[BUFSIZ]; char options[BUFSIZ]; + mode_t oldumask; + int stempfd; static char tmp_name[BUFSIZ]; struct hostent *hostname; char *vc; /* Visual Class */ @@ -191,11 +199,13 @@ strcpy(tmp_name, "/tmp"); } strcat(tmp_name, "/fvwmrcXXXXXX"); - mktemp(tmp_name); + oldumask = umask(0077); + stempfd = mkstemp(tmp_name); + umask(oldumask); - if (*tmp_name == '\0') + if (stempfd == -1) { - perror("mktemp failed in cpp_defs"); + perror("mkstemp failed in cpp_defs"); exit(0377); } @@ -204,7 +214,8 @@ * open a pipe to the command. */ - sprintf(options, "%s %s >%s\n", + close(stempfd); + sprintf(options, "%s %s >> %s\n", cpp_prog, cpp_options, tmp_name); tmpf = popen(options, "w"); @@ -299,6 +310,9 @@ #ifdef XPM strcat(options, "XPM "); #endif +#ifdef I18N + strcat(options, "I18N "); +#endif strcat(options, "Cpp "); --- fvwm95-2.0.43ba.orig/modules/FvwmCpp/Makefile.in +++ fvwm95-2.0.43ba/modules/FvwmCpp/Makefile.in @@ -15,8 +15,8 @@ fvwm_name=@fvwm_name@ # # This is where the modules will be installed -fvwm_dir=@prefix@/lib/X11/@fvwm_name@ -man_dir=@prefix@/man/man1 +fvwm_dir=${prefix}/lib/X11/@fvwm_name@ +man_dir=${prefix}/man/man1 # # Libs @@ -27,7 +27,7 @@ LIBS=-L${top_srcdir}/libs ${x_libraries} ${FVWM_LIBRARY} ${XPM_LIBRARY} ${XEXT_LIBRARY} ${X_LIBRARY} PATH_DEFINES = -DFVWMDIR=\"${fvwm_dir}\" -EXTRA_DEFINES=${PATH_DEFINES} -DXPM -DSHAPE +EXTRA_DEFINES=${PATH_DEFINES} -DXPM -DSHAPE -DI18N CC=@CC@ INCLUDES=-I${top_srcdir}/include ${x_includes} --- fvwm95-2.0.43ba.orig/modules/FvwmForm/FvwmForm.c +++ fvwm95-2.0.43ba/modules/FvwmForm/FvwmForm.c @@ -7,13 +7,18 @@ */ #include <FVWMconfig.h> +#include <fvwm/fvwmlib.h> #include <stdio.h> +#include <unistd.h> #include <stdlib.h> #include <ctype.h> #include <X11/Xlib.h> #include <X11/X.h> #include <X11/Xutil.h> +#ifdef I18N +#include <X11/Xlocale.h> +#endif #include <X11/cursorfont.h> #define XK_MISCELLANY #include <X11/keysymdef.h> @@ -171,6 +176,15 @@ }; Font fonts[3]; XFontStruct *xfs[3]; +#ifdef I18N +XFontSet setxfs[3]; +#ifdef __STDC__ +#define XTextWidth(x,y,z) XmbTextEscapement(set ## x,y,z) +#else +#define XTextWidth(x,y,z) XmbTextEscapement(set/**/x,y,z) +#endif +#define XDrawImageString(t,u,v,w,x,y,z) XmbDrawImageString(t,u,FONTSET,v,w,x,y,z) +#endif Cursor xc_ibeam, xc_hand; @@ -192,7 +206,7 @@ bp = dp = (char *)malloc(n+1); while (n-- > 0) *dp++ = *cp++; - while (isspace(*(--dp))); + while (isspace(((unsigned char)(*(--dp))))); *(++dp) = '\0'; return bp; } @@ -230,7 +244,7 @@ if (c == '\\') { *(dp++) = '\\'; *(dp++) = *(cp++); - } else if (isspace(c) || c == '\0') { + } else if (isspace((unsigned char)c) || c == '\0') { *dp = '\0'; return bp; } else @@ -259,6 +273,10 @@ char *cp; Line *cur_line, *line; Item *item, *cur_sel, *cur_button; +#ifdef I18N + char **ml; + XFontStruct **fs_list; +#endif #define AddToLine(item) { cur_line->items[cur_line->n++] = item; cur_line->size_x += item->header.size_x; if (cur_line->size_y < item->header.size_y) cur_line->size_y = item->header.size_y; } @@ -279,15 +297,26 @@ def_button.button.key = IB_CONTINUE; /* default fonts in case the *FFFont's are missing */ +#ifdef I18N + setxfs[f_text] = setxfs[f_input] = setxfs[f_button] = + GetFontSetOrFixed(dpy, "fixed"); + XFontsOfFontSet(setxfs[f_text], &fs_list, &ml); + xfs[f_text] = xfs[f_input] = xfs[f_button] = fs_list[0]; + fonts[f_text] = fonts[f_input] = fonts[f_button] = xfs[f_text]->fid; +#else xfs[f_text] = xfs[f_input] = xfs[f_button] = GetFontOrFixed(dpy, "fixed"); fonts[f_text] = fonts[f_input] = fonts[f_button] = xfs[f_text]->fid; +#endif prog_name_len = strlen(prog_name); + /* default in case of bad line */ + cur_sel = items; + while (GetConfigLine(fd,&line_buf),line_buf) { cp = line_buf; - while (isspace(*cp)) cp++; /* skip blanks */ + while (isspace((unsigned char)*cp)) cp++; /* skip blanks */ if (*cp != '*') continue; if (strncmp(++cp, prog_name, prog_name_len) != 0) continue; cp += prog_name_len; @@ -302,66 +331,87 @@ else if (strncmp(cp, "Position", 8) == 0) { cp += 8; geom = 1; - while (isspace(*cp)) cp++; + while (isspace((unsigned char)*cp)) cp++; gx = atoi(cp); - while (!isspace(*cp)) cp++; - while (isspace(*cp)) cp++; + while (!isspace((unsigned char)*cp)) cp++; + while (isspace((unsigned char)*cp)) cp++; gy = atoi(cp); fprintf(fp_err, "Position @ (%d, %d)\n", gx, gy); continue; } else if (strncmp(cp, "Fore", 4) == 0) { cp += 4; - while (isspace(*cp)) cp++; + while (isspace((unsigned char)*cp)) cp++; color_names[c_fore] = CopyNString(cp, 0); fprintf(fp_err, "ColorFore: %s\n", color_names[c_fore]); continue; } else if (strncmp(cp, "Back", 4) == 0) { cp += 4; - while (isspace(*cp)) cp++; + while (isspace((unsigned char)*cp)) cp++; color_names[c_back] = CopyNString(cp, 0); fprintf(fp_err, "ColorBack: %s\n", color_names[c_back]); continue; } else if (strncmp(cp, "ItemFore", 8) == 0) { cp += 8; - while (isspace(*cp)) cp++; + while (isspace((unsigned char)*cp)) cp++; color_names[c_itemfore] = CopyNString(cp, 0); fprintf(fp_err, "ColorItemFore: %s\n", color_names[c_itemfore]); continue; } else if (strncmp(cp, "ItemBack", 8) == 0) { cp += 8; - while (isspace(*cp)) cp++; + while (isspace((unsigned char)*cp)) cp++; color_names[c_itemback] = CopyNString(cp, 0); fprintf(fp_err, "ColorItemBack: %s\n", color_names[c_itemback]); continue; } else if (strncmp(cp, "Font", 4) == 0) { cp += 4; - while (isspace(*cp)) cp++; + while (isspace((unsigned char)*cp)) cp++; font_names[f_text] = CopyNString(cp, 0); fprintf(fp_err, "Font: %s\n", font_names[f_text]); +#ifdef I18N + setxfs[f_text] = GetFontSetOrFixed(dpy, font_names[f_text]); + XFontsOfFontSet(setxfs[f_text], &fs_list, &ml); + xfs[f_text] = fs_list[0]; + fonts[f_text] = xfs[f_text]->fid; +#else xfs[f_text] = GetFontOrFixed(dpy, font_names[f_text]); fonts[f_text] = xfs[f_text]->fid; +#endif continue; } else if (strncmp(cp, "ButtonFont", 10) == 0) { cp += 10; - while (isspace(*cp)) cp++; + while (isspace((unsigned char)*cp)) cp++; font_names[f_button] = CopyNString(cp, 0); fprintf(fp_err, "ButtonFont: %s\n", font_names[f_button]); +#ifdef I18N + setxfs[f_button] = GetFontSetOrFixed(dpy, font_names[f_button]); + XFontsOfFontSet(setxfs[f_button], &fs_list, &ml); + xfs[f_button] = fs_list[0]; + fonts[f_button] = xfs[f_button]->fid; +#else xfs[f_button] = GetFontOrFixed(dpy, font_names[f_button]); fonts[f_button] = xfs[f_button]->fid; +#endif continue; } else if (strncmp(cp, "InputFont", 9) == 0) { cp += 9; - while (isspace(*cp)) cp++; + while (isspace((unsigned char)*cp)) cp++; font_names[f_input] = CopyNString(cp, 0); fprintf(fp_err, "InputFont: %s\n", font_names[f_input]); +#ifdef I18N + setxfs[f_input] = GetFontSetOrFixed(dpy, font_names[f_input]); + XFontsOfFontSet(setxfs[f_input], &fs_list, &ml); + xfs[f_input] = fs_list[0]; + fonts[f_input] = xfs[f_input]->fid; +#else xfs[f_input] = GetFontOrFixed(dpy, font_names[f_input]); fonts[f_input] = xfs[f_input]->fid; +#endif continue; } else if (strncmp(cp, "Line", 4) == 0) { cp += 4; cur_line = lines + n_lines++; - while (isspace(*cp)) cp++; + while (isspace((unsigned char)*cp)) cp++; if (strncmp(cp, "left", 4) == 0) cur_line->justify = L_LEFT; else if (strncmp(cp, "right", 5) == 0) @@ -379,7 +429,7 @@ item = items + n_items++; item->type = I_TEXT; item->header.name = ""; - while (isspace(*cp)) cp++; + while (isspace((unsigned char)*cp)) cp++; if (*cp == '\"') item->text.value = CopyQuotedString(++cp); else @@ -398,13 +448,13 @@ cp += 5; item = items + n_items++; item->type = I_INPUT; - while (isspace(*cp)) cp++; + while (isspace((unsigned char)*cp)) cp++; item->header.name = CopySolidString(cp); cp += strlen(item->header.name); - while (isspace(*cp)) cp++; + while (isspace((unsigned char)*cp)) cp++; item->input.size = atoi(cp); - while (!isspace(*cp)) cp++; - while (isspace(*cp)) cp++; + while (!isspace((unsigned char)*cp)) cp++; + while (isspace((unsigned char)*cp)) cp++; if (*cp == '\"') item->input.init_value = CopyQuotedString(++cp); else @@ -427,10 +477,10 @@ cp += 9; cur_sel = items + n_items++; cur_sel->type = I_SELECT; - while (isspace(*cp)) cp++; + while (isspace((unsigned char)*cp)) cp++; cur_sel->header.name = CopySolidString(cp); cp += strlen(cur_sel->header.name); - while (isspace(*cp)) cp++; + while (isspace((unsigned char)*cp)) cp++; if (strncmp(cp, "multiple", 8) == 0) cur_sel->select.key = IS_MULTIPLE; else @@ -444,19 +494,19 @@ cp += 6; item = items + n_items++; item->type = I_CHOICE; - while (isspace(*cp)) cp++; + while (isspace((unsigned char)*cp)) cp++; item->header.name = CopySolidString(cp); cp += strlen(item->header.name); - while (isspace(*cp)) cp++; + while (isspace((unsigned char)*cp)) cp++; item->choice.value = CopySolidString(cp); cp += strlen(item->choice.value); - while (isspace(*cp)) cp++; + while (isspace((unsigned char)*cp)) cp++; if (strncmp(cp, "on", 2) == 0) item->choice.init_on = 1; else item->choice.init_on = 0; - while (!isspace(*cp)) cp++; - while (isspace(*cp)) cp++; + while (!isspace((unsigned char)*cp)) cp++; + while (isspace((unsigned char)*cp)) cp++; if (*cp == '\"') item->choice.text = CopyQuotedString(++cp); else @@ -477,19 +527,19 @@ item = items + n_items++; item->type = I_BUTTON; item->header.name = ""; - while (isspace(*cp)) cp++; + while (isspace((unsigned char)*cp)) cp++; if (strncmp(cp, "restart", 7) == 0) item->button.key = IB_RESTART; else if (strncmp(cp, "quit", 4) == 0) item->button.key = IB_QUIT; else item->button.key = IB_CONTINUE; - while (!isspace(*cp)) cp++; - while (isspace(*cp)) cp++; + while (!isspace((unsigned char)*cp)) cp++; + while (isspace((unsigned char)*cp)) cp++; if (*cp == '\"') { item->button.text = CopyQuotedString(++cp); cp += strlen(item->button.text) + 1; - while (isspace(*cp)) cp++; + while (isspace((unsigned char)*cp)) cp++; } else item->button.text = ""; if (*cp == '^') @@ -511,7 +561,7 @@ } else if (strncmp(cp, "Command", 7) == 0) { /* syntax: *FFCommand <command> */ cp += 7; - while (isspace(*cp)) cp++; + while (isspace((unsigned char)*cp)) cp++; cur_button->button.commands[cur_button->button.n++] = CopyNString(cp, 0); } @@ -653,6 +703,9 @@ colors[c_itemlo] = BlackPixel(dpy, screen); if (XParseColor(dpy, d_cmap, color_names[c_itemback], &xc_item)) { + red = (int) xc_item.red ; + green = (int) xc_item.green ; + blue = (int) xc_item.blue ; tmp1 = (14 * red) / 10 ; if (tmp1 > MAX_INTENSITY) tmp1 = MAX_INTENSITY ; tmp2 = (MAX_INTENSITY + red) / 2 ; @@ -751,12 +804,20 @@ case I_TEXT: x = item->header.pos_x + TEXT_SPC; y = item->header.pos_y + TEXT_SPC + xfs[f_text]->ascent; +#ifdef I18N +#undef FONTSET +#define FONTSET setxfs[f_text] +#endif XDrawImageString(dpy, frame, gc_text, x, y, item->text.value, item->text.n); break; case I_CHOICE: x = item->header.pos_x + TEXT_SPC + item->header.size_y; y = item->header.pos_y + TEXT_SPC + xfs[f_text]->ascent; +#ifdef I18N +#undef FONTSET +#define FONTSET setxfs[f_text] +#endif XDrawImageString(dpy, frame, gc_text, x, y, item->choice.text, item->choice.n); break; @@ -801,6 +862,10 @@ x, BOX_SPC, x, dy - BOX_SPC); } len = item->input.n - item->input.left; +#ifdef I18N +#undef FONTSET +#define FONTSET setxfs[f_input] +#endif if (len > item->input.size) len = item->input.size; else @@ -891,6 +956,10 @@ xsegs[3].x2 = dx - 1, xsegs[3].y2 = dy; XDrawSegments(dpy, item->header.win, gc_button, xsegs, 4); XSetForeground(dpy, gc_button, colors[c_itemfore]); +#ifdef I18N +#undef FONTSET +#define FONTSET setxfs[f_button] +#endif XDrawImageString(dpy, item->header.win, gc_button, BOX_SPC + TEXT_SPC, BOX_SPC + TEXT_SPC + xfs[f_button]->ascent, @@ -957,7 +1026,7 @@ *(vp++) = '\0'; break; } - else if (!isspace(x)) + else if (!isspace((unsigned char)x)) *(vp++) = x; } for (i = 0; i < n_items; i++) { @@ -973,8 +1042,8 @@ } } else { ParseCommand(dn, sp, ')', &dn2, &sp); - if (x == '?' && strlen(item->input.value) > 0 || - x == '!' && strlen(item->input.value) == 0) + if (((x == '?') && (strlen(item->input.value) > 0)) || + ((x == '!') && (strlen(item->input.value) == 0))) dn = dn2; } break; @@ -984,8 +1053,8 @@ AddChar(*cp); } else { ParseCommand(dn, sp, ')', &dn2, &sp); - if (x == '?' && item->choice.on || - x == '!' && !item->choice.on) + if (((x == '?') && item->choice.on) || + ((x == '!') && !item->choice.on)) dn = dn2; } break; @@ -1183,6 +1252,7 @@ char *sp, *dp, *ep; static char buf[10], n; + old_cursor = abs_cursor; /* default */ while (XEventsQueued(dpy, QueuedAfterReading)) { XNextEvent(dpy, &event); if (event.xany.window == frame) { @@ -1420,6 +1490,10 @@ { int len, x, dy; len = cur_text->input.n - cur_text->input.left; +#ifdef I18N +#undef FONTSET +#define FONTSET setxfs[f_input] +#endif if (len > cur_text->input.size) len = cur_text->input.size; else @@ -1530,11 +1604,15 @@ /* main procedure */ -main (int argc, char **argv) +void main (int argc, char **argv) { FILE *fdopen(); int i; +#ifdef I18N + setlocale(LC_CTYPE, ""); +#endif + buf = (char *)malloc(N); /* some kludge */ #ifdef DEBUG --- fvwm95-2.0.43ba.orig/modules/FvwmForm/Makefile.in +++ fvwm95-2.0.43ba/modules/FvwmForm/Makefile.in @@ -15,8 +15,8 @@ fvwm_name=@fvwm_name@ # # This is where the modules will be installed -fvwm_dir=@prefix@/lib/X11/@fvwm_name@ -man_dir=@prefix@/man/man1 +fvwm_dir=${prefix}/lib/X11/@fvwm_name@ +man_dir=${prefix}/man/man1 # # Libs @@ -26,7 +26,10 @@ FVWM_LIBRARY=-l${fvwm_name} LIBS=-L${top_srcdir}/libs ${x_libraries} ${FVWM_LIBRARY} ${XPM_LIBRARY} ${XEXT_LIBRARY} ${X_LIBRARY} -EXTRA_DEFINES=-DXPM -DSHAPE +PATH_DEFINES=-DFVWM_ICONDIR=\"${fvwm_icons}\" \ + -DFVWMDIR=\"${fvwm_dir}\" + +EXTRA_DEFINES=-DXPM -DSHAPE ${PATH_DEFINES} -DI18N CC=@CC@ INCLUDES=-I${top_srcdir}/include ${x_includes} CFLAGS=${INCLUDES} @CFLAGS@ ${EXTRA_DEFINES} --- fvwm95-2.0.43ba.orig/modules/FvwmSave/FvwmSave.c +++ fvwm95-2.0.43ba/modules/FvwmSave/FvwmSave.c @@ -247,7 +247,7 @@ for(i=0;i<len;i++) { - if(isspace(line[i])) + if(isspace((unsigned char)(line[i]))) space = 1; if(line[i]=='\"') qoute = 1; --- fvwm95-2.0.43ba.orig/modules/FvwmSave/Makefile.in +++ fvwm95-2.0.43ba/modules/FvwmSave/Makefile.in @@ -15,8 +15,8 @@ fvwm_name=@fvwm_name@ # # This is where the modules will be installed -fvwm_dir=@prefix@/lib/X11/@fvwm_name@ -man_dir=@prefix@/man/man1 +fvwm_dir=${prefix}/lib/X11/@fvwm_name@ +man_dir=${prefix}/man/man1 # # Libs @@ -26,7 +26,10 @@ FVWM_LIBRARY=-l${fvwm_name} LIBS=-L${top_srcdir}/libs ${x_libraries} ${FVWM_LIBRARY} ${XPM_LIBRARY} ${XEXT_LIBRARY} ${X_LIBRARY} -EXTRA_DEFINES=-DXPM -DSHAPE +PATH_DEFINES=-DFVWM_ICONDIR=\"${fvwm_icons}\" \ + -DFVWMDIR=\"${fvwm_dir}\" + +EXTRA_DEFINES=-DXPM -DSHAPE ${PATH_DEFINES} -DI18N CC=@CC@ INCLUDES=-I${top_srcdir}/include ${x_includes} CFLAGS=${INCLUDES} @CFLAGS@ ${EXTRA_DEFINES} --- fvwm95-2.0.43ba.orig/modules/FvwmIdent/FvwmIdent.h +++ fvwm95-2.0.43ba/modules/FvwmIdent/FvwmIdent.h @@ -66,6 +66,11 @@ void list_res_name(unsigned long *body); void list_end(void); +#ifdef I18N +#define XTextWidth(x,y,z) XmbTextEscapement(fontset,y,z) +#define XDrawString(t,u,v,w,x,y,z) XmbDrawString(t,u,fontset,v,w,x,y,z) +#endif + #ifdef BROKEN_SUN_HEADERS #include "../../fvwm/sun_headers.h" #endif --- fvwm95-2.0.43ba.orig/modules/FvwmIdent/FvwmIdent.c +++ fvwm95-2.0.43ba/modules/FvwmIdent/FvwmIdent.c @@ -34,6 +34,9 @@ #include <X11/Xatom.h> #include <X11/Intrinsic.h> #include <X11/cursorfont.h> +#ifdef I18N +#include <X11/Xlocale.h> +#endif #include "../../fvwm/module.h" #include "FvwmIdent.h" @@ -59,6 +62,9 @@ Window main_win; Window app_win; XFontStruct *font; +#ifdef I18N +XFontSet fontset; +#endif int Width, Height,win_x,win_y; @@ -88,6 +94,10 @@ int Clength; char *tline; +#ifdef I18N + setlocale(LC_CTYPE, ""); +#endif + /* Save the program name for error messages and config parsing */ temp = argv[0]; s=strrchr(argv[0], '/'); @@ -186,7 +196,7 @@ while(1) { - if(count = ReadFvwmPacket(fd[1],header,&body) > 0) + if((count = ReadFvwmPacket(fd[1],header,&body)) > 0) { process_message(header[1],body); free(body); @@ -345,6 +355,12 @@ int JunkX, JunkY; unsigned int JunkMask; int x,y; +#ifdef I18N + char **ml; + int mc; + char *ds; + XFontStruct **fs_list; +#endif if(!found) { @@ -356,11 +372,18 @@ close(fd[1]); /* load the font */ - if ((font = XLoadQueryFont(dpy, font_string)) == NULL) +#ifdef I18N + if ((fontset = GetFontSetOrFixed(dpy, font_string)) == NULL) { + exit(1); + } + XFontsOfFontSet(fontset, &fs_list, &ml); + font = fs_list[0]; +#else + if ((font = GetFontOrFixed(dpy, font_string)) == NULL) { - if ((font = XLoadQueryFont(dpy, "fixed")) == NULL) exit(1); }; +#endif /* make window infomation list */ MakeList(); --- fvwm95-2.0.43ba.orig/modules/FvwmIdent/Makefile.in +++ fvwm95-2.0.43ba/modules/FvwmIdent/Makefile.in @@ -15,8 +15,8 @@ fvwm_name=@fvwm_name@ # # This is where the modules will be installed -fvwm_dir=@prefix@/lib/X11/@fvwm_name@ -man_dir=@prefix@/man/man1 +fvwm_dir=${prefix}/lib/X11/@fvwm_name@ +man_dir=${prefix}/man/man1 # # Libs @@ -26,7 +26,10 @@ FVWM_LIBRARY=-l${fvwm_name} LIBS=-L${top_srcdir}/libs ${x_libraries} ${FVWM_LIBRARY} ${XPM_LIBRARY} ${XEXT_LIBRARY} ${X_LIBRARY} -EXTRA_DEFINES=-DXPM -DSHAPE +PATH_DEFINES=-DFVWM_ICONDIR=\"${fvwm_icons}\" \ + -DFVWMDIR=\"${fvwm_dir}\" + +EXTRA_DEFINES=-DXPM -DSHAPE ${PATH_DEFINES} -DI18N CC=@CC@ INCLUDES=-I${top_srcdir}/include ${x_includes} CFLAGS=${INCLUDES} @CFLAGS@ ${EXTRA_DEFINES} --- fvwm95-2.0.43ba.orig/modules/FvwmPager/FvwmPager.c +++ fvwm95-2.0.43ba/modules/FvwmPager/FvwmPager.c @@ -34,6 +34,9 @@ #include <X11/Xproto.h> #include <X11/Xatom.h> #include <X11/Intrinsic.h> +#ifdef I18N +#include <X11/Xlocale.h> +#endif #include "../../fvwm/module.h" @@ -87,6 +90,9 @@ char line[100]; char mask_mesg[50]; +#ifdef I18N + setlocale(LC_CTYPE, ""); +#endif /* Save our program name - for error messages */ temp = argv[0]; s=strrchr(argv[0], '/'); @@ -768,7 +774,7 @@ if(FD_ISSET(fd[1], &in_fdset)) { - if(count = ReadFvwmPacket(fd[1],header,&body) > 0) + if((count = ReadFvwmPacket(fd[1],header,&body)) > 0) { process_message(header[1],body); free(body); @@ -818,7 +824,7 @@ (strncasecmp(tline, CatString3("*", MyName, "Geometry"),Clength+9)==0)) { tmp = &tline[Clength+9]; - while(((isspace(*tmp))&&(*tmp != '\n'))&&(*tmp != 0)) + while(((isspace((unsigned char)*tmp))&&(*tmp != '\n'))&&(*tmp != 0)) { tmp++; } @@ -858,7 +864,7 @@ Clength+13)==0)) { tmp = &tline[Clength+13]; - while(((isspace(*tmp))&&(*tmp != '\n'))&&(*tmp != 0)) + while(((isspace((unsigned char)*tmp & 0xff))&&(*tmp != '\n'))&&(*tmp != 0)) { tmp++; } @@ -886,8 +892,8 @@ if((desk >= desk1)&&(desk <=desk2)) { n = 0; - while(isspace(tline[Clength+6+n]))n++; - while(!isspace(tline[Clength+6+n]))n++; + while(isspace((unsigned char)tline[Clength+6+n] & 0xff))n++; + while(!isspace((unsigned char)tline[Clength+6+n] & 0xff))n++; free(Desks[desk - desk1].label); CopyString(&Desks[desk - desk1].label,&tline[Clength+6+n]); } @@ -931,8 +937,8 @@ if((desk >= desk1)&&(desk <=desk2)) { n = 0; - while(isspace(tline[Clength+10+n]))n++; - while(!isspace(tline[Clength+10+n]))n++; + while(isspace((unsigned char)tline[Clength+10+n]))n++; + while(!isspace((unsigned char)tline[Clength+10+n]))n++; free(Desks[desk - desk1].Dcolor); CopyString(&Desks[desk - desk1].Dcolor,&tline[Clength+10+n]); #ifdef DEBUG --- fvwm95-2.0.43ba.orig/modules/FvwmPager/x_pager.c +++ fvwm95-2.0.43ba/modules/FvwmPager/x_pager.c @@ -32,6 +32,16 @@ extern int StartIconic; extern int icon_w, icon_h, icon_x, icon_y; XFontStruct *font, *windowFont; +#ifdef I18N +XFontSet fontset, windowFontset; +#ifdef __STDC__ +#define XTextWidth(x,y,z) XmbTextEscapement(x ## set,y,z) +#else +#define XTextWidth(x,y,z) XmbTextEscapement(x/**/set,y,z) +#endif +#define XDrawString(t,u,v,w,x,y,z) XmbDrawString(t,u,FONTSET,v,w,x,y,z) +#define XDrawImageString(t,u,v,w,x,y,z) XmbDrawImageString(t,u,FONTSET,v,w,x,y,z) +#endif GC NormalGC,DashedGC,HiliteGC,rvGC; GC StdGC; @@ -97,6 +107,12 @@ { XWMHints wmhints; XClassHint class1; +#ifdef I18N + char **ml; + int mc; + char *ds; + XFontStruct **fs_list; +#endif XTextProperty name; unsigned long valuemask; @@ -115,26 +131,50 @@ wm_del_win = XInternAtom(dpy,"WM_DELETE_WINDOW",False); /* load the font */ - if (!uselabel || ((font = XLoadQueryFont(dpy, font_string)) == NULL)) +#ifdef I18N + if (!uselabel || ((fontset = GetFontSetOrFixed(dpy, font_string)) == NULL)) + { + fprintf(stderr,"%s: No fonts available\n",MyName); + exit(1); + } + XFontsOfFontSet(fontset, &fs_list, &ml); + font = fs_list[0]; +#else + if (!uselabel || ((font = GetFontOrFixed(dpy, font_string)) == NULL)) { - if ((font = XLoadQueryFont(dpy, "fixed")) == NULL) - { fprintf(stderr,"%s: No fonts available\n",MyName); exit(1); - } }; +#endif + if(uselabel) label_h = font->ascent + font->descent+2; else label_h = 0; - +#ifdef I18N + if(smallFont != NULL) + { + windowFontset = GetFontSetOrFixed(dpy, smallFont); + if (windowFontset != NULL) + { + XFontsOfFontSet(windowFontset, &fs_list, &ml); + windowFont = fs_list[0]; + } + } + else + { + windowFontset = NULL; + windowFont = NULL; + } +#else if(smallFont!= NULL) { windowFont= XLoadQueryFont(dpy, smallFont); } else windowFont= NULL; +#endif /* Load the colors */ fore_pix = GetColor(PagerFore); @@ -641,6 +681,9 @@ { int n1,m1,x,y,n,m,i; XTextProperty name; +#ifdef I18N + int ret; +#endif char str[100],*sptr; static int icon_desk_shown = -1000; @@ -677,11 +720,22 @@ sprintf(str,"Desk %d",Scr.CurrentDesk); sptr = &str[0]; } +#ifdef I18N + if ((ret = XmbTextListToTextProperty(dpy,&sptr,1,XStdICCTextStyle,&name)) + == XNoMemory) + { + fprintf(stderr,"%s: cannot allocate window name",MyName); + return; + } + else if (ret != Success) + return; +#else if (XStringListToTextProperty(&sptr,1,&name) == 0) { fprintf(stderr,"%s: cannot allocate window name",MyName); return; } +#endif XSetWMIconName(dpy,Scr.Pager_w,&name); } } @@ -792,6 +846,10 @@ if((w<= desk_w)&&(uselabel)) { hor_off = (desk_w -w)/2; +#ifdef I18N +#undef FONTSET +#define FONTSET fontset +#endif if(i == (Scr.CurrentDesk - desk1)) XDrawString (dpy, Desks[i].title_w,rvGC,hor_off,font->ascent +1 , ptr, strlen(ptr)); @@ -1507,6 +1565,10 @@ XChangeGC(dpy, StdGC,Globalgcm,&Globalgcv); } +#ifdef I18N +#undef FONTSET +#define FONTSET windowFontset +#endif if(t->PagerView != None) { XClearWindow(dpy, t->PagerView); @@ -1544,6 +1606,10 @@ XChangeGC(dpy,StdGC,Globalgcm,&Globalgcv); } +#ifdef I18N +#undef FONTSET +#define FONTSET windowFontset +#endif XClearWindow(dpy, t->IconView); XDrawString (dpy, t->IconView,StdGC,2,windowFont->ascent+2 , t->icon_name, strlen(t->icon_name)); --- fvwm95-2.0.43ba.orig/modules/FvwmPager/Makefile.in +++ fvwm95-2.0.43ba/modules/FvwmPager/Makefile.in @@ -15,8 +15,8 @@ fvwm_name=@fvwm_name@ # # This is where the modules will be installed -fvwm_dir=@prefix@/lib/X11/@fvwm_name@ -man_dir=@prefix@/man/man1 +fvwm_dir=${prefix}/lib/X11/@fvwm_name@ +man_dir=${prefix}/man/man1 # # Libs @@ -26,7 +26,10 @@ FVWM_LIBRARY=-l${fvwm_name} LIBS=-L${top_srcdir}/libs ${x_libraries} ${FVWM_LIBRARY} ${XPM_LIBRARY} ${XEXT_LIBRARY} ${X_LIBRARY} -EXTRA_DEFINES=-DXPM -DSHAPE +PATH_DEFINES=-DFVWM_ICONDIR=\"${fvwm_icons}\" \ + -DFVWMDIR=\"${fvwm_dir}\" + +EXTRA_DEFINES=-DXPM -DSHAPE ${PATH_DEFINES} -DI18N CC=@CC@ INCLUDES=-I${top_srcdir}/include ${x_includes} CFLAGS=${INCLUDES} @CFLAGS@ ${EXTRA_DEFINES} --- fvwm95-2.0.43ba.orig/modules/FvwmWinList/List.c +++ fvwm95-2.0.43ba/modules/FvwmWinList/List.c @@ -18,7 +18,7 @@ #include "List.h" #include "Mallocs.h" #include "../../fvwm/module.h" - +#include "FvwmWinList.h" #ifdef BROKEN_SUN_HEADERS #include "../../fvwm/sun_headers.h" --- fvwm95-2.0.43ba.orig/modules/FvwmWinList/List.h +++ fvwm95-2.0.43ba/modules/FvwmWinList/List.h @@ -49,3 +49,4 @@ int ItemCountDesk(List *list, long desk); long ItemID(List *list, int n); void CopyItem(List *dest,List *source,int n); +long ItemDesk(List *list, long id); --- fvwm95-2.0.43ba.orig/modules/FvwmWinList/ButtonArray.c +++ fvwm95-2.0.43ba/modules/FvwmWinList/ButtonArray.c @@ -12,21 +12,37 @@ * Things to do: Convert to C++ (In Progress) */ +#include <FVWMconfig.h> + #include <stdlib.h> #include <stdio.h> +#include <string.h> #include <X11/Xlib.h> #include <fvwm/fvwmlib.h> #include "ButtonArray.h" #include "Mallocs.h" +#include "FvwmWinList.h" #ifndef min #define min(a,b) (((a)<(b)) ? (a) : (b)) #define max(a,b) (((a)>(b)) ? (a) : (b)) #endif +#ifdef I18N +#ifdef __STDC__ +#define XTextWidth(x,y,z) XmbTextEscapement(x ## set,y,z) +#else +#define XTextWidth(x,y,z) XmbTextEscapement(x/**/set,y,z) +#endif +#define XDrawString(t,u,v,w,x,y,z) XmbDrawString(t,u,ButtonFontset,v,w,x,y,z) +#endif + extern XFontStruct *ButtonFont; +#ifdef I18N +extern XFontSet ButtonFontset; +#endif extern Display *dpy; extern Window win; extern GC shadow[MAX_COLOUR_SETS],hilite[MAX_COLOUR_SETS]; --- fvwm95-2.0.43ba.orig/modules/FvwmWinList/ButtonArray.h +++ fvwm95-2.0.43ba/modules/FvwmWinList/ButtonArray.h @@ -49,3 +49,5 @@ void SwitchButton(ButtonArray *array,int butnum); int WhichButton(ButtonArray *array,int x, int y); void PrintButtons(ButtonArray *array); +int UpdateButtonDesk(ButtonArray *array, int butnum, long desk ); +void RadioButton(ButtonArray *array, int butnum); --- fvwm95-2.0.43ba.orig/modules/FvwmWinList/FvwmWinList.h +++ fvwm95-2.0.43ba/modules/FvwmWinList/FvwmWinList.h @@ -1,4 +1,5 @@ #include <fvwm/fvwmlib.h> +#include <X11/Xproto.h> /* FvwmWinList Module for Fvwm. * --- fvwm95-2.0.43ba.orig/modules/FvwmWinList/FvwmWinList.c +++ fvwm95-2.0.43ba/modules/FvwmWinList/FvwmWinList.c @@ -72,6 +72,15 @@ #include <X11/Xatom.h> #include <X11/Intrinsic.h> #include <X11/cursorfont.h> +#ifdef I18N +#include <X11/Xlocale.h> +#ifdef __STDC__ +#define XTextWidth(x,y,z) XmbTextEscapement(x ## set,y,z) +#else +#define XTextWidth(x,y,z) XmbTextEscapement(x/**/set,y,z) +#endif +#define XDrawString(t,u,v,w,x,y,z) XmbDrawString(t,u,ButtonFontset,v,w,x,y,z) +#endif #include "../../fvwm/module.h" #include <fvwm/version.h> @@ -99,6 +108,9 @@ GC graph[MAX_COLOUR_SETS],shadow[MAX_COLOUR_SETS],hilite[MAX_COLOUR_SETS]; GC background[MAX_COLOUR_SETS]; XFontStruct *ButtonFont; +#ifdef I18N +XFontSet ButtonFontset; +#endif int fontheight; static Atom wm_del_win; Atom MwmAtom = None; @@ -152,6 +164,9 @@ strcat(Module, temp); Clength = strlen(Module); +#ifdef I18N + setlocale(LC_CTYPE, ""); +#endif /* Open the console for messages */ OpenConsole(); @@ -260,7 +275,7 @@ int redraw=0,i; long flags; char *name,*string; - static current_focus=-1; + static int current_focus=-1; Picture p; @@ -759,7 +774,7 @@ { char *temp; temp=string; - while(isspace(*temp)) temp++; + while(isspace((unsigned char)*temp)) temp++; if(strncasecmp(temp, "Click1", 6)==0) CopyString(&ClickAction[0],&temp[6]); else if(strncasecmp(temp, "Click2", 6)==0) @@ -924,6 +939,13 @@ ******************************************************************************/ void StartMeUp() { +#ifdef I18N + char **ml; + int mc; + char *ds; + XFontStruct **fs_list; +#endif + if (!(dpy = XOpenDisplay(""))) { fprintf(stderr,"%s: can't open display %s", Module, @@ -938,10 +960,18 @@ ScreenHeight = DisplayHeight(dpy,screen); ScreenWidth = DisplayWidth(dpy,screen); - if ((ButtonFont=XLoadQueryFont(dpy,font_string))==NULL) +#ifdef I18N + if ((ButtonFontset=GetFontSetOrFixed(dpy,font_string)) == NULL) { + exit(1); + } + XFontsOfFontSet(ButtonFontset,&fs_list,&ml); + ButtonFont = fs_list[0]; +#else + if ((ButtonFont=GetFontOrFixed(dpy,font_string))==NULL) { - if ((ButtonFont=XLoadQueryFont(dpy,"fixed"))==NULL) exit(1); + exit(1); } +#endif fontheight = ButtonFont->ascent+ButtonFont->descent; @@ -1026,5 +1056,6 @@ ConsoleMessage("%s failed request: %s\n", Module, errmsg); ConsoleMessage("Major opcode: 0x%x, resource id: 0x%x\n", event->request_code, event->resourceid); + return ((XErrorHandler)ErrorHandler); } --- fvwm95-2.0.43ba.orig/modules/FvwmWinList/Makefile.in +++ fvwm95-2.0.43ba/modules/FvwmWinList/Makefile.in @@ -15,8 +15,8 @@ fvwm_name=@fvwm_name@ # # This is where the modules will be installed -fvwm_dir=@prefix@/lib/X11/@fvwm_name@ -man_dir=@prefix@/man/man1 +fvwm_dir=${prefix}/lib/X11/@fvwm_name@ +man_dir=${prefix}/man/man1 # # Libs @@ -26,7 +26,10 @@ FVWM_LIBRARY=-l${fvwm_name} LIBS=-L${top_srcdir}/libs ${x_libraries} ${FVWM_LIBRARY} ${XPM_LIBRARY} ${XEXT_LIBRARY} ${X_LIBRARY} -EXTRA_DEFINES=-DXPM -DSHAPE +PATH_DEFINES=-DFVWM_ICONDIR=\"${fvwm_icons}\" \ + -DFVWMDIR=\"${fvwm_dir}\" + +EXTRA_DEFINES=-DXPM -DSHAPE ${PATH_DEFINES} -DI18N CC=@CC@ INCLUDES=-I${top_srcdir}/include ${x_includes} CFLAGS=${INCLUDES} @CFLAGS@ ${EXTRA_DEFINES} --- fvwm95-2.0.43ba.orig/modules/FvwmScroll/Makefile.in +++ fvwm95-2.0.43ba/modules/FvwmScroll/Makefile.in @@ -15,8 +15,8 @@ fvwm_name=@fvwm_name@ # # This is where the modules will be installed -fvwm_dir=@prefix@/lib/X11/@fvwm_name@ -man_dir=@prefix@/man/man1 +fvwm_dir=${prefix}/lib/X11/@fvwm_name@ +man_dir=${prefix}/man/man1 # # Libs @@ -26,7 +26,10 @@ FVWM_LIBRARY=-l${fvwm_name} LIBS=-L${top_srcdir}/libs ${x_libraries} ${FVWM_LIBRARY} ${XPM_LIBRARY} ${XEXT_LIBRARY} ${X_LIBRARY} -EXTRA_DEFINES=-DXPM -DSHAPE +PATH_DEFINES=-DFVWM_ICONDIR=\"${fvwm_icons}\" \ + -DFVWMDIR=\"${fvwm_dir}\" + +EXTRA_DEFINES=-DXPM -DSHAPE ${PATH_DEFINES} -DI18N CC=@CC@ INCLUDES=-I${top_srcdir}/include ${x_includes} CFLAGS=${INCLUDES} @CFLAGS@ ${EXTRA_DEFINES} --- fvwm95-2.0.43ba.orig/modules/FvwmBacker/FvwmBacker.c +++ fvwm95-2.0.43ba/modules/FvwmBacker/FvwmBacker.c @@ -185,7 +185,7 @@ char *cbody; body = NULL; - if(count = ReadFvwmPacket(Fvwm_fd[1],header,&body) > 0) + if((count = ReadFvwmPacket(Fvwm_fd[1],header,&body)) > 0) { ProcessMessage(header[1],body); free(body); @@ -327,10 +327,10 @@ char *temp; int num; temp=string; - while(isspace(*temp)) temp++; + while(isspace((unsigned char)*temp)) temp++; num=atoi(temp); - while(!isspace(*temp)) temp++; - while(isspace(*temp)) temp++; + while(!isspace((unsigned char)*temp)) temp++; + while(isspace((unsigned char)*temp)) temp++; if (DeskCount<1) { commands=(Command*)safemalloc((num+1)*sizeof(Command)); while(DeskCount<num+1) commands[DeskCount++].type= -1; @@ -354,10 +354,10 @@ /* Process a solid color request */ color = &temp[7]; - while (isspace(*color)) + while (isspace((unsigned char)*color)) color++; tmp= color; - while (!isspace(*tmp)) + while (!isspace((unsigned char)*tmp)) tmp++; *tmp = 0; commands[num].type = 1; --- fvwm95-2.0.43ba.orig/modules/FvwmBacker/root_bits.c +++ fvwm95-2.0.43ba/modules/FvwmBacker/root_bits.c @@ -38,6 +38,7 @@ #include <X11/Xutil.h> #include <X11/Xatom.h> #include <stdio.h> +#include <stdlib.h> #include "X11/bitmaps/gray" char *index(); @@ -70,4 +71,5 @@ (ecolor.pixel != WhitePixel(dpy, screen)) && (DefaultVisual(dpy, screen)->class & Dynamic)) return(ecolor.pixel); + return 0; } --- fvwm95-2.0.43ba.orig/modules/FvwmBacker/Makefile.in +++ fvwm95-2.0.43ba/modules/FvwmBacker/Makefile.in @@ -15,8 +15,8 @@ fvwm_name=@fvwm_name@ # # This is where the modules will be installed -fvwm_dir=@prefix@/lib/X11/@fvwm_name@ -man_dir=@prefix@/man/man1 +fvwm_dir=${prefix}/lib/X11/@fvwm_name@ +man_dir=${prefix}/man/man1 # # Libs @@ -26,7 +26,10 @@ FVWM_LIBRARY=-l${fvwm_name} LIBS=-L${top_srcdir}/libs ${x_libraries} ${FVWM_LIBRARY} ${XPM_LIBRARY} ${XEXT_LIBRARY} ${X_LIBRARY} -EXTRA_DEFINES=-DXPM -DSHAPE +PATH_DEFINES=-DFVWM_ICONDIR=\"${fvwm_icons}\" \ + -DFVWMDIR=\"${fvwm_dir}\" + +EXTRA_DEFINES=-DXPM -DSHAPE ${PATH_DEFINES} -DI18N CC=@CC@ INCLUDES=-I${top_srcdir}/include ${x_includes} CFLAGS=${INCLUDES} @CFLAGS@ ${EXTRA_DEFINES} --- fvwm95-2.0.43ba.orig/modules/FvwmTalk/FvwmTalk.c +++ fvwm95-2.0.43ba/modules/FvwmTalk/FvwmTalk.c @@ -396,7 +396,7 @@ if(FD_ISSET(fd[1], &in_fdset)) { - if(count = ReadFvwmPacket(fd[1],header,&body) > 0) + if((count = ReadFvwmPacket(fd[1],header,&body)) > 0) { if(header[1] == M_ERROR) { --- fvwm95-2.0.43ba.orig/modules/FvwmTalk/Makefile.in +++ fvwm95-2.0.43ba/modules/FvwmTalk/Makefile.in @@ -15,8 +15,8 @@ fvwm_name=@fvwm_name@ # # This is where the modules will be installed -fvwm_dir=@prefix@/lib/X11/@fvwm_name@ -man_dir=@prefix@/man/man1 +fvwm_dir=${prefix}/lib/X11/@fvwm_name@ +man_dir=${prefix}/man/man1 # # Libs @@ -26,7 +26,10 @@ FVWM_LIBRARY=-l${fvwm_name} LIBS=-L${top_srcdir}/libs ${x_libraries} ${FVWM_LIBRARY} ${XPM_LIBRARY} ${XEXT_LIBRARY} ${X_LIBRARY} -EXTRA_DEFINES=-DXPM -DSHAPE +PATH_DEFINES=-DFVWM_ICONDIR=\"${fvwm_icons}\" \ + -DFVWMDIR=\"${fvwm_dir}\" + +EXTRA_DEFINES=-DXPM -DSHAPE ${PATH_DEFINES} -DI18N CC=@CC@ INCLUDES=-I${top_srcdir}/include ${x_includes} CFLAGS=${INCLUDES} @CFLAGS@ ${EXTRA_DEFINES} --- fvwm95-2.0.43ba.orig/modules/FvwmAudio/FvwmAudio.c +++ fvwm95-2.0.43ba/modules/FvwmAudio/FvwmAudio.c @@ -62,6 +62,7 @@ #include <fcntl.h> #include <string.h> #include <sys/wait.h> +#include <time.h> #include <sys/time.h> #include <unistd.h> #include <ctype.h> @@ -142,7 +143,7 @@ RPLAY *rplay_table[MAX_MESSAGES+MAX_BUILTIN]; #endif -main(int argc, char **argv) +void main(int argc, char **argv) { char *temp, *s; --- fvwm95-2.0.43ba.orig/modules/FvwmAudio/Makefile.in +++ fvwm95-2.0.43ba/modules/FvwmAudio/Makefile.in @@ -15,8 +15,8 @@ fvwm_name=@fvwm_name@ # # This is where the modules will be installed -fvwm_dir=@prefix@/lib/X11/@fvwm_name@ -man_dir=@prefix@/man/man1 +fvwm_dir=${prefix}/lib/X11/@fvwm_name@ +man_dir=${prefix}/man/man1 # # Libs X_LIBRARY=-lX11 @LIBS@ @@ -26,7 +26,10 @@ RPLAY_LIBRARY= LIBS=-L${top_srcdir}/libs ${x_libraries} ${FVWM_LIBRARY} ${XPM_LIBRARY} ${XEXT_LIBRARY} ${X_LIBRARY} ${RPLAY_LIBRARY} -EXTRA_DEFINES=-DXPM -DSHAPE +PATH_DEFINES=-DFVWM_ICONDIR=\"${fvwm_icons}\" \ + -DFVWMDIR=\"${fvwm_dir}\" + +EXTRA_DEFINES=-DXPM -DSHAPE ${PATH_DEFINES} -DI18N CC=@CC@ INCLUDES=-I${top_srcdir}/include ${x_includes} CFLAGS=${INCLUDES} @CFLAGS@ ${EXTRA_DEFINES} --- fvwm95-2.0.43ba.orig/modules/FvwmIconBox/FvwmIconBox.c +++ fvwm95-2.0.43ba/modules/FvwmIconBox/FvwmIconBox.c @@ -52,12 +52,21 @@ #define FALSE 0 #endif +#ifdef I18N +#include <X11/Xlocale.h> +#endif + #include "FvwmIconBox.h" #include <fvwm/version.h> char *MyName; XFontStruct *font; +#ifdef I18N +XFontSet fontset; +#define XTextWidth(x,y,z) XmbTextEscapement(fontset,y,z) +#define XDrawString(t,u,v,w,x,y,z) XmbDrawString(t,u,fontset,v,w,x,y,z) +#endif Display *dpy; /* which display are we talking to */ int x_fd,fd_width; @@ -169,6 +178,10 @@ char *temp, *s; XIconSize* size; +#ifdef I18N + setlocale(LC_CTYPE, ""); +#endif + temp = argv[0]; s=strrchr(argv[0], '/'); @@ -880,6 +893,12 @@ XGCValues gcv; unsigned long gcm; unsigned long mask; +#ifdef I18N + char **ml; + int mc; + char *ds; + XFontStruct **fs_list; +#endif h_margin = margin1*2 + bar_width + margin2 + 8; v_margin = margin1*2 + bar_width + margin2 + 8; @@ -888,14 +907,21 @@ _XA_WM_PROTOCOLS = XInternAtom (dpy, "WM_PROTOCOLS", False); /* load the font */ - if ((font = XLoadQueryFont(dpy, font_string)) == NULL) +#ifdef I18N + if ((fontset = GetFontSetOrFixed(dpy, font_string)) == NULL) + { + fprintf(stderr,"%s: No fonts available\n",MyName); + exit(1); + } + XFontsOfFontSet(fontset, &fs_list, &ml); + font = fs_list[0]; +#else + if ((font = GetFontOrFixed(dpy, font_string)) == NULL) { - if ((font = XLoadQueryFont(dpy, "fixed")) == NULL) - { fprintf(stderr,"%s: No fonts available\n",MyName); exit(1); - } }; +#endif if ((local_flags & HIDE_H)) v_margin -= bar_width + margin2 + 4; @@ -1435,7 +1461,7 @@ if (strncasecmp(tline,CatString3("*", MyName, "Geometry"),Clength+9)==0){ tmp = &tline[Clength+9]; - while(((isspace(*tmp))&&(*tmp != '\n'))&&(*tmp != 0)) + while(((isspace((unsigned char)*tmp))&&(*tmp != '\n'))&&(*tmp != 0)) tmp++; tmp[strlen(tmp)-1] = 0; flags = XParseGeometry(tmp,&g_x,&g_y,&width,&height); @@ -1454,7 +1480,7 @@ } else if (strncasecmp(tline,CatString3("*", MyName, "MaxIconSize"),Clength+12)==0){ tmp = &tline[Clength+12]; - while(((isspace(*tmp))&&(*tmp != '\n'))&&(*tmp != 0)) + while(((isspace((unsigned char)*tmp))&&(*tmp != '\n'))&&(*tmp != 0)) tmp++; tmp[strlen(tmp)-1] = 0; @@ -1518,7 +1544,7 @@ else if (strncasecmp(tline,CatString3("*",MyName, "Resolution"),Clength+11)==0){ tmp = &tline[Clength+11]; - while(((isspace(*tmp))&&(*tmp != '\n'))&&(*tmp != 0)) + while(((isspace((unsigned char)*tmp))&&(*tmp != '\n'))&&(*tmp != 0)) tmp++; if (strncasecmp(tmp, "Desk", 4) == 0){ m_mask |= M_NEW_DESK; @@ -1533,7 +1559,7 @@ else if (strncasecmp(tline,CatString3("*",MyName, "SortIcons"),Clength+10)==0){ tmp = &tline[Clength+10]; - while(((isspace(*tmp))&&(*tmp != '\n'))&&(*tmp != 0)) + while(((isspace((unsigned char)*tmp))&&(*tmp != '\n'))&&(*tmp != 0)) tmp++; if (strlen(tmp) == 0){ /* the case where no argument is given */ sortby = ICONNAME; @@ -1550,7 +1576,7 @@ }else if (strncasecmp(tline,CatString3("*",MyName, "HideSC"),Clength+7)==0){ tmp = &tline[Clength+7]; - while(((isspace(*tmp))&&(*tmp != '\n'))&&(*tmp != 0)) + while(((isspace((unsigned char)*tmp))&&(*tmp != '\n'))&&(*tmp != 0)) tmp++; if (strncasecmp(tmp, "Horizontal", 10) == 0) local_flags |= HIDE_H; @@ -1603,11 +1629,11 @@ /* file */ /* skip spaces */ - while(isspace(*tline)&&(*tline != '\n')&&(*tline != 0)) + while(isspace((unsigned char)*tline)&&(*tline != '\n')&&(*tline != 0)) tline++; start = tline; end = tline; - while(!isspace(*end)&&(*end != '\n')&&(*end != 0)) + while(!isspace((unsigned char)*end)&&(*end != '\n')&&(*end != 0)) end++; len = end - start; ptr = safemalloc(len+1); @@ -1664,11 +1690,11 @@ f->mouse = 0; /* skip spaces */ - while(isspace(*tline)&&(*tline != '\n')&&(*tline != 0)) + while(isspace((unsigned char)*tline)&&(*tline != '\n')&&(*tline != 0)) tline++; start = tline; end = tline; - while((!isspace(*end))&&(*end!='\n')&&(*end!=0)) + while((!isspace((unsigned char)*end))&&(*end!='\n')&&(*end!=0)) end++; if (strncasecmp(start, "1", 1) == 0) f->mouse = Button1; @@ -1679,11 +1705,11 @@ /* click or doubleclick */ tline = end; /* skip spaces */ - while(isspace(*tline)&&(*tline != '\n')&&(*tline != 0)) + while(isspace((unsigned char)*tline)&&(*tline != '\n')&&(*tline != 0)) tline++; start = tline; end = tline; - while((!isspace(*end))&&(*end!='\n')&&(*end!=0)) + while((!isspace((unsigned char)*end))&&(*end!='\n')&&(*end!=0)) end++; if (strncasecmp(start, "Click", 5) == 0) f->type = CLICK; @@ -1693,13 +1719,13 @@ /* actions */ tline = end; /* skip spaces */ - while(isspace(*tline)&&(*tline != '\n')&&(*tline != 0)) + while(isspace((unsigned char)*tline)&&(*tline != '\n')&&(*tline != 0)) tline++; start = tline; end = tline; tmp = tline; while((*tmp!='\n')&&(*tmp!=0)){ - if (!isspace(*tmp)) + if (!isspace((unsigned char)*tmp)) end = tmp; tmp++; } @@ -1729,11 +1755,11 @@ KeySym keysym; /* skip spaces */ - while(isspace(*tline)&&(*tline != '\n')&&(*tline != 0)) + while(isspace((unsigned char)*tline)&&(*tline != '\n')&&(*tline != 0)) tline++; start = tline; end = tline; - while((!isspace(*end))&&(*end!='\n')&&(*end!=0)) + while((!isspace((unsigned char)*end))&&(*end!='\n')&&(*end!=0)) end++; nlen = end - start; nptr = safemalloc(nlen+1); @@ -1743,13 +1769,13 @@ /* actions */ tline = end; /* skip spaces */ - while(isspace(*tline)&&(*tline != '\n')&&(*tline != 0)) + while(isspace((unsigned char)*tline)&&(*tline != '\n')&&(*tline != 0)) tline++; start = tline; end = tline; tmp = tline; while((*tmp!='\n')&&(*tmp!=0)){ - if (!isspace(*tmp)) + if (!isspace((unsigned char)*tmp)) end = tmp; tmp++; } @@ -1847,7 +1873,7 @@ if(FD_ISSET(fd[1], &in_fdset)) { - if(count = ReadFvwmPacket(fd[1],header,&body) > 0) + if((count = ReadFvwmPacket(fd[1],header,&body)) > 0) { process_message(header[1],body); free(body); @@ -2709,11 +2735,12 @@ char msg[256]; if (event->error_code == BadWindow) - return; + return 0; XGetErrorText(dpy, event->error_code, msg, 256); fprintf(stderr, "Error in %s: %s \n", MyName, msg); fprintf(stderr, "Major opcode of failed request: %d \n", event->request_code); - fprintf(stderr, "Resource id of failed request: 0x%x \n", event->resourceid); + fprintf(stderr, "Resource id of failed request: 0x%lx \n", event->resourceid); + return 0; } --- fvwm95-2.0.43ba.orig/modules/FvwmIconBox/Makefile.in +++ fvwm95-2.0.43ba/modules/FvwmIconBox/Makefile.in @@ -15,8 +15,8 @@ fvwm_name=@fvwm_name@ # # This is where the modules will be installed -fvwm_dir=@prefix@/lib/X11/@fvwm_name@ -man_dir=@prefix@/man/man1 +fvwm_dir=${prefix}/lib/X11/@fvwm_name@ +man_dir=${prefix}/man/man1 # # Libs @@ -26,7 +26,10 @@ FVWM_LIBRARY=-l${fvwm_name} LIBS=-L${top_srcdir}/libs ${x_libraries} ${FVWM_LIBRARY} ${XPM_LIBRARY} ${XEXT_LIBRARY} ${X_LIBRARY} -EXTRA_INCLUDES=-DXPM -DSHAPE +PATH_DEFINES=-DFVWM_ICONDIR=\"${fvwm_icons}\" \ + -DFVWMDIR=\"${fvwm_dir}\" + +EXTRA_INCLUDES=-DXPM -DSHAPE ${PATH_DEFINES} -DI18N CC=@CC@ INCLUDES=-I${top_srcdir}/include ${x_includes} CFLAGS=${INCLUDES} @CFLAGS@ ${EXTRA_INCLUDES} --- fvwm95-2.0.43ba.orig/modules/FvwmSaveDesk/FvwmSaveDesk.c +++ fvwm95-2.0.43ba/modules/FvwmSaveDesk/FvwmSaveDesk.c @@ -262,7 +262,7 @@ for(i=0;i<len;i++) { - if(isspace(line[i])) + if(isspace((unsigned char)line[i])) space = 1; if(line[i]=='\"') qoute = 1; --- fvwm95-2.0.43ba.orig/modules/FvwmSaveDesk/Makefile.in +++ fvwm95-2.0.43ba/modules/FvwmSaveDesk/Makefile.in @@ -15,8 +15,8 @@ fvwm_name=@fvwm_name@ # # This is where the modules will be installed -fvwm_dir=@prefix@/lib/X11/@fvwm_name@ -man_dir=@prefix@/man/man1 +fvwm_dir=${prefix}/lib/X11/@fvwm_name@ +man_dir=${prefix}/man/man1 # # Libs @@ -26,7 +26,10 @@ FVWM_LIBRARY=-l${fvwm_name} LIBS=-L${top_srcdir}/libs ${x_libraries} ${FVWM_LIBRARY} ${XPM_LIBRARY} ${XEXT_LIBRARY} ${X_LIBRARY} -EXTRA_DEFINES=-DXPM -DSHAPE +PATH_DEFINES=-DFVWM_ICONDIR=\"${fvwm_icons}\" \ + -DFVWMDIR=\"${fvwm_dir}\" + +EXTRA_DEFINES=-DXPM -DSHAPE ${PATH_DEFINES} -DI18N CC=@CC@ INCLUDES=-I${top_srcdir}/include ${x_includes} CFLAGS=${INCLUDES} @CFLAGS@ ${EXTRA_DEFINES} --- fvwm95-2.0.43ba.orig/modules/FvwmAuto/Makefile.in +++ fvwm95-2.0.43ba/modules/FvwmAuto/Makefile.in @@ -15,8 +15,8 @@ fvwm_name=@fvwm_name@ # # This is where the modules will be installed -fvwm_dir=@prefix@/lib/X11/@fvwm_name@ -man_dir=@prefix@/man/man1 +fvwm_dir=${prefix}/lib/X11/@fvwm_name@ +man_dir=${prefix}/man/man1 # # Libs @@ -26,7 +26,10 @@ FVWM_LIBRARY=-l${fvwm_name} LIBS=-L${top_srcdir}/libs ${x_libraries} ${FVWM_LIBRARY} ${XPM_LIBRARY} ${XEXT_LIBRARY} ${X_LIBRARY} -EXTRA_DEFINES=-DXPM -DSHAPE +PATH_DEFINES=-DFVWM_ICONDIR=\"${fvwm_icons}\" \ + -DFVWMDIR=\"${fvwm_dir}\" + +EXTRA_DEFINES=-DXPM -DSHAPE ${PATH_DEFINES} -DI18N CC=@CC@ INCLUDES=-I${top_srcdir}/include ${x_includes} CFLAGS=${INCLUDES} @CFLAGS@ ${EXTRA_DEFINES} --- fvwm95-2.0.43ba.orig/modules/FvwmButtons/FvwmButtons.c +++ fvwm95-2.0.43ba/modules/FvwmButtons/FvwmButtons.c @@ -31,6 +31,9 @@ #include <sys/select.h> #endif +#ifdef I18N +#include <X11/Xlocale.h> +#endif #include <X11/keysym.h> #include <X11/Xlib.h> #include <X11/Xutil.h> @@ -146,6 +149,34 @@ } #endif +#ifdef I18N +/* + * fake XFetchName() function + */ +static Status MyXFetchName(dpy, win, winname) +Display *dpy; +Window win; +char **winname; +{ + XTextProperty text; + char **list; + int nitems; + + if (XGetWMName(dpy, win, &text)) { + if (text.value) + text.nitems = strlen(text.value); + if (XmbTextPropertyToTextList(dpy, &text, &list, &nitems) >= Success && + *list) { + *winname = *list; + return 0; + } + return 1; + } + return 0; /* Unsuccessful */ +} +#define XFetchName(x,y,z) MyXFetchName(x,y,z) +#endif + /** *** Some fancy routines straight out of the manual :-) Used in DeadPipe. **/ @@ -187,6 +218,7 @@ MyName,(ushort)b,(ushort)b->IconWin,b->hangon); # endif if(!IsThereADestroyEvent(b)) /* Has someone destroyed it? */ + { if(!(buttonSwallow(b)&b_NoClose)) { if(buttonSwallow(b)&b_Kill) @@ -215,6 +247,7 @@ XResizeWindow(Dpy,b->IconWin,b->w,b->h); XSetWindowBorderWidth(Dpy,b->IconWin,b->bw); } + } # ifdef DEBUG_HANGON else fprintf(stderr,"already handled\n"); @@ -350,6 +383,9 @@ char *temp, *s; button_info *b,*ub; +#ifdef I18N + setlocale(LC_CTYPE, ""); +#endif temp=argv[0]; s=strrchr(argv[0],'/'); if(s) temp=s+1; @@ -615,7 +651,7 @@ stays down until window "identifier" materializes */ i=4; while(act[i]!=0 && act[i]!='"' && - isspace(act[i])) + isspace((unsigned char)act[i])) i++; if(act[i] == '"') { @@ -637,7 +673,7 @@ tmp=mymalloc(strlen(act)); strcpy(tmp,"Exec "); - while(act[i2]!=0 && isspace(act[i2])) + while(act[i2]!=0 && isspace((unsigned char)act[i2])) i2++; strcat(tmp,&act[i2]); MySendText(fd,tmp,0); @@ -782,6 +818,13 @@ { int i,j,x=0,y=0; XFontStruct *font; +#ifdef I18N + char **ml; + int mc; + char *ds; + XFontStruct **fs_list; + XFontSet fontset; +#endif if(!b) return; @@ -838,12 +881,28 @@ if(strncasecmp(b->font_string,"none",4)==0) b->font=NULL; +#ifdef I18N + else if(!(b->fontset=GetFontSetOrFixed(Dpy,b->font_string))) + { + b->font = NULL; + b->flags&=~b_Font; + fprintf(stderr,"%s: Couldn't load fontset %s\n",MyName, + b->font_string); + } + else + { + /* fontset found */ + XFontsOfFontSet(b->fontset, &fs_list, &ml); + b->font = fs_list[0]; + } +#else else if(!(b->font=XLoadQueryFont(Dpy,b->font_string))) { b->flags&=~b_Font; fprintf(stderr,"%s: Couldn't load font %s\n",MyName, b->font_string); } +#endif } if(b->flags&b_Container && b->c->flags&b_Font) @@ -853,6 +912,30 @@ # endif if(strncasecmp(b->c->font_string,"none",4)==0) b->c->font=NULL; +#ifdef I18N + else if(!(b->c->fontset=GetFontSetOrFixed(Dpy,b->c->font_string))) + { + fprintf(stderr,"%s: Couldn't load fontset %s\n",MyName, + b->c->font_string); + if(b==UberButton) + { + if(!(b->c->fontset=XCreateFontSet(Dpy,"fixed",&ml,&mc,&ds))) { + fprintf(stderr,"%s: Couldn't load fontset fixed\n",MyName); + b->c->font = NULL; + } + } + else { + b->c->font = NULL; + b->c->flags&=~b_Font; + } + } + else + { + /* fontset found */ + XFontsOfFontSet(b->c->fontset, &fs_list, &ml); + b->c->font = fs_list[0]; + } +#else else if(!(b->c->font=XLoadQueryFont(Dpy,b->c->font_string))) { fprintf(stderr,"%s: Couldn't load font %s\n",MyName, @@ -865,6 +948,7 @@ else b->c->flags&=~b_Font; } +#endif } @@ -910,7 +994,11 @@ else b->flags&=~b_Icon; +#ifdef I18N + if(b->flags&b_Title && (fontset = buttonFontSet(b)) && (font=buttonFont(b))) +#else if(b->flags&b_Title && (font=buttonFont(b))) +#endif { # ifdef DEBUG_LOADDATA fprintf(stderr,", title \"%s\"",b->title); --- fvwm95-2.0.43ba.orig/modules/FvwmButtons/FvwmButtons.h +++ fvwm95-2.0.43ba/modules/FvwmButtons/FvwmButtons.h @@ -92,6 +92,9 @@ byte xpad,ypad; /* b_Padding */ signed char framew; /* b_Frame */ XFontStruct *font; /* b_Font */ +#ifdef I18N + XFontSet fontset; /* b_Font */ +#endif char *font_string; /* b_Font */ char *back; /* b_Back */ char *fore; /* b_Fore */ @@ -111,6 +114,9 @@ /* conditional fields */ /* applicable if these flags are set */ XFontStruct *font; /* b_Font */ +#ifdef I18N + XFontSet fontset; /* b_Font */ +#endif char *font_string; /* b_Font */ char *back; /* b_Back */ char *fore; /* b_Fore */ @@ -154,6 +160,15 @@ #define abs(a) (((a)>=0)?(a):-(a)) #endif +#ifdef I18N +#ifdef __STDC__ +#define XTextWidth(x,y,z) XmbTextEscapement(x ## set,y,z) +#else +#define XTextWidth(x,y,z) XmbTextEscapement(x/**/set,y,z) +#endif +#define XDrawString(t,u,v,w,x,y,z) XmbDrawString(t,u,fontset,v,w,x,y,z) +#endif + /* -------------------------------- prototypes ----------------------------- */ void AddButtonAction(button_info*,int,char*); void MakeContainer(button_info*); --- fvwm95-2.0.43ba.orig/modules/FvwmButtons/button.c +++ fvwm95-2.0.43ba/modules/FvwmButtons/button.c @@ -156,6 +156,25 @@ return None; } +#ifdef I18N +/** +*** buttonFontSet() +*** Give the font pointer for this button +**/ +XFontSet buttonFontSet(button_info *b) +{ + if(b->flags&b_Font) + return b->fontset; + while((b=b->parent)) + if(b->c->flags&b_Font) + return b->c->fontset; +#ifdef DEBUG + fprintf(stderr,"%s: BUG: No fontset definition?\n",MyName); +#endif + return None; +} +#endif + /** *** buttonFore() *** Give the foreground pixel of this button --- fvwm95-2.0.43ba.orig/modules/FvwmButtons/button.h +++ fvwm95-2.0.43ba/modules/FvwmButtons/button.h @@ -35,6 +35,9 @@ int buttonXPad(button_info*); int buttonYPad(button_info*); XFontStruct *buttonFont(button_info*); +#ifdef I18N +XFontSet buttonFontSet(button_info*); +#endif Pixel buttonFore(button_info*); Pixel buttonBack(button_info*); Pixel buttonHilite(button_info*); --- fvwm95-2.0.43ba.orig/modules/FvwmButtons/draw.c +++ fvwm95-2.0.43ba/modules/FvwmButtons/draw.c @@ -23,6 +23,9 @@ #include <stdlib.h> #include <stdio.h> +#ifdef I18N +#include <X11/Xlocale.h> +#endif #include <X11/Xlib.h> #include <X11/Xutil.h> #include <X11/Xproto.h> @@ -173,6 +176,9 @@ int f,x,y,px,py; int ix,iy,iw,ih; XFontStruct *font=buttonFont(b); +#ifdef I18N + XFontSet fontset = buttonFontSet(b); +#endif XGCValues gcv; unsigned long gcm=0; int rev=0; --- fvwm95-2.0.43ba.orig/modules/FvwmButtons/icons.c +++ fvwm95-2.0.43ba/modules/FvwmButtons/icons.c @@ -61,8 +61,8 @@ if(b->IconWin != None) { - fprintf(stderr,"%s: BUG: Iconwindow already created for 0x%06x!\n", - MyName,(ushort)b); + fprintf(stderr,"%s: BUG: Iconwindow already created for %p!\n", + MyName, b); exit(2); } --- fvwm95-2.0.43ba.orig/modules/FvwmButtons/misc.c +++ fvwm95-2.0.43ba/modules/FvwmButtons/misc.c @@ -153,7 +153,7 @@ *widthp = dwidth; *heightp = dheight; return; -#undef makemult(a,b) +#undef makemult #undef maxAspectX #undef maxAspectY #undef minAspectX --- fvwm95-2.0.43ba.orig/modules/FvwmButtons/output.c +++ fvwm95-2.0.43ba/modules/FvwmButtons/output.c @@ -33,16 +33,16 @@ if(b!=UberButton) { int button=buttonNum(b); - fprintf(stderr,"0x%06x(%ix%i@(%i,%i),0x%04x): ", - (ushort)b,b->BWidth,b->BHeight, + fprintf(stderr,"%p(%ix%i@(%i,%i),0x%04x): ", + b,b->BWidth,b->BHeight, buttonXPos(b,button),buttonYPos(b,button),b->flags); } else - fprintf(stderr,"0x%06x(%ix%i@,0x%04x): ",(ushort)b, + fprintf(stderr,"%p(%ix%i@,0x%04x): ",b, b->BWidth,b->BHeight,b->flags); if(b->flags&b_Font) - fprintf(stderr,"Font(%s,%i) ",b->font_string,(int)b->font); + fprintf(stderr,"Font(%s,%i) ",b->font_string,(int)(b->font)); if(b->flags&b_Padding) fprintf(stderr,"Padding(%i,%i) ",b->xpad,b->ypad); if(b->flags&b_Frame) @@ -79,7 +79,7 @@ b->c->ypad); */ while(i<b->c->num_buttons) - fprintf(stderr,"0x%06x ",(ushort)b->c->buttons[i++]); + fprintf(stderr,"%p ",b->c->buttons[i++]); fprintf(stderr,"}\n"); i=0; while(i<b->c->num_buttons) @@ -137,36 +137,36 @@ if(b->swallow_mask) { fprintf(stderr,"("); - if(b->swallow_mask&b_NoHints) + if(b->swallow_mask&b_NoHints) { if(b->swallow&b_NoHints) fprintf(stderr,"NoHints "); else - fprintf(stderr,"Hints "); - if(b->swallow_mask&b_Kill) + fprintf(stderr,"Hints "); } + if(b->swallow_mask&b_Kill) { if(b->swallow&b_Kill) fprintf(stderr,"Kill "); else - fprintf(stderr,"NoKill "); - if(b->swallow_mask&b_NoClose) + fprintf(stderr,"NoKill "); } + if(b->swallow_mask&b_NoClose) { if(b->swallow&b_NoClose) fprintf(stderr,"NoClose "); else - fprintf(stderr,"Close "); - if(b->swallow_mask&b_Respawn) + fprintf(stderr,"Close "); } + if(b->swallow_mask&b_Respawn) { if(b->swallow&b_Respawn) fprintf(stderr,"Respawn "); else - fprintf(stderr,"NoRespawn "); - if(b->swallow_mask&b_UseOld) + fprintf(stderr,"NoRespawn "); } + if(b->swallow_mask&b_UseOld) { if(b->swallow&b_UseOld) fprintf(stderr,"UseOld "); else - fprintf(stderr,"NoOld "); - if(b->swallow_mask&b_UseTitle) + fprintf(stderr,"NoOld "); } + if(b->swallow_mask&b_UseTitle) { if(b->swallow&b_UseTitle) fprintf(stderr,"UseTitle "); else - fprintf(stderr,"NoTitle "); + fprintf(stderr,"NoTitle "); } fprintf(stderr,") "); } fprintf(stderr,"\"%s\" \"%s\" ",b->hangon,b->spawn); @@ -219,36 +219,36 @@ if(b->c->swallow_mask) { fprintf(stderr,"Swallow ("); - if(b->c->swallow_mask&b_NoHints) + if(b->c->swallow_mask&b_NoHints) { if(b->c->swallow&b_NoHints) fprintf(stderr,"NoHints "); else - fprintf(stderr,"Hints "); - if(b->c->swallow_mask&b_Kill) + fprintf(stderr,"Hints "); } + if(b->c->swallow_mask&b_Kill) { if(b->c->swallow&b_Kill) fprintf(stderr,"Kill "); else - fprintf(stderr,"NoKill "); - if(b->c->swallow_mask&b_NoClose) + fprintf(stderr,"NoKill "); } + if(b->c->swallow_mask&b_NoClose) { if(b->c->swallow&b_NoClose) fprintf(stderr,"NoClose "); else - fprintf(stderr,"Close "); - if(b->c->swallow_mask&b_Respawn) + fprintf(stderr,"Close "); } + if(b->c->swallow_mask&b_Respawn) { if(b->c->swallow&b_Respawn) fprintf(stderr,"Respawn "); else - fprintf(stderr,"NoRespawn "); - if(b->c->swallow_mask&b_UseOld) + fprintf(stderr,"NoRespawn "); } + if(b->c->swallow_mask&b_UseOld) { if(b->c->swallow&b_UseOld) fprintf(stderr,"UseOld "); else - fprintf(stderr,"NoOld "); - if(b->c->swallow_mask&b_UseTitle) + fprintf(stderr,"NoOld "); } + if(b->c->swallow_mask&b_UseTitle) { if(b->c->swallow&b_UseTitle) fprintf(stderr,"UseTitle "); else - fprintf(stderr,"NoTitle "); + fprintf(stderr,"NoTitle "); } fprintf(stderr,") "); } } --- fvwm95-2.0.43ba.orig/modules/FvwmButtons/parse.c +++ fvwm95-2.0.43ba/modules/FvwmButtons/parse.c @@ -63,7 +63,7 @@ else { b=t=*s; - while(**s && !isspace(**s) && **s!=')' && **s!=',') + while(**s && !isspace((unsigned char)**s) && **s!=')' && **s!=',') (*s)++; t=*s; } --- fvwm95-2.0.43ba.orig/modules/FvwmButtons/Makefile.in +++ fvwm95-2.0.43ba/modules/FvwmButtons/Makefile.in @@ -15,8 +15,8 @@ fvwm_name=@fvwm_name@ # # This is where the modules will be installed -fvwm_dir=@prefix@/lib/X11/@fvwm_name@ -man_dir=@prefix@/man/man1 +fvwm_dir=${prefix}/lib/X11/@fvwm_name@ +man_dir=${prefix}/man/man1 # # Libs @@ -26,7 +26,10 @@ FVWM_LIBRARY=-l${fvwm_name} LIBS=-L${top_srcdir}/libs ${x_libraries} ${FVWM_LIBRARY} ${XPM_LIBRARY} ${XEXT_LIBRARY} ${X_LIBRARY} -EXTRA_DEFINES=-DXPM -DSHAPE +PATH_DEFINES=-DFVWM_ICONDIR=\"${fvwm_icons}\" \ + -DFVWMDIR=\"${fvwm_dir}\" + +EXTRA_DEFINES=-DXPM -DSHAPE ${PATH_DEFINES} -DI18N CC=@CC@ INCLUDES=-I${top_srcdir}/include ${x_includes} CFLAGS=${INCLUDES} @CFLAGS@ ${EXTRA_DEFINES} --- fvwm95-2.0.43ba.orig/modules/FvwmDebug/FvwmDebug.c +++ fvwm95-2.0.43ba/modules/FvwmDebug/FvwmDebug.c @@ -62,7 +62,7 @@ } else /* parent */ { - if (waitpid(pid, NULL, WNOHANG) != pid) + if (ReapChildrenPid(pid) != pid) { dup2(PIPE[1], STDOUT_FILENO); dup2(PIPE[1], STDERR_FILENO); @@ -139,7 +139,7 @@ while(1) { - if(count = ReadFvwmPacket(fd[1],header,&body) > 0) + if((count = ReadFvwmPacket(fd[1],header,&body)) > 0) { process_message(header[1],body); free(body); --- fvwm95-2.0.43ba.orig/modules/FvwmDebug/FvwmDebug.h +++ fvwm95-2.0.43ba/modules/FvwmDebug/FvwmDebug.h @@ -38,3 +38,13 @@ #include "../../fvwm/sun_headers.h" #endif +#ifdef HAVE_WAITPID +#define ReapChildrenPid(pid) waitpid(pid, NULL, WNOHANG) +#else +#define ReapChildrenPid(pid) wait4(pid, NULL, WNOHANG, NULL) +#endif + +#ifdef sony_news +typedef int pid_t; +#define setvbuf(a,b,c,d) setlinebuf(a) +#endif --- fvwm95-2.0.43ba.orig/modules/FvwmDebug/Makefile.in +++ fvwm95-2.0.43ba/modules/FvwmDebug/Makefile.in @@ -15,8 +15,8 @@ fvwm_name=@fvwm_name@ # # This is where the modules will be installed -fvwm_dir=@prefix@/lib/X11/@fvwm_name@ -man_dir=@prefix@/man/man1 +fvwm_dir=${prefix}/lib/X11/@fvwm_name@ +man_dir=${prefix}/man/man1 # # Libs @@ -26,7 +26,10 @@ FVWM_LIBRARY=-l${fvwm_name} LIBS=-L${top_srcdir}/libs ${x_libraries} ${FVWM_LIBRARY} ${XPM_LIBRARY} ${XEXT_LIBRARY} ${X_LIBRARY} -EXTRA_DEFINES=-DXPM -DSHAPE +PATH_DEFINES=-DFVWM_ICONDIR=\"${fvwm_icons}\" \ + -DFVWMDIR=\"${fvwm_dir}\" + +EXTRA_DEFINES=-DXPM -DSHAPE ${PATH_DEFINES} -DI18N CC=@CC@ INCLUDES=-I${top_srcdir}/include ${x_includes} CFLAGS=${INCLUDES} @CFLAGS@ ${EXTRA_DEFINES} --- fvwm95-2.0.43ba.orig/modules/FvwmTaskBar/ButtonArray.c +++ fvwm95-2.0.43ba/modules/FvwmTaskBar/ButtonArray.c @@ -14,20 +14,36 @@ * */ +#include <FVWMconfig.h> + #include <stdlib.h> #include <stdio.h> +#include <string.h> #include <X11/Xlib.h> #include <fvwm/fvwmlib.h> #include "ButtonArray.h" #include "Mallocs.h" +#include "FvwmTaskBar.h" + +#ifdef I18N +#ifdef __STDC__ +#define XTextWidth(x,y,z) XmbTextEscapement(x ## set,y,z) +#else +#define XTextWidth(x,y,z) XmbTextEscapement(x/**/set,y,z) +#endif +#define XDrawString(t,u,v,w,x,y,z) XmbDrawString(t,u,fontset,v,w,x,y,z) +#endif extern XFontStruct *ButtonFont, *SelButtonFont; +#ifdef I18N +extern XFontSet ButtonFontset, SelButtonFontset; +#endif extern Display *dpy; extern Window win; extern GC shadow, hilite, graph, whitegc, blackgc, checkered; -extern button_width; +extern int button_width; extern Button *StartButton; @@ -109,6 +125,9 @@ int state, x3p, w3p, newx; int search_len; XFontStruct *font; +#ifdef I18N + XFontSet fontset; +#endif XGCValues gcv; unsigned long gcm; @@ -122,9 +141,23 @@ if (state != BUTTON_UP) { x++; y++; } if (state == BUTTON_BRIGHT || button == StartButton) +#ifdef I18N + { + font = SelButtonFont; + fontset = SelButtonFontset; + } +#else font = SelButtonFont; +#endif else +#ifdef I18N + { + font = ButtonFont; + fontset = ButtonFontset; + } +#else font = ButtonFont; +#endif gcm = GCFont; gcv.font = font->fid; --- fvwm95-2.0.43ba.orig/modules/FvwmTaskBar/ButtonArray.h +++ fvwm95-2.0.43ba/modules/FvwmTaskBar/ButtonArray.h @@ -60,3 +60,4 @@ int *xb, int *yb, char **name, int *trunc); void ArrangeButtonArray(ButtonArray *array); +void ButtonDraw(Button *button, int x, int y, int w, int h); --- fvwm95-2.0.43ba.orig/modules/FvwmTaskBar/CheckLockModule.c +++ fvwm95-2.0.43ba/modules/FvwmTaskBar/CheckLockModule.c @@ -6,11 +6,13 @@ #include <sys/stat.h> #include <X11/X.h> -#include <X11/xpm.h> #include <fvwm/fvwmlib.h> #include "GoodyLoadable.h" +#include "FvwmTaskBar.h" + +#include <X11/xpm.h> /* * Be careful to avoid name collisions. --- fvwm95-2.0.43ba.orig/modules/FvwmTaskBar/FvwmTaskBar.c +++ fvwm95-2.0.43ba/modules/FvwmTaskBar/FvwmTaskBar.c @@ -45,6 +45,9 @@ #include <X11/Xatom.h> #include <X11/Intrinsic.h> #include <X11/cursorfont.h> +#ifdef I18N +#include <X11/Xlocale.h> +#endif #include "../../fvwm/module.h" #include <fvwm/version.h> @@ -85,6 +88,9 @@ Pixel back, fore; GC graph, shadow, hilite, blackgc, whitegc; XFontStruct *ButtonFont, *SelButtonFont; +#ifdef I18N +XFontSet ButtonFontset, SelButtonFontset; +#endif int fontheight; static Atom wm_del_win; Atom MwmAtom = None; @@ -175,6 +181,9 @@ strcat(Module, temp); Clength = strlen(Module); +#ifdef I18N + setlocale(LC_CTYPE, ""); +#endif /* Open the console for messages */ OpenConsole(); @@ -664,7 +673,7 @@ tline = (char *)&body[3]; - while (isspace(*tline))tline++; + while (isspace((unsigned char)*tline))tline++; if (strlen(tline)>1 && tline[0] != '#') { if(strncasecmp(tline, CatString3(Module, "Font",""),Clength+4)==0) CopyString(&font_string,&tline[Clength+4]); @@ -674,7 +683,7 @@ CopyString(&ForeColor,&tline[Clength+4]); else if(strncasecmp(tline,CatString3(Module, "Geometry",""), Clength+8)==0) { str = &tline[Clength+9]; - while(((isspace(*str))&&(*str != '\n'))&&(*str != 0)) str++; + while(((isspace((unsigned char)*str))&&(*str != '\n'))&&(*str != 0)) str++; str[strlen(str)-1] = 0; UpdateString(&geometry,str); } else if(strncasecmp(tline,CatString3(Module, "Back",""), Clength+4)==0) @@ -935,11 +944,12 @@ break; case Expose: - if (Event.xexpose.count == 0) + if (Event.xexpose.count == 0) { if (Event.xexpose.window == Tip.win) redraw = 0; else redraw = 1; + } /* time = ; */ break; @@ -1083,7 +1093,7 @@ { char *temp; temp=string; - while(isspace(*temp)) temp++; + while(isspace((unsigned char)*temp)) temp++; if(strncasecmp(temp, "Click1", 6)==0) CopyString(&ClickAction[0],&temp[6]); else if(strncasecmp(temp, "Click2", 6)==0) @@ -1103,6 +1113,12 @@ XGCValues gcval; unsigned long gcmask; int ret; +#ifdef I18N + char **ml; + int mc; + char *ds; + XFontStruct **fs_list; +#endif if (!(dpy = XOpenDisplay(""))) { fprintf(stderr,"%s: can't open display %s", Module, @@ -1121,18 +1137,29 @@ if (selfont_string == NULL) selfont_string = font_string; - if ((ButtonFont = XLoadQueryFont(dpy, font_string)) == NULL) { - if ((ButtonFont = XLoadQueryFont(dpy, "fixed")) == NULL) { - ConsoleMessage("Couldn't load fixed font, exiting...\n"); - exit(1); - } +#ifdef I18N + if ((ButtonFontset=GetFontSetOrFixed(dpy,font_string)) == NULL) { + ConsoleMessage("Couldn't load Button font. Exiting!\n"); + exit(1); } - if ((SelButtonFont = XLoadQueryFont(dpy, selfont_string)) == NULL) { - if ((SelButtonFont = XLoadQueryFont(dpy, "fixed")) == NULL) { - ConsoleMessage("Couldn't load fixed font, exiting...\n"); - exit(1); - } + XFontsOfFontSet(ButtonFontset,&fs_list,&ml); + ButtonFont = fs_list[0]; + if ((SelButtonFontset=GetFontSetOrFixed(dpy,selfont_string)) == NULL) { + ConsoleMessage("Couldn't load SelButton font. Exiting!\n"); + exit(1); } + XFontsOfFontSet(SelButtonFontset,&fs_list,&ml); + SelButtonFont = fs_list[0]; +#else + if ((ButtonFont = GetFontOrFixed(dpy, font_string)) == NULL) { + ConsoleMessage("Couldn't load fixed font, exiting...\n"); + exit(1); + } + if ((SelButtonFont = GetFontOrFixed(dpy, selfont_string)) == NULL) { + ConsoleMessage("Couldn't load fixed font, exiting...\n"); + exit(1); + } +#endif fontheight = SelButtonFont->ascent + SelButtonFont->descent; @@ -1238,7 +1265,8 @@ XSelectInput(dpy,win,(ExposureMask | KeyPressMask | PointerMotionMask | EnterWindowMask | LeaveWindowMask | - StructureNotifyMask)); + StructureNotifyMask | + ButtonPressMask | ButtonReleaseMask)); /* ResizeRedirectMask | */ ChangeWindowName(&Module[1]); --- fvwm95-2.0.43ba.orig/modules/FvwmTaskBar/FvwmTaskBar.h +++ fvwm95-2.0.43ba/modules/FvwmTaskBar/FvwmTaskBar.h @@ -19,6 +19,8 @@ * as long as the copyright is kept intact. */ #include <fvwm/fvwmlib.h> +#include <X11/Xproto.h> + #include "../../fvwm/fvwm.h" #define F_SWALLOWED 1 --- fvwm95-2.0.43ba.orig/modules/FvwmTaskBar/Goodies.c +++ fvwm95-2.0.43ba/modules/FvwmTaskBar/Goodies.c @@ -4,9 +4,7 @@ #include <fcntl.h> #include <pwd.h> #include <sys/time.h> -#ifdef _AIX #include <time.h> -#endif #include <sys/stat.h> #include <sys/types.h> #include <X11/Xlib.h> @@ -22,6 +20,7 @@ #include "GoodyLoadable.h" #include "Mallocs.h" #include "Colors.h" +#include "FvwmTaskBar.h" int RenewGoodies = 0; @@ -36,6 +35,15 @@ GC statusgc, dategc; XFontStruct *StatusFont; +#ifdef I18N +XFontSet StatusFontset; +#ifdef __STDC__ +#define XTextWidth(x,y,z) XmbTextEscapement(x ## set,y,z) +#else +#define XTextWidth(x,y,z) XmbTextEscapement(x/**/set,y,z) +#endif +#define XDrawString(t,u,v,w,x,y,z) XmbDrawString(t,u,StatusFontset,v,w,x,y,z) +#endif int stwin_width = 100, old_stwin_width = 100, goodies_width = 0; int anymail, unreadmail, newmail, mailcleared = 0; int fontheight, clock_width; @@ -102,13 +110,26 @@ void InitGoodies() { XGCValues gcval; unsigned long gcmask; +#ifdef I18N + char **ml; + int mc; + char *ds; + XFontStruct **fs_list; +#endif - if ((StatusFont = XLoadQueryFont(dpy, statusfont_string)) == NULL) { - if ((StatusFont = XLoadQueryFont(dpy, "fixed")) == NULL) { - ConsoleMessage("Couldn't load fixed font, exiting...\n"); +#ifdef I18N + if ((StatusFontset=GetFontSetOrFixed(dpy,statusfont_string))==NULL) { + ConsoleMessage("Couldn't load statusfont fontset...exiting !\n"); exit(1); - } } + XFontsOfFontSet(StatusFontset,&fs_list,&ml); + StatusFont = fs_list[0]; +#else + if ((StatusFont = GetFontOrFixed(dpy, statusfont_string)) == NULL) { + ConsoleMessage("Couldn't load statusfont font, exiting...\n"); + exit(1); + } +#endif fontheight = StatusFont->ascent + StatusFont->descent; --- fvwm95-2.0.43ba.orig/modules/FvwmTaskBar/Goodies.h +++ fvwm95-2.0.43ba/modules/FvwmTaskBar/Goodies.h @@ -1,7 +1,9 @@ #ifndef __Goodies__ #define __Goodies__ -#define DEFAULT_MAIL_PATH "/var/spool/mail/" +#ifndef DEFAULT_MAIL_PATH +#define DEFAULT_MAIL_PATH "/var/mail/" +#endif #define DEFAULT_BELL_VOLUME 20 /* Tip window types */ @@ -30,6 +32,8 @@ void RedrawTipWindow(); void DestroyTipWindow(); void ShowTipWindow(int open); +void CheckAndShowTipWindow(int tip_type); +void CheckAndDestroyTipWindow(int tip_type); /* void HandleMouseClick(XEvent event); */ #endif --- fvwm95-2.0.43ba.orig/modules/FvwmTaskBar/GoodyLoadable.c +++ fvwm95-2.0.43ba/modules/FvwmTaskBar/GoodyLoadable.c @@ -2,9 +2,11 @@ #include <dlfcn.h> #include <dirent.h> #include <string.h> +#include <stdlib.h> #include <fvwm/fvwmlib.h> #include "GoodyLoadable.h" +#include "FvwmTaskBar.h" #include "Goodies.h" extern int win_width; @@ -141,7 +143,13 @@ #else Handles[HandlesFree] = dlopen(plugin, RTLD_NOW); #endif - if(Handles[HandlesFree] == NULL) return; + if(Handles[HandlesFree] == NULL) { + if (Report) { + printf("FvwmTaskBar.GoodyLoadable.AddHandle(\"%s\"): error\n%s\n", + plugin, dlerror()); + } + return; + } HandlesFree++; if (Report) { printf("FvwmTaskBar.GoodyLoadable.AddHandle(\"%s\"): plugin \"%s\" loaded.\n", --- fvwm95-2.0.43ba.orig/modules/FvwmTaskBar/GoodyModule.c +++ fvwm95-2.0.43ba/modules/FvwmTaskBar/GoodyModule.c @@ -3,11 +3,13 @@ #include <string.h> #include <X11/X.h> -#include <X11/xpm.h> #include <fvwm/fvwmlib.h> #include "GoodyLoadable.h" +#include "FvwmTaskBar.h" + +#include <X11/xpm.h> /* * Be careful to avoid name collisions. --- fvwm95-2.0.43ba.orig/modules/FvwmTaskBar/List.c +++ fvwm95-2.0.43ba/modules/FvwmTaskBar/List.c @@ -17,6 +17,7 @@ #include <stdlib.h> #include "List.h" #include "Mallocs.h" +#include "FvwmTaskBar.h" #include "../../fvwm/module.h" --- fvwm95-2.0.43ba.orig/modules/FvwmTaskBar/MailCheckModule.c +++ fvwm95-2.0.43ba/modules/FvwmTaskBar/MailCheckModule.c @@ -10,10 +10,14 @@ #include <sys/stat.h> #include <X11/X.h> -#include <X11/xpm.h> #include <fvwm/fvwmlib.h> #include "GoodyLoadable.h" +#include "Goodies.h" +#include "Mallocs.h" +#include "FvwmTaskBar.h" + +#include <X11/xpm.h> /* Be careful to avoid name collisions. * It's best to name all symbols used for external reference as @@ -790,6 +794,7 @@ /* assume list is empty */ MailHdr = MailHdr_tail = NULL; + pNew = NULL; /* walk through buffer to extract mail headers */ pLine = GetsBuf(mif->MailBuf); --- fvwm95-2.0.43ba.orig/modules/FvwmTaskBar/Makefile.in +++ fvwm95-2.0.43ba/modules/FvwmTaskBar/Makefile.in @@ -15,8 +15,10 @@ fvwm_name=@fvwm_name@ # # This is where the modules will be installed -fvwm_dir=@prefix@/lib/X11/@fvwm_name@ -man_dir=@prefix@/man/man1 +fvwm_dir=${prefix}/lib/X11/@fvwm_name@ +man_dir=${prefix}/man/man1 +plugins=${fvwm_dir}/plugins +mailpath=/var/spool/mail/ # # Libs @@ -26,10 +28,15 @@ FVWM_LIBRARY=-l${fvwm_name} LIBS=-L${top_srcdir}/libs ${x_libraries} ${FVWM_LIBRARY} ${XPM_LIBRARY} ${XEXT_LIBRARY} ${X_LIBRARY} -ldl -EXTRA_DEFINES=-DXPM -DSHAPE -CC=@CC@ -rdynamic -pipe +PATH_DEFINES=-DFVWM_ICONDIR=\"${fvwm_icons}\" \ + -DFVWMDIR=\"${fvwm_dir}\" \ + -DPLUGINS=\"${plugins}\" + +EXTRA_DEFINES=-DXPM -DSHAPE ${PATH_DEFINES} -DI18N -DDEFAULT_MAIL_PATH=\"${mailpath}\" +CC=@CC@ -pipe INCLUDES=-I${top_srcdir}/include ${x_includes} CFLAGS=${INCLUDES} @CFLAGS@ ${EXTRA_DEFINES} +LDFLAGS= @LDFLAGS@ -rdynamic MAKEDEPEND=@MAKEDEPEND@ INSTALL=@INSTALL@ INSTALL_PROGRAM=@INSTALL_PROGRAM@ @@ -87,16 +94,16 @@ modules: ${MODULES} CheckLockModule.so: CheckLockModule.c GoodyLoadable.h - ${CC} ${INCLUDES} -shared CheckLockModule.c -o CheckLockModule.so + ${CC} ${CFLAGS} -lc -fpic -shared CheckLockModule.c -o CheckLockModule.so GoodyModule.so: GoodyModule.c GoodyLoadable.h - ${CC} ${INCLUDES} -shared GoodyModule.c -o GoodyModule.so + ${CC} ${CFLAGS} -lc -fpic -shared GoodyModule.c -o GoodyModule.so ShowDateModule.so: ShowDateModule.c GoodyLoadable.h - ${CC} ${INCLUDES} -shared ShowDateModule.c -o ShowDateModule.so + ${CC} ${CFLAGS} -lc -fpic -shared ShowDateModule.c -o ShowDateModule.so MailCheckModule.so: MailCheckModule.c GoodyLoadable.h - ${CC} ${INCLUDES} -shared MailCheckModule.c -o MailCheckModule.so + ${CC} ${CFLAGS} -lc -fpic -shared MailCheckModule.c -o MailCheckModule.so ${PROG}: ${OBJS} - ${CC} -o ${PROG} ${OBJS} ${LIBS} + ${CC} -o ${PROG} ${OBJS} ${LIBS} ${LDFLAGS} --- fvwm95-2.0.43ba.orig/modules/FvwmTaskBar/Mallocs.c +++ fvwm95-2.0.43ba/modules/FvwmTaskBar/Mallocs.c @@ -19,6 +19,7 @@ * as long as the copyright is kept intact. */ #include <FVWMconfig.h> +#include <fvwm/fvwmlib.h> #include <stdio.h> #include <stdlib.h> #include <ctype.h> --- fvwm95-2.0.43ba.orig/modules/FvwmTaskBar/ShowDateModule.c +++ fvwm95-2.0.43ba/modules/FvwmTaskBar/ShowDateModule.c @@ -3,6 +3,7 @@ #include <string.h> #include <fcntl.h> #include <pwd.h> +#include <time.h> #include <sys/time.h> #include <sys/stat.h> #include <sys/types.h> @@ -11,13 +12,15 @@ #include <X11/Xlib.h> #include <X11/Xutil.h> #include <X11/extensions/shape.h> -#include <X11/xpm.h> #include <fvwm/fvwmlib.h> #include "Goodies.h" #include "GoodyLoadable.h" +#include "Mallocs.h" +#include "FvwmTaskBar.h" +#include <X11/xpm.h> struct DateInfo { char *id; @@ -130,7 +133,8 @@ if(strncasecmp(tline,CatString3(Module, "ShowDateModuleClockFormat",v->id), Clength+25+strlen(v->id))==0) { UpdateString(&(v->clockfmt), &tline[Clength+26+strlen(v->id)]); - v->clockfmt[strlen(v->clockfmt)-1] = 0; + if(v->clockfmt[strlen(v->clockfmt)-1] == '\n') + v->clockfmt[strlen(v->clockfmt)-1] = 0; return 1; } else if(strncasecmp(tline, CatString3(Module, "ShowDateModuleStatusFont",v->id), Clength+24+strlen(v->id))==0) { --- fvwm95-2.0.43ba.orig/modules/FvwmTaskBar/Start.c +++ fvwm95-2.0.43ba/modules/FvwmTaskBar/Start.c @@ -4,11 +4,22 @@ #include <X11/Xlib.h> #include <fvwm/fvwmlib.h> +#include <stdio.h> #include "ButtonArray.h" +#include "FvwmTaskBar.h" +#include "Mallocs.h" extern Display *dpy; extern Window Root, win; extern XFontStruct *ButtonFont; +#ifdef I18N +extern XFontSet ButtonFontset; +#ifdef __STDC__ +#define XTextWidth(x,y,z) XmbTextEscapement(x ## set,y,z) +#else +#define XTextWidth(x,y,z) XmbTextEscapement(x/**/set,y,z) +#endif +#endif extern int Clength; extern char *PixmapPath; extern char *IconPath; --- fvwm95-2.0.43ba.orig/modules/FvwmConsole/getline.c +++ fvwm95-2.0.43ba/modules/FvwmConsole/getline.c @@ -19,6 +19,7 @@ #else /* readline - starts here */ #include <readline/readline.h> +#include <readline/history.h> char *getline() { static char *line; --- fvwm95-2.0.43ba.orig/modules/FvwmConsole/FvwmConsole.c +++ fvwm95-2.0.43ba/modules/FvwmConsole/FvwmConsole.c @@ -13,12 +13,12 @@ int fd[2]; /* pipe to fvwm */ FILE *sp; -int s,ns; /* socket handles */ +int tocfd[2], fromcfd[2]; /* to/from client pipes */ char name[32]; /* name of this program in executable format */ int pid; /* server routine child process id */ -void server(int *fd); -void GetResponse(); +void server(int *fd, int to, int from); +void GetResponse(int toc); void DeadPipe(); void CloseSocket(); void ErrMsg( char *msg ); @@ -28,10 +28,14 @@ void main(int argc, char **argv){ char *tmp, *s; - static char client[120]; + char *client = NULL; char **eargv; + char tocfdrname[10]; + char fromcfdwname[10]; + char errordupfd[10]; int i,j; char *xterm_a[] = {"-title", name,"-name",name, "-e",client,NULL }; +#define client_loc 5 /* initially no child */ pid = 0; @@ -43,15 +47,18 @@ if (s != NULL) tmp = s + 1; - strcpy( name, tmp ); + strncpy( name, tmp , 32); + name[31] = '\0'; MyName = safemalloc(strlen(tmp)+2); strcpy(MyName,"*"); strcat(MyName, tmp); /* construct client's name */ + client = safemalloc(strlen(argv[0])+2); strcpy( client, argv[0] ); strcat( client, "C" ); + xterm_a[client_loc] = client; if(argc < FARGS) { fprintf(stderr,"%s Version %s should only be executed by fvwm!\n", @@ -59,7 +66,7 @@ exit(1); } - if( ( eargv =(char **)safemalloc((argc-FARGS+XARGS)*sizeof(char *)) ) == NULL ) { + if( ( eargv =(char **)safemalloc((argc-FARGS+XARGS+FCARGS-1)*sizeof(char *)) ) == NULL ) { ErrMsg( "allocation" ); } @@ -73,23 +80,40 @@ for ( i=0 ; xterm_a[i] != NULL ; j++, i++ ) { eargv[j] = xterm_a[i]; } + /* Make pipes to/from client */ + if (pipe(tocfd) == -1) { ErrMsg("pipe"); } + if (pipe(fromcfd) == -1) { ErrMsg("pipe"); } + /* Add client arguments */ + sprintf(tocfdrname, "%d", tocfd[0]); + eargv[j] = tocfdrname; j++; + sprintf(fromcfdwname, "%d", fromcfd[1]); + eargv[j] = fromcfdwname; j++; + eargv[j] = errordupfd; j++; eargv[j] = NULL; - /* Dead pipes mean fvwm died */ + /* Dead pipes mean fvwm or client died */ signal (SIGPIPE, DeadPipe); signal (SIGINT, SigHandler); signal (SIGQUIT, SigHandler); + signal (SIGCHLD, SigHandler); fd[0] = atoi(argv[1]); fd[1] = atoi(argv[2]); /* launch xterm with client */ if( fork() == 0 ) { + close(tocfd[1]); + close(fromcfd[0]); + close(fd[0]); + close(fd[1]); + sprintf(errordupfd, "%d", dup(2)); execvp( *eargv, eargv ); ErrMsg("exec"); } + close(tocfd[0]); + close(fromcfd[1]); - server(fd); + server(fd, tocfd[1], fromcfd[0]); } /*********************************************************************** @@ -113,82 +137,46 @@ if( pid ) { kill( pid, SIGKILL ); } - close(ns); /* remove the socket */ - fclose(sp); - unlink( S_NAME ); + close(tocfd[1]); + close(fromcfd[0]); } /*********************************************************/ /* setup server and communicate with fvwm and the client */ /*********************************************************/ -void server (int *fd) { - struct sockaddr_un sas, csas; - int len, clen; /* length of sockaddr */ +void server (int *fd, int toclient, int fromclient) { char buf[BUFSIZE]; /* command line buffer */ - - /* make a socket */ - if( (s = socket(AF_UNIX, SOCK_STREAM, 0 )) < 0 ) { - ErrMsg( "socket"); - exit(1); - } - - /* name the socket */ - sas.sun_family = AF_UNIX; - strcpy( sas.sun_path, S_NAME ); - - /* bind the above name to the socket */ - /* first, erase the old socket */ - unlink( S_NAME ); - len = sizeof( sas.sun_family) + strlen( sas.sun_path ); - - if( bind(s, &sas,len) < 0 ) { - ErrMsg( "bind" ); - exit(1); - } - - /* listen to the socket */ - /* set backlog to 5 */ - if ( listen(s,5) < 0 ) { - ErrMsg( "listen" ); - exit(1); - } - - /* accept connections */ - clen = sizeof(csas); - if(( ns = accept(s, &csas, &clen)) < 0 ) { - ErrMsg( "accept"); - exit(1); - } + FILE *inf; /* get command from client and return result */ - sp = fdopen( ns, "r" ); pid = fork(); if( pid == -1 ) { ErrMsg( "fork"); exit(1); } if( pid == 0 ) { - while(fgets( buf, BUFSIZE, sp )) { - - /* check if client is terminated */ - if( buf == NULL ) { - break; - } + inf = fdopen(fromclient , "r" ); + close(toclient); + while(fgets( buf, BUFSIZE, inf )) { + /* strip trailing newline */ + if (buf[strlen(buf)-1] == '\n') buf[strlen(buf)-1] = '\0'; SendText(fd,buf,0); /* send command */ } CloseSocket(); kill( getppid(), SIGQUIT); exit(0); - } - while(1) { - GetResponse(); + } else { + close(fromclient); + while(1) { + GetResponse(toclient); + } } } /**********************************************/ /* read fvwm packet and pass it to the client */ /**********************************************/ -void GetResponse() { +void GetResponse(int toclient) { fd_set in_fdset; unsigned long *body; unsigned long header[HEADER_SIZE]; @@ -199,7 +187,7 @@ /* ignore anything but error message */ if( ReadFvwmPacket(fd[1],header,&body) > 0) { if(header[1] == M_PASS) { - send( ns, (char *)&body[3], strlen((char *)&body[3]), 0 ); + write( toclient, (char *)&body[3], strlen((char *)&body[3])); } free(body); } --- fvwm95-2.0.43ba.orig/modules/FvwmConsole/FvwmConsoleC.c +++ fvwm95-2.0.43ba/modules/FvwmConsole/FvwmConsoleC.c @@ -1,7 +1,8 @@ #include "FvwmConsole.h" -int s; /* socket handle */ -FILE *sp; +int infd, outfd; /* socket handle */ +int errorfd; +FILE *inf, *errorf; char *name; /* name of this program at executing time */ char *getline(); @@ -9,8 +10,9 @@ /******************************************/ /* close socket and exit */ /******************************************/ -void sclose () { - fclose(sp); +void dofclose () { + fclose(inf); + close(outfd); exit(0); } @@ -18,8 +20,12 @@ /* print error message on stderr */ /************************************/ void ErrMsg( char *msg ) { - fprintf( stderr, "%s error in %s\n", name , msg ); - fclose(sp); + fprintf( stderr, "%s error in %s:%s\n", name , msg , strerror(errno)); + if (errorf != NULL ) + fprintf( errorf, "%s error in %s:%s\n", name , msg , strerror(errno)); + sleep(30); + fclose(inf); + close(outfd); exit(1); } @@ -32,39 +38,42 @@ char *cmd; unsigned char data[BUFSIZE]; int len; /* length of socket address */ - struct sockaddr_un sas; int clen; /* command length */ int pid; /* child process id */ - signal (SIGINT, sclose); - signal (SIGQUIT, sclose); - + signal (SIGCHLD, dofclose); + signal (SIGINT, dofclose); + signal (SIGQUIT, dofclose); + signal (SIGPIPE, dofclose); + + if (argc == 0) {exit(1);} + if (argc != FCARGS) { + fprintf(stderr, "%s intended to be invoked by FvwmConsole only.\n", + argv[0]); + sleep(30); + exit(1); + } name=strrchr(argv[0], '/'); if (name != NULL) { name++; + } else { + name = argv[0]; } - /* make a socket */ - if( (s = socket(AF_UNIX, SOCK_STREAM, 0)) < 0 ) { - ErrMsg ("socket"); - } + infd = atoi(argv[1]); + outfd = atoi(argv[2]); + errorfd = atoi(argv[3]); + errorf = fdopen(errorfd, "w"); - /* name the socket and obtain the size of it*/ - sas.sun_family = AF_UNIX; - strcpy( sas.sun_path, S_NAME ); - len = sizeof(sas.sun_family) + strlen(sas.sun_path); - - if( connect( s, &sas, len )< 0 ) { - ErrMsg( "connect" ); - } - - sp = fdopen( s, "r" ); + inf = fdopen( infd, "r" ); + if (inf == NULL) { ErrMsg("fdopen"); } pid = fork(); if( pid == -1 ) { ErrMsg( "fork"); } - if( pid == 0 ) { + if( pid == 0 ) { /* child */ + fclose(inf); /* loop of get user's command and send it to server */ while( 1 ) { @@ -74,23 +83,27 @@ } clen = strlen(cmd); - if( clen == 1 ) { + if( clen <= 1 ) { continue; /* empty line */ } /* send the command to the server */ - send( s, cmd, strlen(cmd), 0 ); + if (write( outfd, cmd, strlen(cmd) ) == -1) { ErrMsg( "write" ); } } - kill( getppid(), SIGKILL ); - sclose(); - } - while( fgets( data, BUFSIZE, sp ) ) { + kill( getppid(), SIGQUIT ); + dofclose(); + } else { /* parent */ + close(outfd); + while( fgets( data, BUFSIZE, inf ) ) { /* get the response */ if( *data == '\0' ) { break; } printf( "%s",data ); + } + kill( pid, SIGQUIT ); + dofclose(); } } --- fvwm95-2.0.43ba.orig/modules/FvwmConsole/FvwmConsole.h +++ fvwm95-2.0.43ba/modules/FvwmConsole/FvwmConsole.h @@ -10,6 +10,7 @@ #include <unistd.h> #include <ctype.h> #include <stdlib.h> +#include <errno.h> #include <stdio.h> #include <sys/time.h> @@ -42,3 +43,4 @@ #define FARGS 6 #define XTERM "xterm" +#define FCARGS 4 --- fvwm95-2.0.43ba.orig/modules/FvwmConsole/Makefile.in +++ fvwm95-2.0.43ba/modules/FvwmConsole/Makefile.in @@ -15,8 +15,8 @@ fvwm_name=@fvwm_name@ # # This is where the modules will be installed -fvwm_dir=@prefix@/lib/X11/@fvwm_name@ -man_dir=@prefix@/man/man1 +fvwm_dir=${prefix}/lib/X11/@fvwm_name@ +man_dir=${prefix}/man/man1 # # Libs @@ -27,7 +27,7 @@ LIBS=-L${top_srcdir}/libs ${x_libraries} ${FVWM_LIBRARY} ${XPM_LIBRARY} ${XEXT_LIBRARY} ${X_LIBRARY} PATH_DEFINES = -DFVWMDIR=\"${fvwm_dir}\" -EXTRA_DEFINES=${PATH_DEFINES} -DXPM -DSHAPE +EXTRA_DEFINES=${PATH_DEFINES} -DXPM -DSHAPE -DI18N CC=@CC@ INCLUDES=-I${top_srcdir}/include ${x_includes} @@ -37,6 +37,7 @@ INSTALL_PROGRAM=@INSTALL_PROGRAM@ INSTALL_DATA=@INSTALL_DATA@ RM=@RM@ +READLINE_LIBRARIES=@READLINE_LIBRARIES@ PROG=FvwmConsole PROGC=FvwmConsoleC @@ -57,7 +58,7 @@ ${INSTALL_DATA} ${PROG}.man ${man_dir}/${PROG}.1 clean: - ${RM} ${PROG} ${OBJS} *~ core *.bak + ${RM} ${PROG} ${OBJS} ${PROGC} ${OBJSC} *~ core *.bak distclean: clean @@ -66,5 +67,4 @@ ${CC} -o ${PROG} ${OBJS} ${LIBS} ${PROGC}: ${OBJSC} - ${CC} -o ${PROGC} ${OBJSC} ${LIBS} - + ${CC} -o ${PROGC} ${OBJSC} ${LIBS} ${READLINE_LIBRARIES} --- fvwm95-2.0.43ba.orig/modules/FvwmIconMan/FvwmIconMan.c +++ fvwm95-2.0.43ba/modules/FvwmIconMan/FvwmIconMan.c @@ -1,5 +1,6 @@ #include "FvwmIconMan.h" #include "../../fvwm/module.h" +#include <fvwm/fvwmlib.h> static int fd_width; static FILE *console = NULL; @@ -320,11 +321,11 @@ int id = manager; \ if (id == -1) { \ for (id = 0; id < globals.num_managers; id++) { \ - globals.managers[id].##field = value; \ + globals.managers[id]. field = value; \ } \ } \ else if (id < globals.num_managers) { \ - globals.managers[id].##field = value; \ + globals.managers[id]. field = value; \ } \ else { \ ConsoleMessage ("Internal error in SET_MANAGER: %d\n", id); \ @@ -336,7 +337,7 @@ char *p, *q; int i, n, manager; char *option1; - Resolution r; + Resolution r = SHOW_GLOBAL; ButtonState state; if (!init_config_file (file)) @@ -659,6 +660,10 @@ char *temp, *s; FvwmPacketBody temppacket; +#ifdef I18N + setlocale(LC_CTYPE, ""); +#endif + if ((char *)&temppacket.add_config_data.window_gravity - (char *)&temppacket != 21 * sizeof (long)) { fprintf (stderr, "Bad packet structure. Can't run. Sorry\n"); @@ -690,7 +695,7 @@ read_in_resources (argv[3]); assert (globals.managers); - fd_width = sysconf(_SC_OPEN_MAX); + fd_width = GetFdWidth(); SetMessageMask(Fvwm_fd,M_CONFIGURE_WINDOW | M_RES_CLASS | M_RES_NAME | M_ADD_WINDOW | M_DESTROY_WINDOW | M_ICON_NAME | --- fvwm95-2.0.43ba.orig/modules/FvwmIconMan/xmanager.c +++ fvwm95-2.0.43ba/modules/FvwmIconMan/xmanager.c @@ -1,4 +1,5 @@ #include "FvwmIconMan.h" +#include <fvwm/fvwmlib.h> #define FONT_STRING "8x13" #define WIN_WIDTH 12 @@ -305,6 +306,7 @@ break; case BUTTON_DOWN: + default: context1 = man->shadowContext[contextId]; context2 = man->reliefContext[contextId]; break; @@ -701,6 +703,12 @@ int i, val, x, y; unsigned int width, height; WinManager *man; +#ifdef I18N + char **ml; + int mc; + char *ds; + XFontStruct **fs_list; +#endif ConsoleDebug ("In init_window\n"); @@ -716,6 +724,15 @@ man->cursor_in_window = 0; if (man->fontname) { +#ifdef I18N + man->ButtonFontset = GetFontSetOrFixed (theDisplay, man->fontname); + if (!man->ButtonFontset) { + ConsoleMessage ("Can't get fontset\n"); + ShutMeDown (1); + } + XFontsOfFontSet(man->ButtonFontset,&fs_list,&ml); + man->ButtonFont = fs_list[0]; +#else man->ButtonFont = XLoadQueryFont (theDisplay, man->fontname); if (!man->ButtonFont) { if (!(man->ButtonFont = XLoadQueryFont (theDisplay, FONT_STRING))) { @@ -723,12 +740,22 @@ ShutMeDown (1); } } +#endif } else { +#ifdef I18N + if (!(man->ButtonFontset = GetFontSetOrFixed (theDisplay, FONT_STRING))) { + ConsoleMessage ("Can't get fontset\n"); + ShutMeDown (1); + } + XFontsOfFontSet(man->ButtonFontset,&fs_list,&ml); + man->ButtonFont = fs_list[0]; +#else if (!(man->ButtonFont = XLoadQueryFont (theDisplay, FONT_STRING))) { ConsoleMessage ("Can't get font\n"); ShutMeDown (1); } +#endif } for ( i = 0; i < NUM_CONTEXTS; i++ ) { --- fvwm95-2.0.43ba.orig/modules/FvwmIconMan/FvwmIconMan.h +++ fvwm95-2.0.43ba/modules/FvwmIconMan/FvwmIconMan.h @@ -17,6 +17,10 @@ #include <X11/Intrinsic.h> #include <X11/cursorfont.h> #include <X11/keysym.h> +#ifdef I18N +#include <X11/Xlocale.h> +#define XDrawString(t,u,v,w,x,y,z) XmbDrawString(t,u,man->ButtonFontset,v,w,x,y,z) +#endif #if defined ___AIX || defined _AIX || defined __QNX__ || defined ___AIXV3 || defined AIXV3 || defined _SEQUENT_ #include <sys/select.h> @@ -190,6 +194,9 @@ reliefContext[NUM_CONTEXTS]; GC shadowContext[NUM_CONTEXTS], flatContext[NUM_CONTEXTS]; XFontStruct *ButtonFont; +#ifdef I18N + XFontSet ButtonFontset; +#endif int fontheight, boxheight; int win_width, win_height; int win_x, win_y, win_title, win_border; --- fvwm95-2.0.43ba.orig/modules/FvwmIconMan/Makefile.in +++ fvwm95-2.0.43ba/modules/FvwmIconMan/Makefile.in @@ -15,8 +15,8 @@ fvwm_name=@fvwm_name@ # # This is where the modules will be installed -fvwm_dir=@prefix@/lib/X11/@fvwm_name@ -man_dir=@prefix@/man/man1 +fvwm_dir=${prefix}/lib/X11/@fvwm_name@ +man_dir=${prefix}/man/man1 # # Libs @@ -27,7 +27,7 @@ LIBS=-L${top_srcdir}/libs ${x_libraries} ${FVWM_LIBRARY} ${XPM_LIBRARY} ${XEXT_LIBRARY} ${X_LIBRARY} PATH_DEFINES = -DFVWMDIR=\"${fvwm_dir}\" -EXTRA_DEFINES=${PATH_DEFINES} -DXPM -DSHAPE +EXTRA_DEFINES=${PATH_DEFINES} -DXPM -DSHAPE -DI18N CC=@CC@ INCLUDES=-I${top_srcdir}/include ${x_includes} --- fvwm95-2.0.43ba.orig/modules/Makefile.in +++ fvwm95-2.0.43ba/modules/Makefile.in @@ -9,7 +9,7 @@ FvwmCpp FvwmDebug FvwmForm FvwmIconBox FvwmIconMan FvwmIdent FvwmM4 \ FvwmPager FvwmSave FvwmSaveDesk FvwmScript FvwmScroll FvwmTalk \ FvwmTaskBar FvwmWinList FvwmWharf -modules_dir=@prefix@/lib/X11/@fvwm_name@ +modules_dir=${prefix}/lib/X11/@fvwm_name@ all: @for i in ${subdirs}; do \ --- fvwm95-2.0.43ba.orig/modules/FvwmScript/FvwmScript.c +++ fvwm95-2.0.43ba/modules/FvwmScript/FvwmScript.c @@ -88,7 +88,7 @@ yyparse(); /* Fermeture du script */ - close((int)yyin); + fclose(yyin); } /* Quitter par l'option Delete du bouton de la fenetre */ --- fvwm95-2.0.43ba.orig/modules/FvwmScript/Scripts/some_nice_icons/Makefile.in +++ fvwm95-2.0.43ba/modules/FvwmScript/Scripts/some_nice_icons/Makefile.in @@ -2,7 +2,7 @@ SHELL=/bin/sh prefix=@prefix@ -icon_dir=@prefix@/lib/X11/icons +icon_dir=${prefix}/lib/X11/icons INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ --- fvwm95-2.0.43ba.orig/modules/FvwmScript/Scripts/Makefile.in +++ fvwm95-2.0.43ba/modules/FvwmScript/Scripts/Makefile.in @@ -2,7 +2,7 @@ SHELL=/bin/sh prefix=@prefix@ -fvwm_dir=@prefix@/lib/X11/@fvwm_name@ +fvwm_dir=${prefix}/lib/X11/@fvwm_name@ INSTALL = @INSTALL@ --- fvwm95-2.0.43ba.orig/modules/FvwmScript/Makefile.in +++ fvwm95-2.0.43ba/modules/FvwmScript/Makefile.in @@ -15,8 +15,8 @@ fvwm_name=@fvwm_name@ # # This is where the modules will be installed -fvwm_dir=@prefix@/lib/X11/@fvwm_name@ -man_dir=@prefix@/man/man1 +fvwm_dir=${prefix}/lib/X11/@fvwm_name@ +man_dir=${prefix}/man/man1 # # Libs @@ -27,7 +27,10 @@ LOCAL_LIBRARY = ./Widgets/libWidgets.a LIBS=-L${top_srcdir}/libs ${x_libraries} ${FVWM_LIBRARY} ${XPM_LIBRARY} ${XEXT_LIBRARY} ${X_LIBRARY} ${LOCAL_LIBRARY} -EXTRA_DEFINES=-DXPM -DSHAPE +PATH_DEFINES=-DFVWM_ICONDIR=\"${fvwm_icons}\" \ + -DFVWMDIR=\"${fvwm_dir}\" + +EXTRA_DEFINES=-DXPM -DSHAPE ${PATH_DEFINES} -DI18N CC=@CC@ INCLUDES=-I${top_srcdir}/include ${x_includes} CFLAGS=${INCLUDES} @CFLAGS@ ${EXTRA_DEFINES} --- fvwm95-2.0.43ba.orig/modules/FvwmWharf/Wharf.h +++ fvwm95-2.0.43ba/modules/FvwmWharf/Wharf.h @@ -73,7 +73,7 @@ char *file; short w, h; Pixmap icon, mask; - char depth; + signed char depth; } icon_info; struct button_info --- fvwm95-2.0.43ba.orig/modules/FvwmWharf/FvwmWharf.c +++ fvwm95-2.0.43ba/modules/FvwmWharf/FvwmWharf.c @@ -49,6 +49,7 @@ #include <string.h> #include <sys/wait.h> #include <sys/time.h> +#include <time.h> #if defined ___AIX || defined _AIX || defined __QNX__ || defined ___AIXV3 || defined AIXV3 || defined _SEQUENT_ #include <sys/select.h> #endif @@ -449,6 +450,7 @@ time_t t, tl = (time_t) 0; int CancelPush=0; + i=j=-10; while(1) { if(My_XNextEvent(dpy,&Event)) --- fvwm95-2.0.43ba.orig/modules/FvwmWharf/stepgfx.c +++ fvwm95-2.0.43ba/modules/FvwmWharf/stepgfx.c @@ -65,9 +65,9 @@ rv += sr; gv += sg; bv += sb; - rv = ((rv > 65535.0) || (rv < 0.0)) ? rv -= sr : rv; - gv = ((gv > 65535.0) || (gv < 0.0)) ? gv -= sg : gv; - bv = ((bv > 65535.0) || (bv < 0.0)) ? bv -= sb : bv; + rv = ((rv > 65535.0) || (rv < 0.0)) ? rv - sr : rv; + gv = ((gv > 65535.0) || (gv < 0.0)) ? gv - sg : gv; + bv = ((bv > 65535.0) || (bv < 0.0)) ? bv - sb : bv; } /* allocate 2 colors for the bevel */ if (alloc_relief) { @@ -196,6 +196,7 @@ c1 = ((float)maxcols/2.0)*((float)py/(float)((h-pd*2)-1)); j = -1; k=pd+x; + i = (int)c1; for(px = pd+x; px < w-pd+x; px++) { i = (int)c1; if (i>=maxcols) i=maxcols-1; --- fvwm95-2.0.43ba.orig/modules/FvwmWharf/Makefile.in +++ fvwm95-2.0.43ba/modules/FvwmWharf/Makefile.in @@ -15,8 +15,8 @@ fvwm_name=@fvwm_name@ # # This is where the modules will be installed -fvwm_dir=@prefix@/lib/X11/@fvwm_name@ -man_dir=@prefix@/man/man1 +fvwm_dir=${prefix}/lib/X11/@fvwm_name@ +man_dir=${prefix}/man/man1 # # Libs @@ -26,7 +26,10 @@ FVWM_LIBRARY=-l${fvwm_name} LIBS=-L${top_srcdir}/libs ${x_libraries} ${FVWM_LIBRARY} ${XPM_LIBRARY} ${XEXT_LIBRARY} ${X_LIBRARY} -EXTRA_DEFINES=-DXPM -DSHAPE +PATH_DEFINES=-DFVWM_ICONDIR=\"${fvwm_icons}\" \ + -DFVWMDIR=\"${fvwm_dir}\" + +EXTRA_DEFINES=-DXPM -DSHAPE ${PATH_DEFINES} -DI18N CC=@CC@ INCLUDES=-I${top_srcdir}/include ${x_includes} CFLAGS=${INCLUDES} @CFLAGS@ ${EXTRA_DEFINES} --- fvwm95-2.0.43ba.orig/xpmroot/xpmroot.c +++ fvwm95-2.0.43ba/xpmroot/xpmroot.c @@ -9,6 +9,7 @@ #include <FVWMconfig.h> #include <stdio.h> +#include <stdlib.h> #include <signal.h> #include <string.h> #include <X11/Xos.h> --- fvwm95-2.0.43ba.orig/xpmroot/Makefile.in +++ fvwm95-2.0.43ba/xpmroot/Makefile.in @@ -11,7 +11,7 @@ x_includes=@x_includes@ x_libraries=@x_libraries@ -man_dir=@prefix@/man/man1 +man_dir=${prefix}/man/man1 XPM_LIBRARY=-lXpm X_LIBRARY=-lX11 @LIBS@ --- fvwm95-2.0.43ba.orig/fvwm/add_window.c +++ fvwm95-2.0.43ba/fvwm/add_window.c @@ -99,6 +99,13 @@ XrmValue rm_value; XTextProperty text_prop; extern Bool PPosOverride; +#ifdef I18N + Atom actual_type; + int actual_format; + unsigned long nitems, bytesafter; + char **list; + int num; +#endif NeedToResizeToo = False; /* allocate space for the fvwm window */ @@ -123,15 +130,82 @@ } if ( XGetWMName(dpy, tmp_win->w, &text_prop) != 0 ) { +#ifdef I18N + if (text_prop.value) text_prop.nitems = strlen(text_prop.value); + if (XmbTextPropertyToTextList(dpy, &text_prop, &list, &num) >= Success + && num > 0 && *list) +#ifndef EVIL + { + tmp_win->name = *list; + tmp_win->realname = *list; + } + else + { + tmp_win->name = NoName; + tmp_win->realname = NoName; + } +#else /* EVIL */ + { + tmp_win->name = *list; + tmp_win->realname = *list; + if((tmp_win->name != NULL) && (strcmp(tmp_win->name, "")==0)) { + XGetWMName(dpy, tmp_win->w, &text_prop); + tmp_win->name = (char *)text_prop.value ; + tmp_win->realname = (char *)text_prop.value ; + } + } + else + { + XGetWMName(dpy, tmp_win->w, &text_prop); + tmp_win->name = (char *)text_prop.value ; + tmp_win->realname = (char *)text_prop.value ; + } +#endif /* EVIL */ +#else /* I18N */ tmp_win->name = (char *)text_prop.value; tmp_win->realname = (char *)text_prop.value; +#endif /* I18N */ } else { tmp_win->name = NoName; tmp_win->realname = NoName; } +#ifdef I18N + if (XGetWindowProperty(dpy, tmp_win->w, XA_WM_ICON_NAME, 0L, 200L, False, + AnyPropertyType, &actual_type, &actual_format, &nitems, + &bytesafter,(unsigned char **)&tmp_win->icon_name) + == Success && actual_type != None) { + text_prop.value = tmp_win->icon_name; + text_prop.encoding = actual_type; + text_prop.format = actual_format; + text_prop.nitems = nitems; + if (XmbTextPropertyToTextList(dpy, &text_prop, &list, &num) >= Success + && num > 0 && *list) +#ifndef EVIL + tmp_win->icon_name = *list; + else + tmp_win->icon_name = NULL; +#else /* EVIL */ + { + tmp_win->icon_name = *list; + if((tmp_win->icon_name != NULL) && (strcmp(tmp_win->icon_name, "")==0)) { + XGetWMIconName (dpy, tmp_win->w, &text_prop); + tmp_win->icon_name = (char *) text_prop.value; + } + } + else + { + XGetWMIconName (dpy, tmp_win->w, &text_prop); + tmp_win->icon_name = (char *)text_prop.value ; + } +#endif /* EVIL */ + } + else + tmp_win->icon_name = NULL; +#else /* I18N */ XGetWMIconName (dpy, tmp_win->w, &text_prop); tmp_win->icon_name = (char *) text_prop.value; +#endif /* I18N */ if (tmp_win->icon_name != (char *)NULL) tmp_win->realname = tmp_win->icon_name; @@ -481,7 +555,34 @@ XChangeWindowAttributes (dpy, tmp_win->w, valuemask, &attributes); if ( XGetWMName(dpy, tmp_win->w, &text_prop) != 0 ) +#ifdef I18N + { + if (text_prop.value) text_prop.nitems = strlen(text_prop.value); + if (XmbTextPropertyToTextList(dpy, &text_prop, &list, &num) >= Success + && num > 0 && *list) +#ifndef EVIL + tmp_win->name = *list; + else + tmp_win->name = NoName; +#else /* EVIL */ + { + tmp_win->name = *list; + tmp_win->realname = *list; + if((tmp_win->name != NULL) && (strcmp(tmp_win->name, "")==0)) { + XGetWMName(dpy, tmp_win->w, &text_prop); + tmp_win->name = (char *)text_prop.value ; + } + } + else + { + XGetWMName(dpy, tmp_win->w, &text_prop); + tmp_win->name = (char *)text_prop.value ; + } +#endif /* EVIL */ + } +#else /* I18N */ tmp_win->name = (char *)text_prop.value ; +#endif /* I18N */ else tmp_win->name = NoName; --- fvwm95-2.0.43ba.orig/fvwm/borders.c +++ fvwm95-2.0.43ba/fvwm/borders.c @@ -396,6 +396,11 @@ if (NewTitle) XClearWindow (dpy, t->title_w); +#ifdef I18N +#undef FONTSET +#define FONTSET Scr.WindowFont.fontset +#endif /* I18N */ + /* for mono, we clear an area in the title bar where the window * title goes, so that its more legible. For color, no need */ if(Scr.d_depth<2) --- fvwm95-2.0.43ba.orig/fvwm/functions.c +++ fvwm95-2.0.43ba/fvwm/functions.c @@ -35,47 +35,50 @@ struct functions func_config[] = { - {"AddToMenu", add_item_to_menu, F_ADDMENU, FUNC_NO_WINDOW}, + {"+", add_another_item, F_ADDMENU2, FUNC_NO_WINDOW}, {"AddToFunc", add_item_to_func, F_ADDFUNC, FUNC_NO_WINDOW}, + {"AddToMenu", add_item_to_menu, F_ADDMENU, FUNC_NO_WINDOW}, {"AddModuleConfig", AddModConfig, F_ADD_MOD, FUNC_NO_WINDOW}, {"Beep", Bell, F_BEEP, FUNC_NO_WINDOW}, {"ButtonStyle", ButtonStyle, F_BUTTON_STYLE, FUNC_NO_WINDOW}, {"ClickTime", SetClick, F_CLICK, FUNC_NO_WINDOW}, {"Close", close_function, F_CLOSE, FUNC_NEEDS_WINDOW}, {"ColormapFocus",SetColormapFocus, F_COLORMAP_FOCUS, FUNC_NO_WINDOW}, + {"Current", CurrentFunc, F_CURRENT, FUNC_NO_WINDOW}, {"CursorMove", movecursor, F_MOVECURSOR, FUNC_NO_WINDOW}, {"DefaultColors",SetStdColor, F_BORDERCOLOR, FUNC_NO_WINDOW}, {"Delete", delete_function, F_DELETE, FUNC_NEEDS_WINDOW}, - {"DesktopSize", SetDeskSize, F_SETDESK, FUNC_NO_WINDOW}, {"Desk", changeDesks_func, F_DESK, FUNC_NO_WINDOW}, + {"DesktopSize", SetDeskSize, F_SETDESK, FUNC_NO_WINDOW}, + {"Destroy", destroy_function, F_DESTROY, FUNC_NEEDS_WINDOW}, {"DestroyFunc", destroy_menu, F_DESTROY_MENU, FUNC_NO_WINDOW}, {"DestroyMenu", destroy_menu, F_DESTROY_MENU, FUNC_NO_WINDOW}, {"DestroyModuleConfig", DestroyModConfig, F_DESTROY_MOD, FUNC_NO_WINDOW}, - {"Destroy", destroy_function, F_DESTROY, FUNC_NEEDS_WINDOW}, - {"EdgeScroll", SetEdgeScroll, F_EDGE_SCROLL, FUNC_NO_WINDOW}, {"EdgeResistance",SetEdgeResistance,F_EDGE_RES, FUNC_NO_WINDOW}, + {"EdgeScroll", SetEdgeScroll, F_EDGE_SCROLL, FUNC_NO_WINDOW}, {"Exec", exec_function, F_EXEC, FUNC_NO_WINDOW}, {"ExecUseSHELL", exec_setup, F_EXEC_SETUP, FUNC_NO_WINDOW}, {"Focus", focus_func, F_FOCUS, FUNC_NEEDS_WINDOW}, {"Function", ComplexFunction, F_FUNCTION, FUNC_NO_WINDOW}, {"GotoPage", goto_page_func, F_GOTO_PAGE, FUNC_NO_WINDOW}, {"HilightColors",SetHiColor, F_HICOLOR, FUNC_NO_WINDOW}, - {"Iconify", iconify_function, F_ICONIFY, FUNC_NEEDS_WINDOW}, {"IconFont", LoadIconFont, F_ICONFONT, FUNC_NO_WINDOW}, + {"Iconify", iconify_function, F_ICONIFY, FUNC_NEEDS_WINDOW}, {"IconPath", setIconPath, F_ICON_PATH, FUNC_NO_WINDOW}, {"Key", ParseKeyEntry, F_KEY, FUNC_NO_WINDOW}, + {"KillModule", module_zapper, F_ZAP, FUNC_NO_WINDOW}, {"Lower", lower_function, F_LOWER, FUNC_NEEDS_WINDOW}, {"Maximize", Maximize, F_MAXIMIZE, FUNC_NEEDS_WINDOW}, + {"Menu", staysup_func, F_STAYSUP, FUNC_POPUP}, {"MenuFont", SetMenuFont, F_MENUFONT, FUNC_NO_WINDOW}, {"MenuColors", SetMenuColors, F_MENUCOLORS, FUNC_NO_WINDOW}, - {"Menu", staysup_func, F_STAYSUP, FUNC_POPUP}, - {"ModulePath", setModulePath, F_MODULE_PATH, FUNC_NO_WINDOW}, {"Module", executeModule, F_MODULE, FUNC_NO_WINDOW}, + {"ModulePath", setModulePath, F_MODULE_PATH, FUNC_NO_WINDOW}, {"Mouse", ParseMouseEntry, F_MOUSE, FUNC_NO_WINDOW}, {"Move", move_window, F_MOVE, FUNC_NEEDS_WINDOW}, - {"Nop", Nop_func, F_NOP, FUNC_NOP}, {"Next", NextFunc, F_NEXT, FUNC_NO_WINDOW}, {"None", NoneFunc, F_NONE, FUNC_NO_WINDOW}, + {"Nop", Nop_func, F_NOP, FUNC_NOP}, {"OpaqueMoveSize", SetOpaque, F_OPAQUE, FUNC_NO_WINDOW}, {"PipeRead", PipeRead, F_READ, FUNC_NO_WINDOW}, #ifdef XPM @@ -85,32 +88,30 @@ {"Prev", PrevFunc, F_PREV, FUNC_NO_WINDOW}, {"Quit", quit_func, F_QUIT, FUNC_NO_WINDOW}, {"QuitScreen", quit_screen_func, F_QUIT_SCREEN, FUNC_NO_WINDOW}, - {"Raise_it", raise_it_func, F_RAISE_IT, FUNC_NO_WINDOW}, - {"RaiseLower", raiselower_func, F_RAISELOWER, FUNC_NEEDS_WINDOW}, {"Raise", raise_function, F_RAISE, FUNC_NEEDS_WINDOW}, + {"RaiseLower", raiselower_func, F_RAISELOWER, FUNC_NEEDS_WINDOW}, {"Read", ReadFile, F_READ, FUNC_NO_WINDOW}, {"Recapture", Recapture, F_RECAPTURE, FUNC_NO_WINDOW}, {"Refresh", refresh_function, F_REFRESH, FUNC_NO_WINDOW}, {"Resize", resize_window, F_RESIZE, FUNC_NEEDS_WINDOW}, {"Restart", restart_function, F_RESTART, FUNC_NO_WINDOW}, - {"KillModule", module_zapper, F_ZAP, FUNC_NO_WINDOW}, {"Scroll", scroll, F_SCROLL, FUNC_NO_WINDOW}, - {"SendToModule", SendStrToModule, F_SEND_STRING, FUNC_NO_WINDOW}, {"Send_ConfigInfo",SendDataToModule, F_CONFIG_LIST, FUNC_NO_WINDOW}, {"Send_WindowList",send_list_func, F_SEND_WINDOW_LIST, FUNC_NO_WINDOW}, + {"SendToModule", SendStrToModule, F_SEND_STRING, FUNC_NO_WINDOW}, {"set_mask", set_mask_function,F_SET_MASK, FUNC_NO_WINDOW}, - {"StickyColors", SetStickyColor, F_STICKYCOLOR, FUNC_NO_WINDOW}, {"Stick", stick_function, F_STICK, FUNC_NEEDS_WINDOW}, + {"StickyColors", SetStickyColor, F_STICKYCOLOR, FUNC_NO_WINDOW}, {"Style", ProcessNewStyle, F_STYLE, FUNC_NO_WINDOW}, {"Title", Nop_func, F_TITLE, FUNC_TITLE}, {"Wait", wait_func, F_WAIT, FUNC_NO_WINDOW}, {"WarpToWindow", warp_func, F_WARP, FUNC_NEEDS_WINDOW}, {"WindowFont", LoadWindowFont, F_WINDOWFONT, FUNC_NO_WINDOW}, + {"WindowId", WindowIdFunc, F_WINDOWID, FUNC_NO_WINDOW}, {"WindowList", do_windowList, F_WINDOWLIST, FUNC_NO_WINDOW}, {"WindowsDesk", changeWindowsDesk,F_CHANGE_WINDOWS_DESK, FUNC_NEEDS_WINDOW}, {"XORValue", SetXOR, F_XOR, FUNC_NO_WINDOW}, - {"+", add_another_item, F_ADDMENU2, FUNC_NO_WINDOW}, - {"", 0,0} + {"",0,0,0} }; --- fvwm95-2.0.43ba.orig/fvwm/builtins.c +++ fvwm95-2.0.43ba/fvwm/builtins.c @@ -754,7 +754,15 @@ { if (execl(exec_shell_name, exec_shell_name, "-c", cmd, NULL)==-1) { +#if defined(sun) && !defined(SVR4) + /* XXX: dirty hack for SunOS 4.x */ + extern char *sys_errlist[]; + + /* no strerror() function, see sys_errlist[] instead */ + fvwm_msg(ERR,"exec_function","execl failed (%s)",sys_errlist[errno]); +#else fvwm_msg(ERR,"exec_function","execl failed (%s)",strerror(errno)); +#endif exit(100); } } @@ -1441,18 +1449,35 @@ char *font= NULL; extern char *white,*black; int wid,hei; +#ifdef I18N + XFontSetExtents *fset_extents; + XFontStruct **fs_list; + char **ml; +#endif action = GetNextToken(action, &font); +#ifdef I18N + if ((font == NULL)|| + (Scr.StdFont.fontset = GetFontSetOrFixed(dpy, font)) == NULL) +#else if ((font == NULL)|| (Scr.StdFont.font = GetFontOrFixed(dpy, font)) == NULL) +#endif { fprintf(stderr, "[SetMenuFont]: ERROR -- Couldn't load font '%s' or 'fixed'\n", (font==NULL)?("NULL"):(font)); exit(1); } +#ifdef I18N + XFontsOfFontSet(Scr.StdFont.fontset, &fs_list, &ml); + Scr.StdFont.font = fs_list[0]; + fset_extents = XExtentsOfFontSet(Scr.StdFont.fontset); + Scr.StdFont.height = fset_extents->max_logical_extent.height; +#else Scr.StdFont.height = Scr.StdFont.font->ascent + Scr.StdFont.font->descent; +#endif Scr.StdFont.y = Scr.StdFont.font->ascent; Scr.EntryHeight = Scr.StdFont.height + HEIGHT_EXTRA; @@ -1492,18 +1517,35 @@ { char *font; FvwmWindow *tmp; +#ifdef I18N + XFontSetExtents *fset_extents; + XFontStruct **fs_list; + char **ml; +#endif action = GetNextToken(action,&font); +#ifdef I18N + if ((Scr.IconFont.fontset = GetFontSetOrFixed(dpy, font)) == NULL) +#else if ((Scr.IconFont.font = GetFontOrFixed(dpy, font))==NULL) +#endif { fvwm_msg(ERR,"LoadIconFont","Couldn't load font '%s' or 'fixed'\n", font); free(font); return; } +#ifdef I18N + XFontsOfFontSet(Scr.IconFont.fontset, &fs_list, &ml); + Scr.IconFont.font = fs_list[0]; + fset_extents = XExtentsOfFontSet(Scr.IconFont.fontset); + Scr.IconFont.height = + fset_extents->max_logical_extent.height; +#else Scr.IconFont.height= Scr.IconFont.font->ascent+Scr.IconFont.font->descent; +#endif Scr.IconFont.y = Scr.IconFont.font->ascent; free(font); @@ -1527,14 +1569,28 @@ FvwmWindow *tmp,*hi; int x,y,w,h,extra_height; XFontStruct *newfont; +#ifdef I18N + XFontSetExtents *fset_extents; + XFontStruct **fs_list; + char **ml; +#endif action = GetNextToken(action,&font); +#ifdef I18N + if ((Scr.WindowFont.fontset = GetFontSetOrFixed(dpy,font)) != NULL) + { + XFontsOfFontSet(Scr.WindowFont.fontset, &fs_list, &ml); + Scr.WindowFont.font = fs_list[0]; + fset_extents = XExtentsOfFontSet(Scr.WindowFont.fontset); + Scr.WindowFont.height = fset_extents->max_logical_extent.height; +#else if ((newfont = GetFontOrFixed(dpy, font))!=NULL) { Scr.WindowFont.font = newfont; Scr.WindowFont.height= Scr.WindowFont.font->ascent+Scr.WindowFont.font->descent; +#endif Scr.WindowFont.y = Scr.WindowFont.font->ascent; extra_height = Scr.TitleHeight; Scr.TitleHeight = Scr.WindowFont.font->ascent+Scr.WindowFont.font->descent+3; @@ -1667,10 +1723,10 @@ l=0; if(action == NULL) - return; + return NULL; t = action; - while(isspace(*t)&&(*t!= 0)) + while(isspace((unsigned char)*t)&&(*t!= 0)) t++; if(*t == '[') { @@ -1685,7 +1741,7 @@ if(*t == 0) { fvwm_msg(ERR,"Circulate","Conditionals require closing brace"); - return; + return NULL; } *restofline = t+1; @@ -1813,16 +1869,6 @@ } -void module_zapper(XEvent *eventp,Window junk,FvwmWindow *tmp_win, - unsigned long context, char *action,int* Module) -{ - char *condition; - - GetNextToken(action,&condition); - KillModuleByName(condition); - free(condition); -} - void NextFunc(XEvent *eventp,Window junk,FvwmWindow *tmp_win, unsigned long context, char *action,int* Module) { @@ -1837,7 +1883,6 @@ } - void NoneFunc(XEvent *eventp,Window junk,FvwmWindow *tmp_win, unsigned long context, char *action,int* Module) { @@ -1851,7 +1896,59 @@ } } +void CurrentFunc(XEvent *eventp,Window junk,FvwmWindow *tmp_win, + unsigned long context, char *action,int* Module) +{ + FvwmWindow *found; + char *restofline; + + found = Circulate(action, 0, &restofline); + if(found != NULL) + { + ExecuteFunction(restofline,found,eventp,C_WINDOW,*Module); + } +} + +void WindowIdFunc(XEvent *eventp,Window junk,FvwmWindow *tmp_win, + unsigned long context, char *action,int* Module) +{ + FvwmWindow *found=NULL,*t; + char *actioncopy,*restofline,*num; + unsigned long win; + + actioncopy = strdup(action); + restofline = GetNextToken(actioncopy, &num); +#ifdef HAVE_STRTOUL + win = strtoul(num,NULL,0); +#else + win = (unsigned long)strtol(num,NULL,0); /* SunOS doesn't have strtoul */ +#endif + for (t = Scr.FvwmRoot.next; t != NULL; t = t->next) + { + if (t->w == win) + { + found = t; + break; + } + } + if(found) + { + ExecuteFunction(restofline,found,eventp,C_WINDOW,*Module); + } + if (actioncopy) + free(actioncopy); +} + +void module_zapper(XEvent *eventp,Window junk,FvwmWindow *tmp_win, + unsigned long context, char *action,int* Module) +{ + char *condition; + + GetNextToken(action,&condition); + KillModuleByName(condition); + free(condition); +} /*********************************************************************** * --- fvwm95-2.0.43ba.orig/fvwm/menus.c +++ fvwm95-2.0.43ba/fvwm/menus.c @@ -46,6 +46,7 @@ void DrawSeparator(Window, GC,GC,int, int,int,int,int); void DrawUnderline(Window w, GC gc, int x, int y, char *txt, int off); int UpdateMenu(int sticks); +int ButtonPosition(int context, FvwmWindow * t); int mouse_moved = 0; int menu_aborted = 0; @@ -69,7 +70,7 @@ MenuItem *PrevActiveItem=0; int retval=MENU_NOP; int x,y; - Time t0; + Time t0 = 0; extern Time lastTimestamp; int PrevMenuX = PrevActiveMenuX; @@ -262,8 +263,12 @@ if(mi->next == NULL) DrawSeparator(mr->w,ShadowGC,Scr.BlackGC,1,mr->height-2, mr->width-2, mr->height-2,1); - - if (*mi->item) +/* Why is this here; it has no effect! */ +#ifdef I18N +#undef FONTSET +#define FONTSET Scr.StdFont.fontset +#endif + if (*mi->item) { if (check_allowed_function(mi)) { XDrawString(dpy, mr->w, TextGC, @@ -278,8 +283,9 @@ XDrawString(dpy, mr->w, ShadowGC, mi->x+mr->xoffset, text_y, mi->item, mi->strlen); } + } - if (mi->strlen2>0) + if (mi->strlen2>0) { if (check_allowed_function(mi)) { XDrawString(dpy, mr->w, TextGC, @@ -294,9 +300,10 @@ XDrawString(dpy, mr->w, ShadowGC, mi->x2 + mr->xoffset, text_y, mi->item2, mi->strlen2); } + } /* pete@tecc.co.uk: If the item has a hot key, underline it */ - if (mi->hotkey > 0) + if (mi->hotkey > 0) { if (check_allowed_function(mi)) { DrawUnderline(mr->w, TextGC, mi->x + mr->xoffset, text_y, @@ -311,8 +318,9 @@ DrawUnderline(mr->w, ShadowGC, mi->x + mr->xoffset, text_y, mi->item, mi->hotkey - 1); } + } - if (mi->hotkey < 0) + if (mi->hotkey < 0) { if (check_allowed_function(mi)) { DrawUnderline(mr->w, TextGC, mi->x2 + mr->xoffset, text_y, @@ -327,6 +335,7 @@ DrawUnderline(mr->w, ShadowGC, mi->x2 + mr->xoffset, text_y, mi->item2, -1 - mi->hotkey); } + } d=(Scr.EntryHeight-7) >> 1; if(mi->func_type == F_POPUP) @@ -707,7 +716,7 @@ ***********************************************************************/ int UpdateMenu(int sticks) { - int done; + int done = 0; int retval; MenuItem *InitialMI; MenuRoot *actual_mr; @@ -1159,13 +1168,14 @@ /* Side picture support: this makes the window wider for the picture and calculates offset */ mr->xoffset = 0; - if(mr->sidePic) + if(mr->sidePic) { if(mr->sidePic->height < mr->height) { mr->xoffset = mr->sidePic->width + 3; } else { DestroyPicture(dpy, mr->sidePic); mr->sidePic = NULL; } + } mr->width = mr->width0 + mr->width + mr->width2 + mr->xoffset; --- fvwm95-2.0.43ba.orig/fvwm/icons.c +++ fvwm95-2.0.43ba/fvwm/icons.c @@ -303,6 +303,11 @@ x = (Tmp_win->icon_w_width - Tmp_win->icon_t_width)/2; if(x<3)x=3; +#ifdef I18N +#undef FONTSET +#define FONTSET Scr.IconFont.fontset +#endif + XDrawString (dpy, Tmp_win->icon_w, Scr.ScratchGC3, x, Tmp_win->icon_w_height-Scr.IconFont.height+ Scr.IconFont.y-3, @@ -803,11 +808,12 @@ } } } - if (tmp_win->icon_w == None) + if (tmp_win->icon_w == None) { if(tmp_win->flags & ICON_MOVED) CreateIconWindow(tmp_win,tmp_win->icon_x_loc,tmp_win->icon_y_loc); else CreateIconWindow(tmp_win, def_x, def_y); + } AutoPlace(tmp_win); tmp_win->flags |= ICONIFIED; --- fvwm95-2.0.43ba.orig/fvwm/module.c +++ fvwm95-2.0.43ba/fvwm/module.c @@ -275,7 +275,7 @@ if(size >255) { fvwm_msg(ERR,"HandleModuleInput", - "Module command is too big (%d)",(void *)size); + "Module command is too big (%d)", size); size=255; } --- fvwm95-2.0.43ba.orig/fvwm/move.c +++ fvwm95-2.0.43ba/fvwm/move.c @@ -296,6 +296,10 @@ offset = (Scr.SizeStringWidth + SIZE_HINDENT*2 - XTextWidth(Scr.StdFont.font,str,strlen(str)))/2; +#ifdef I18N +#undef FONTSET +#define FONTSET Scr.StdFont.fontset +#endif XDrawString (dpy, Scr.SizeWindow, Scr.WinGC, offset, Scr.StdFont.font->ascent + SIZE_VINDENT, --- fvwm95-2.0.43ba.orig/fvwm/misc.c +++ fvwm95-2.0.43ba/fvwm/misc.c @@ -455,7 +455,7 @@ return 1; c1 = '%'; - n = sscanf(action,"%d%c", val1, &c1); + n = sscanf(action,"%ld%c", val1, &c1); if(n != 2) return 0; @@ -726,11 +726,11 @@ if(source == NULL) return NULL; - while(isspace(*source)) + while(isspace((unsigned char)*source)) source++; len = strlen(source); tmp = source + len -1; - while(((isspace(*tmp))||(*tmp == '\n'))&&(tmp >=source)) + while(((isspace((unsigned char)*tmp))||(*tmp == '\n'))&&(tmp >=source)) { tmp--; len--; @@ -763,9 +763,9 @@ *token = NULL; return NULL; } - while(isspace(*t)&&(*t != 0))t++; + while(isspace((unsigned char)*t)&&(*t != 0))t++; start = t; - while(!isspace(*t)&&(*t != 0)) + while((!isspace((unsigned char)*t))&&(*t != 0)) { /* Check for qouted text */ if(*t == '"') @@ -824,6 +824,29 @@ return end; } + +/* +** GetToken: destructively rips next token from string, returning it +** (you should free returned string later) +*/ +char *GetToken(char **pstr) +{ + char *new_pstr=NULL,*tok,*ws; + + if (!pstr) return NULL; + + ws = GetNextToken(*pstr, &tok); + while(ws && (*ws != '\0') && isspace(*ws)) ws++; + + if (*ws) + new_pstr = strdup(ws); + + free(*pstr); + *pstr = new_pstr; + + return tok; +} + void HandleHardFocus(FvwmWindow *t) { int x,y; @@ -907,8 +930,8 @@ char tmp[1024]; /* I hate to use a fixed length but this will do for now */ sprintf(tmp,"[FVWM95][%s]: %s ", id, typestr); vsprintf(tmp+strlen(tmp), msg, args); - tmp[strlen(tmp)] = '\n'; tmp[strlen(tmp)+1] = '\0'; + tmp[strlen(tmp)] = '\n'; BroadcastName(M_ERROR,0,0,0,tmp); } --- fvwm95-2.0.43ba.orig/fvwm/resize.c +++ fvwm95-2.0.43ba/fvwm/resize.c @@ -415,6 +415,10 @@ Scr.StdFont.height,False); } +#ifdef I18N +#undef FONTSET +#define FONTSET Scr.StdFont.fontset +#endif XDrawString (dpy, Scr.SizeWindow, Scr.WinGC, offset, Scr.StdFont.font->ascent + SIZE_VINDENT, str, 13); --- fvwm95-2.0.43ba.orig/fvwm/windows.c +++ fvwm95-2.0.43ba/fvwm/windows.c @@ -14,8 +14,10 @@ #include <FVWMconfig.h> #include <stdio.h> +#include <stdlib.h> #include <signal.h> #include <string.h> +#include <limits.h> #include "fvwm.h" #include "menus.h" @@ -28,6 +30,288 @@ /* Minimum and maximum values a `signed int' can hold. */ #define MY_INT_MIN (- MY_INT_MAX - 1) #define MY_INT_MAX 2147483647 +#ifndef INT_MIN +#define INT_MIN MY_INT_MIN +#endif +#ifndef INT_MAX +#define INT_MAX MY_INT_MAX +#endif + +#define SHOW_GEOMETRY (1<<0) +#define SHOW_ALLDESKS (1<<1) +#define SHOW_NORMAL (1<<2) +#define SHOW_ICONIC (1<<3) +#define SHOW_STICKY (1<<4) +#define SHOW_ONTOP (1<<5) +#define DONT_SORT (1<<6) +#define SHOW_ICONNAME (1<<7) +#define SHOW_ALPHABETIC (1<<8) +#define SHOW_EVERYTHING (SHOW_GEOMETRY | SHOW_ALLDESKS | SHOW_NORMAL | SHOW_ICONIC | SHOW_STICKY | SHOW_ONTOP) + +/* Function to compare window title names + */ +static int globalFlags; +int winCompare(const void *cva, const void *cvb) +{ + const FvwmWindow *a; + const FvwmWindow *b; + a = *((FvwmWindow **)cva); + b = *((FvwmWindow **)cvb); + if(globalFlags & SHOW_ICONNAME) + return strcasecmp((a)->icon_name,(b)->icon_name); + else + return strcasecmp((a)->name,(b)->name); +} + +/* + * Change by PRB (pete@tecc.co.uk), 31/10/93. Prepend a hot key + * specifier to each item in the list. This means allocating the + * memory for each item (& freeing it) rather than just using the window + * title directly. */ +void do_windowList(XEvent *eventp,Window w,FvwmWindow *tmp_win, + unsigned long context, char *action,int *Module) +{ + MenuRoot *mr; + FvwmWindow *t; + FvwmWindow **windowList; + int numWindows; + int ii; + char *tname=NULL; + char loc[40],*name=NULL; + int dwidth,dheight; + char tlabel[50]=""; + int last_desk_done = INT_MIN; + int next_desk; + char *t_hot=NULL; /* Menu label with hotkey added */ + char scut = '0'; /* Current short cut key */ + char *line=NULL,*tok=NULL; + int desk = Scr.CurrentDesk; + int flags = SHOW_EVERYTHING; + char *func=NULL; + + if (action && *action) + { + line = strdup(action); /* local copy */ + /* parse args */ + while (line && *line) + { + tok = GetToken(&line); + + if (StrEquals(tok,"Function")) + func = GetToken(&line); + else if (StrEquals(tok,"Desk")) + { + desk = atoi(GetToken(&line)); + flags &= ~SHOW_ALLDESKS; + } + else if (StrEquals(tok,"CurrentDesk")) + { + desk = Scr.CurrentDesk; + flags &= ~SHOW_ALLDESKS; + } + else if (StrEquals(tok,"NotAlphabetic")) + flags &= ~SHOW_ALPHABETIC; + else if (StrEquals(tok,"Alphabetic")) + flags |= SHOW_ALPHABETIC; + else if (StrEquals(tok,"Unsorted")) + flags |= DONT_SORT; + else if (StrEquals(tok,"UseIconName")) + flags |= SHOW_ICONNAME; + else if (StrEquals(tok,"NoGeometry")) + flags &= ~SHOW_GEOMETRY; + else if (StrEquals(tok,"Geometry")) + flags |= SHOW_GEOMETRY; + else if (StrEquals(tok,"NoIcons")) + flags &= ~SHOW_ICONIC; + else if (StrEquals(tok,"Icons")) + flags |= SHOW_ICONIC; + else if (StrEquals(tok,"OnlyIcons")) + flags = SHOW_ICONIC; + else if (StrEquals(tok,"NoNormal")) + flags &= ~SHOW_NORMAL; + else if (StrEquals(tok,"Normal")) + flags |= SHOW_NORMAL; + else if (StrEquals(tok,"OnlyNormal")) + flags = SHOW_NORMAL; + else if (StrEquals(tok,"NoSticky")) + flags &= ~SHOW_STICKY; + else if (StrEquals(tok,"Sticky")) + flags |= SHOW_STICKY; + else if (StrEquals(tok,"OnlySticky")) + flags = SHOW_STICKY; + else if (StrEquals(tok,"NoOnTop")) + flags &= ~SHOW_ONTOP; + else if (StrEquals(tok,"OnTop")) + flags |= SHOW_ONTOP; + else if (StrEquals(tok,"OnlyOnTop")) + flags = SHOW_ONTOP; + else + { + fvwm_msg(ERR,"WindowList","Unknown option '%s'",tok); + } + } + } + + globalFlags = flags; + if (flags & SHOW_GEOMETRY) + { + sprintf(tlabel,"Desk: %d\tGeometry",desk); + } + else + { + sprintf(tlabel,"Desk: %d",desk); + } + mr=NewMenuRoot(tlabel,F_POPUP); + AddToMenu(mr, tlabel, "TITLE"); + + next_desk = 0; + + numWindows = 0; + for (t = Scr.FvwmRoot.next; t != NULL; t = t->next) + { + numWindows++; + } + windowList = malloc(numWindows*sizeof(t)); + if (windowList == NULL) return; + + ii = 0; + for (t = Scr.FvwmRoot.next; t != NULL; t = t->next) + { + windowList[ii] = t; + ii++; + } + + /* Do alphabetic sort */ + if (flags & SHOW_ALPHABETIC) + qsort(windowList,numWindows,sizeof(t),winCompare); + + while(next_desk != INT_MAX) + { + /* Sort window list by desktop number */ + if((flags & SHOW_ALLDESKS) && !(flags & DONT_SORT)) + { + next_desk = INT_MAX; + for (ii = 0; ii < numWindows; ii++) + { + t = windowList[ii]; + if((t->Desk >last_desk_done)&&(t->Desk < next_desk)) + next_desk = t->Desk; + } + } + if(!(flags & SHOW_ALLDESKS)) + { + if(last_desk_done == INT_MIN) + next_desk = desk; + else + next_desk = INT_MAX; + } + last_desk_done = next_desk; + for (ii = 0; ii < numWindows; ii++) + { + t = windowList[ii]; + if((t->Desk == next_desk)&& + (!(t->flags & WINDOWLISTSKIP))) + { + if (!(flags & SHOW_ICONIC) && (t->flags & ICONIFIED)) + continue; /* don't want icons - skip */ + if (!(flags & SHOW_STICKY) && (t->flags & STICKY)) + continue; /* don't want sticky ones - skip */ + if (!(flags & SHOW_ONTOP) && (t->flags & ONTOP)) + continue; /* don't want ontop ones - skip */ + if (!(flags & SHOW_NORMAL) && + !((t->flags & ICONIFIED) || + (t->flags & STICKY) || + (t->flags & ONTOP))) + continue; /* don't want "normal" ones - skip */ + + if (++scut == ('9' + 1)) scut = 'A'; /* Next shortcut key */ + if(flags & SHOW_ICONNAME) + name = t->icon_name; + else + name = t->name; + t_hot = safemalloc(strlen(name) + 48); + sprintf(t_hot, "&%c. %s", scut, name); /* Generate label */ + + if (flags & SHOW_GEOMETRY) + { + tname = safemalloc(80); + tname[0]=0; + if(t->flags & ICONIFIED) + strcpy(tname, "("); + sprintf(loc,"%d:",t->Desk); + strcat(tname,loc); + + dheight = t->frame_height - t->title_height - 2*t->boundary_width; + dwidth = t->frame_width - 2*t->boundary_width; + + dwidth -= t->hints.base_width; + dheight -= t->hints.base_height; + + dwidth /= t->hints.width_inc; + dheight /= t->hints.height_inc; + + sprintf(loc,"%d",dwidth); + strcat(tname, loc); + sprintf(loc,"x%d",dheight); + strcat(tname, loc); + if(t->frame_x >=0) + sprintf(loc,"+%d",t->frame_x); + else + sprintf(loc,"%d",t->frame_x); + strcat(tname, loc); + if(t->frame_y >=0) + sprintf(loc,"+%d",t->frame_y); + else + sprintf(loc,"%d",t->frame_y); + strcat(tname, loc); + + if (t->flags & STICKY) + strcat(tname, " S"); + if (t->flags & ONTOP) + strcat(tname, " T"); + if (t->flags & ICONIFIED) + strcat(tname, ")"); + strcat(t_hot,"\t"); + strcat(t_hot,tname); + } + if (func) + sprintf(tlabel,"%s %ld",func,t->w); + else + sprintf(tlabel,"WindowListFunc %ld",t->w); + AddToMenu(mr, t_hot, tlabel); + /* Add the title pixmap */ + if (t->title_icon) { + mr->last->lpicture = t->title_icon; + t->title_icon->count++; /* increase the cache count!! + otherwise the pixmap will be + eventually removed from the + cache by DestroyMenu */ + } + if (t_hot) + free(t_hot); + if (tname) + free(tname); + } + } + } + + free(windowList); + + mr->has_coords = False; + MakeMenu(mr); + + /* If the menu is a result of a ButtonPress, then tell do_menu() + to expect (and ignore) a button release event. Otherwise, it was + as a result of a keypress or something, so we shouldn't expect + a button release event. Fixes problem with keyboard short cuts not + working if window list is popped up by keyboard. + and1000@cam.ac.uk, 27/6/96 */ + do_menu(mr, eventp->type == ButtonPress); + + DestroyMenu(mr); +} + +#if 0 /* * Change by PRB (pete@tecc.co.uk), 31/10/93. Prepend a hot key @@ -174,7 +458,7 @@ free(tname); } - sprintf(tlabel, "RAISE_IT %ld %ld", t, t->w); + sprintf(tlabel, "RAISE_IT %p %ld", t, t->w); AddToMenu(mr, t_hot, tlabel); /* Add the title pixmap */ @@ -208,3 +492,4 @@ DestroyMenu(mr); } +#endif --- fvwm95-2.0.43ba.orig/fvwm/misc.h +++ fvwm95-2.0.43ba/fvwm/misc.h @@ -105,6 +105,15 @@ Globalgcm = GCFont | GCForeground | GCBackground; \ XChangeGC(dpy,Scr.ScratchGC3,Globalgcm,&Globalgcv); \ } +#ifdef I18N +#ifdef __STDC__ +#define XTextWidth(x,y,z) XmbTextEscapement(x ## set,y,z) +#else +#define XTextWidth(x,y,z) XmbTextEscapement(x/**/set,y,z) +#endif +#define XDrawString(t,u,v,w,x,y,z) XmbDrawString(t,u,FONTSET,v,w,x,y,z) +#define XDrawImageString(t,u,v,w,x,y,z) XmbDrawImageString(t,u,FONTSET,v,w,x,y,z) +#endif #ifdef NO_ICONS #define ICON_HEIGHT 1 @@ -259,6 +268,7 @@ unsigned long context, char *action,int* Module); void DeadPipe(int nonsense); void GetMwmHints(FvwmWindow *t); +void GetOlHints(FvwmWindow *t); void SelectDecor(FvwmWindow *, unsigned long, int,int); extern Bool PopUpMenu(MenuRoot *, int, int); void ComplexFunction(XEvent *eventp,Window w,FvwmWindow *tmp_win, @@ -421,6 +431,7 @@ char *stripcpy3(char *, Bool); void bad_binding(int num); char *GetNextToken(char *indata,char **token); +char *GetToken(char **pstr); void MakeMenus(void); void GetMenuXPMFile(char *name, MenuItem *it); void GetMenuBitmapFile(char *name, MenuItem *it); @@ -488,6 +499,10 @@ unsigned long context, char *action,int* Module); void AddModConfig(XEvent *eventp,Window junk,FvwmWindow *tmp_win, unsigned long context, char *action,int* Module); +void CurrentFunc(XEvent *eventp,Window junk,FvwmWindow *tmp_win, + unsigned long context, char *action,int* Module); +void WindowIdFunc(XEvent *eventp,Window junk,FvwmWindow *tmp_win, + unsigned long context, char *action,int* Module); void HandleHardFocus(FvwmWindow *t); void OpenConsole(); --- fvwm95-2.0.43ba.orig/fvwm/module.h +++ fvwm95-2.0.43ba/fvwm/module.h @@ -14,6 +14,9 @@ extern int *writePipes; extern struct queue_buff_struct **pipeQueue; +void KillModuleByName(char *name); +void AddToModList(char *tline); + #define START_FLAG 0xffffffff #define M_NEW_PAGE (1) --- fvwm95-2.0.43ba.orig/fvwm/parse.h +++ fvwm95-2.0.43ba/fvwm/parse.h @@ -76,6 +76,8 @@ #define F_STICKYCOLOR 58 #define F_EXEC_SETUP 59 #define F_MENUCOLORS 60 +#define F_CURRENT 61 +#define F_WINDOWID 62 /* Functions which require a target window */ #define F_RESIZE 100 #define F_RAISE 101 @@ -97,7 +99,7 @@ #define F_SEND_WINDOW_LIST 1000 /* Functions for internal only! */ -#define F_RAISE_IT 2000 +/* #define F_RAISE_IT 2000 */ #endif /* _PARSE_ */ --- fvwm95-2.0.43ba.orig/fvwm/fvwm.h +++ fvwm95-2.0.43ba/fvwm/fvwm.h @@ -110,6 +110,9 @@ typedef struct MyFont { XFontStruct *font; /* font structure */ +#ifdef I18N + XFontSet fontset; /* font set */ +#endif int height; /* height of the font */ int y; /* Y coordinate to draw characters */ } MyFont; --- fvwm95-2.0.43ba.orig/fvwm/style.c +++ fvwm95-2.0.43ba/fvwm/style.c @@ -64,13 +64,13 @@ if((name == NULL)||(restofline == NULL)) return; - while(isspace(*restofline)&&(*restofline != 0))restofline++; + while(isspace((unsigned char)*restofline)&&(*restofline != 0))restofline++; line = restofline; if(restofline == NULL)return; while((*restofline != 0)&&(*restofline != '\n')) { - while(isspace(*restofline)) restofline++; + while(isspace((unsigned char)*restofline)) restofline++; switch (tolower(restofline[0])) { case 'a': @@ -84,11 +84,11 @@ if(strncasecmp(restofline,"BackColor",9)==0) { restofline +=9; - while(isspace(*restofline))restofline++; + while(isspace((unsigned char)*restofline))restofline++; tmp = restofline; len = 0; while((tmp != NULL)&&(*tmp != 0)&&(*tmp != ',')&& - (*tmp != '\n')&&(!isspace(*tmp))) + (*tmp != '\n')&&(!isspace((unsigned char)*tmp))) { tmp++; len++; @@ -107,11 +107,11 @@ restofline +=6; sscanf(restofline,"%d",&butt); - while(isspace(*restofline))restofline++; - while((!isspace(*restofline))&&(*restofline!= 0)&& + while(isspace((unsigned char)*restofline))restofline++; + while((!isspace((unsigned char)*restofline))&&(*restofline!= 0)&& (*restofline != ',')&&(*restofline != '\n')) restofline++; - while(isspace(*restofline))restofline++; + while(isspace((unsigned char)*restofline))restofline++; on_buttons |= (1<<(butt-1)); } @@ -120,22 +120,22 @@ restofline +=11; off_flags |= BW_FLAG; sscanf(restofline,"%d",&bw); - while(isspace(*restofline))restofline++; - while((!isspace(*restofline))&&(*restofline!= 0)&& + while(isspace((unsigned char)*restofline))restofline++; + while((!isspace((unsigned char)*restofline))&&(*restofline!= 0)&& (*restofline != ',')&&(*restofline != '\n')) restofline++; - while(isspace(*restofline))restofline++; + while(isspace((unsigned char)*restofline))restofline++; } break; case 'c': if(strncasecmp(restofline,"Color",5)==0) { restofline +=5; - while(isspace(*restofline))restofline++; + while(isspace((unsigned char)*restofline))restofline++; tmp = restofline; len = 0; while((tmp != NULL)&&(*tmp != 0)&&(*tmp != ',')&& - (*tmp != '\n')&&(*tmp != '/')&&(!isspace(*tmp))) + (*tmp != '\n')&&(*tmp != '/')&&(!isspace((unsigned char)*tmp))) { tmp++; len++; @@ -148,15 +148,15 @@ off_flags |= FORE_COLOR_FLAG; } - while(isspace(*tmp))tmp++; + while(isspace((unsigned char)*tmp))tmp++; if(*tmp == '/') { tmp++; - while(isspace(*tmp))tmp++; + while(isspace((unsigned char)*tmp))tmp++; restofline = tmp; len = 0; while((tmp != NULL)&&(*tmp != 0)&&(*tmp != ',')&& - (*tmp != '\n')&&(*tmp != '/')&&(!isspace(*tmp))) + (*tmp != '\n')&&(*tmp != '/')&&(!isspace((unsigned char)*tmp))) { tmp++; len++; @@ -216,11 +216,11 @@ if(strncasecmp(restofline,"ForeColor",9)==0) { restofline +=9; - while(isspace(*restofline))restofline++; + while(isspace((unsigned char)*restofline))restofline++; tmp = restofline; len = 0; while((tmp != NULL)&&(*tmp != 0)&&(*tmp != ',')&& - (*tmp != '\n')&&(!isspace(*tmp))) + (*tmp != '\n')&&(!isspace((unsigned char)*tmp))) { tmp++; len++; @@ -259,11 +259,11 @@ restofline +=11; off_flags |= NOBW_FLAG; sscanf(restofline,"%d",&nobw); - while(isspace(*restofline))restofline++; - while((!isspace(*restofline))&&(*restofline!= 0)&& + while(isspace((unsigned char)*restofline))restofline++; + while((!isspace((unsigned char)*restofline))&&(*restofline!= 0)&& (*restofline != ',')&&(*restofline != '\n')) restofline++; - while(isspace(*restofline))restofline++; + while(isspace((unsigned char)*restofline))restofline++; } break; case 'i': @@ -280,8 +280,8 @@ &IconBox[2],&IconBox[3]); for(i=0;i<num;i++) { - while(isspace(*restofline))restofline++; - while((!isspace(*restofline))&&(*restofline!= 0)&& + while(isspace((unsigned char)*restofline))restofline++; + while((!isspace((unsigned char)*restofline))&&(*restofline!= 0)&& (*restofline != ',')&&(*restofline != '\n')) restofline++; } @@ -304,7 +304,7 @@ else if(strncasecmp(restofline,"Icon",4)==0) { restofline +=4; - while(isspace(*restofline))restofline++; + while(isspace((unsigned char)*restofline))restofline++; tmp = restofline; len = 0; while((tmp != NULL)&&(*tmp != 0)&&(*tmp != ',')&&(*tmp != '\n')) @@ -340,7 +340,7 @@ if(strncasecmp(restofline,"MiniIcon",8)==0) { restofline +=9; - while(isspace(*restofline))restofline++; + while(isspace((unsigned char)*restofline))restofline++; tmp = restofline; len = 0; while((tmp != NULL)&&(*tmp != 0)&&(*tmp != ',')&&(*tmp != '\n')) @@ -429,11 +429,11 @@ restofline +=8; sscanf(restofline,"%d",&butt); - while(isspace(*restofline))restofline++; - while((!isspace(*restofline))&&(*restofline!= 0)&& + while(isspace((unsigned char)*restofline))restofline++; + while((!isspace((unsigned char)*restofline))&&(*restofline!= 0)&& (*restofline != ',')&&(*restofline != '\n')) restofline++; - while(isspace(*restofline))restofline++; + while(isspace((unsigned char)*restofline))restofline++; off_buttons |= (1<<(butt-1)); } @@ -528,11 +528,11 @@ restofline +=12; off_flags |= STARTSONDESK_FLAG; sscanf(restofline,"%d",&desknumber); - while(isspace(*restofline))restofline++; - while((!isspace(*restofline))&&(*restofline!= 0)&& + while(isspace((unsigned char)*restofline))restofline++; + while((!isspace((unsigned char)*restofline))&&(*restofline!= 0)&& (*restofline != ',')&&(*restofline != '\n')) restofline++; - while(isspace(*restofline))restofline++; + while(isspace((unsigned char)*restofline))restofline++; } else if(strncasecmp(restofline,"StartsAnywhere",14)==0) { @@ -544,7 +544,7 @@ if(strncasecmp(restofline,"TitleIcon",9)==0) { restofline +=9; - while(isspace(*restofline))restofline++; + while(isspace((unsigned char)*restofline))restofline++; tmp = restofline; len = 0; while((tmp != NULL)&&(*tmp != 0)&&(*tmp != ',')&&(*tmp != '\n')) @@ -575,10 +575,10 @@ else if(strncasecmp(restofline,"UseStyle",8)==0) { restofline +=8; - while(isspace(*restofline))restofline++; + while(isspace((unsigned char)*restofline))restofline++; tmp = restofline; while( tmp && *tmp &&(*tmp != ',')&& - (*tmp != '\n')&&(!isspace(*tmp))) + (*tmp != '\n')&&(!isspace((unsigned char)*tmp))) tmp++; if((len = tmp - restofline) > 0) { @@ -614,7 +614,7 @@ free(tmp); } } - while(isspace(*restofline)) restofline++; + while(isspace((unsigned char)*restofline)) restofline++; } break; case 'v': @@ -641,7 +641,7 @@ break; } - while(isspace(*restofline))restofline++; + while(isspace((unsigned char)*restofline))restofline++; if(*restofline == ',') restofline++; else if((*restofline != 0)&&(*restofline != '\n')) --- fvwm95-2.0.43ba.orig/fvwm/read.c +++ fvwm95-2.0.43ba/fvwm/read.c @@ -13,6 +13,9 @@ #include <ctype.h> #include <unistd.h> #include <fcntl.h> +#ifdef I18N +#include <X11/Xlocale.h> +#endif #include "fvwm.h" #include "menus.h" @@ -59,6 +62,9 @@ int thisfileno; extern Bool Restarting; extern XEvent Event; +#ifdef I18N + char *Lang; +#endif thisfileno = numfilesread; numfilesread++; @@ -90,12 +96,37 @@ if (Home == NULL) Home = "./"; HomeLen = strlen(Home); +#ifdef I18N + if((Lang = setlocale(LC_CTYPE, NULL)) != NULL) { + /* find the LOCALE directory to look in */ + home_file = safemalloc(HomeLen + strlen(Lang) + strlen(ofilename)+4); + strcpy(home_file,Home); + strcat(home_file,"/"); + strcat(home_file,Lang); + strcat(home_file,"/"); + strcat(home_file,ofilename); + filename = home_file; + fd = fopen(filename,"r"); + } + if(fd == NULL) { + if((filename != NULL)&&(filename!= ofilename)) + free(filename); + /* do it as original */ + home_file = safemalloc(HomeLen + strlen(ofilename)+3); + strcpy(home_file,Home); + strcat(home_file,"/"); + strcat(home_file,ofilename); + filename = home_file; + fd = fopen(filename,"r"); + } +#else home_file = safemalloc(HomeLen + strlen(ofilename)+3); strcpy(home_file,Home); strcat(home_file,"/"); strcat(home_file,ofilename); filename = home_file; fd = fopen(filename,"r"); +#endif } if((fd == NULL)&&(ofilename[0] != '/')) { @@ -149,7 +180,7 @@ tline = fgets(line+l-2,sizeof(line)-l,fd); } tline=line; - while(isspace(*tline))tline++; + while(isspace((unsigned char)*tline))tline++; /* should these next checks be moved into ExecuteFunction? */ if((strlen(&tline[0])>1)&&(tline[0]!='#')&&(tline[0]!='*')) ExecuteFunction(tline,tmp_win,eventp,context,*Module); @@ -283,26 +314,36 @@ unsigned long context, char *action, int *Module) { struct moduleInfoList *t; - char message[256]; + char *message,msg2[32]; extern char *IconPath; #ifdef XPM extern char *PixmapPath; #endif - sprintf(message,"IconPath %s\n",IconPath); - SendName(*Module,M_CONFIG_INFO,0,0,0,message); + if (IconPath && strlen(IconPath)) + { + message=safemalloc(strlen(IconPath)+11); + sprintf(message,"IconPath %s\n",IconPath); + SendName(*Module,M_CONFIG_INFO,0,0,0,message); + free(message); + } #ifdef XPM - sprintf(message,"PixmapPath %s\n",PixmapPath); - SendName(*Module,M_CONFIG_INFO,0,0,0,message); + if (PixmapPath && strlen(PixmapPath)) + { + message=safemalloc(strlen(PixmapPath)+13); + sprintf(message,"PixmapPath %s\n",PixmapPath); + SendName(*Module,M_CONFIG_INFO,0,0,0,message); + free(message); + } #endif - sprintf(message,"ClickTime %d\n",Scr.ClickTime); - SendName(*Module,M_CONFIG_INFO,0,0,0,message); + sprintf(msg2,"ClickTime %d\n",Scr.ClickTime); + SendName(*Module,M_CONFIG_INFO,0,0,0,msg2); t = modlistroot; while(t != NULL) - { - SendName(*Module,M_CONFIG_INFO,0,0,0,t->data); - t = t->next; - } + { + SendName(*Module,M_CONFIG_INFO,0,0,0,t->data); + t = t->next; + } SendPacket(*Module,M_END_CONFIG_INFO,0,0,0,0,0,0,0,0); } --- fvwm95-2.0.43ba.orig/fvwm/complex.c +++ fvwm95-2.0.43ba/fvwm/complex.c @@ -293,7 +293,7 @@ else if(input[i+1] == 'w') { if(tmp_win) - sprintf(&out[j],"0x%x",tmp_win->w); + sprintf(&out[j],"0x%ld",tmp_win->w); else sprintf(&out[j],"$w"); j = strlen(out); --- fvwm95-2.0.43ba.orig/fvwm/bindings.c +++ fvwm95-2.0.43ba/fvwm/bindings.c @@ -74,7 +74,7 @@ int mouse_binding) { Binding *temp = Scr.AllBindings, *temp2, *prev = NULL; - KeyCode keycode; + KeyCode keycode = 0; if (!mouse_binding) keycode = XKeysymToKeycode(dpy, keysym); --- fvwm95-2.0.43ba.orig/fvwm/events.c +++ fvwm95-2.0.43ba/fvwm/events.c @@ -459,6 +459,14 @@ void HandlePropertyNotify() { XTextProperty text_prop; +#ifdef I18N + Atom actual = None; + int actual_format; + unsigned long nitems, bytesafter; + char *prop = NULL; + char **list; + int num; +#endif if ((!Tmp_win)||(XGetGeometry(dpy, Tmp_win->w, &JunkRoot, &JunkX, &JunkY, &JunkWidth, &JunkHeight, &JunkBW, &JunkDepth) == 0)) @@ -467,12 +475,51 @@ switch (Event.xproperty.atom) { case XA_WM_NAME: +#ifdef I18N + if (XGetWindowProperty (dpy, Tmp_win->w, Event.xproperty.atom, 0L, + MAX_NAME_LEN, False, AnyPropertyType, &actual, + &actual_format, &nitems, &bytesafter, + (unsigned char **) &prop) != Success || + actual == None) + return; + text_prop.value = prop; + text_prop.encoding = actual; + text_prop.format = actual_format; + text_prop.nitems = nitems; + if (XmbTextPropertyToTextList(dpy, &text_prop, &list, &num) < Success) + return; +#ifdef EVIL + if (!(num > 0 && *list)) { + if (!XGetWMName(dpy, Tmp_win->w, &text_prop)) + return; + free_window_name (Tmp_win); + Tmp_win->name = (char *)text_prop.value; + } else { + prop = *list; + Tmp_win->name = prop; + if((Tmp_win->name != NULL) && (strcmp(Tmp_win->name, "") == 0)) { + if (!XGetWMName(dpy, Tmp_win->w, &text_prop)) + return; + free_window_name (Tmp_win); + Tmp_win->name = (char *)text_prop.value; + } + } +#else /* EVIL */ + if (!(num > 0 && *list)) + prop = NoName; + else + prop = *list; + free_window_name (Tmp_win); + Tmp_win->name = prop; +#endif /* EVIL */ +#else /* I18N */ if (!XGetWMName(dpy, Tmp_win->w, &text_prop)) return; free_window_name (Tmp_win); Tmp_win->name = (char *)text_prop.value; +#endif /* I18N */ if (Tmp_win->name == NULL) Tmp_win->name = NoName; BroadcastName(M_WINDOW_NAME,Tmp_win->w,Tmp_win->frame, @@ -496,10 +543,49 @@ break; case XA_WM_ICON_NAME: +#ifdef I18N + if (XGetWindowProperty (dpy, Tmp_win->w, Event.xproperty.atom, 0L, + MAX_NAME_LEN, False, AnyPropertyType, &actual, + &actual_format, &nitems, &bytesafter, + (unsigned char **) &prop) != Success || + actual == None) + return; + text_prop.value = prop; + text_prop.encoding = actual; + text_prop.format = actual_format; + text_prop.nitems = nitems; + if (XmbTextPropertyToTextList(dpy, &text_prop, &list, &num) < Success) + return; +#ifdef EVIL + if (!(num > 0 && *list)) { + if (!XGetWMIconName (dpy, Tmp_win->w, &text_prop)) + return; + free_icon_name (Tmp_win); + Tmp_win->icon_name = (char *) text_prop.value; + } else { + prop = *list; + Tmp_win->icon_name = prop; + if((Tmp_win->icon_name != NULL) && (strcmp(Tmp_win->icon_name, "") == 0)) { + if (!XGetWMIconName (dpy, Tmp_win->w, &text_prop)) + return; + free_icon_name (Tmp_win); + Tmp_win->icon_name = (char *) text_prop.value; + } + } +#else /* EVIL */ + if (!(num > 0 && *list)) + prop = NoName; + else + prop = *list; + free_icon_name (Tmp_win); + Tmp_win->icon_name = prop; +#endif /* EVIL */ +#else /* I18N */ if (!XGetWMIconName (dpy, Tmp_win->w, &text_prop)) return; free_icon_name (Tmp_win); Tmp_win->icon_name = (char *) text_prop.value; +#endif /* I18N */ if (Tmp_win->icon_name == NULL) Tmp_win->icon_name = NoName; BroadcastName(M_ICON_NAME,Tmp_win->w,Tmp_win->frame, --- fvwm95-2.0.43ba.orig/fvwm/fvwm.c +++ fvwm95-2.0.43ba/fvwm/fvwm.c @@ -35,6 +35,10 @@ #include <X11/extensions/shape.h> #endif /* SHAPE */ +#ifdef I18N +#include <X11/Xlocale.h> +#endif + #if defined (sparc) && defined (SVR4) /* Solaris has sysinfo instead of gethostname. */ #include <sys/systeminfo.h> @@ -74,6 +78,7 @@ void SetMWM_INFO(Window window); void SetRCDefaults(void); void StartupStuff(void); +void SetupButtons(); XContext FvwmContext; /* context for fvwm windows */ XContext MenuContext; /* context for fvwm menus */ @@ -118,7 +123,7 @@ * *********************************************************************** */ -void main(int argc, char **argv) +int main(int argc, char **argv) { unsigned long valuemask; /* mask for create windows */ XSetWindowAttributes attributes; /* attributes for create windows */ @@ -139,6 +144,10 @@ OpenConsole(); DBUG("main","Entered, about to parse args"); +#ifdef I18N + if (setlocale(LC_CTYPE, "") == NULL) + fvwm_msg(ERR, "main", "Can't set locale. Check your $LC_CTYPE or $LANG.\n"); +#endif for (i = 1; i < argc; i++) { if (strncasecmp(argv[i],"-debug",6)==0) @@ -446,7 +455,7 @@ DBUG("main","Entering HandleEvents loop..."); HandleEvents(); DBUG("main","Back from HandleEvents loop? Exitting..."); - return; + return 0; } /*********************************************************************** @@ -488,19 +497,34 @@ void SetRCDefaults() { /* set up default colors, menus, fonts, etc... */ - ExecuteFunction("MenuFont fixed",NULL,&Event,C_ROOT,-1); - ExecuteFunction("HilightColors white black",NULL,&Event,C_ROOT,-1); - ExecuteFunction("StickyColors white grey",NULL,&Event,C_ROOT,-1); - ExecuteFunction("DefaultColors black grey grey white",NULL,&Event,C_ROOT,-1); - ExecuteFunction("MenuColors black grey white black",NULL,&Event,C_ROOT,-1); - ExecuteFunction("XORValue 255",NULL,&Event,C_ROOT,-1); - ExecuteFunction("IconFont fixed", NULL,&Event,C_ROOT,-1); - ExecuteFunction("WindowFont fixed", NULL,&Event,C_ROOT,-1); - ExecuteFunction("Style \"*\" ClickToFocus", NULL,&Event,C_ROOT,-1); - ExecuteFunction("Style \"*\" DecorateTransient", NULL,&Event,C_ROOT,-1); - ExecuteFunction("AddToMenu default_menu \"Default Menu\" Title", NULL,&Event,C_ROOT,-1); - ExecuteFunction("+ \"Exit\" Quit", NULL,&Event,C_ROOT,-1); - ExecuteFunction("Mouse 1 R N Popup default_menu", NULL,&Event,C_ROOT,-1); + char *defaults[] = { + "MenuFont fixed", + "HilightColors white black", + "StickyColors white grey", + "DefaultColors black grey grey white", + "MenuColors black grey white black", + "XORValue 255", + "IconFont fixed", + "WindowFont fixed", + "Style \"*\" ClickToFocus", + "Style \"*\" DecorateTransient", + "Style \"*\" RandomPlacement, SmartPlacement", + "AddToMenu builtin_menu \"Builtin Menu\" Title", + "+ \"Exit\" Quit", + "Mouse 1 R N Popup builtin_menu", + "AddToFunc WindowListFunc \"I\" WindowId $0 Iconify -1", + "+ \"I\" WindowId $0 Focus", + "+ \"I\" WindowId $0 Raise", + "+ \"I\" WindowId $0 WarpToWindow 5p 5p", + NULL + }; + int i=0; + + while (defaults[i]) + { + ExecuteFunction(defaults[i],NULL,&Event,C_ROOT,-1); + i++; + } } /*********************************************************************** @@ -704,7 +728,14 @@ ************************************************************************/ void Restart(int nonsense) { + sigset_t sigusr1; + + sigemptyset(&sigusr1); + sigaddset(&sigusr1, SIGUSR1); + sigprocmask(SIG_UNBLOCK, &sigusr1, NULL); + Done(1, *g_argv); + signal (SIGUSR1, Restart); SIGNAL_RETURN; } @@ -953,6 +984,7 @@ using "xlogout" to be able to switch between multiple window managers */ Done(0, NULL); + return 0; /* Never reached, but... */ } /*********************************************************************** @@ -1077,7 +1109,7 @@ } } /* UnBlackoutScreen */ -SetupButtons() +void SetupButtons() { XWindowAttributes root_attr; XpmAttributes xpm_attributes; --- fvwm95-2.0.43ba.orig/fvwm/Makefile.in +++ fvwm95-2.0.43ba/fvwm/Makefile.in @@ -15,8 +15,8 @@ fvwm_name=@fvwm_name@ # # This is where the modules will be installed -fvwm_dir=@prefix@/lib/X11/@fvwm_name@ -man_dir=@prefix@/man/man1 +fvwm_dir=${prefix}/lib/X11/@fvwm_name@ +man_dir=${prefix}/man/man1 # # Libs @@ -30,7 +30,7 @@ -DFVWMDIR=\"${fvwm_dir}\" \ -DFVWMRC=\"${fvwm_rc}\" -EXTRA_DEFINES=-DXPM -DSHAPE ${PATH_DEFINES} +EXTRA_DEFINES=-DXPM -DSHAPE ${PATH_DEFINES} -DI18N CC=@CC@ INCLUDES=-I${top_srcdir}/include ${x_includes} --- fvwm95-2.0.43ba.orig/fvwm/fvwm95.man +++ fvwm95-2.0.43ba/fvwm/fvwm95.man @@ -169,8 +169,8 @@ will start an xterm on desk number 1. Not all applications understand this option, however. -You could achieve the same result with the following line in your -.Xdefaults file: +You could achieve the same result with the following line in +your .Xdefaults file: .EX XTerm*Desk: 1 .EE @@ -524,6 +524,18 @@ colormap will be the one for the window that currently has the keyboard focus. +.IP "Current [\fIconditions\fP] \fIcommand\fP" +Performs \fIcommand\fP on the current window if it satisfies all +\fIconditions\fP. Conditions include "Iconic", "!Iconic", "Visible", +"!Visible", "Sticky", "!Sticky", "Maximized", "!Maximized", +"Transient", "!Transient", "Raised", "!Raised", "CurrentDesk", +"CurrentPage", and "CurrentPageAnyDesk". In addition, the condition +may include a window name to match to. The window name may include +the wildcards * and ?. The window name, icon name, class, and +resource will be considered when attempting to find a match. The +window name can begin with ! which will prevent \fIcommand\fP if any +of the window name, icon name, class or resource match. + .IP "CursorMove \fIhorizonal vertical\fP" Moves the mouse pointer by \fIhorizontal\fP pages in the X direction @@ -636,7 +648,7 @@ .IP "Exec \fIcommand\fP" Executes \fIcommand\fP. Exec does not require an additional 'exec' at -the beginning or '&' at the end of the command. +the beginning or \'&' at the end of the command. The following example binds function key F1 in the root window, with no modifiers, to the exec function. The program rxvt will be started @@ -1295,42 +1307,58 @@ to map itself, then switches to desk 2 and starts an xmh. After the xmh window appears control moves to desk 0. +.IP "WindowFont \fIfontname\fP" +Makes \fIfvwm95\fP use font \fIfontname\fP instead of "fixed" for window +title-bars. -.IP "WindowList \fIoptions\fP" -Generates a pop-up menu (and pops it up) in which the title and -(optionally) the geometry of each of the windows currently on the desk -top are shown. The geometry of iconified windows is shown in brackets. -Selecting an item from the window list pop-up menu will cause that -window to be moved onto the desktop if it is currently not on it, will -move the desktop viewport to the page containing the upper left hand -corner of the window, will de-iconify the window if it is iconified, -and will raise the window. The WindowList command can take an optional -argument list of one or more of the following options, separated by -spaces: - -\fIShowAllDesks\fP - All windows on all desktops (except those -listed in WindowSkipList directives) will be shown. This is the -default. - -\fIShowCurrentDesk\fP - Only windows on the current desktop will -be shown. - -\fIShowDesk n\fP - Only windows on desktop number \fIn\fP will -be shown. +.IP "WindowId \fIid func\fP" +The WindowId function is similar to the Next and Prev funcs, except +that it looks for a specific window \fIid\fP and runs the specified +\fIfunc\fP on it. +.EX +WindowId 0x34567890 Raise +WindowId 0x34567890 WarpToWindow 50 50 +.EE +Mostly this is useful for functions used with the WindowList builtin. -\fIShowGeometry\fP - When specified, the geometry of each window -will be added to the list. This option is off by default. +.IP "WindowList \fI[options]\fP" +Generates a pop-up menu (and pops it up) in which the title and +geometry of each of the windows currently on the desk top are shown. +The geometry of iconified windows is shown in parenthesis. Selecting +an item from the window list pop-up menu will by default cause the +interpreted function WindowListFunc to be run with the window id of +that window passed in as $0. By default the WindowListFunc looks like +this: +.EX +AddToFunc WindowListFunc "I" WindowId $0 Iconify -1 ++ "I" WindowId $0 Focus ++ "I" WindowId $0 Raise ++ "I" WindowId $0 WarpToWindow 5p 5p +.EE +You can Destroy the builtin WindowListFunc and create your own if +these defaults do not suit you. -\fIUseWindowNames\fP - The windows are listed using the window -(titlebar) name. This is the default +The \fIoptions\fP passed to WindowList can be "NoGeometry", "Function +<funcname>", "Desk <desknum>", "CurrentDesk", "NoIcons", "Icons", +"OnlyIcons", "NoNormal", "Normal", "OnlyNormal", "NoSticky", "Sticky", +"OnlySticky", "NoOnTop", "OnTop", "OnlyOnTop", "Unsorted", "UseIconName", +"Alphabetic", "NotAlphabetic". -\fIUseIconNames\fP - The window's icon names is used instead of -the title name. +(Note - normal means not iconic, sticky, or ontop) +If you pass in a function via "Function <funcname>", $0 is the window +id: +.EX +AddToFunc IFunc "I" WindowId $0 Iconify +WindowList Function IFunc NoSticky CurrentDesk NoIcons +.EE -.IP "WindowFont \fIfontname\fP" -Makes \fIfvwm95\fP use font \fIfontname\fP instead of "fixed" for window -title-bars. +If you wanted to use the WindowList as an icon manager, you could invoke +the following: +.EX +WindowList OnlyIcons Sticky OnTop Geometry +.EE +(Note - the "Only" options essentially wipe out all other ones...) .IP "WindowsDesk \fInew_desk\fP" --- fvwm95-2.0.43ba.orig/libs/wild.c +++ fvwm95-2.0.43ba/libs/wild.c @@ -1,4 +1,5 @@ #include <stdio.h> +#include <string.h> #ifndef TRUE #define TRUE 1 --- fvwm95-2.0.43ba.orig/libs/strutils.c +++ fvwm95-2.0.43ba/libs/strutils.c @@ -91,14 +91,14 @@ int len; char *start; - while(((isspace(*source))&&(*source != '\n'))&&(*source != 0)) source++; + while(((isspace((unsigned char)*source))&&(*source != '\n'))&&(*source != 0)) source++; len = 0; start = source; while((*source != '\n')&&(*source != 0)) len++, source++; source--; - while((isspace(*source))&&(*source != 0)&&(len >0)) len--, source--; + while((isspace((unsigned char)*source))&&(*source != 0)&&(len >0)) len--, source--; *dest = safemalloc(len+1); strncpy(*dest,start,len); @@ -136,3 +136,11 @@ strcat(CatS, c); return CatS; } + +int StrEquals(char *s1,char *s2) +{ + if (!s1 || !s2) + return 0; + return (strcasecmp(s1,s2)==0); +} + --- fvwm95-2.0.43ba.orig/libs/SendText.c +++ fvwm95-2.0.43ba/libs/SendText.c @@ -1,5 +1,8 @@ +#include <unistd.h> #include <stdio.h> #include <ctype.h> +#include <string.h> + /************************************************************************ * * Sends arbitrary text to fvwm --- fvwm95-2.0.43ba.orig/libs/ReadPacket.c +++ fvwm95-2.0.43ba/libs/ReadPacket.c @@ -1,5 +1,6 @@ #include <stdio.h> #include <stdlib.h> +#include <unistd.h> #include <fvwm/fvwmlib.h> #include "../fvwm/module.h" --- fvwm95-2.0.43ba.orig/libs/SendInfo.c +++ fvwm95-2.0.43ba/libs/SendInfo.c @@ -1,4 +1,6 @@ +#include <unistd.h> #include <stdio.h> +#include <string.h> #include <ctype.h> /*********************************************************************** --- fvwm95-2.0.43ba.orig/libs/GetLine.c +++ fvwm95-2.0.43ba/libs/GetLine.c @@ -36,7 +36,7 @@ *tline = NULL; if(*tline != NULL) { - while(isspace(**tline))(*tline)++; + while(isspace((unsigned char)**tline))(*tline)++; } /* fprintf(stderr,"%x %x\n",header[1],M_END_CONFIG_INFO);*/ @@ -52,5 +52,6 @@ } } + return line; } --- fvwm95-2.0.43ba.orig/libs/hostname.c +++ fvwm95-2.0.43ba/libs/hostname.c @@ -1,4 +1,5 @@ #include <FVWMconfig.h> +#include <string.h> #if HAVE_UNAME /* define mygethostname() by using uname() */ @@ -8,9 +9,11 @@ int mygethostname(char *client, int length) { struct utsname sysname; + int i; - uname(&sysname); + i = uname(&sysname); strncpy(client,sysname.nodename,length); + return i; } #else #if HAVE_GETHOSTNAME @@ -18,7 +21,7 @@ int mygethostname(char *client, int length) { - gethostname(client, length); + return gethostname(client, length); } #else int mygethostname(char *client, int length) --- fvwm95-2.0.43ba.orig/libs/Makefile.in +++ fvwm95-2.0.43ba/libs/Makefile.in @@ -14,7 +14,7 @@ fvwm_rc=@fvwm_rc@ fvwm_name=@fvwm_name@ -EXTRA_DEFINES=-DXPM -DSHAPE +EXTRA_DEFINES=-DXPM -DSHAPE -DI18N CC=@CC@ INCLUDES=-I${top_srcdir}/include ${x_includes} CFLAGS=${INCLUDES} @CFLAGS@ ${EXTRA_DEFINES} @@ -29,6 +29,7 @@ SRCS=GetFdWidth.c \ GetFont.c \ + GetFontSet.c \ GetLine.c \ Picture.c \ ReadPacket.c \ @@ -46,6 +47,7 @@ OBJS=GetFdWidth.o \ GetFont.o \ + GetFontSet.o \ GetLine.o \ Picture.o \ ReadPacket.o \ --- fvwm95-2.0.43ba.orig/libs/GetFontSet.c +++ fvwm95-2.0.43ba/libs/GetFontSet.c @@ -0,0 +1,64 @@ +/* This file brings from GetFont.c */ + +#include <FVWMconfig.h> + +#include <stdio.h> +#include <unistd.h> +#include <stdlib.h> + +#include <X11/Xlib.h> +#include <X11/Xutil.h> +#include <X11/Xlocale.h> + +#include <fvwm/fvwmlib.h> + +XFontSet GetFontSetOrFixedCLocale(Display *disp, char *fontname); +/* +** loads fontset or "fixed" on failure +*/ +XFontSet GetFontSetOrFixed(Display *disp, char *fontname) +{ + XFontSet fontset; + char **ml; + int mc; + char *ds; + + if ((fontset = XCreateFontSet(disp,fontname,&ml,&mc,&ds))==NULL) + { + fprintf(stderr, + "[GetFontSetOrFixed]: WARNING -- can't get fontset %s, trying 'fixed'\n", + fontname); + /* fixed should always be avail, so try that */ + if ((fontset = XCreateFontSet(disp,"fixed",&ml,&mc,&ds))==NULL) + { + fprintf(stderr,"[GetFontSetOrFixed]: ERROR -- can't get fontset 'fixed'\n"); + fprintf(stderr,"[GetFontSetOrFixed]: Trying C locale as last resort\n"); + fontset = GetFontSetOrFixedCLocale(disp, fontname); + } + } + return fontset; +} + +XFontSet GetFontSetOrFixedCLocale(Display *disp, char *fontname) +{ + XFontSet fontset; + char **ml; + int mc; + char *ds; + + setlocale(LC_CTYPE, "C"); + if ((fontset = XCreateFontSet(disp,fontname,&ml,&mc,&ds))==NULL) + { + fprintf(stderr, + "[GetFontSetOrFixedCLocale]: WARNING -- can't get fontset %s, trying 'fixed'\n", + fontname); + /* fixed should always be avail, so try that */ + if ((fontset = XCreateFontSet(disp,"fixed",&ml,&mc,&ds))==NULL) + { + fprintf(stderr,"[GetFontSetOrFixedCLocale]: ERROR -- can't get fontset 'fixed'\n"); + } + } + setlocale(LC_CTYPE, ""); + return fontset; +} + --- fvwm95-2.0.43ba.orig/icons/Makefile.in +++ fvwm95-2.0.43ba/icons/Makefile.in @@ -2,7 +2,7 @@ SHELL=/bin/sh prefix=@prefix@ -icon_dir=@prefix@/lib/X11/icons +icon_dir=${prefix}/lib/X11/icons INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ --- fvwm95-2.0.43ba.orig/Makefile.in +++ fvwm95-2.0.43ba/Makefile.in @@ -12,7 +12,7 @@ exec_prefix=@exec_prefix@ subdirs=libs fvwm modules utils sample.fvwmrc xpmroot icons mini-icons -CFLAGS = -O +CFLAGS= @CFLAGS@ all: @for i in ${subdirs}; do \ --- fvwm95-2.0.43ba.orig/mini-icons/Makefile.in +++ fvwm95-2.0.43ba/mini-icons/Makefile.in @@ -2,7 +2,7 @@ SHELL=/bin/sh prefix=@prefix@ -icon_dir=@prefix@/lib/X11/mini-icons +icon_dir=${prefix}/lib/X11/mini-icons INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ --- fvwm95-2.0.43ba.orig/configure +++ fvwm95-2.0.43ba/configure @@ -1,7 +1,7 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.12 +# Generated automatically using autoconf version 2.13 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation @@ -51,6 +51,7 @@ # Initialize some other variables. subdirs= MFLAGS= MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. ac_max_here_lines=12 @@ -334,7 +335,7 @@ verbose=yes ;; -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.12" + echo "configure generated by autoconf version 2.13" exit 0 ;; -with-* | --with-*) @@ -504,9 +505,11 @@ # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross +ac_exeext= +ac_objext=o if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then @@ -524,7 +527,7 @@ -CFLAGS=-O +#CFLAGS=-O #------------------------------------------------------------------- # @@ -536,15 +539,16 @@ # Extract the first word of "uname -a", so it can be a program name with args. set dummy uname -a; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:540: checking for $ac_word" >&5 +echo "configure:543: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_UNAME'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$UNAME"; then ac_cv_prog_UNAME="$UNAME" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_UNAME="uname -a" @@ -566,15 +570,16 @@ # Extract the first word of "uname", so it can be a program name with args. set dummy uname; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:570: checking for $ac_word" >&5 +echo "configure:574: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_UNAME'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$UNAME"; then ac_cv_prog_UNAME="$UNAME" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_UNAME="uname" @@ -597,7 +602,7 @@ if test "$UNAME" != ""; then uname=`$UNAME` echo $ac_n "checking 'checking cached value of \$uname'""... $ac_c" 1>&6 -echo "configure:601: checking 'checking cached value of \$uname'" >&5 +echo "configure:606: checking 'checking cached value of \$uname'" >&5 if eval "test \"`echo '$''{'ac_cv_prog_uname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -628,15 +633,16 @@ # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:632: checking for $ac_word" >&5 +echo "configure:637: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_AR="ar cr" @@ -657,15 +663,16 @@ # Extract the first word of "makedepend", so it can be a program name with args. set dummy makedepend; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:661: checking for $ac_word" >&5 +echo "configure:667: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_MAKEDEPEND'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$MAKEDEPEND"; then ac_cv_prog_MAKEDEPEND="$MAKEDEPEND" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_MAKEDEPEND="makedepend" @@ -686,15 +693,16 @@ # Extract the first word of "rm", so it can be a program name with args. set dummy rm; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:690: checking for $ac_word" >&5 +echo "configure:697: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$RM"; then ac_cv_prog_RM="$RM" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_RM="rm -f" @@ -715,15 +723,16 @@ # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:719: checking for $ac_word" >&5 +echo "configure:727: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_RANLIB="ranlib" @@ -742,7 +751,7 @@ fi echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:746: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:755: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -771,15 +780,16 @@ # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:775: checking for $ac_word" >&5 +echo "configure:784: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_CC="gcc" @@ -800,16 +810,17 @@ # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:804: checking for $ac_word" >&5 +echo "configure:814: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_prog_rejected=no - for ac_dir in $PATH; do + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then @@ -844,25 +855,61 @@ echo "$ac_t""no" 1>&6 fi + if test -z "$CC"; then + case "`uname -s`" in + *win32* | *WIN32*) + # Extract the first word of "cl", so it can be a program name with args. +set dummy cl; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:865: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="cl" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + ;; + esac + fi test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:852: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:897: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross -cat > conftest.$ac_ext <<EOF -#line 862 "configure" +cat > conftest.$ac_ext << EOF + +#line 908 "configure" #include "confdefs.h" + main(){return(0);} EOF -if { (eval echo configure:866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -876,18 +923,24 @@ ac_cv_prog_cc_works=no fi rm -fr conftest* +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:886: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:939: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:891: checking whether we are using GNU C" >&5 +echo "configure:944: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -896,7 +949,7 @@ yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:900: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:953: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -907,11 +960,15 @@ if test $ac_cv_prog_gcc = yes; then GCC=yes - ac_test_CFLAGS="${CFLAGS+set}" - ac_save_CFLAGS="$CFLAGS" - CFLAGS= - echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:915: checking whether ${CC-cc} accepts -g" >&5 +else + GCC= +fi + +ac_test_CFLAGS="${CFLAGS+set}" +ac_save_CFLAGS="$CFLAGS" +CFLAGS= +echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 +echo "configure:972: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -926,16 +983,20 @@ fi echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 - if test "$ac_test_CFLAGS" = set; then - CFLAGS="$ac_save_CFLAGS" - elif test $ac_cv_prog_cc_g = yes; then +if test "$ac_test_CFLAGS" = set; then + CFLAGS="$ac_save_CFLAGS" +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then CFLAGS="-g -O2" else - CFLAGS="-O2" + CFLAGS="-g" fi else - GCC= - test "${CFLAGS+set}" = set || CFLAGS="-g" + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi fi @@ -947,7 +1008,7 @@ #------------------------------------------------------------------- echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:951: checking how to run the C preprocessor" >&5 +echo "configure:1012: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -962,14 +1023,14 @@ # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext <<EOF -#line 966 "configure" +#line 1027 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:972: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:1033: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : else @@ -979,14 +1040,31 @@ rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext <<EOF -#line 983 "configure" +#line 1044 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:989: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:1050: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP="${CC-cc} -nologo -E" + cat > conftest.$ac_ext <<EOF +#line 1061 "configure" +#include "confdefs.h" +#include <assert.h> +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1067: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : else @@ -999,6 +1077,8 @@ rm -f conftest* fi rm -f conftest* +fi +rm -f conftest* ac_cv_prog_CPP="$CPP" fi CPP="$ac_cv_prog_CPP" @@ -1008,9 +1088,9 @@ echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking for AIX""... $ac_c" 1>&6 -echo "configure:1012: checking for AIX" >&5 +echo "configure:1092: checking for AIX" >&5 cat > conftest.$ac_ext <<EOF -#line 1014 "configure" +#line 1094 "configure" #include "confdefs.h" #ifdef _AIX yes @@ -1040,7 +1120,7 @@ #------------------------------------------------------------------- echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1044: checking how to run the C preprocessor" >&5 +echo "configure:1124: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1055,14 +1135,14 @@ # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext <<EOF -#line 1059 "configure" +#line 1139 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1065: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:1145: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : else @@ -1072,14 +1152,31 @@ rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext <<EOF -#line 1076 "configure" +#line 1156 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1082: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:1162: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP="${CC-cc} -nologo -E" + cat > conftest.$ac_ext <<EOF +#line 1173 "configure" +#include "confdefs.h" +#include <assert.h> +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1179: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : else @@ -1092,6 +1189,8 @@ rm -f conftest* fi rm -f conftest* +fi +rm -f conftest* ac_cv_prog_CPP="$CPP" fi CPP="$ac_cv_prog_CPP" @@ -1105,15 +1204,16 @@ # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1109: checking for $ac_word" >&5 +echo "configure:1208: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$YACC"; then ac_cv_prog_YACC="$YACC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_YACC="$ac_prog" @@ -1137,15 +1237,16 @@ # Extract the first word of "flex", so it can be a program name with args. set dummy flex; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1141: checking for $ac_word" >&5 +echo "configure:1241: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$LEX"; then ac_cv_prog_LEX="$LEX" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_LEX="flex" @@ -1170,7 +1271,7 @@ *) ac_lib=l ;; esac echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6 -echo "configure:1174: checking for yywrap in -l$ac_lib" >&5 +echo "configure:1275: checking for yywrap in -l$ac_lib" >&5 ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1178,7 +1279,7 @@ ac_save_LIBS="$LIBS" LIBS="-l$ac_lib $LIBS" cat > conftest.$ac_ext <<EOF -#line 1182 "configure" +#line 1283 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -1189,7 +1290,7 @@ yywrap() ; return 0; } EOF -if { (eval echo configure:1193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1237,28 +1338,30 @@ # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:1245: checking for a BSD compatible install" >&5 +echo "configure:1347: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" + IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" for ac_dir in $PATH; do # Account for people who put trailing slashes in PATH elements. case "$ac_dir/" in /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. - for ac_prog in ginstall installbsd scoinst install; do + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do if test -f $ac_dir/$ac_prog; then if test $ac_prog = install && grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. - # OSF/1 installbsd also uses dspmsg, but is usable. : else ac_cv_path_install="$ac_dir/$ac_prog -c" @@ -1288,10 +1391,12 @@ # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' + test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1295: checking whether ln -s works" >&5 +echo "configure:1400: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1337,7 +1442,7 @@ #------------------------------------------------------------------- echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6 -echo "configure:1341: checking for main in -lXbsd" >&5 +echo "configure:1446: checking for main in -lXbsd" >&5 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1345,14 +1450,14 @@ ac_save_LIBS="$LIBS" LIBS="-lXbsd $LIBS" cat > conftest.$ac_ext <<EOF -#line 1349 "configure" +#line 1454 "configure" #include "confdefs.h" int main() { main() ; return 0; } EOF -if { (eval echo configure:1356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1375,12 +1480,12 @@ fvwm95_checkBoth=0 echo $ac_n "checking for connect""... $ac_c" 1>&6 -echo "configure:1379: checking for connect" >&5 +echo "configure:1484: checking for connect" >&5 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1384 "configure" +#line 1489 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char connect(); below. */ @@ -1403,7 +1508,7 @@ ; return 0; } EOF -if { (eval echo configure:1407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_connect=yes" else @@ -1425,7 +1530,7 @@ if test "$fvwm95_checkSocket" = 1; then echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6 -echo "configure:1429: checking for main in -lsocket" >&5 +echo "configure:1534: checking for main in -lsocket" >&5 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1433,14 +1538,14 @@ ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <<EOF -#line 1437 "configure" +#line 1542 "configure" #include "confdefs.h" int main() { main() ; return 0; } EOF -if { (eval echo configure:1444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1466,12 +1571,12 @@ fvwm95_oldLibs=$LIBS LIBS="$LIBS -lsocket -lnsl" echo $ac_n "checking for accept""... $ac_c" 1>&6 -echo "configure:1470: checking for accept" >&5 +echo "configure:1575: checking for accept" >&5 if eval "test \"`echo '$''{'ac_cv_func_accept'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1475 "configure" +#line 1580 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char accept(); below. */ @@ -1494,7 +1599,7 @@ ; return 0; } EOF -if { (eval echo configure:1498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_accept=yes" else @@ -1516,12 +1621,12 @@ fi echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 -echo "configure:1520: checking for gethostbyname" >&5 +echo "configure:1625: checking for gethostbyname" >&5 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1525 "configure" +#line 1630 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char gethostbyname(); below. */ @@ -1544,7 +1649,7 @@ ; return 0; } EOF -if { (eval echo configure:1548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_gethostbyname=yes" else @@ -1562,7 +1667,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6 -echo "configure:1566: checking for main in -lnsl" >&5 +echo "configure:1671: checking for main in -lnsl" >&5 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1570,14 +1675,14 @@ ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <<EOF -#line 1574 "configure" +#line 1679 "configure" #include "confdefs.h" int main() { main() ; return 0; } EOF -if { (eval echo configure:1581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1600,6 +1705,52 @@ fi +# For FvwmConsole +echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6 +echo "configure:1711: checking for readline in -lreadline" >&5 +ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lreadline $LIBS" +cat > conftest.$ac_ext <<EOF +#line 1719 "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char readline(); + +int main() { +readline() +; return 0; } +EOF +if { (eval echo configure:1730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + READLINE_LIBRARIES="-lreadline" + cat >> confdefs.h <<\EOF +#define HAVE_READLINE 1 +EOF + +else + echo "$ac_t""no" 1>&6 +READLINE_LIBRARIES="" +fi + #------------------------------------------------------------------- # @@ -1608,12 +1759,12 @@ #------------------------------------------------------------------- echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1612: checking for ANSI C header files" >&5 +echo "configure:1763: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1617 "configure" +#line 1768 "configure" #include "confdefs.h" #include <stdlib.h> #include <stdarg.h> @@ -1621,8 +1772,8 @@ #include <float.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1625: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:1776: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* ac_cv_header_stdc=yes @@ -1638,7 +1789,7 @@ if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext <<EOF -#line 1642 "configure" +#line 1793 "configure" #include "confdefs.h" #include <string.h> EOF @@ -1656,7 +1807,7 @@ if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext <<EOF -#line 1660 "configure" +#line 1811 "configure" #include "confdefs.h" #include <stdlib.h> EOF @@ -1677,7 +1828,7 @@ : else cat > conftest.$ac_ext <<EOF -#line 1681 "configure" +#line 1832 "configure" #include "confdefs.h" #include <ctype.h> #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1688,7 +1839,7 @@ exit (0); } EOF -if { (eval echo configure:1692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -1720,12 +1871,12 @@ #------------------------------------------------------------------- echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:1724: checking for working const" >&5 +echo "configure:1875: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1729 "configure" +#line 1880 "configure" #include "confdefs.h" int main() { @@ -1774,7 +1925,7 @@ ; return 0; } EOF -if { (eval echo configure:1778: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1929: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -1795,21 +1946,21 @@ fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:1799: checking for inline" >&5 +echo "configure:1950: checking for inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <<EOF -#line 1806 "configure" +#line 1957 "configure" #include "confdefs.h" int main() { } $ac_kw foo() { ; return 0; } EOF -if { (eval echo configure:1813: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1964: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -1846,12 +1997,12 @@ for ac_func in gethostname waitpid sysconf uname do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1850: checking for $ac_func" >&5 +echo "configure:2001: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1855 "configure" +#line 2006 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -1874,7 +2025,7 @@ ; return 0; } EOF -if { (eval echo configure:1878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1898,15 +2049,15 @@ fi done -for ac_func in strerror strcasecmp strncasecmp +for ac_func in strerror strcasecmp strncasecmp strtoul do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1905: checking for $ac_func" >&5 +echo "configure:2056: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1910 "configure" +#line 2061 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -1929,7 +2080,7 @@ ; return 0; } EOF -if { (eval echo configure:1933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1968,7 +2119,7 @@ # Uses ac_ vars as temps to allow command line to override cache and checks. # --without-x overrides everything else, but does not touch the cache. echo $ac_n "checking for X""... $ac_c" 1>&6 -echo "configure:1972: checking for X" >&5 +echo "configure:2123: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -2030,13 +2181,13 @@ # First, try using that file with no special directory specified. cat > conftest.$ac_ext <<EOF -#line 2034 "configure" +#line 2185 "configure" #include "confdefs.h" #include <$x_direct_test_include> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2039: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:2190: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* # We can compile using X headers with no special include directory. @@ -2104,14 +2255,14 @@ ac_save_LIBS="$LIBS" LIBS="-l$x_direct_test_library $LIBS" cat > conftest.$ac_ext <<EOF -#line 2108 "configure" +#line 2259 "configure" #include "confdefs.h" int main() { ${x_direct_test_function}() ; return 0; } EOF -if { (eval echo configure:2115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* LIBS="$ac_save_LIBS" # We can link X programs with no special library path. @@ -2207,7 +2358,7 @@ fvwm_name="fvwm95" fvwm_rc=".fvwm95rc" -fvwm_icons="$x_includes/X11/bitmaps:$x_includes/X11/pixmaps:$prefix/icons" +fvwm_icons="${x_includes:-/usr/include}/X11/bitmaps:${x_includes:-/usr/include}/X11/pixmaps:$prefix/icons" if test "x$x_libraries" != x ; then x_libraries="-L$x_libraries" @@ -2261,7 +2412,7 @@ # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. (set) 2>&1 | - case `(ac_space=' '; set) 2>&1` in + case `(ac_space=' '; set | grep ac_space) 2>&1` in *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote substitution # turns \\\\ into \\, and sed turns \\ into \). @@ -2328,7 +2479,7 @@ echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.12" + echo "$CONFIG_STATUS generated by autoconf version 2.13" exit 0 ;; -help | --help | --hel | --he | --h) echo "\$ac_cs_usage"; exit 0 ;; @@ -2382,9 +2533,11 @@ s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF $ac_vpsub $extrasub +s%@SHELL@%$SHELL%g s%@CFLAGS@%$CFLAGS%g s%@CPPFLAGS@%$CPPFLAGS%g s%@CXXFLAGS@%$CXXFLAGS%g +s%@FFLAGS@%$FFLAGS%g s%@DEFS@%$DEFS%g s%@LDFLAGS@%$LDFLAGS%g s%@LIBS@%$LIBS%g @@ -2415,8 +2568,10 @@ s%@LEX@%$LEX%g s%@LEXLIB@%$LEXLIB%g s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g +s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g s%@INSTALL_DATA@%$INSTALL_DATA%g s%@LN_S@%$LN_S%g +s%@READLINE_LIBRARIES@%$READLINE_LIBRARIES%g s%@x_libraries@%$x_libraries%g s%@x_includes@%$x_includes%g s%@fvwm_icons@%$fvwm_icons%g --- fvwm95-2.0.43ba.orig/include/fvwm/fvwmlib.h +++ fvwm95-2.0.43ba/include/fvwm/fvwmlib.h @@ -16,7 +16,9 @@ char *strerror(int num); #endif char *CatString3(char *a, char *b, char *c); +int StrEquals(char *s1,char *s2); int mygethostname(char *client, int namelen); +int mygetostype(char *buf, int max); void SendText(int *fd,char *message,unsigned long window); void SendInfo(int *fd,char *message,unsigned long window); char *safemalloc(int); @@ -48,5 +50,8 @@ void DestroyPicture(Display *, Picture *p); XFontStruct *GetFontOrFixed(Display *disp, char *fontname); +#ifdef I18N +XFontSet GetFontSetOrFixed(Display *disp, char *fontname); +#endif #endif --- fvwm95-2.0.43ba.orig/include/fvwm/version.h +++ fvwm95-2.0.43ba/include/fvwm/version.h @@ -1,2 +1,2 @@ -#define VERSION "2.0.43a" +#define VERSION "2.0.43b" --- fvwm95-2.0.43ba.orig/include/FVWMconfig.h.in +++ fvwm95-2.0.43ba/include/FVWMconfig.h.in @@ -16,6 +16,10 @@ /* Define if you have the ANSI C header files. */ #undef STDC_HEADERS +/* Define if you have the GNU readline libraries. */ +/* Used only for FvwmConsole */ +#undef HAVE_READLINE + /* Define if you have the gethostname function. */ #undef HAVE_GETHOSTNAME --- fvwm95-2.0.43ba.orig/include/FVWMconfig.h +++ fvwm95-2.0.43ba/include/FVWMconfig.h @@ -17,6 +17,10 @@ /* Define if you have the ANSI C header files. */ #define STDC_HEADERS 1 +/* Define if you have the GNU readline libraries. */ +/* Used only for FvwmConsole */ +#define HAVE_READLINE 1 + /* Define if you have the gethostname function. */ #define HAVE_GETHOSTNAME 1 --- fvwm95-2.0.43ba.orig/debian/fvwm95-icons.postinst +++ fvwm95-2.0.43ba/debian/fvwm95-icons.postinst @@ -0,0 +1,9 @@ +#!/bin/sh + +if [ "$1" = "configure" ]; then + if [ -d /usr/doc -a -h /usr/doc/fvwm95-icons -a -d /usr/share/doc/fvwm95-icons ]; then + rm -f /usr/doc/fvwm95-icons + fi +fi + +#DEBHELPER# --- fvwm95-2.0.43ba.orig/debian/README.debian +++ fvwm95-2.0.43ba/debian/README.debian @@ -0,0 +1,16 @@ +Before reporting a bug about not being able to switch windows, +CHECK YOUR NUM-LOCK KEY. It must be off to do most anything you want. + +Whether this behavior is a design flaw in X11 or a bug in fvwm95 +is open for debate. It's probably a design flaw that X doesn't provide +an easy way for fvwm95 to fix this bug. At the moment people will just +have to turn it off. + +If you would prefer Japanese menus, you can try the system.fvwm95rc-ja +file provided by Atsuhito Kohda <kohda@pm.tokushima-u.ac.jp>. To use this, + + cp /usr/share/doc/fvwm95/examples/system.fvwm95rc-ja /etc/X11/fvwm95/system.fvwm95rc + +You must also have EUC-encoded Japanese fonts installed for X to get +any usable result. Such fonts can be found (among other places) in +the package xfonts-intl-japanese. --- fvwm95-2.0.43ba.orig/debian/menu +++ fvwm95-2.0.43ba/debian/menu @@ -0,0 +1,17 @@ +?package(fvwm95):needs="wm" section="WindowManagers" title="Fvwm95" command="/usr/bin/X11/fvwm95" +?package(fvwm95):needs="fvwm95module" section="WindowManagers/Modules" title="Fvwm95-Audio" command="/usr/lib/X11/fvwm95/FvwmAudio" +?package(fvwm95):needs="fvwm95module" section="WindowManagers/Modules" title="Fvwm95-Backer" command="/usr/lib/X11/fvwm95/FvwmBacker" +?package(fvwm95):needs="fvwm95module" section="WindowManagers/Modules" title="Fvwm95-Banner" command="/usr/lib/X11/fvwm95/FvwmBanner" +?package(fvwm95):needs="fvwm95module" section="WindowManagers/Modules" title="Fvwm95-Buttons" command="/usr/lib/X11/fvwm95/FvwmButtons DebianFvwm95Buttons" +?package(fvwm95):needs="fvwm95module" section="WindowManagers/Modules" title="Fvwm95-Console" command="/usr/lib/X11/fvwm95/FvwmConsole" +?package(fvwm95):needs="fvwm95module" section="WindowManagers/Modules" title="Fvwm95-Debug" command="/usr/lib/X11/fvwm95/FvwmDebug" +?package(fvwm95):needs="fvwm95module" section="WindowManagers/Modules" title="Fvwm95-IconBox" command="/usr/lib/X11/fvwm95/FvwmIconBox" +?package(fvwm95):needs="fvwm95module" section="WindowManagers/Modules" title="Fvwm95-IconMan" command="/usr/lib/X11/fvwm95/FvwmIconMan" +?package(fvwm95):needs="fvwm95module" section="WindowManagers/Modules" title="Fvwm95-Ident" command="/usr/lib/X11/fvwm95/FvwmIdent" +?package(fvwm95):needs="fvwm95module" section="WindowManagers/Modules" title="Fvwm95-Pager" command="/usr/lib/X11/fvwm95/FvwmPager 0 3" +?package(fvwm95):needs="fvwm95module" section="WindowManagers/Modules" title="Fvwm95-Save" command="/usr/lib/X11/fvwm95/FvwmSave" +?package(fvwm95):needs="fvwm95module" section="WindowManagers/Modules" title="Fvwm95-SaveDesk" command="/usr/lib/X11/fvwm95/FvwmSaveDesk" +?package(fvwm95):needs="fvwm95module" section="WindowManagers/Modules" title="Fvwm95-Scroll" command="/usr/lib/X11/fvwm95/FvwmScroll" +?package(fvwm95):needs="fvwm95module" section="WindowManagers/Modules" title="Fvwm95-Talk" command="/usr/lib/X11/fvwm95/FvwmTalk" +?package(fvwm95):needs="fvwm95module" section="WindowManagers/Modules" title="Fvwm95-TaskBar" command="/usr/lib/X11/fvwm95/FvwmTaskBar DebianFvwm95TaskBar" +?package(fvwm95):needs="fvwm95module" section="WindowManagers/Modules" title="Fvwm95-WinList" command="/usr/lib/X11/fvwm95/FvwmWinList" --- fvwm95-2.0.43ba.orig/debian/control +++ fvwm95-2.0.43ba/debian/control @@ -0,0 +1,27 @@ +Source: fvwm95 +Section: x11 +Priority: optional +Maintainer: Daniel Martin <fizbin@debian.org> +Standards-Version: 3.1.1 +Build-Depends: debhelper (>= 2.0.76), libx11-dev, libxt-dev, libxext-dev, libxpm-dev, libreadline5-dev | libreadline-dev, autoconf, libxmu-dev + +Package: fvwm95 +Architecture: any +Pre-Depends: x11-common (>= 1:7.0.0) +Depends: ${shlibs:Depends} +Provides: x-window-manager +Recommends: fvwm95-icons, xbase-clients, xterm, menu (>= 1.5-1) +Description: Win95 lookalike Window Manager for X + fvwm95 is a Window Manager for the X Window System, configured + to look like a win95 user interface. + Fvwm95 is no longer maintained upstream; its main continued + advantage is that it has low resource requirements compared to + some of the other window managers that attempt to look somewhat + like windows 95. (TM) + +Package: fvwm95-icons +Suggests: fvwm95 +Architecture: all +Description: Win95ish icons for X + fvwm95 is a Window Manager for the X Window System, configured + to look like a win95 user interface. These are its icons. --- fvwm95-2.0.43ba.orig/debian/postrm +++ fvwm95-2.0.43ba/debian/postrm @@ -0,0 +1,91 @@ +#!/bin/bash +# fvwm95.postrm based on +# postrm.skeleton +# Skeleton maintainer script showing all the possible cases. +# Written by Charles Briscoe-Smith, March-April 1998. Public Domain. +# written and placed in the public domain by Daniel Martin +# Thu Apr 9 00:32:30 EDT 1998 + +# Abort if any command returns an error value +set -e + +# This script is called twice during the removal of the package; once +# after the removal of the package's files from the system, and as +# the final step in the removal of this package, after the package's +# conffiles have been removed. +menu_method_file=/etc/menu-methods/fvwm95 + +case "$1" in + remove) + # This package has been removed, but its configuration has not yet + # been purged. + if [ -f $menu_method_file ] ; then + chmod a-x $menu_method_file + if [ -x /usr/bin/update-menus ]; then update-menus ; fi + fi + if [ -x /usr/sbin/register-window-manager ]; then + register-window-manager --remove fvwm95 + fi + + # Policy 9.1.2, see #330793 + if [ -d /usr/local/share/fvwm95/icons ]; then rmdir /usr/local/share/fvwm95-icons 2>/dev/null || true ; fi + if [ -d /usr/local/share/fvwm95 ]; then rmdir /usr/local/share/fvwm95 2>/dev/null || true ; fi + if [ -d /usr/local/share/icons ]; then rmdir /usr/local/share/fvwm95 2>/dev/null || true ; fi + + ;; + disappear) + if test "$2" != overwriter; then + echo "$0: undocumented call to \`postrm $*'" 1>&2 + exit 1 + fi + # This package has been completely overwritten by package $3 + # (version $4). All our files are already gone from the system. + # This is a special case: neither "prerm remove" nor "postrm remove" + # have been called, because dpkg didn't know that this package would + # disappear until this stage. + if [ -f $menu_method_file ] ; then + chmod a-x $menu_method_file + if [ -x /usr/bin/update-menus ]; then update-menus ; fi + fi + if [ -x /usr/sbin/register-window-manager ]; then + register-window-manager --remove fvwm95 + fi + ;; + purge) + # This package has previously been removed and is now having + # its configuration purged from the system. + # remove fvwm95 from window manager list + if [ -x /usr/sbin/register-window-manager ]; then + register-window-manager --remove fvwm95 + fi + # remove miscellaneous leftover menu files + rm -f /etc/fvwm95/menudefs.hook + ;; + upgrade) + # About to upgrade FROM THIS VERSION to version $2 of this package. + # "prerm upgrade" has been called for this version, and "preinst + # upgrade" has been called for the new version. Last chance to + # clean up. + : + ;; + failed-upgrade) + # About to upgrade from version $2 of this package TO THIS VERSION. + # "prerm upgrade" has been called for the old version, and "preinst + # upgrade" has been called for this version. This is only used if + # the previous version's "postrm upgrade" couldn't handle it and + # returned non-zero. (Fix old postrm bugs here.) + : + ;; + abort-*) + # Back out of an attempt to install this package. Undo the effects of + # "preinst install/upgrade...". + for oldfile in /etc/X11/fvwm95/deleteme/*; do + if [ -f $oldfile ] ; then mv $oldfile /etc/X11/fvwm95; fi + done + rm -rf /etc/X11/fvwm95/deleteme + ;; + *) echo "$0: didn't understand being called with \`$1'" 1>&2 + exit 1;; +esac + +exit 0 --- fvwm95-2.0.43ba.orig/debian/prerm +++ fvwm95-2.0.43ba/debian/prerm @@ -0,0 +1,24 @@ +#!/bin/sh + +set -e + +case "$1" in + remove) + # This package about to be removed. + if [ -L /usr/doc/fvwm95 ]; then rm -f /usr/doc/fvwm95 ; fi + rm -f /etc/X11/fvwm95/menus.dat /etc/X11/fvwm95/menudefs.hook + update-alternatives --remove x-window-manager /usr/bin/X11/fvwm95 + ;; + upgrade) + if [ -L /usr/doc/fvwm95 ]; then rm -f /usr/doc/fvwm95 ; fi + ;; + deconfigure|failed-upgrade) + update-alternatives --remove x-window-manager /usr/bin/X11/fvwm95 + ;; + *) + echo "$0: didn't understand being called with \`$1'" 1>&2 + exit 0 + ;; +esac + +exit 0 --- fvwm95-2.0.43ba.orig/debian/rules +++ fvwm95-2.0.43ba/debian/rules @@ -0,0 +1,179 @@ +#!/usr/bin/make -f +# Reworked from the bottom up, October 1998 +# by Daniel Martin <fizbin@debian.org> +# Reworked somewhat after the style of Manoj Srivastava's "make" package's +# debian/rules file. + +SHELL = /bin/bash + +package = fvwm95 +icon_package = fvwm95-icons + +topdir := $(shell pwd) +package_tmp = debian/tmp +icon_package_tmp = debian/tmp-icon +package_tmp_a = $(topdir)/debian/tmp +icon_package_tmp_a = $(topdir)/debian/tmp-icon + +package_subdirs = fvwm modules +icon_package_subdirs = icons mini-icons + +FILES_TO_CLEAN = TAGS tags debian/files* config.cache debian/substvars +DIRS_TO_CLEAN = $(package_tmp) $(icon_package_tmp) +STAMPS_TO_CLEAN = stamp-configure stamp-build + +install_file= install -p -o root -g root -m 644 +install_program= install -p -o root -g root -m 755 +make_directory= install -d -o root -g root -m 755 + +configure: stamp-configure + +stamp-configure: + $(checkdir) + (INSTALL_PROGRAM="/usr/bin/install -s"; export INSTALL_PROGRAM ; \ + CFLAGS="-O2 -g -Wall -Wno-unused"; export CFLAGS ; \ + ./configure --prefix=/usr) + touch stamp-configure + +build: stamp-build + +stamp-build: stamp-configure + $(checkdir) + ${MAKE} + touch stamp-build + +clean: + $(checkdir) + -rm -f $(STAMPS_TO_CLEAN) + -test -f Makefile && $(MAKE) distclean + -rm -f $(FILES_TO_CLEAN) + -rm -rf $(DIRS_TO_CLEAN) + -rm -f `find . \( -name '*.o' -o -name core -o -name '*.rej' \ + -o -name '*~' \ + -o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \ + -o -name '.*.rej' -o -name '.SUMS' -o -size 0 \) -print` + +binary-indep: checkroot stamp-build + $(checkdir) + -rm -rf $(icon_package_tmp) + $(make_directory) $(icon_package_tmp) $(icon_package_tmp)/DEBIAN + $(make_directory) $(icon_package_tmp)/usr/share/icons + $(make_directory) $(icon_package_tmp)/usr/share/fvwm95/icons + $(install_file) debian/debmenu.xpm \ + $(icon_package_tmp)/usr/share/fvwm95/icons + for i in ${icon_package_subdirs}; do \ + echo Installing in $$i ; \ + $(make_directory) $(icon_package_tmp)/usr/share/fvwm95/$$i ; \ + (cd $$i; ${MAKE} install icon_dir=$(icon_package_tmp_a)/usr/share/fvwm95/$$i) \ + done + $(make_directory) $(icon_package_tmp)/usr/share/doc/$(icon_package)/ + $(install_file) debian/copyright \ + $(icon_package_tmp)/usr/share/doc/$(icon_package)/copyright + $(install_file) debian/changelog $(icon_package_tmp)/usr/share/doc/$(icon_package)/changelog.Debian + gzip -9fq $(icon_package_tmp)/usr/share/doc/$(icon_package)/changelog.Debian + dpkg-gencontrol -isp -p$(icon_package) -P$(icon_package_tmp) + chown -R root.root $(icon_package_tmp) + chmod -R g-ws $(icon_package_tmp) + dpkg --build $(icon_package_tmp) .. + +binary-arch: checkroot stamp-build + $(checkdir) + -rm -rf $(package_tmp) + $(make_directory) $(package_tmp) $(package_tmp)/DEBIAN + $(make_directory) $(package_tmp)/usr/bin + $(make_directory) $(package_tmp)/usr/lib + $(make_directory) $(package_tmp)/usr/lib/X11/fvwm95 + $(make_directory) $(package_tmp)/etc/X11/fvwm95 + $(make_directory) $(package_tmp)/etc/X11/fvwm95/.fvwm95 + $(make_directory) $(package_tmp)/usr/share/man/man{1,5} + $(make_directory) $(package_tmp)/usr/lib/menu + $(make_directory) $(package_tmp)/usr/share/doc $(package_tmp)/usr/share/doc/fvwm95 + $(make_directory) $(package_tmp)/usr/share/xsessions + $(make_directory) $(package_tmp)/etc/menu-methods + @for i in ${package_subdirs}; do \ + echo Installing in $$i ; \ + (cd $$i; $(MAKE) install prefix=$(package_tmp_a)/usr \ + fvwm_dir=$(package_tmp_a)/usr/lib/X11/fvwm95 \ + man_dir=$(package_tmp_a)/usr/share/man/man5 \ + icon_dir=$(package_tmp_a)/usr/share/fvwm95/icons) \ + done + + (cd $(package_tmp)/usr/share/man/man5; rm -f fvwm95.1 fvwm95.1x; \ + for i in *.1; do \ + mv $$i `basename $$i .1`.5fvwm95; \ + done) + test -f $(package_tmp)/usr/share/man/man1/fvwm95.1x || \ + $(install_file) fvwm/fvwm95.man $(package_tmp)/usr/share/man/man1/fvwm95.1x + + $(install_file) sample.fvwmrc/system.fvwm95rc \ + $(package_tmp)/usr/share/doc/fvwm95/ + $(install_file) debian/fvwm95.desktop \ + $(package_tmp)/usr/share/xsessions/ + $(install_file) debian/fvwm95rc \ + $(package_tmp)/etc/X11/fvwm95/system.fvwm95rc + $(install_file) debian/*.hook \ + $(package_tmp)/etc/X11/fvwm95/ + mv $(package_tmp)/etc/X11/fvwm95/null.hook \ + $(package_tmp)/etc/X11/fvwm95/.fvwm95/null.hook + ln -s /etc/X11/fvwm95/system.fvwm95rc \ + $(package_tmp)/usr/lib/X11/fvwm95/.fvwm95rc + ln -s /etc/X11/fvwm95/.fvwm95 \ + $(package_tmp)/usr/lib/X11/fvwm95/.fvwm95 + (cd $(package_tmp)/etc/X11/fvwm95/.fvwm95; \ + for i in init-restart.hook main-menu.hook post.hook init.hook \ + menudefs.hook pre.hook main-menu-pre.hook restart.hook; \ + do ln -s null.hook $$i; done) + mv $(package_tmp)/usr/lib/X11/fvwm95/scripts \ + $(package_tmp)/usr/share/doc/fvwm95/FvwmScript-examples +#Debian menus + $(install_program) debian/menu-method $(package_tmp)/etc/menu-methods/fvwm95 + $(install_file) debian/menu $(package_tmp)/usr/lib/menu/fvwm95 +#Debian installation scripts/other files + #debstd -m INSTALL README *.lsm docs/* debian/README.sysrc debian/example.fvwm95rc_menu + $(install_file) INSTALL README *.lsm debian/README.sysrc \ + debian/README.debian \ + $(package_tmp)/usr/share/doc/$(package) + $(make_directory) $(package_tmp)/usr/share/doc/$(package)/html + $(install_file) docs/GPL.html docs/color_combos docs/error_codes \ + docs/example.fvwm95rc docs/example.fvwm95rc.fr \ + docs/m4_hacks docs/modules.tex docs/index.html \ + $(package_tmp)/usr/share/doc/$(package) + $(install_file) docs/html/* $(package_tmp)/usr/share/doc/$(package)/html + $(make_directory) $(package_tmp)/usr/share/doc/$(package)/examples + $(install_file) `cat debian/examples` \ + $(package_tmp)/usr/share/doc/$(package)/examples + gzip -9frq $(package_tmp)/usr/share/doc/$(package) + gzip -9fqr $(package_tmp)/usr/share/man + $(install_file) debian/copyright \ + $(package_tmp)/usr/share/doc/$(package)/copyright + $(install_file) debian/changelog $(package_tmp)/usr/share/doc/$(package)/changelog.Debian + gzip -9fq $(package_tmp)/usr/share/doc/$(package)/changelog.Debian + $(install_file) Changelog $(package_tmp)/usr/share/doc/$(package)/changelog + $(install_file) debian/conffiles $(package_tmp)/DEBIAN/conffiles + $(install_program) debian/preinst $(package_tmp)/DEBIAN/preinst + $(install_program) debian/prerm $(package_tmp)/DEBIAN/prerm + $(install_program) debian/postinst $(package_tmp)/DEBIAN/postinst + $(install_program) debian/postrm $(package_tmp)/DEBIAN/postrm + dpkg-shlibdeps $(package_tmp)/usr/bin/fvwm95 \ + $(package_tmp)/usr/lib/X11/fvwm95/Fvwm* + dpkg-gencontrol -isp -p$(package) -P$(package_tmp) + chown -R root.root $(package_tmp) + chmod -R g-ws $(package_tmp) + dpkg --build $(package_tmp) .. + +define checkdir + test -f debian/rules +endef + +# Below here is fairly generic really + +binary: binary-indep binary-arch + +source diff: + @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false + +checkroot: + $(checkdir) + test root = "`whoami`" + +.PHONY: binary binary-arch binary-indep clean checkroot --- fvwm95-2.0.43ba.orig/debian/changelog +++ fvwm95-2.0.43ba/debian/changelog @@ -0,0 +1,445 @@ +fvwm95 (2.0.43ba-24.2) unstable; urgency=low + + * Non-maintainer upload. + * Get rid of the /usr/doc link in postinst (Closes: #351516). + * Clean up dirs if not empty in /usr/local/ postrm (Closes: #330793). + * Remove xcontrib from Recommends (Closes: #351516). + + -- Amaya Rodrigo Sastre <amaya@debian.org> Sat, 15 Jul 2006 18:26:06 +0200 + +fvwm95 (2.0.43ba-24.1) unstable; urgency=low + + * NMU + * Add a Pre-Depends on x11-common (>= 1:7.0.0) (Closes: #365285) + * Remove {prerm,postinst}.fvwm95-icons since it was only used to create the + deprecated /usr/doc link + * Fix install-menu path + * + + -- Julien Danjou <acid@debian.org> Tue, 23 May 2006 11:27:23 +0200 + +fvwm95 (2.0.43ba-24) unstable; urgency=low + + * Rework usage of /usr/X11R6 etc. for new X11R7. (closes: Bug#365285) + + -- Daniel Martin <fizbin@debian.org> Mon, 1 May 2006 00:24:58 -0400 + +fvwm95 (2.0.43ba-23) unstable; urgency=low + + * Add libxmu-dev to Build-Depends (closes: Bug#317417) + * Add fvwm95.desktop file (closes: Bug#322653) + * Rebuild against libreadline5 (closes: Bug#326361) + * Remove 'netscape' and 'pine' from default fvwm95rc (closes: Bug#333578) + + -- Daniel Martin <fizbin@debian.org> Wed, 2 Nov 2005 23:00:47 -0500 + +fvwm95 (2.0.43ba-22) unstable; urgency=low + + * Fix postrm syntax error (closes: Bug#302620) + + -- Daniel Martin <fizbin@debian.org> Sun, 17 Apr 2005 18:10:27 -0400 + +fvwm95 (2.0.43ba-21) unstable; urgency=low + + * Add explicit output encoding to menu method (closes: Bug#296819) + * Remove calls to wm-menu-config from preinst and postinst (closes: + Bug#296965) + * Fix FvwmIconMan.c 's preprocessing logic since apparently gcc's + preprocessor no longer allows the construct `somevar.##someparam' + (closes: Bug#253668) + * Fix FvwmIconMan/xmanager.c by including forgotten header file + (closes: Bug#226527) + * Fix most C warnings (still remaining: many type-punning breaks + strict aliasing warnings, many "void main" warnings, and a few + others) + + -- Daniel Martin <fizbin@debian.org> Mon, 28 Feb 2005 11:57:18 -0500 + +fvwm95 (2.0.43ba-20) unstable; urgency=low + + * Add missing "libxt-dev" to Build-Depends (closes: Bug#280463) + + -- Daniel Martin <fizbin@debian.org> Thu, 11 Nov 2004 20:12:56 -0500 + +fvwm95 (2.0.43ba-19) unstable; urgency=low + + * Fix description typo ("it's" => "its") (closes: Bug#268509) + * Recompile against new xlibs regime. + + -- Daniel Martin <fizbin@debian.org> Fri, 29 Oct 2004 17:06:39 -0400 + +fvwm95 (2.0.43ba-18) unstable; urgency=low + + * Fix modules/FvwmWharf/Wharf.h to use "signed char" for + icon_info.depth, since that is sometimes set to -1 as a flag. + (closes: Bug#176389) + + -- Daniel Martin <fizbin@debian.org> Mon, 13 Jan 2003 20:53:44 -0500 + +fvwm95 (2.0.43ba-17) unstable; urgency=low + + * Fix the menu method so as to replace spaces with underscores in menu + names; this means that menus with spaces no longer create a + configuration file that crashes. (closes: Bug#163376) + * incorporate NMU changes (closes: Bug#92668) (closes: Bug#132843) + + -- Daniel Martin <fizbin@debian.org> Sat, 30 Nov 2002 09:44:47 -0500 + +fvwm95 (2.0.43ba-16.1) unstable; urgency=low + + * Non-maintainer upload. + * debian/conffiles: added etc/X11/fvwm95/.fvwm95/null.hook. + Closes: Bug#132843. + * debian/README.debian: fixed spelling mistake. + * debian/copyright: changed path to license. + * debian/rules: + - compress changelog.Debian file in order to be + policy-compliant. + - added mandatory changelog file to fvwm95-icons. + + -- Jerome Marant <jerome@debian.org> Sun, 17 Feb 2002 09:29:26 +0100 + +fvwm95 (2.0.43ba-16) unstable; urgency=low + + * Updated configure (new autoconf) + * Fixed location of x-window-manager.1.gz slave alternative link + (closes: #127915) + * Remove dependency on fvwm-common (closes: #110332) + * Removed references to offix editor from default buttons (closes: + #71109) + * Removed geometry from Netscape button (closes: #77332) + * Included Japanese example system.fvwm95rc file (closes: #60416) + * Added vase-insensitive flag to fvwm95's menu methods (closes: #81760) + * Rewrapped man page source code so as to not have ".Xdefaults" at the + start of a line (closes: #61153) + + -- Daniel Martin <fizbin@debian.org> Sun, 27 Jan 2002 15:22:57 -0500 + +fvwm95 (2.0.43ba-15.1) unstable; urgency=high + + * NMU with permission of Daniel Martin <fizbin@debian.org>. + * Corrected the build dependencies for unstable. (closes: #92668) + * #include <time.h> in: + - modules/FvwmTaskBar/Goodies.c + - modules/FvwmTaskBar/ShowDateModule.c + (needed to compile with the latest glibc) + * Added "-isp" to all calls of dpkg-gencontrol in debian/rules. + + -- Adrian Bunk <bunk@fs.tum.de> Mon, 4 Jun 2001 09:40:27 +0200 + +fvwm95 (2.0.43ba-15) frozen unstable; urgency=low + + * Fixed a typo in postrm that was discovered in dicussing bug + #64218. (Bug #64218 is marked as Critical, so this should probably + make it into frozen) + + -- Daniel Martin <fizbin@debian.org> Fri, 19 May 2000 10:09:14 -0400 + +fvwm95 (2.0.43ba-14) unstable; urgency=low + + * Fixed minor error in preinst logic dealing with deleting obsolete + conffiles. (closes #64218) + + -- Daniel Martin <fizbin@debian.org> Tue, 16 May 2000 12:51:21 -0400 + +fvwm95 (2.0.43ba-13) unstable; urgency=low + + * Added a last-resort get font from C locale option to GetFontSetOrFixed - + This is a kludge to get around the problem reported in bug #59985; for + some reason the XCreateFontSet call fails when in non-iso8859-1 + locales. I'd greatly appreciate help on this. + + -- Daniel Martin <fizbin@debian.org> Thu, 9 Mar 2000 12:10:06 -0500 + +fvwm95 (2.0.43ba-12) frozen unstable; urgency=low + + * Fixed broken fvwm95-icons postinst; I don't know how that got released. + + -- Daniel Martin <fizbin@debian.org> Tue, 7 Mar 2000 09:27:22 -0500 + +fvwm95 (2.0.43ba-11) unstable; urgency=low + + * Reworked prerm and postrm according to the new way to do X window + managers. (That is, with update-alternatives and Provides: + x-window-manager) (closes 59556) + + -- Daniel Martin <fizbin@debian.org> Mon, 6 Mar 2000 09:56:14 -0500 + +fvwm95 (2.0.43ba-10) unstable; urgency=low + + * Merged in I18N patches from fvwm95-ja + * /usr/doc -> /usr/share/doc transition work + + -- Daniel Martin <fizbin@debian.org> Fri, 17 Sep 1999 13:43:18 -0400 + +fvwm95 (2.0.43ba-9) unstable; urgency=low + + * Added prerm statements to remove menu-generated files (closes + #37102, #29412) + * Fixed fvwm2 reference in menu-method (closes 37102) + * Fixed permissions/ownership of created directories (closes 35750) + + -- Daniel Martin <fizbin@debian.org> Sun, 9 May 1999 08:57:29 -0400 + +fvwm95 (2.0.43ba-8) frozen unstable; urgency=low + + * Reworked dependencies after the great X reorg. + + -- Daniel Martin <fizbin@debian.org> Tue, 2 Feb 1999 21:37:07 -0500 + +fvwm95 (2.0.43ba-7) frozen unstable; urgency=low + + * Reworked prerm and postrm according to new menu docs (closes 29412) + * Fixed WindowList bug (not reported to BTS) by ripping WindowList + code out of fvwm2 - this also removes the ability to make fvwm95 + dump core by doing "raise_it 1 1" in FvwmTalk or a config file. + * Fixed occasional FvwmTaskBar bug that caused buttonpresses to go + unrecognized. I'm still not certain what exactly triggered this. + (closes 22933) + + -- Daniel Martin <fizbin@debian.org> Mon, 16 Nov 1998 20:14:43 -0500 + +fvwm95 (2.0.43ba-6) frozen; urgency=low + + * Reworked postinst to use new register-window-manager program (Closes 28928) + * Fixed "binary" target in debian/rules so that it doesn't depend on + fvwm95 already being installed (enables automated builds) + * Various minor code tweaks to make gcc -Wall complain less (uninitialized + variables, pointer is unsigned long assumptions, etc.) + + -- Daniel Martin <fizbin@debian.org> Fri, 6 Nov 1998 01:05:00 -0500 + +fvwm95 (2.0.43ba-5) unstable; urgency=low + + * Fixed install when menu package isn't installed (I had moved + example.fvwm95rc_menu.gz but forgot to update the postinst to the new + location) (Closes 28709, 28710, 28711) + * Changed voodoo patch in modules/FvwmTaskBar to something that works + because it should work, not just as a coincidence + * More debstd fun - forgot the changelog + + -- Daniel Martin <fizbin@debian.org> Thu, 29 Oct 1998 16:55:30 -0500 + +fvwm95 (2.0.43ba-4) unstable; urgency=low + + * Forgot, in move away from debstd, to install conffiles file + into debian/tmp/DEBIAN + + -- Daniel Martin <fizbin@debian.org> Fri, 23 Oct 1998 00:06:35 -0400 + +fvwm95 (2.0.43ba-3) frozen; urgency=low + + * Many bugfixes were in -2, but I discovered this bug soon enough + after uploading -2 that I simply pulled -2 from Incoming. + (Besides; I hadn't announced -2 to debian-devel-changes) + * Fixed mode on /etc/menu-methods/fvwm95 (it wasn't executeable) + + -- Daniel Martin <fizbin@debian.org> Tue, 20 Oct 1998 23:10:41 -0400 + +fvwm95 (2.0.43ba-2) frozen; urgency=low + + * Reworked menu configs for better useability - fvwm95 really + can't use all of fvwm2's modules, and the ones it can use it + has its own copies of. + * Reworked postinst to not depend on tempfile; removed superfluous + Pre-Depends on debianutils (>= 1.8) (closes #28237) + * Fixed debian/rules clean to remove upstream libc5 .o files + (closes #28236) + * Fixed buffer overflows preventing long PixmapPath lines + * Fixed FvwmConsole (closes #6455) + + -- Daniel Martin <fizbin@debian.org> Tue, 20 Oct 1998 09:51:07 -0400 + +fvwm95 (2.0.43ba-1) frozen; urgency=low + + * New upstream version + * I know, new upstream versions aren't supposed to go into + frozen, but I missed the freeze by just a smidge, and + really this upstream version is well over a year old + see README.Debian for details on versioning info. + + -- Daniel Martin <fizbin@debian.org> Thu, 28 May 1998 10:39:46 -0400 + +fvwm95 (2.0.43b-5) frozen; urgency=low + + * Fixed extraneous newline in postinst (closes #21538) + * Added Replaces: header due to pixmap overlaps with bo afterstep + + -- Daniel Martin <fizbin@debian.org> Wed, 13 May 1998 12:22:35 -0400 + +fvwm95 (2.0.43b-4) frozen; urgency=low + + * Repacked for frozen + * More examples in comments in .hook files in /etc/X11/fvwm95 + + -- Daniel Martin <fizbin@debian.org> Tue, 14 Apr 1998 10:53:34 -0400 + +fvwm95 (2.0.43b-3) unstable; urgency=low + + * Recommends: menu, since the provided menu is minimal at best without it (closes 15601) + * Reworked install scripts (clean up old config. file names, ask to make fvwm95 default) (closes 17342) + * Fixed problem wrt. Read in config. files and FvwmTaskBar (closes 20866 and 15952/15953) + * Moved icons from /usr/X11R6/icons to .../include/X11/pixmaps (closes 19749/19182 and 19910) + * New maintainer + + -- Daniel Martin <fizbin@debian.org> Thu, 9 Apr 1998 15:47:31 -0400 + +fvwm95 (2.0.43b-2) unstable; urgency=low + + * Remove a couple of obsolete files in debian after talking with Joost. + * Menu methods file fixed to refer to fvwm95rc instead of fvwm2rc95 + * Add suggests offix-files and offix-editor to make the Taskbar work + again. + * postrm script would not remove fvwm95 + * /etc/X11/window-managers replace fvwm95-2 with fvwm95 on upgrade. + * #8334 invocation of rxvt changed to use -fn instead of -font + + -- Christoph Lameter <clameter@debian.org> Wed, 1 Oct 1997 09:02:54 -0700 + +fvwm95 (2.0.43b-1) unstable; urgency=low + + * Build under hamm + * #6544 fvwm95 appends to the end of window-managers (May be changed in + the future) + * #12936 #8459 Build with xpm. + * #11031 Taskbar is included (I checked) + * #13211 Complaint re INSTALL: Contains some information that might be useful + * Remove spurious /usr/doc/copyright directory ?? + * #6188 Suggest netscape not offix + * #11752 supposed sec. hole fixed + * Bugs already fixed by Joost #7992, #13149 #13148 #11175 #11138 #10833 + #10771 #10214 #10210 #6545 #12774 #10835 + * Include manpages #5895, #6453, #6454 + * Upstream update + * Back to debstd (not too familiar with manual building) + * Please be careful with updates! the name of the config files everywhere + was changed from "fvwm2rc95" to "fvwm95rc" + + -- Christoph Lameter <clameter@debian.org> Mon, 29 Sep 1997 20:40:22 -0700 + +fvwm95 (2.0.42a-10.4) unstable; urgency=low + + * Added a fvwm95module entry to /etc/menu-methods/fvwm95. Now the + modules also appear in the menu's. + + -- joost witteveen <joost@rulcmc.leidenuniv.nl> Thu, 14 Aug 1997 16:25:37 +0200 + +fvwm95 (2.0.42a-10.3) unstable; urgency=low + + * Rebuild. People told me this fixed the missing modules problem, + apparently it does. + + -- joost witteveen <joost@rulcmc.leidenuniv.nl> Sat, 2 Aug 1997 21:40:54 +0200 + +fvwm95 (2.0.42a-10.2) unstable; urgency=low + + * Sorry, I meant /usr/X11R6/include, not /usr/X11/include (in + system.fvwm2rc95 files). + * Dropped the netscape + offix "Suggests" stuff. I believe Christoph + now has a Criscruft (or somesuch) package that'll install all his + favorite packages -- I'd say that's a better way of doing this. + * fvwm95-2 is now appended to the end of the window-manager list. + (fixing bug #6544). + + -- joost witteveen <joost@rulcmc.leidenuniv.nl> Mon, 23 Jun 1997 12:26:49 +0200 + +fvwm95 (2.0.42a-10.1) unstable; urgency=low + + * no, I'm not the maintainer, I just did the last 4 releases for fun. + This release doesn't attempt to fix all bugs, only those that are + related to menu, and bash-2.0. Still, it fixes quite a few bugs: + * added a "-f" to "-rm `find ...`" in the clean target. + * added ";"'s to for loops in Makefile.in, to keep bash-2.0 happy. + * replaced "/usr/include/X11/" by "/usr/X11/include" in default + system.fvwm2rc95-menu + * changed /etc/menu-method/fvwm95: now quotes titles in xterm arguments, + uses hotkeys, and uses "new-format" menu syntax. + * new suggests: menu + * if there was no /etc/X11/fvwm95/system.fvwm2rc95, then copy the + one found in /usr/doc/fvwm95/example/system.fvwm2rc95.gz (to make + fvwm95 usable without menu package). This is a hack, sure, but + as menu (when installed) will overwrite this file, it cannot be + a conffile. + * remove executable bits from /usr/lib/menu/fvwm95. + * compiled for libc6 + * changed description (no X-windows). + -- joost witteveen <joost@rulcmc.leidenuniv.nl> Sun, 22 Jun 1997 20:50:27 +0200 + +fvwm95 (2.0.42a-10) unstable; urgency=low + + * Fix for debmake (this doesn't use debmake, never has). + * Include menudefenitions in system.fvwm2rc95 file, as otherwise + * the TaskBar doesn't work properly. + + -- joost witteveen <joost@rulcmc.leidenuniv.nl> Fri, 3 Jan 1997 19:06:57 +0100 + +fvwm95 (2.0.42a-9) unstable; urgency=low + + * Removed the "touch /etc/X11/window-managers" again, and added + a dependancy on xbase + * Let depmake handle the example files + * local icon path chaged to /usr/local/lib/mini-icons in + system.fvwm2rc95 + * This package now doesn't work with menu-0.7 or before (menu-0.8 + is fine). + * Kept the netscape/offix buttons/suggestions, as current debian + maintainer preferes to keep them (and I'm but a mere temporary + upgrader of fvwm95). + -- joost witteveen <joost@rulcmc.leidenuniv.nl> Mon, 30 Dec 1996 13:23:10 +0100 + +fvwm95 (2.0.42a-7) unstable; urgency=low + + * Added support for the debian menu package. + * /etc/X11/fvwm95/system.fvwm2rc95 is now a conffile + (added a "cp debian/conffiles debian/tmp/DEBIAN" to the rules file) + * Added a "touch /etc/X11/window-managers" to the postinst, + to prevent bug 5517 (though I'm not sure this is TheRightSolution). + + -- joost witteveen <joost@rulcmc.leidenuniv.nl> Sat, 7 Dec 1996 17:22:37 +0100 + +fvwm95 (2.0.42a-6) unstable; urgency=low + + * Manpage for fvwm95-2 was missing + * Release 5 rejected for some reason by master + + -- Christoph Lameter <clameter@debian.org> Thu, 17 Oct 1996 09:00:00 +0808 + +fvwm95 (2.0.42a-5) unstable; urgency=low + + * Bug in postinst as a result of the last change. Corrupts + /etc/X11/window-managers! + + -- Christoph Lameter <clameter@debian.org> Fri, 20 Sep 1996 15:37:25 +0100 + +fvwm95 (2.0.42a-4) unstable; urgency=low + + * Removed usage of ed from postinst script and set up dependencies for sed + and grep. + + -- Christoph Lameter <clameter@debian.org> Fri, 20 Sep 1996 15:37:25 +0100 + +fvwm95 (2.0.42a-3) unstable; urgency=low + + * directory /usr/doc/example changed to usr/doc/examples + + -- Christoph Lameter <clameter@debian.org> Tue, 17 Sep 1996 15:37:25 +0100 + +fvwm95 (2.0.42a-2) unstable; urgency=low + + * /etc/X11/fvwm95/system.fvwm2rc95 fixed up so that xterm calls work with + the debian way of naming things. + * postrm script removes fvwm95 from the list of Window Managers. + * Some cleanup in postinst script + + -- Christoph Lameter <clameter@debian.org> Tue, 10 Sep 1996 15:37:25 +0100 + +fvwm95 (2.0.42a-1) unstable; urgency=low + + * Initial Release, Handle with care, and submit improvement patches + if possible. I'd be glad if someone else took this package since + I dont think I know enough or have the time to deal with all the + issues that I am sure will come up. I just want this to be in debian. + + -- Christoph Lameter <clameter@waterf.org> Thu, 01 Sep 1996 15:37:25 +0100 + + --- fvwm95-2.0.43ba.orig/debian/restart.hook +++ fvwm95-2.0.43ba/debian/restart.hook @@ -0,0 +1,3 @@ +# Similar to init.hook, but for the RestartFunction, which is +# executed when fvwm is restarted. + --- fvwm95-2.0.43ba.orig/debian/conffiles +++ fvwm95-2.0.43ba/debian/conffiles @@ -0,0 +1,10 @@ +/etc/X11/fvwm95/system.fvwm95rc +/etc/menu-methods/fvwm95 +/etc/X11/fvwm95/init-restart.hook +/etc/X11/fvwm95/init.hook +/etc/X11/fvwm95/main-menu-pre.hook +/etc/X11/fvwm95/main-menu.hook +/etc/X11/fvwm95/.fvwm95/null.hook +/etc/X11/fvwm95/post.hook +/etc/X11/fvwm95/pre.hook +/etc/X11/fvwm95/restart.hook --- fvwm95-2.0.43ba.orig/debian/fvwm95rc +++ fvwm95-2.0.43ba/debian/fvwm95rc @@ -0,0 +1,642 @@ +# +# Configuration file for fvwm95 +# by Daniel Martin +# +# Much of this was inspired by/stolen from the fvwm2 configuration file. +# (by Lars Wirzenius) +# The easiest way to explain everything is to say "install fvwm2 and +# read /usr/doc/fvwm2/README.sysrc" +# + +# +# Use pre.hook for things that need to be done before anything else. +# For example, a PixmapPath might be defined here. +# + +Read /etc/X11/fvwm95/pre.hook +Read .fvwm95/pre.hook + +#========================================================================# + +# +# Fonts - one for window titles, another for icons, and another for the menus +# +WindowFont -adobe-helvetica-bold-r-*-*-12-*-*-*-*-*-*-* +IconFont fixed +MenuFont -adobe-helvetica-medium-r-*-*-*-120-*-*-*-*-*-* + +# +# Set the default window colors. The syntax is: +# DefaultColors winforecolor winbackcolor titleforecolor titlebackcolor +# where: +# winbackcolor is the background (border) color of all windows, +# including the menu windows +# winforecolor is used for the menu text +# titlebackcolor is the background color used for title bars of +# non selected windows +# titleforecolor is the color of the title text of non selected windows +# +DefaultColors Black #cccccc #cccccc grey50 + +# +# Text and background color for the title bar of the active (selected) window +# +HilightColors White #00007f + +# +# Text and background color for the title bar of sticky windows +# +StickyColors grey50 grey20 + +# You can also use the Style command to set the colors of individual +# title bars of some non-selected windows + + +#Style "*" ForeColor #c0c0c0 +#Style "*" BackColor grey51 + +#========================================================================# + +# +# Set up the major operating modes +# + +Style "*" ClickToFocus +# Put one of the following in your post.hook if you would prefer +# focus follow mouse. +#ChangeDefaultFocus MouseFocus +#ChangeDefaultFocus SloppyFocus + +# If we use the FvwmTaskBar we don't need the icons :-) +# Style "..." Icon are also commented below. +Style "*" NoIcon +Style "*" MWMFunctions +Style "*" HintOverride +Style "*" MWMDecor +Style "*" DecorateTransient + +OpaqueMoveSize 100 +# A low-memory system might want to do something like: +# OpaqueMoveSize 40 +EdgeScroll 100 100 +EdgeResistance 10000 10 + +# +# RandomPlacement prevents user interaction while placing windows: +# +Style "*" RandomPlacement, SmartPlacement + +# +# NoPPosition instructs fvwm to ignore the PPosition field in window +# geometry hints. Emacs annoyingly sets PPosition to (0,0)! +# +Style "*" NoPPosition + +#========================================================================# + +# +# Set the desk top size in units of physical screen size +# + +DeskTopSize 3x2 + +#========================================================================# + +# +# Module path and paths to the icons +# ModulePath is a colon-separated list, just like regular unix PATH +# +ModulePath /usr/lib/X11/fvwm95/ +PixmapPath .fvwm95/icons:.fvwm95/icons:.icons:/usr/local/share/fvwm95/icons:/usr/local/share/fvwm95/mini-icons:/usr/local/share/icons:/usr/share/fvwm95/icons:/usr/share/fvwm95/mini-icons:/usr/share/icons:/usr/share/pixmaps:/usr/include/X11/pixmaps:/usr/include/X11/bitmaps:/usr/include/pixmaps:/usr/include/bitmaps +IconPath .fvwm95/icons:.fvwm95/icons:.icons:/usr/local/share/fvwm95/icons:/usr/local/share/fvwm95/mini-icons:/usr/local/share/icons:/usr/share/fvwm95/icons:/usr/share/fvwm95/mini-icons:/usr/share/icons:/usr/share/pixmaps:/usr/include/X11/pixmaps:/usr/include/X11/bitmaps:/usr/include/pixmaps:/usr/include/bitmaps +#========================================================================# + +# Set the decoration styles and window options +# If compatible styles are set for a single window in multiple Style +# commands, then the styles are ORed together. If conflicting styles +# are set, the last one specified is used. + +# These commands should command before any menus or functions are defined, +# and before the internal pager is started. + +# +# Default border and handle widths +# +Style "*" BorderWidth 5, HandleWidth 5 + +Style "Fvwm*" NoTitle, Sticky, WindowListSkip +Style "Fvwm Pager" StaysOnTop, NoHandles +Style "FvwmBanner" StaysOnTop +Style "FvwmButtons" NoTitle, NoHandles, Sticky, CirculateSkip, WindowListSkip,BorderWidth 5, ClickToFocus +Style "FvwmConsole" WindowListHit, Title, Slippery +Style "FvwmTaskBar" ClickToFocus +#These are left to the local sysadmin to deal with +#Style "*lock" NoTitle, NoHandles, Sticky, WindowListSkip +#Style "xbiff" NoTitle, Sticky, WindowListSkip + +# +# Some mini-icons for the title bar +# +Style "*" TitleIcon mini-x2.xpm +Style "*xterm*" TitleIcon mini-term.xpm +Style "rxvt" TitleIcon mini-term.xpm +Style "xcalc" TitleIcon mini-calc.xpm +Style "xsession" TitleIcon mini-bx2.xpm +Style "xv" TitleIcon mini-xv.xpm +Style "Netscape" TitleIcon mini-nscape.xpm +Style "xmag" TitleIcon mini-zoom.xpm +Style "editor" TitleIcon mini-edit.xpm +Style "tkps" TitleIcon mini-run.xpm +Style "Ghostview" TitleIcon mini-gv.xpm +Style "Xcolorsel" TitleIcon mini-colors.xpm +Style "IDL*" TitleIcon mini-zoom.xpm +Style "xeyes" TitleIcon mini-eyes.xpm +Style "*fm*" TitleIcon mini-filemgr.xpm +# xman resource names +Style "topBox" TitleIcon mini-book1.xpm +Style "help" TitleIcon mini-book2.xpm +Style "manualBrowser" TitleIcon mini-book2.xpm +# xpaint resource names +Style "xpaint" TitleIcon mini-paint.xpm +Style "Canvas" TitleIcon mini-paint.xpm +Style "fatbits" TitleIcon mini-paint.xpm +Style "filebrowser" TitleIcon mini-ofolder.xpm + +Style "FvwmFile" TitleIcon mini-ofolder.xpm +Style "XDbx" TitleIcon mini-bug2.xpm + + +#Style "rxvt" Icon term.xpm +#Style "xterm" Icon xterm.xpm +#Style "color_xterm" Icon rterm.xpm +#Style "Appointment" Icon datebook.xpm +#Style "xcalc" Icon Rcalc.xpm +#Style "xbiff" Icon mail1.xpm +#Style "xmh" Icon mail1.xpm, StartsOnDesk 2 +#Style "xman" Icon xman.xpm +#Style "xvgr" Icon graphs.xpm +#Style "matlab" Icon math4.xpm +#Style "xmag" Icon mag_glass.xpm +#Style "xgraph" Icon graphs.xpm +#Style "xv" Icon xview.xpm +#Style "FvwmButtons" Icon toolbox.xpm +#Style "xconsole" Icon koala.xpm +#Style "xsession" Icon koala.xpm +#Style "editor" Icon textedit.xpm +#Style "ghostview" Icon gv.xpm + +#========================================================================# + +# +# Stuff to do at start-up +# For example, if you also have fvwm2 installed, you might add +# + "I" Exec setup-background +# to your .fvwm95/init.hook +# +# The init.hook, init-restart.hook and restart.hook files should +# contain continuation lines, eg: +# + "I" Exec xterm +# +# + +AddToFunc "InitFunction" "I" Exec xsetroot -solid cyan4 & +Read /etc/X11/fvwm95/init.hook +Read /etc/X11/fvwm95/init-restart.hook +Read .fvwm95/init.hook +Read .fvwm95/init-restart.hook + + +AddToFunc "RestartFunction" +Read /etc/X11/fvwm95/restart.hook +Read /etc/X11/fvwm95/init-restart.hook +Read .fvwm95/restart.hook +Read .fvwm95/init-restart.hook + +#========================================================================# + +# Now define some handy complex functions + +#------------------------------------------------------------------------------ +# These two maximize in both directions and just vertically, respectively. +# The idea is to allow for more customization, and also to not cover the +# taskbar. +#------------------------------------------------------------------------------ + +DestroyFunc "Maximize-Func" +AddToFunc "Maximize-Func" "I" Maximize 100 97 +DestroyFunc "Vert-Maximize-Func" +AddToFunc "Vert-Maximize-Func" "I" Maximize 0 97 + +# +# This one moves and then raises the window if you drag the mouse, +# only raises the window if you click, or does a full maximize if +# you double click +# +DestroyFunc "Move-or-Raise" +AddToFunc "Move-or-Raise" "M" Move ++ "M" Raise ++ "C" Raise ++ "D" Maximize-Func + +# +# This one moves and then lowers the window if you drag the mouse, +# only lowers the window if you click, or does a RaiseLower if you double +# click +# +DestroyFunc "Move-or-Lower" +AddToFunc "Move-or-Lower" "M" Move ++ "M" Lower ++ "C" Lower ++ "D" RaiseLower + +# +# This one moves or (de)iconifies: +# +DestroyFunc "Move-or-Iconify" +AddToFunc "Move-or-Iconify" "M" Move ++ "D" Iconify + +# +# This one resizes and then raises the window if you drag the mouse, +# only raises the window if you click, or does a RaiseLower if you double +# click +# +DestroyFunc "Resize-or-Raise" +AddToFunc "Resize-or-Raise" "M" Resize ++ "M" Raise ++ "C" Raise ++ "D" RaiseLower + +#------------------------------------------------------------------------------ +# This one focuses and then 'warps' to the center of the window. +#------------------------------------------------------------------------------ + + +DestroyFunc "FocusAndWarp" +AddToFunc FocusAndWarp "I" Focus ++ "I" WarpToWindow 50 50 + + +#------------------------------------------------------------------------------ +# Like the precedent, but de-iconifies first. +#------------------------------------------------------------------------------ + +DestroyFunc "DeiconifyFocusAndWarp" +AddToFunc DeiconifyFocusAndWarp "I" Iconify -1 ++ "I" FocusAndWarp + +#------------------------------------------------------------------------------ +# This one is used to modify some settings +#------------------------------------------------------------------------------ + +DestroyFunc "ChangeDefaultFocus" +AddToFunc ChangeDefaultFocus "I" Style "*" $0 ++ "I" Style "FvwmTaskBar" ClickToFocus ++ "I" Style "FvwmButtons" ClickToFocus ++ "I" Recapture + +#------------------------------------------------------------------------------ +# A really useful one: de-iconifies, warps to the window +# or creates it if it doen't exist (often used with mailtools) +#------------------------------------------------------------------------------ + +DestroyFunc "WarpOrExec" +AddToFunc WarpOrExec "I" Next [$0] Iconify -1 ++ "I" Next [$0] FocusAndWarp ++ "I" None [$0] Exec $0 $1 + +# +# The main menu. +# + +# +# Read in system and user menu definitions. +# + +DestroyMenu /Debian +# Read system and user menu prefixes +AddToMenu "/Debian" "DebianMenu" Title +Read /etc/X11/fvwm95/main-menu-pre.hook +Read .fvwm95/main-menu-pre.hook + +# Read the auto-generated menus +Read /etc/X11/fvwm95/menudefs.hook +Read .fvwm95/menudefs.hook + +# Add in user additions +Read /etc/X11/fvwm95/main-menu.hook +Read .fvwm95/main-menu.hook + +# Tack a quit entry on to the end +AddToMenu /Debian ++ "" Nop ++ "Exit Fvwm" Popup Quit-Verify + + +#========================================================================# +# +# The Window-Ops menu is for manipulating windows. It is invoked either +# from the main menu, or directly from the root window. +# + +# +# This defines the most common window operations +# +AddToMenu "Window" "Window Ops" Title ++ "&Move" Function Move-or-Raise ++ "&Resize" Function Resize-or-Raise ++ "R&aise%mini-raise.xpm%" Raise ++ "&Lower%mini-lower.xpm%" Lower ++ "(De)Iconify" Iconify ++ "(Un)Stick" Stick ++ "(Un)Maximize" Maximize-Func ++ "" Nop ++ "Kill" Destroy ++ "&Close" Close ++ "" Nop ++ "Switch to..." WindowList ++ "Refresh Screen%mini-ray.xpm%" Refresh + +# This menu is invoked as a sub-menu - it allows you to quit, +# restart, or switch to another WM. + +AddToMenu "Quit-Verify" "Really Quit Fvwm?" Title ++ "Restart%mini-turn.xpm%" Restart fvwm95 ++ "" Nop ++ "Yes, Really Quit%mini-exclam.xpm%" Quit ++ "No, Don't Quit%mini-cross.xpm%" Nop + + +# +# A trimmed down version of "Window Ops", good for binding to decorations +# +AddToMenu "Window-Ops2" "&Restore" Iconify -1 ++ "&Move" Move-or-Raise ++ "&Size" Resize-or-Raise ++ "Mi&nimize" Iconify 1 ++ "Ma&ximize" Maximize-Func ++ "" Nop ++ "&Kill" Destroy ++ "&Close Alt+F4" Close + +#========================================================================# + +# +# One more complex function - couldn't be defined earlier because it used +# pop-up menus +# +# This creates the "system" menu for the title-bar window-ops +# pop-up +# +AddToFunc "window_ops_func" "C" PopUp Window-Ops2 ++ "M" PopUp Window-Ops2 ++ "D" Close + + +#========================================================================# + +# +# Mouse bindings +# + +# First, for the mouse in the root window +# Button 1 gives the Utilities menu +# Button 2 gives the Window Ops menu +# Button 3 gives the WindowList (like TwmWindows) +# I use the AnyModifier (A) option for the modifier field, so you can hold down +# any shift-control-whatever combination you want! + +# Button Context Modifi Function +Mouse 1 R A Menu "/Debian" Nop +Mouse 2 R A Menu "Window Ops" Nop +Mouse 3 R A WindowList +#Mouse 3 R A Module "winlist" FvwmWinList transient + +# Now the title bar buttons +# Any button in the left title-bar button gives the window ops menu +# Any button in the first right title-bar button Iconifies the window +# Any button in the second title-bar button full-maximizes +# Any button in the third (rightmost) title-bar button closes +# Note the use of "Mouse 0" for AnyButton. + +# Button Context Modif Function +Mouse 0 1 A Function "window_ops_func" +Mouse 1 2 A Close +Mouse 0 4 A Function Maximize-Func +Mouse 0 4 S Function Vert-Maximize-Func +Mouse 0 6 A Iconify + +# +# Now the rest of the frame +# Here I invoke my complex functions for Move-or-lower, Move-or-raise, +# and Resize-or-Raise. +# +# Button 1 in the corner pieces, with any modifiers, gives resize or raise +Mouse 1 F A Function "Resize-or-Raise" +# Button 1 in the title, sides, or icon, w/ any modifiers, gives move or raise +Mouse 1 TS A Function "Move-or-Raise" + +# Button 1 in an icons gives move for a drag, de-iconify for a double-click, +# nothing for a single click +# Button 2 in an icon, w/ any modifiers, gives de-iconify +Mouse 1 I A Function "Move-or-Iconify" +Mouse 2 I A Iconify + +# Button 2 in the corners, sides, or title-bar gives the window ops menu +Mouse 2 FST A Function "window_ops_func" + +# Button 3 anywhere in the decoration (except the title-bar buttons) +# does a raise-lower +Mouse 3 TSIF A RaiseLower + +# Button 3 in the window, with the Modifier-1 key (usually alt or diamond) +# gives Raise-Lower. Used to use control here, but that interferes with xterm +Mouse 3 W M RaiseLower + +#========================================================================# + +# Now some keyboard shortcuts. + +# Arrow Keys +# press arrow + control anywhere, and scroll by 1 page +Key Left A C Scroll -100 0 +Key Right A C Scroll +100 +0 +Key Up A C Scroll +0 -100 +Key Down A C Scroll +0 +100 + +# press arrow + meta key, and scroll by 1/10 of a page +Key Left A M Scroll -10 +0 +Key Right A M Scroll +10 +0 +Key Up A M Scroll +0 -10 +Key Down A M Scroll +0 +10 + +# press shift arrow + control anywhere, and move the pointer by 1% of a page +Key Left A SC CursorMove -1 0 +Key Right A SC CursorMove +1 +0 +Key Up A SC CursorMove +0 -1 +Key Down A SC CursorMove +0 +1 + +# press shift arrow + meta key, and move the pointer by 1/10 of a page +Key Left A SM CursorMove -10 +0 +Key Right A SM CursorMove +10 +0 +Key Up A SM CursorMove +0 -10 +Key Down A SM CursorMove +0 +10 + +# Keyboard accelerators +Key F1 A M Popup "/Debian" +Key F2 A M Popup "Window Ops" +Key F3 A M Module "WindowList" FvwmWinList +Key F4 A M Iconify +Key F5 A M Move +Key F6 A M Resize + +#Page Up/Dapge Down keys are used to scroll by one desktop page +# in any context, press page up/down + control +# in root context, just pressing page up/down is OK +# +# I prefer the non-wrapping scroll. These are for example purposes only +#Key Next A C Scroll 100000 0 +#Key Next R N Scroll 100000 0 +#Key Prior A C Scroll -100000 0 +#Key Prior R N Scroll -100000 0 + +Key Tab A MS Prev FocusAndWarp +Key Tab A M Next FocusAndWarp + +Key Escape A C WindowList + +#========================================================================# + +# Definitions used by the modules + +#------------------ RunDialog (an FvwmForm incarnation) +*RunDialogFont *helvetica*m*r*n*14* +*RunDialogButtonFont *helvetica*m*o*n*14* +*RunDialogWarpPointer +*RunDialogFore black +*RunDialogBack gray70 +*RunDialogItemBack gray90 +*RunDialogItemFore black +*RunDialogLine left +*RunDialogText "Command: " +*RunDialogInput cmd 30 +*RunDialogLine center +*RunDialogButton quit "Run" ^M +*RunDialogCommand Exec $(cmd) +*RunDialogButton quit "Cancel" ^[ +*RunDialogCommand Nop + +#------------------ Pager +*FvwmPagerBack grey60 +*FvwmPagerFore black +*FvwmPagerFont -adobe-helvetica-bold-r-*-*-10-*-*-*-*-*-*-* +*FvwmPagerHilight #c0c0c0 +*FvwmPagerGeometry -1-1 +*FvwmPagerLabel 0 Desktop +*FvwmPagerSmallFont 5x8 + +#------------------ FvwmButtons (from 2.0.42) +*DebianFvwm95ButtonsFore Black +*DebianFvwm95ButtonsBack #c0c0c0 +*DebianFvwm95ButtonsFont -adobe-helvetica-bold-r-*-*-10-*-*-*-*-*-*-* +# Geometry - really likes to pick its own size, but giving a position is OK +*DebianFvwm95ButtonsGeometry -5-34 +# Layout: specify rows or columns, not both +*DebianFvwm95ButtonsRows 1 + +# Define the buttons to use..... + +*DebianFvwm95Buttons(Title xclock, Icon clock.xpm, \ + Swallow(UseOld) "xclock" 'Exec /usr/bin/X11/xclock -bg \#c0c0c0 \ + -padding 0 -geometry -1500-1500 &') +*DebianFvwm95Buttons(2x1, Title load, \ + Swallow(UseOld) "xload" 'Exec /usr/bin/X11/xload \ + -nolabel -bg grey60 -update 5 -geometry -1500-1500 &') +*DebianFvwm95Buttons(Title xterm, Icon rterm.xpm, \ + Action 'Exec "XTerm" xterm \ + -ls -sb -title "Color xterm" &') +*DebianFvwm95Buttons(Title xcalc, Icon rcalc.xpm, \ + Action 'Exec "Calculator" xcalc &') +*DebianFvwm95Buttons(Title xview, Icon xview.xpm, \ + Action 'Exec "xv" xv &') +*DebianFvwm95Buttons(Title gv, Icon gv.xpm, \ + Action 'Exec "gv" gv &') +*DebianFvwm95Buttons(Title mozilla, Icon nscape.xpm, \ + Action 'Exec "Mozilla" mozilla &') +*DebianFvwm95Buttons(Title kill, Icon rbomb.xpm, Action Destroy) +*DebianFvwm95Buttons(2x1, Swallow(UseOld) "Desktop" 'FvwmPager 0 0') + +#------------------ Identify +*FvwmIdentBack #000080 +*FvwmIdentFore Yellow +*FvwmIdentFont -adobe-helvetica-medium-r-*-*-12-*-*-*-*-*-*-* + +#------------------ FvwmWinList +*FvwmWinListBack #c0c0c0 +*FvwmWinListFore Black +*FvwmWinListFont -adobe-helvetica-bold-r-*-*-10-*-*-*-*-*-*-* +*FvwmWinListAction Click1 Iconify -1,Focus +*FvwmWinListAction Click2 Iconify +*FvwmWinListAction Click3 Module "FvwmIdent" FvwmIdent +*FvwmWinListUseSkipList +*FvwmWinListGeometry +0-1 +*FvwmWinListShowCurrentDesk + +#------------------ FvwmTaskBar +Style "FvwmTaskBar" NoTitle,BorderWidth 4,HandleWidth 4,Sticky,StaysOnTop,WindowListSkip,CirculateSkip + +*FvwmTaskBarGeometry +0-0 +*FvwmTaskBarFore Black +*FvwmTaskBarBack #c0c0c0 +*FvwmTaskBarTipsFore black +*FvwmTaskBarTipsBack bisque +*FvwmTaskBarFont -adobe-helvetica-medium-r-*-*-*-120-*-*-*-*-*-* +*FvwmTaskBarSelFont -adobe-helvetica-bold-r-*-*-*-120-*-*-*-*-*-* +*FvwmTaskBarAction Click1 Iconify -1,Raise,Focus +*FvwmTaskBarAction Click2 Iconify +*FvwmTaskBarAction Click3 Module "FvwmIdent" FvwmIdent +*FvwmTaskBarUseSkipList +*FvwmTaskBarAutoStick +*FvwmTaskBarStartName Start +*FvwmTaskBarStartMenu /Debian +*FvwmTaskBarStartIcon mini-exp.xpm +*FvwmTaskBarShowTips +#*FvwmTaskBarShowTransients +#*FvwmTaskBarClockFormat %I:%M%p +#*FvwmTaskBarHighlightFocus +#*FvwmTaskBarAutoHide + +#The taskbar now has plugins... +*FvwmTaskBarGoodyLoadableQuiet +*FvwmTaskBarGoodyLoadablePlugins /usr/lib/X11/fvwm95/plugins + +*FvwmTaskBarGoodyLoadableSymbol CheckLockModuleSymbol +*FvwmTaskBarGoodyLoadableId .Modem +*FvwmTaskBarCheckLockModuleIcon.Modem mini-connect.xpm +*FvwmTaskBarCheckLockModuleTip.Modem Modem is in use +*FvwmTaskBarCheckLockModuleLockFile.Modem /var/lock/LCK..modem + +*FvwmTaskBarGoodyLoadableSymbol ShowDateModuleSymbol +*FvwmTaskBarGoodyLoadableId .DATE +*FvwmTaskBarShowDateModuleTip.DATE Date +*FvwmTaskBarShowDateModuleCommand.DATE Exec xmessage `date` +*FvwmTaskBarShowDateModuleClockFormat.DATE %I:%M%p + +DestroyFunc Fvwm95MailFunc +AddToFunc Fvwm95MailFunc ++ "I" Exec xterm -T Mail -ls -fn 8x13 -e mutt -i + +*FvwmTaskBarGoodyLoadableSymbol MailCheckModuleSymbol +*FvwmTaskBarGoodyLoadableId .MAIL +*FvwmTaskBarMailCheckModuleMailIcon.MAIL mini-mail.xpm +*FvwmTaskBarMailCheckModuleCommand.MAIL Fvwm95MailFunc +*FvwmTaskBarMailCheckModuleNewMailIcon.MAIL mini-newmail.xpm +*FvwmTaskBarMailCheckModuleNewMailTip.MAIL You have new mail +#*FvwmTaskBarMailCheckModuleNewMailCommand.MAIL beep +*FvwmTaskBarMailCheckModuleUnreadMailIcon.MAIL mini-unreadmail.xpm +*FvwmTaskBarMailCheckModuleMailFile.MAIL /var/spool/mail/$USER +#*FvwmTaskBarMailCheckModuleAutoMailTip.MAIL +*FvwmTaskBarMailCheckModuleMailTipFormat.MAIL 1 0 10 2 10 + +Read /etc/X11/fvwm95/post.hook +Read .fvwm95/post.hook --- fvwm95-2.0.43ba.orig/debian/init.hook +++ fvwm95-2.0.43ba/debian/init.hook @@ -0,0 +1,15 @@ +# Additional commands for the InitFunction, which is +# automatically executed by fvwm upon startup. This should +# contain commands to start any programs you want to always +# start, such as a welcome screen or an xterm. +# In here should also go commands for selecting the background +# color/picture. +# +# The lines in init.hook should be "continuation lines" +# for a function, such as: +# +# + "I" Exec xterm +# +# See the fvwm95 manual page for details (the AddToFunction +# command). + --- fvwm95-2.0.43ba.orig/debian/postinst +++ fvwm95-2.0.43ba/debian/postinst @@ -0,0 +1,75 @@ +#!/bin/bash +# fvwm95.postinst based on +# postinst.skeleton +# Skeleton maintainer script showing all the possible cases. +# Written by Charles Briscoe-Smith, March-April 1998. Public Domain. +# Written by Daniel Martin Thu, 9 Apr 1998 00:20:58 -0400 +# and placed in the public domain + +# Abort if any command returns an error value +set -e + +# This script is called as the last step of the installation of the +# package. All the package's files are in place, dpkg has already done +# its automatic conffile handling, and all the packages we depend of +# are already fully installed and configured. + +package=fvwm95 +binfile=/usr/bin/fvwm95 + +# Prioirty 49 instead of 50 because fvwm95 is a bit old and is +# unmaintained upstream +case "$1" in + configure) + update-alternatives --install /usr/bin/x-window-manager \ + x-window-manager $binfile 49 \ + --slave /usr/share/man/man1/x-window-manager.1.gz \ + x-window-manager.1.gz /usr/share/man/man1/fvwm95.1x.gz + rm -rf /etc/X11/fvwm95/deleteme + chmod a+rx /etc/menu-methods/fvwm95 + if [ -x /usr/bin/update-menus ] ; then + /usr/bin/update-menus + else # menu default + zcat /usr/share/doc/fvwm95/examples/example.fvwm95rc_menu.gz > /etc/X11/fvwm95/menudefs.hook + fi + set +e + for i in /usr/local/share/icons /usr/local/share/fvwm95 \ + /usr/local/share/fvwm95/icons; do + if [ ! -d $i ] ; then + mkdir -p -m 2775 $i + chown root.staff $i + fi + done + set -e + ;; + abort-upgrade) + # Back out of an attempt to upgrade this package FROM THIS VERSION + # to version $2. Undo the effects of "prerm upgrade $2". + : + ;; + abort-remove) + if test "$2" != in-favour; then + echo "$0: undocumented call to \`postinst $*'" 1>&2 + exit 1 + fi + # Back out of an attempt to remove this package, which was due to + # a conflict with package $3 (version $4). Undo the effects of + # "prerm remove in-favour $3 $4". + : + ;; + abort-deconfigure) + if test "$2" != in-favour -o "$5" != removing; then + echo "$0: undocumented call to \`postinst $*'" 1>&2 + exit 1 + fi + # Back out of an attempt to deconfigure this package, which was + # due to package $6 (version $7) which we depend on being removed + # to make way for package $3 (version $4). Undo the effects of + # "prerm deconfigure in-favour $3 $4 removing $6 $7". + : + ;; + *) echo "$0: didn't understand being called with \`$1'" 1>&2 + exit 1;; +esac + +exit 0 --- fvwm95-2.0.43ba.orig/debian/main-menu.hook +++ fvwm95-2.0.43ba/debian/main-menu.hook @@ -0,0 +1,13 @@ +# Additional entries in the main menu. These entries come +# before the mandatory "Exit" entry. Each line in +# main-menu.hook should be a continuation line for a +# menu definition (see the fvwm95 manual page about the +# AddToMenu command). For example: +# +# + "XTerm" Exec xterm +# +# Note that main-menu.hook and init.hook (et al) have a +# different, but very similar syntax. + ++ "" Nop ++ "Run..." Module FvwmForm RunDialog --- fvwm95-2.0.43ba.orig/debian/example.fvwm95rc_menu +++ fvwm95-2.0.43ba/debian/example.fvwm95rc_menu @@ -0,0 +1,100 @@ +# +# Example menudefs.hook taken from +# .fvwm95rc example configuration file for fvwm95-2.0.43 +# +# This file should only get used if the user doesn't have the menu +# package. The user should really use the menu package instead. Really. + +#========================================================================# +#<stuff snipped> +#DestroyMenu "StartMenu" +#AddToMenu "StartMenu@linux-menu.xpm@^#808080^" \ +# "&Programs%programs.xpm%" Popup Programs ++ "&Programs%programs.xpm%" Popup Programs ++ "" Nop ++ "Sh&ut Down%shutdown.xpm%" Popup Shutdown + +#--------- Programs + +DestroyMenu "Programs" +AddToMenu "Programs" \ + "Accessories%mini-hammer.xpm%" Popup Accessories ++ "Games%mini-happy.xpm%" Popup Games ++ "Shells%mini-term.xpm%" Popup Shells ++ "Graphics%mini-eye.xpm%" Popup Graphics ++ "" Nop ++ "Window manager modules%mini-modules.xpm%" Popup Module-Popup + +#--------- Accessories + +DestroyMenu "Accessories" +AddToMenu "Accessories" \ + "View Running processes%mini-run.xpm%" Exec xterm -font 7x14 \ + -bg \#c0c0c0 -fg black \ + -T Top -n Top -e top & ++ "Calculator%mini-calc.xpm%" Exec xcalc & ++ "Magnifying glass%mini-zoom.xpm%" Exec xmag & ++ "Xclock%mini-clock.xpm%" Exec xclock & ++ "Xclipboard%mini-clipboard.xpm%" Exec xclipboard & + +#--------- Games and amusements + +DestroyMenu "Games" +AddToMenu "Games" \ + "No games available" Nop ++ "" Nop ++ "Amusements" Popup Amusements + +DestroyMenu "Amusements" +AddToMenu "Amusements" \ + "X logo%mini-bx2.xpm%" Exec xlogo & + +#--------- Graphics + +DestroyMenu "Graphics" +AddToMenu "Graphics" \ + "Bitmap editor%mini-paint.xpm%" Exec bitmap & + +#--------- Shells + +DestroyMenu "Shells" +AddToMenu "Shells" \ + "Xterm (7x14 font)%mini-term.xpm%" Exec xterm -sb -sl 500 \ + -j -ls -fn 7x14 & ++ "Color Xterm (7x14 font)%mini-term.xpm%" Exec xterm -sb -sl 500 \ + -j -ls -fn 7x14 \ + -fb 7x14bold \ + -title "Color xterm" & ++ "Color Xterm (8x13 font)%mini-term.xpm%" Exec xterm -sb -sl 500 \ + -j -ls -fn 8x13 \ + -title "Color xterm" & ++ "" Nop ++ "Large Xterm (10x20 font)%mini-term.xpm%" Exec xterm -sb -sl 500 \ + -j -ls -fn 10x20 & ++ "Large Color Xterm (10x20 font)%mini-term.xpm%" Exec xterm -sb \ + -sl 500 -j -ls -fn 10x20 & + +#--------- Modules + +DestroyMenu "Module-Popup" +AddToMenu "Module-Popup" \ + "Button bar%mini-ball.xpm%" Module FvwmButtons ++ "Mini button bar%mini-ball.xpm%" Module FvwmButtons MiniButtons +#+ "Configure%mini-hammer.xpm%" Module FvwmConfig ++ "Task bar%mini-exp.xpm" Module FvwmTaskBar ++ "Identify%mini-question.xpm%" Module FvwmIdent ++ "Save Desktop%mini-desktop.xpm%" Module FvwmSave ++ "Debug%mini-bug2.xpm%" Module FvwmDebug ++ "Pager%mini-pager.xpm%" Module FvwmPager 0 3 ++ "Window List%mini-windows.xpm%" Module FvwmWinList ++ "Talk%mini-ball.xpm%" Module FvwmTalk ++ "Console%mini-ball.xpm%" Module FvwmConsole -sb -fn 8x13 + +#--------- Shutdown + +DestroyMenu "Shutdown" +AddToMenu "Shutdown" \ + "Quit fvwm95%mini-exclam.xpm%" Quit ++ "" Nop ++ "Restart%mini-turn.xpm%" Restart +# --- fvwm95-2.0.43ba.orig/debian/system.fvwm95rc-ja +++ fvwm95-2.0.43ba/debian/system.fvwm95rc-ja @@ -0,0 +1,712 @@ +# +# Configuration file for fvwm95, Japanese edition +# by Daniel Martin, Japanese menus by Atsuhito Kohda +# +# To use this as your configuration, do: +# cp /usr/share/doc/fvwm95/examples/system.fvwm95rc-ja /etc/X11/fvwm95/system.fvwm95rc +# +# The Japanese in this file uses the japanese-euc encoding. +# +# ÆüËܸì¤Îfvwm95rc¤Î¥³¥ó¥Õ¥£¥°¥ì¡¼¥·¥ç¥ó¥Õ¥¡¥¤¥ë +# ¤³¤Î¥Õ¥¡¥¤¥ë¤ò±×¤Ï¡¢ +# cp /usr/share/doc/fvwm95/examples/system.fvwm95rc-ja /etc/X11/fvwm95/system.fvwm95rc +# +# Much of this was inspired by/stolen from the fvwm2 configuration file. +# (by Lars Wirzenius) +# The easiest way to explain everything is to say "install fvwm2 and +# read /usr/share/doc/fvwm2/README.sysrc" +# + +# +# Use pre.hook for things that need to be done before anything else. +# For example, a PixmapPath might be defined here. +# + +Read /etc/X11/fvwm95/pre.hook +Read .fvwm95/pre.hook + +#========================================================================# + +# +# Fonts - one for window titles, another for icons, and another for the menus +# +WindowFont -*-fixed-medium-r-normal--14-* +IconFont fixed +MenuFont -*-fixed-medium-r-normal--14-* + +# +# Set the default window colors. The syntax is: +# DefaultColors winforecolor winbackcolor titleforecolor titlebackcolor +# where: +# winbackcolor is the background (border) color of all windows, +# including the menu windows +# winforecolor is used for the menu text +# titlebackcolor is the background color used for title bars of +# non selected windows +# titleforecolor is the color of the title text of non selected windows +# +DefaultColors Black #c3c3c3 #c3c3c3 grey51 +#DefaultColors Black #cccccc #cccccc grey50 + +# +# Text and background color for the title bar of the active (selected) window +# +HilightColors White #00007f +#HilightColors White #000080 + +# +# Text and background color for the title bar of sticky windows +# +StickyColors grey50 grey20 +#StickyColors grey51 #60c080 + +# You can also use the Style command to set the colors of individual +# title bars of some non-selected windows + + +#Style "*" ForeColor #c0c0c0 +#Style "*" BackColor grey51 + +#========================================================================# + +# +# Set up the major operating modes +# + +Style "*" SloppyFocus +#Style "*" ClickToFocus +# Put one of the following in your post.hook if you would prefer +# focus follow mouse. +#ChangeDefaultFocus MouseFocus +#ChangeDefaultFocus SloppyFocus + +# If we use the FvwmTaskBar we don't need the icons :-) +# Style "..." Icon are also commented below. +Style "*" NoIcon +Style "*" MWMFunctions +Style "*" HintOverride +Style "*" MWMDecor +Style "*" DecorateTransient + +OpaqueMoveSize 100 +# A low-memory system might want to do something like: +# OpaqueMoveSize 40 +EdgeScroll 100 100 +EdgeResistance 10000 10 + +# +# RandomPlacement prevents user interaction while placing windows: +# +Style "*" RandomPlacement, SmartPlacement + +# +# NoPPosition instructs fvwm to ignore the PPosition field in window +# geometry hints. Emacs annoyingly sets PPosition to (0,0)! +# +Style "*" NoPPosition + +#========================================================================# + +# +# Set the desk top size in units of physical screen size +# + +DeskTopSize 3x2 + +#========================================================================# + +# +# Module path and paths to the icons +# ModulePath is a colon-separated list, just like regular unix PATH +# +ModulePath /usr/lib/X11/fvwm95/ +PixmapPath .fvwm95/icons:.fvwm95/icons:.icons:/usr/local/share/fvwm95/icons:/usr/local/share/fvwm95/mini-icons:/usr/local/share/icons:/usr/share/fvwm95/icons:/usr/share/fvwm95/mini-icons:/usr/share/icons:/usr/share/pixmaps:/usr/include/X11/pixmaps:/usr/include/X11/bitmaps:/usr/include/pixmaps:/usr/include/bitmaps +IconPath .fvwm95/icons:.fvwm95/icons:.icons:/usr/local/share/fvwm95/icons:/usr/local/share/fvwm95/mini-icons:/usr/local/share/icons:/usr/share/fvwm95/icons:/usr/share/fvwm95/mini-icons:/usr/share/icons:/usr/share/pixmaps:/usr/include/X11/pixmaps:/usr/include/X11/bitmaps:/usr/include/pixmaps:/usr/include/bitmaps +#========================================================================# + +# Set the decoration styles and window options +# If compatible styles are set for a single window in multiple Style +# commands, then the styles are ORed together. If conflicting styles +# are set, the last one specified is used. + +# These commands should command before any menus or functions are defined, +# and before the internal pager is started. + +# +# Default border and handle widths +# +Style "*" BorderWidth 5, HandleWidth 5 + +Style "Fvwm*" NoTitle, Sticky, WindowListSkip +Style "Fvwm Pager" StaysOnTop, NoHandles +Style "FvwmBanner" StaysOnTop +Style "FvwmButtons" NoTitle, NoHandles, Sticky, CirculateSkip, WindowListSkip,BorderWidth 5, ClickToFocus +Style "FvwmConsole" WindowListHit, Title, Slippery +Style "FvwmTaskBar" ClickToFocus +#These are left to the local sysadmin to deal with +#Style "*lock" NoTitle, NoHandles, Sticky, WindowListSkip +#Style "xbiff" NoTitle, Sticky, WindowListSkip + +# +# Some mini-icons for the title bar +# +Style "*" TitleIcon mini-x2.xpm +Style "*xterm*" TitleIcon mini-term.xpm +Style "rxvt" TitleIcon mini-term.xpm +Style "xcalc" TitleIcon mini-calc.xpm +Style "xsession" TitleIcon mini-bx2.xpm +Style "xv" TitleIcon mini-xv.xpm +Style "Netscape" TitleIcon mini-nscape.xpm +Style "xmag" TitleIcon mini-zoom.xpm +Style "editor" TitleIcon mini-edit.xpm +Style "tkps" TitleIcon mini-run.xpm +Style "Ghostview" TitleIcon mini-gv.xpm +Style "Xcolorsel" TitleIcon mini-colors.xpm +Style "IDL*" TitleIcon mini-zoom.xpm +Style "xeyes" TitleIcon mini-eyes.xpm +Style "*fm*" TitleIcon mini-filemgr.xpm +# xman resource names +Style "topBox" TitleIcon mini-book1.xpm +Style "help" TitleIcon mini-book2.xpm +Style "manualBrowser" TitleIcon mini-book2.xpm +# xpaint resource names +Style "xpaint" TitleIcon mini-paint.xpm +Style "Canvas" TitleIcon mini-paint.xpm +Style "fatbits" TitleIcon mini-paint.xpm +Style "filebrowser" TitleIcon mini-ofolder.xpm + +Style "FvwmFile" TitleIcon mini-ofolder.xpm +Style "XDbx" TitleIcon mini-bug2.xpm + + +#Style "rxvt" Icon term.xpm +#Style "xterm" Icon xterm.xpm +#Style "color_xterm" Icon rterm.xpm +#Style "Appointment" Icon datebook.xpm +#Style "xcalc" Icon Rcalc.xpm +#Style "xbiff" Icon mail1.xpm +#Style "xmh" Icon mail1.xpm, StartsOnDesk 2 +#Style "xman" Icon xman.xpm +#Style "xvgr" Icon graphs.xpm +#Style "matlab" Icon math4.xpm +#Style "xmag" Icon mag_glass.xpm +#Style "xgraph" Icon graphs.xpm +#Style "xv" Icon xview.xpm +#Style "FvwmButtons" Icon toolbox.xpm +#Style "xconsole" Icon koala.xpm +#Style "xsession" Icon koala.xpm +#Style "editor" Icon textedit.xpm +#Style "ghostview" Icon gv.xpm + +#========================================================================# + +# +# Stuff to do at start-up +# For example, if you also have fvwm2 installed, you might add +# + "I" Exec setup-background +# to your .fvwm95/init.hook +# +# The init.hook, init-restart.hook and restart.hook files should +# contain continuation lines, eg: +# + "I" Exec xterm +# +# + +AddToFunc "InitFunction" "I" Exec xsetroot -solid cyan4 & +Read /etc/X11/fvwm95/init.hook +Read /etc/X11/fvwm95/init-restart.hook +Read .fvwm95/init.hook +Read .fvwm95/init-restart.hook + + +AddToFunc "RestartFunction" +Read /etc/X11/fvwm95/restart.hook +Read /etc/X11/fvwm95/init-restart.hook +Read .fvwm95/restart.hook +Read .fvwm95/init-restart.hook + +#========================================================================# + +# Now define some handy complex functions + +#------------------------------------------------------------------------------ +# These two maximize in both directions and just vertically, respectively. +# The idea is to allow for more customization, and also to not cover the +# taskbar. +#------------------------------------------------------------------------------ + +DestroyFunc "Maximize-Func" +AddToFunc "Maximize-Func" "I" Maximize 100 97 +DestroyFunc "Vert-Maximize-Func" +AddToFunc "Vert-Maximize-Func" "I" Maximize 0 97 + +# +# This one moves and then raises the window if you drag the mouse, +# only raises the window if you click, or does a full maximize if +# you double click +# +DestroyFunc "Move-or-Raise" +AddToFunc "Move-or-Raise" "M" Move ++ "M" Raise ++ "C" Raise ++ "D" Maximize-Func + +# +# This one moves and then lowers the window if you drag the mouse, +# only lowers the window if you click, or does a RaiseLower if you double +# click +# +DestroyFunc "Move-or-Lower" +AddToFunc "Move-or-Lower" "M" Move ++ "M" Lower ++ "C" Lower ++ "D" RaiseLower + +# +# This one moves or (de)iconifies: +# +DestroyFunc "Move-or-Iconify" +AddToFunc "Move-or-Iconify" "M" Move ++ "D" Iconify + +# +# This one resizes and then raises the window if you drag the mouse, +# only raises the window if you click, or does a RaiseLower if you double +# click +# +DestroyFunc "Resize-or-Raise" +AddToFunc "Resize-or-Raise" "M" Resize ++ "M" Raise ++ "C" Raise ++ "D" RaiseLower + +#------------------------------------------------------------------------------ +# This one focuses and then 'warps' to the center of the window. +#------------------------------------------------------------------------------ + + +DestroyFunc "FocusAndWarp" +AddToFunc FocusAndWarp "I" Focus ++ "I" WarpToWindow 50 50 + + +#------------------------------------------------------------------------------ +# Like the precedent, but de-iconifies first. +#------------------------------------------------------------------------------ + +DestroyFunc "DeiconifyFocusAndWarp" +AddToFunc DeiconifyFocusAndWarp "I" Iconify -1 ++ "I" FocusAndWarp + +#------------------------------------------------------------------------------ +# This one is used to modify some settings +#------------------------------------------------------------------------------ + +DestroyFunc "ChangeDefaultFocus" +AddToFunc ChangeDefaultFocus "I" Style "*" $0 ++ "I" Style "FvwmTaskBar" ClickToFocus ++ "I" Style "FvwmButtons" ClickToFocus ++ "I" Recapture + +#------------------------------------------------------------------------------ +# A really useful one: de-iconifies, warps to the window +# or creates it if it doen't exist (often used with mailtools) +#------------------------------------------------------------------------------ + +DestroyFunc "WarpOrExec" +AddToFunc WarpOrExec "I" Next [$0] Iconify -1 ++ "I" Next [$0] FocusAndWarp ++ "I" None [$0] Exec $0 $1 + +# +# The main menu. +# + +# +# Read in system and user menu definitions. +# + +DestroyMenu /Debian +# Read system and user menu prefixes +AddToMenu "/Debian" "DebianMenu" Title +Read /etc/X11/fvwm95/main-menu-pre.hook +Read .fvwm95/main-menu-pre.hook + +# Read the auto-generated menus +Read /etc/X11/fvwm95/menudefs.hook +Read .fvwm95/menudefs.hook + +# Add in user additions +Read /etc/X11/fvwm95/main-menu.hook +Read .fvwm95/main-menu.hook + +# Tack a quit entry on to the end +AddToMenu /Debian ++ "" Nop ++ "Exit Fvwm" Popup Quit-Verify + + +#========================================================================# + +DestroyMenu "StartMenu" +AddToMenu "StartMenu" ++ "DebianMenu" Popup /Debian ++ "¥·¥§¥ë%mini-sh1.xpm%" Popup shells ++ "¥æ¡¼¥Æ¥£¥ê¥Æ¥£" Popup Utilities ++ "¥¢¥¯¥»¥µ¥ê" Popup Accessories ++ "¥â¥¸¥å¡¼¥ë" Popup Module-Popup ++ "¥Þ¥Ë¥å¥¢¥ë %mini-book1.xpm%" Exec xman & ++ "²èÌÌÁ´ÂΤκÆÉÁ²è%mini-ray.xpm%" Refresh ++ "" Nop ++ "Fvwm ¤Î½ªÎ»%mini-stop.xpm%" Popup Quit-Verify + +DestroyMenu "Shells" +AddToMenu "Shells" "¥·¥§¥ë" Title ++ "kterm%mini-term.xpm%" Exec kterm -ls & ++ "kterm (´Ýʸ»ú)%mini-term.xpm%" Exec kterm -T "´Ýʸ»ú" -fn 7x14 -fr 7x14rkmr -fb 7x14bold -fk maru14 -ls & ++ "kterm (14¥É¥Ã¥È)%mini-term.xpm%"Exec kterm -fn 7x14 -fb 7x14bold -fr rk14 -fk k14 -ls & ++ "" Nop ++ "krxvt%mini-term.xpm%" Exec krxvt -ls & ++ "krxvt (´Ýʸ»ú)%mini-term.xpm%" Exec krxvt -name marumoji -fn 7x14 -fb 7x14bold -fm maru14 -ls & ++ "krxvt (14¥É¥Ã¥È)%mini-term.xpm%" Exec krxvt -fn 7x14 -fb 7x14bold -fm k14 -ls & + +AddToMenu "Utilities" "¥æ¡¼¥Æ¥£¥ê¥Æ¥£" Title ++ "Emacs" Exec emacs & ++ "XEmacs" Exec xemacs & ++ "Netscape" Exec netscape & + +AddToMenu "Module-Popup" "¥â¥¸¥å¡¼¥ë" Title ++ "Buttons" Module FvwmButtons ++ "Clean-Up%mini-pencil.xpm%" Module FvwmClean ++ "Task bar" Module FvwmTaskBar ++ "Identify%mini-question.xpm%" Module FvwmIdent ++ "Save Desktop" Module FvwmSave ++ "Debug%mini-bug2.xpm%" Module FvwmDebug ++ "Pager" Module FvwmPager 0 3 ++ "Window List%mini-windows.xpm%" Module FvwmWinList ++ "Talk" Module FvwmTalk ++ "Configure%mini-hammer.xpm%" Module FvwmConfig + +# +# This menu will fire up some very common utilities +# + +DestroyMenu "Accessories" +AddToMenu "Accessories" \ + "¥×¥í¥»¥¹Éé²Ù¥â¥Ë¥¿%mini-run.xpm%" Exec xterm -font 7x14 \ + -bg \#c0c0c0 -fg black \ + -T Top -n Top -e top & ++ "ÅÅÂî%mini-calc.xpm%" Exec xcalc & ++ "Ãî¥á¥¬¥Í%mini-zoom.xpm%" Exec xmag & ++ "»þ·×%mini-clock.xpm%" Exec xclock & ++ "¥¯¥ê¥Ã¥×¥Ü¡¼¥É%mini-clipboard.xpm%" Exec xclipboard & + +# +# The Window-Ops menu is for manipulating windows. It is invoked either +# from the main menu, or directly from the root window. +# + +# +# This defines the most common window operations +# +AddToMenu "Window" "¥¦¥£¥ó¥É¥¦¤ÎÀ©¸æ" Title ++ "°ÜÆ° (&Move)" Function Move-or-Raise ++ "¥µ¥¤¥ºÊѹ¹ (&Resize)" Function Resize-or-Raise ++ "°ìÈÖ¾å¤Ë°ÜÆ° (R&aise)" Raise ++ "°ìÈÖ²¼¤Ë°ÜÆ° (&Lower)" Lower ++ "(Èó)¥¢¥¤¥³¥ó²½" Iconify ++ "(Èó)¸ÇÄê²½" Stick ++ "(Èó)ºÇÂç²½" Function maximize_func ++ "" Nop ++ "¥¦¥£¥ó¥É¥¦ºï½ü" Destroy ++ "¥¦¥£¥ó¥É¥¦¤òÊĤ¸¤ë (&Close)" Delete ++ "" Nop ++ "²èÌÌÁ´ÂΤκÆÉÁ²è%mini-ray.xpm%" Refresh + +# This menu is invoked as a sub-menu - it allows you to quit, +# restart, or switch to another WM. + +AddToMenu "Quit-Verify" "¥Û¥ó¥È¤Ë Fvwm ¤«¤éÈ´¤±¤ë¤Î¡©" Title ++ "¤¦¤ó¡¢È´¤±¤ë¤Ã¤¹%mini-exclam.xpm%" Quit ++ "ºÆµ¯Æ°¤·¤Æ¤Á¤ç%mini-turn.xpm%" Restart fvwm95 ++ "" Nop ++ "¤ä¤Ã¤Ñ¡¢È´¤±¤Ê¤¤%mini-cross.xpm%" Nop + +# +# A trimmed down version of "Window Ops", good for binding to decorations +# + +AddToMenu "Window-Ops2" "Éü³è (&Restore)" Iconify -1 ++ "°ÜÆ° (&Move)" Move-or-Raise ++ "¥µ¥¤¥ºÊѹ¹ (&Size)" Resize-or-Raise ++ "ºÇ¾®²½ (Mi&nimize)" Iconify 1 ++ "ºÇÂç²½ (Ma&ximize)" Maximize-Func ++ "" Nop ++ "¥¦¥£¥ó¥É¥¦ºï½ü (&Kill)" Destroy ++ "¥¦¥£¥ó¥É¥¦¤òÊĤ¸¤ë (&Close Alt+F4)" Delete + +#========================================================================# + +# +# One more complex function - couldn't be defined earlier because it used +# pop-up menus +# +# This creates the "system" menu for the title-bar window-ops +# pop-up +# +AddToFunc "window_ops_func" "C" PopUp Window-Ops2 ++ "M" PopUp Window-Ops2 ++ "D" Close + + +#========================================================================# + +# +# Mouse bindings +# + +# First, for the mouse in the root window +# Button 1 gives the Utilities menu +# Button 2 gives the Window Ops menu +# Button 3 gives the WindowList (like TwmWindows) +# I use the AnyModifier (A) option for the modifier field, so you can hold down +# any shift-control-whatever combination you want! + +# Button Context Modifi Function +Mouse 1 R A Menu "StartMenu" Nop +Mouse 2 R A Menu "Window Ops" Nop +Mouse 3 R A WindowList +#Mouse 3 R A Module "winlist" FvwmWinList transient + +# Now the title bar buttons +# Any button in the left title-bar button gives the window ops menu +# Any button in the first right title-bar button Iconifies the window +# Any button in the second title-bar button full-maximizes +# Any button in the third (rightmost) title-bar button closes +# Note the use of "Mouse 0" for AnyButton. + +# Button Context Modif Function +Mouse 0 1 A Function "window_ops_func" +Mouse 1 2 A Close +Mouse 0 4 A Function Maximize-Func +Mouse 0 4 S Function Vert-Maximize-Func +Mouse 0 6 A Iconify + +# +# Now the rest of the frame +# Here I invoke my complex functions for Move-or-lower, Move-or-raise, +# and Resize-or-Raise. +# +# Button 1 in the corner pieces, with any modifiers, gives resize or raise +Mouse 1 F A Function "Resize-or-Raise" +# Button 1 in the title, sides, or icon, w/ any modifiers, gives move or raise +Mouse 1 TS A Function "Move-or-Raise" + +# Button 1 in an icons gives move for a drag, de-iconify for a double-click, +# nothing for a single click +# Button 2 in an icon, w/ any modifiers, gives de-iconify +Mouse 1 I A Function "Move-or-Iconify" +Mouse 2 I A Iconify + +# Button 2 in the corners, sides, or title-bar gives the window ops menu +Mouse 2 FST A Function "window_ops_func" + +# Button 3 anywhere in the decoration (except the title-bar buttons) +# does a raise-lower +Mouse 3 TSIF A RaiseLower + +# Button 3 in the window, with the Modifier-1 key (usually alt or diamond) +# gives Raise-Lower. Used to use control here, but that interferes with xterm +Mouse 3 W M RaiseLower + +#========================================================================# + +# Now some keyboard shortcuts. + +# Arrow Keys +# press arrow + control anywhere, and scroll by 1 page +Key Left A C Scroll -100 0 +Key Right A C Scroll +100 +0 +Key Up A C Scroll +0 -100 +Key Down A C Scroll +0 +100 + +# press arrow + meta key, and scroll by 1/10 of a page +Key Left A M Scroll -10 +0 +Key Right A M Scroll +10 +0 +Key Up A M Scroll +0 -10 +Key Down A M Scroll +0 +10 + +# press shift arrow + control anywhere, and move the pointer by 1% of a page +Key Left A SC CursorMove -1 0 +Key Right A SC CursorMove +1 +0 +Key Up A SC CursorMove +0 -1 +Key Down A SC CursorMove +0 +1 + +# press shift arrow + meta key, and move the pointer by 1/10 of a page +Key Left A SM CursorMove -10 +0 +Key Right A SM CursorMove +10 +0 +Key Up A SM CursorMove +0 -10 +Key Down A SM CursorMove +0 +10 + +# Keyboard accelerators +Key F1 A M Popup "/Debian" +Key F2 A M Popup "Window Ops" +Key F3 A M Module "WindowList" FvwmWinList +Key F4 A M Iconify +Key F5 A M Move +Key F6 A M Resize + +#Page Up/Dapge Down keys are used to scroll by one desktop page +# in any context, press page up/down + control +# in root context, just pressing page up/down is OK +# +# I prefer the non-wrapping scroll. These are for example purposes only +#Key Next A C Scroll 100000 0 +#Key Next R N Scroll 100000 0 +#Key Prior A C Scroll -100000 0 +#Key Prior R N Scroll -100000 0 + +Key Tab A MS Prev FocusAndWarp +Key Tab A M Next FocusAndWarp + +Key Escape A C WindowList + +#========================================================================# + +# Definitions used by the modules + +#------------------ RunDialog (an FvwmForm incarnation) +*RunDialogFont *helvetica*m*r*n*14* +*RunDialogButtonFont *helvetica*m*o*n*14* +*RunDialogWarpPointer +*RunDialogFore black +*RunDialogBack gray70 +*RunDialogItemBack gray90 +*RunDialogItemFore black +*RunDialogLine left +*RunDialogText "Command: " +*RunDialogInput cmd 30 +*RunDialogLine center +*RunDialogButton quit "Run" ^M +*RunDialogCommand Exec $(cmd) +*RunDialogButton quit "Cancel" ^[ +*RunDialogCommand Nop + +#------------------ Pager +*FvwmPagerBack grey60 +*FvwmPagerFore black +*FvwmPagerFont -adobe-helvetica-bold-r-*-*-10-*-*-*-*-*-*-* +*FvwmPagerHilight #c0c0c0 +*FvwmPagerGeometry -1-1 +*FvwmPagerLabel 0 Desktop +*FvwmPagerSmallFont 5x8 + +#------------------ FvwmButtons (from 2.0.42) +*DebianFvwm95ButtonsFore Black +*DebianFvwm95ButtonsBack #c0c0c0 +*DebianFvwm95ButtonsFont -*-fixed-medium-r-normal--14-* +# Geometry - really likes to pick its own size, but giving a position is OK +*DebianFvwm95ButtonsGeometry -5-34 +# Layout: specify rows or columns, not both +*DebianFvwm95ButtonsRows 1 + +# Define the buttons to use..... + +*DebianFvwm95Buttons(Title »þ·×, Icon clock.xpm, \ + Swallow(UseOld) "xclock" 'Exec /usr/bin/X11/xclock -bg \#c0c0c0 \ + -padding 0 -geometry -1500-1500 &') +*DebianFvwm95Buttons(2x1, Title load, \ + Swallow(UseOld) "xload" 'Exec /usr/bin/X11/xload \ + -nolabel -bg grey60 -update 5 -geometry -1500-1500 &') +*DebianFvwm95Buttons(Title kterm, Icon rterm.xpm, \ + Action 'Exec "KTerm" kterm \ + -ls -sb &') +*DebianFvwm95Buttons(Title Files, Icon Xfm.xpm, \ + Action 'Exec "Files" files &') +*DebianFvwm95Buttons(Title Editor, Icon textedit.xpm, \ + Action 'Exec "Editor" emacs &') +*DebianFvwm95Buttons(Title ÅÅÂî, Icon rcalc.xpm, \ + Action 'Exec "Calculator" xcalc &') +*DebianFvwm95Buttons(Title xview, Icon xview.xpm, \ + Action 'Exec "xv" xv &') +*DebianFvwm95Buttons(Title gview, Icon gv.xpm, \ + Action 'Exec "ghostview" ghostview &') +*DebianFvwm95Buttons(Title netscape, Icon nscape.xpm, \ + Action 'Exec "Netscape" netscape -geometry 920x622+90+5 &') +*DebianFvwm95Buttons(Title kill, Icon rbomb.xpm, Action Destroy) +*DebianFvwm95Buttons(2x1, Swallow(UseOld) "Desktop" 'FvwmPager 0 0') + +#------------------ Identify +*FvwmIdentBack #000080 +*FvwmIdentFore Yellow +*FvwmIdentFont -adobe-helvetica-medium-r-*-*-12-*-*-*-*-*-*-* + +#------------------ FvwmWinList +*FvwmWinListBack #c0c0c0 +*FvwmWinListFore Black +*FvwmWinListFont -adobe-helvetica-bold-r-*-*-10-*-*-*-*-*-*-* +*FvwmWinListAction Click1 Iconify -1,Focus +*FvwmWinListAction Click2 Iconify +*FvwmWinListAction Click3 Module "FvwmIdent" FvwmIdent +*FvwmWinListUseSkipList +*FvwmWinListGeometry +0-1 +*FvwmWinListShowCurrentDesk + +#------------------ FvwmTaskBar +Style "FvwmTaskBar" NoTitle,BorderWidth 4,HandleWidth 4,Sticky,StaysOnTop,WindowListSkip,CirculateSkip + +*FvwmTaskBarGeometry +0-0 +*FvwmTaskBarFore Black +*FvwmTaskBarBack #c0c0c0 +*FvwmTaskBarTipsFore black +*FvwmTaskBarTipsBack bisque +*FvwmTaskBarFont -*-fixed-medium-r-normal--14-* +*FvwmTaskBarSelFont -*-fixed-medium-r-normal--14-* +*FvwmTaskBarAction Click1 Iconify -1,Raise,Focus +*FvwmTaskBarAction Click2 Iconify +*FvwmTaskBarAction Click3 Module "FvwmIdent" FvwmIdent +*FvwmTaskBarUseSkipList +*FvwmTaskBarAutoStick +*FvwmTaskBarStartName ¥¹¥¿¡¼¥È +*FvwmTaskBarStartMenu StartMenu +*FvwmTaskBarStartIcon mini-exp.xpm +*FvwmTaskBarShowTips +#*FvwmTaskBarShowTransients +#*FvwmTaskBarClockFormat %I:%M%p +#*FvwmTaskBarHighlightFocus +#*FvwmTaskBarAutoHide + +#The taskbar now has plugins... +*FvwmTaskBarGoodyLoadableQuiet +*FvwmTaskBarGoodyLoadablePlugins /usr/lib/X11/fvwm95/plugins + +*FvwmTaskBarGoodyLoadableSymbol CheckLockModuleSymbol +*FvwmTaskBarGoodyLoadableId .Modem +*FvwmTaskBarCheckLockModuleIcon.Modem mini-connect.xpm +*FvwmTaskBarCheckLockModuleTip.Modem Modem is in use +*FvwmTaskBarCheckLockModuleLockFile.Modem /var/lock/LCK..modem + +*FvwmTaskBarGoodyLoadableSymbol ShowDateModuleSymbol +*FvwmTaskBarGoodyLoadableId .DATE +*FvwmTaskBarShowDateModuleTip.DATE Date +*FvwmTaskBarShowDateModuleCommand.DATE Exec xmessage `date` +*FvwmTaskBarShowDateModuleClockFormat.DATE %I:%M%p + +DestroyFunc Fvwm95MailFunc +AddToFunc Fvwm95MailFunc ++ "I" Exec xterm -T Mail -ls -fn 8x13 -e pine -i + +*FvwmTaskBarGoodyLoadableSymbol MailCheckModuleSymbol +*FvwmTaskBarGoodyLoadableId .MAIL +*FvwmTaskBarMailCheckModuleMailIcon.MAIL mini-mail.xpm +*FvwmTaskBarMailCheckModuleCommand.MAIL Fvwm95MailFunc +*FvwmTaskBarMailCheckModuleNewMailIcon.MAIL mini-newmail.xpm +*FvwmTaskBarMailCheckModuleNewMailTip.MAIL You have new mail +#*FvwmTaskBarMailCheckModuleNewMailCommand.MAIL beep +*FvwmTaskBarMailCheckModuleUnreadMailIcon.MAIL mini-unreadmail.xpm +*FvwmTaskBarMailCheckModuleMailFile.MAIL /var/spool/mail/$USER +#*FvwmTaskBarMailCheckModuleAutoMailTip.MAIL +*FvwmTaskBarMailCheckModuleMailTipFormat.MAIL 1 0 10 2 10 + +Read /etc/X11/fvwm95/post.hook +Read .fvwm95/post.hook --- fvwm95-2.0.43ba.orig/debian/post.hook +++ fvwm95-2.0.43ba/debian/post.hook @@ -0,0 +1,15 @@ +# Commands to execute after all other commands in +# system.fvwm95rc. This is usually where most customization +# is put. +XORvalue 65535 + +# Some people prefer to have the Debian Menu as a submenu of the Start Menu +# Uncomment the following lines to get that behavior - you'll +# probably also want to remove the run... command from main-menu.hook + +#AddToMenu "StartMenu@debmenu.xpm@^gray40^" +#+ "Programs%programs.xpm%" Popup /Debian +#+ "Run...%run.xpm%" Module FvwmForm RunDialog +#+ "" Nop +#+ "Exit Fvwm95%shutdown.xpm%" Popup Quit-Verify +#*FvwmTaskBarStartMenu "StartMenu" --- fvwm95-2.0.43ba.orig/debian/README.sysrc +++ fvwm95-2.0.43ba/debian/README.sysrc @@ -0,0 +1,216 @@ +The Debian fvwm95 package has taken the way of doing configuration directly +from the Debian fvwm2 package, with little or no modification. + +Therefore, it makes sense to include the documentation for the fvwm2 package's +system-wide rc files almost verbatim. + +Note that everywhere fvwm2 is used below, the fvwm95 user should think +"fvwm95" instead. This means for example that the following translations +should be made: +system.fvwm2rc ==> system.fvwm95rc +/etc/X11/fvwm2/ ==> /etc/X11/fvwm95/ +~/.fvwm2/ ==> ~/.fvwm95/ +~/.fvwm2rc ==> ~/.fvwm95rc + +The one thing that doesn't work with fvwm95 the way it does with fvwm2 is +any setting of background colors. That will eventually get coordinated, +once I talk to the fvwm-common and fvwm2 mainter, and get him to move +some things into fvwm-common that aren't there yet. + +One consequence of the similarity in doing configuration is that users +could have their ~/.fvwm2 directories merely as symlinks to their ~/.fvwm95 +directories. (Or vice versa) + +Anyway, here's the fvwm2 documentation; remember to read fvwm95 where you +see fvwm2! + + User Extensible system.fvwm2rc For Debian GNU/Linux +----------------------------------------------------------------------------- + +The Debian pre-packaged version of the Fvwm window manager (version 2) +comes with a custom system.fvwm2rc. It provides the following features: + + o users can customize their environment without having to + copy system.fvwmrc + + o Debian packages can install themselves into a menu + + o users can also add to the menus + +This README describes how the features of the Debian system.fvwmrc can +be used. + +** Allowing user customization the right way + +When fvwm starts, it reads in one of two configuration files: either the +user's own ~/.fvwm2rc, or the system wide /etc/X11/fvwm2/system.fvwm2rc. +(Paths given in this document are for a Debian Linux system. For most +other people, they are different.) As long as a user does not have their +own configuration file, their environment will change when system.fvwm2rc +is changed. This is good, because the system administrator can then +use system.fvwm2rc to set up a comfortable environment, with menus for +locally installed software, and so on. + +If a user is not completely happy with the environment set up by +system.fvwm2rc, they can make any modifications they wish by copying +system.fvwm2rc to ~/.fvwm2rc, and then changing the file. +Unfortunately, their environment will no longer follow changes +in the system.fvwm2rc. + +The problem can be solved in many ways. The new system.fvwm2rc in this +package does it by adding `hooks'. Hooks are extra files that a user +can create that modify the environment. This avoids the need for a +~/.fvwm2rc. Therefore, when system.fvwm2rc changes, a user's environment +will also change. + +A bare bones version of this would be system.fvwm2rc that looked +something like the following: + + Style "*" Color white/black + ... other commands to set up the default environment ... + Read .fvwm2/post.hook + +The last line is a command for fvwm to read in the file .fvwm2/post.hook +and execute all configuration commands in it. Now, if a user +needs to customize their environment, they can create the file +~/.fvwm2/post.hook, put any necessary commands there, and things will +work fine. + +The bare bones version above is, however, slightly too simple. For +example, if system.fvwm2rc defines a main menu, which it usually does, +new entries can be added to it in .fvwm2/post.hook, but they will be +added to the end of the menu. This is awkward. Therefore, the new +system.fvwm2rc contains several other hooks. See later for a complete +list. + +The system administrator has the same problem as a user. If he installs +a new version of fvwm, which comes with a new system.fvwm2rc, either +his local modifications will be lost, or the new stuff will be lost. +This new system.fvwm2rc solves the problem by duplicating each hook: the +system administrator also won't change system.fvwm2rc directly, but will +only add hooks. + + +----------------------------------------------------------------------------- + The hooks + +For each hook, there is one version for the system administrator, +located in /etc/X11/fvwm2, and one for the user, located in ~/.fvwm2. +The system administrator hook is read in first. + +The hooks are: + + pre.hook + Commands to execute before any commands in system.fvwm2rc. + This is included mostly for completeness. + + post.hook + Commands to execute after all other commands in + system.fvwm2rc. This is usually where most customization + is put. + + init.hook + Additional commands for the InitFunction, which is + automatically executed by fvwm upon startup. This should + contain commands to start any programs you want to always + start, such as a welcome screen or an xterm. + + The lines in init.hook should be "continuation lines" + for a function, such as: + + + "I" Exec xterm + + See the fvwm2 manual page for details (the AddToFunction + command). + + restart.hook + Similar to init.hook, but for the RestartFunction, which is + executed when fvwm is restarted. + + init-restart.hook + Similar to init.hook and restart.hook, but these additional + commands will be added to both InitFunction and + RestartFunction. This is usually where commands to + start fvwm modules are placed. + + main-menu.hook + Additional entries in the main menu. These entries + come after the auto-generated stuff, but before the + mandatory "Exit" entry. Each line in main-menu.hook + should be a continuation line for a menu definition + (see the fvwm2 manual page about the AddToMenu + command). For example: + + + "XTerm" Exec xterm + + Note that main-menu.hook and init.hook (et al) have a + different, but very similar syntax. + + main-menu-pre.hook + Same as main-menu.hook, but entries are added at the + very beginning of the menu. You will probably want to + add a separator line to the end of this, by using: + + "" Nop + otherwise the menu looks silly. + + menudefs.hook + The menu auto-generation stuff puts the generated + menus in this system-wide file. Therefore, any edits + the system administrator makes to this file will be + lost the next time "update-menus" is run, so don't + edit it. post-hook is probably the best place to put + extra menus. + + background.xpm + background.jpg + background.gif + background.color + background.list + These files define the screen background (root window). + They are searched for in order, and only the first + one is used. (Also, for this case only, the user + hook is searched for before the system administrator, + because otherwise a user could not override the background). + + background.xpm, background.jpg and background.gif + should be the graphic files themselves (or a symbolic + link to them). + + The background.color file should contain one line that + gives the name of a color. The background will then + be set to that color. + + The background.list file should be a list of + filenames, one per line. Each line specifies the path + to a jpg or gif format picture file. Paths can be + absolute (starting with '/'), or relative to the + user's home directory. The background will be set to + one of the pictures at random. + + +----------------------------------------------------------------------------- +For more details of the menu system, install the "menu" package, and +read /usr/doc/menu/README. + + +----------------------------------------------------------------------------- + Hints and tips + + Configuring your pager + You can put *FvwmPagerXXX lines in the post hook to + reconfigure the pager to your liking: your options + will override the defaults provided. This is good + enough for most people. + + Unfortunately, you can't easily change the number of + desks covered by the pager. This is because the pager + is started just after the post hook. If you want + multiple desks, you could wait for the appearance of + the pager, kill it, and start a new one configured to + you liking. You can do this by including something + like the following at the end of your init-restart + hook: + + "I" Wait FvwmPager + + "I" KillModule FvwmPager + + "I" Module FvwmPager 0 3 + --- fvwm95-2.0.43ba.orig/debian/pre.hook +++ fvwm95-2.0.43ba/debian/pre.hook @@ -0,0 +1,3 @@ +# Commands to execute before any commands in system.fvwm95rc. +# This is included mostly for completeness. + --- fvwm95-2.0.43ba.orig/debian/init-restart.hook +++ fvwm95-2.0.43ba/debian/init-restart.hook @@ -0,0 +1,6 @@ +# Similar to init.hook and restart.hook, but these additional +# commands will be added to both InitFunction and +# RestartFunction. This is usually where commands to +# start fvwm modules are placed. ++ "I" Module FvwmButtons DebianFvwm95Buttons ++ "I" Module FvwmTaskBar --- fvwm95-2.0.43ba.orig/debian/main-menu-pre.hook +++ fvwm95-2.0.43ba/debian/main-menu-pre.hook @@ -0,0 +1,13 @@ +# Same as main-menu.hook, but entries are added at the +# very beginning of the menu. + +#You can also modify the look a bit by uncommenting this line: +#AddToMenu "/Debian@debmenu.xpm@^gray30^" + +# But mostly this will be used to add extra menu entries; +# for example: ++ "xterm" Exec xterm + +# and the following generates a horizontal line: ++ "" Nop + --- fvwm95-2.0.43ba.orig/debian/debmenu.xpm +++ fvwm95-2.0.43ba/debian/debmenu.xpm @@ -0,0 +1,143 @@ +/* XPM */ +static char * debmenu2_xpm[] = { +"28 100 40 1", +" c None", +". c #BFBFBF", +"+ c #ACACAC", +"@ c #8F8F8F", +"# c #000000", +"$ c #7F7F7F", +"% c #949494", +"& c #3F3F3F", +"* c #7C7C7C", +"= c #404040", +"- c #383838", +"; c #B9B9B9", +"> c #A2A2A2", +", c #959595", +"' c #848484", +") c #606060", +"! c #1D1D1D", +"~ c #656565", +"{ c #A9A9A9", +"] c #696969", +"^ c #545454", +"/ c #141414", +"( c #686868", +"_ c #222222", +": c #B5B5B5", +"< c #B0B0B0", +"[ c #9C9C9C", +"} c #292929", +"| c #898989", +"1 c #515151", +"2 c #A3A3A3", +"3 c #5A5A5A", +"4 c #989898", +"5 c #BCBCBC", +"6 c #AEAEAE", +"7 c #A0A0A0", +"8 c #868686", +"9 c #BABABA", +"0 c #1A1A1A", +"a c #ABABAB", +" ", +" ", +" .+ ", +" ..........@# ", +" ............$# ", +" .............$# ", +" .............$# ", +" ...%$$$$$$$$.$# ", +" ..&#########*$# ", +" .$# =# ", +" .$# ", +" .- .. ", +" ;.> .,# ", +" .............'# ", +" .............$# ", +" .............$# ", +" .............$# ", +" .)##########%$# ", +" ! )# ", +" .~ ", +" .$ ", +" ...........{# ", +" .............# ", +" ..............# ", +" .............]# ", +" .{$$%.^$$$$.]## ", +" ./##!.& ###(._ ", +" .# :% .] ", +" .$ .) ...# ", +" ..< ..{.....# ", +" ....[ .......{# ", +" ...$# ......]# ", +" +..}# +....%## ", +" -}# ($$&## ", +" ## ", +" .. ", +" .@# ", +" ...+ .............|# ", +" .....- .............$# ", +" .....& .............$# ", +" ...{# .............$# ", +" $]/# .%&&&&&&&&&&{$# ", +" ## 1# 2'# ", +" ## ", +" ", +" ......... ", +" ........... ", +" ............{ ", +" .............3 ", +" ..{]}####}^{.$ ", +" ../## 4.# ", +" .$# .# ", +" <$# .# ", +" .1 ..# ", +" ........5.6.........|# ", +" ....................&# ", +" ....................} ", +" ....................{ ", +" ..$$$$$$$$$$$$$$$$$$^# ", +" 7################### ", +" # ", +" .. ", +" ....@ .+ ", +" .....$# ~.@ ", +" ......$# 8.( ", +" ..{$$.$# .% ", +" .&###@$# ..# ", +" .# .@# ..# ", +" .} .@# ...# ", +" .., .@# ...%# ", +" 5............]# ", +" ............/# ", +" 2..........&# ", +" -%......$/# ", +" #&&&}### ", +" ", +" ..... ", +" ..........9 ", +" .............2 ", +" ...............@ ", +" .................- ", +" ....{$^&&&&]$....% ", +" ..{}### ##^{..0 ", +" .{/# }a.& ", +" ..}# .^ ", +" .<# 9$ ", +" .@# .'# ", +" .@# .@# ", +" .@# .@# ", +" ..@................|# ", +" ...................$# ", +" ...................$# ", +" ...................$# ", +" ..$$$$$$$$$$$$$$$$.$# ", +" .@################7$# ", +" .@# .|# ", +" ## ## ", +" ", +" ", +" "}; --- fvwm95-2.0.43ba.orig/debian/copyright +++ fvwm95-2.0.43ba/debian/copyright @@ -0,0 +1,50 @@ +This package was debianized most recently by Daniel Martin <fizbin@debian.org> +on Tue, 28 Apr 1998 09:35:45 -0400 +This built on previous Debianizing work by other maintainers; see the +changelog. + +It was downloaded from: + ftp://mitac11.uia.ac.be/pub/fvwm95/ +(however, see the README.debian file) + +fvwm95 is derived from fvwm2, which is derived from fvwm, which is derived +from twm. This means that many people hold copyrights to various portions +of the code. The license on fvwm is essentially BSD-ish (see below) - +however, the modifications to fvwm2 to make it into fvwm95 are GPLed by the +upstream authors. What this all works out to is GPL plus a small advertising +clause consisting of several other parties disclaiming all liability. + +Basically, this software comes with NO WARRANTY, including any implied +warranties of merchantibility or fitness for a purpose. + +A copy of the GPL can be found at /usr/share/common-licenses/GPL on Debian systems. + +Copyright: (taken from the man page) + Since fvwm95 is derived from fvwm code it shares fvwm's + copyrights. + + fvwm is copyright 1988 by Evans and Sutherland Computer + Corporation, Salt Lake City, Utah, and 1989 by the Mas- + sachusetts Institute of Technology, Cambridge, Mas- + sachusetts, All rights reserved. It is also copyright + 1993 and 1994 by Robert Nation. + + Permission to use, copy, modify, and distribute this soft- + ware and its documentation for any purpose and without fee + is hereby granted, provided that the above copyright + notice appear in all copies and that both that copyright + notice and this permission notice appear in supporting + documentation, and that the names of Evans & Sutherland + and M.I.T. not be used in advertising in publicity per- + taining to distribution of the software without specific, + written prior permission. + + ROBERT NATION, CHARLES HINES, EVANS & SUTHERLAND, AND + M.I.T. DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFT- + WARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS, IN NO EVENT SHALL EVANS & SUTHERLAND OR + M.I.T. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUEN- + TIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS + OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, + NEGLIGENCE OR OTHER TORTUOUS ACTION, ARISING OUT OF OR IN + CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. --- fvwm95-2.0.43ba.orig/debian/fvwm95.desktop +++ fvwm95-2.0.43ba/debian/fvwm95.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=Fvwm-95 +Comment=A variant on fvwm that resembles a certain decade-old OS +Exec=fvwm95 +Terminal=False +TryExec=fvwm95 +Icon= +Type=Application + +[Window Manager] +SessionManaged=true + --- fvwm95-2.0.43ba.orig/debian/examples +++ fvwm95-2.0.43ba/debian/examples @@ -0,0 +1,3 @@ +sample.fvwmrc/*fvwm* +debian/example.fvwm95rc_menu +debian/system.fvwm95rc-ja --- fvwm95-2.0.43ba.orig/debian/null.hook +++ fvwm95-2.0.43ba/debian/null.hook @@ -0,0 +1 @@ +# This is just to keep complaints down. --- fvwm95-2.0.43ba.orig/debian/menu-method +++ fvwm95-2.0.43ba/debian/menu-method @@ -0,0 +1,61 @@ +#!/usr/bin/install-menu +#I need menu-1.4! +# +#NOTE: the first line of this script _must_ be +# equal to "#!/usr/sbin/install-menu", otherwise update-menus +# will feed this script old-compat-mode data. +# +#More info: /usr/doc/menu/html. +# +# One of the great things about free software is that if someone else +# does it right, you don't have to do it again. The following is cribbed +# from the fvwm menu-method file, mostly by Julian Gilbey + +!include menu.h + +compat="menu-1" +outputencoding="ISO-8859-1" + +function start($var,$com)=\ + "+ \"" escfirst(title(),$hotkey,"&") \ + cond_surr(icon(),"%","%") "\" " $var " " $com "\n" +supported + fvwm95module= start("Module", $command) + wm= start("Restart",$command) + x11fvwm2= start("Exec", $command) + x11fvwm= start("Exec", $command) + x11= start("Exec", $command) + text= start("Exec", term()) +endsupported + +# Ok, "startmenu" is a little wacky, and comes in 4 parts: +# 1. If this is running for a user, then we do a DestroyMenu to +# clear out the system one. Furthermore, if we're dealing with the +# top-level /Debian menu, then add a title for it (normally done in +# system.fvwm2rc), and re-read the main-menu-pre.hooks whose results +# we merrily blew away earlier. This is so that the +# main-menu-pre.hooks work for users as well as system-wide. Of +# course, none of this happens if we're running as root to produce the +# system-wide menudef.hook file. +# 2. We spit out an "AddToMenu /Foo/Bar/Baz" to start this menu. +# 3. We add a trailing newline to the lot. + +startmenu= "DestroyMenu \"" replacewith($section," ","_") "\"\n" \ + "AddToMenu \"" replacewith($section," ","_") "\" \"" title() "\" Title \n" \ + ifeq($section, "/Debian", \ + "Read /etc/X11/fvwm95/main-menu-pre.hook \n" \ + "Read .fvwm95/main-menu-pre.hook \n") +endmenu= "\n" + +submenutitle= "+ \"" escfirst(title(),$hotkey,"&") \ + cond_surr(icon(),"%","%") "\" Popup " replacewith($section," ","_") "\n" +genmenu= "menudefs.hook" +rootprefix="/etc/X11/fvwm95/" +userprefix="/.fvwm95/" +treewalk="c(m)" +mainmenutitle="Main Menu" +hotkeycase="insensitive" + +#If you want your fvwm95 sessions to be automatically restarted when you +#upgrade your debian menus, uncomment the next line: +#postrun="killall -USR1 /usr/bin/X11/fvwm95" --- fvwm95-2.0.43ba.orig/debian/preinst +++ fvwm95-2.0.43ba/debian/preinst @@ -0,0 +1,93 @@ +#!/bin/sh +# preinst for fvwm95 based on: +# preinst.skeleton +# Skeleton maintainer script showing all the possible cases. +# Written by Charles Briscoe-Smith, March 1998. Public Domain. + +# Abort if any command returns an error value +set -e + +# This script is called before this version of this package is installed. +# When this script is called, the package's files have not been unpacked +# yet. + +case "$1" in + install|upgrade) + # About to install this package. There are two sub-cases. + # About to upgrade this package from version $2 TO THIS VERSION. + # "prerm upgrade" has already been called for the old version of + # this package. + : + if test "${2+set}" = set; then + # The configuration files from version $2 of this package are + # still on the system. + conffileold="/etc/X11/fvwm95/system.fvwm95rc-menu" + conffilenew="/etc/X11/fvwm95/system.fvwm95rc" + delfiles="" + alsotext=""; normaltext="" + if [ ! -f $conffileold ]; then + conffileold="/etc/X11/fvwm95/system.fvwm2rc95-menu" + delfiles="/etc/X11/fvwm95/system.fvwm2rc95" + elif [ -f /etc/X11/fvwm95/system.fvwm2rc95-menu ] ; then + alsotext="You also have the obsolete file /etc/X11/fvwm95/system.fvwm2rc95-menu on +your system; it should be deleted too." + normaltext="You have the obsolete file /etc/X11/fvwm95/system.fvwm2rc95-menu on +your system; it should be deleted. Any local edits should be incorporated +into the new .hook files - see /usr/doc/fvwm95/README.sysrc.gz" + fi + origMD5=`dpkg -s fvwm95 | grep $conffileold | sed 's/^.* \([^ ]*\)$/\1/'` + curMD5=`md5sum $conffileold 2>/dev/null | sed 's/^\([^ ]*\) .*$/\1/'` + if [ -z "$origMD5" -o -z "$curMD5" ]; then + if [ -f $conffileold ] ; then +# Assume that /etc/X11/fvwm95/system.fvwm95rc-menu is left over from +# two or more installs ago + cat >&2 <<EOT + +$conffileold is left on your system, however the +version of fvwm95 being replaced didn't use it. You should probably delete +$conffileold; if it contains local edits +which you wish to incorporate into your current fvwm95 setup, read the +documentation in /usr/doc/fvwm95/README.sysrc.gz +$alsotext +EOT + fi + rm -f $delfiles + exit 0 + fi + if [ "$origMD5" = "$curMD5" ]; then + # no change, can safely delete it, but leave the deleting for postinst + mkdir -p /etc/X11/fvwm95/deleteme + mv -f $conffileold $conffilenew $delfiles /etc/X11/fvwm95/deleteme + if [ ! -z "$normaltext" ] ; then echo "$normaltext" >&2 ; fi + else + cat >&2 <<EOT + +$conffileold has been edited and no longer matches the +fvwm95 distributed system rc. In this package of fvwm95, the configuration +process has been vastly improved, one consequence of which is that a separate +$conffileold and $conffilenew are no +longer needed. The new $conffilenew will be installed, +but your edited $conffileold will be preserved. +You will need to either edit $conffilenew +or edit the new '.hook' files to incorporate your old edits. +You should then delete $conffileold to avoid +error messages on future installs. +$alsotext +EOT + fi + : + else + # There is no existing configuration; install from scratch. + # We're ok in this case + : + fi ;; + abort-upgrade) + # Back out of an attempt to upgrade this package FROM THIS VERSION to + # version $2. Undo the effects of "postrm upgrade $2". + : + ;; + *) echo "$0: didn't understand being called with \`$1'" 1>&2 + exit 1;; +esac + +# From here on is debstd's mucking --- fvwm95-2.0.43ba.orig/acconfig.h +++ fvwm95-2.0.43ba/acconfig.h @@ -0,0 +1,3 @@ +/* Define if you have the GNU readline libraries. */ +/* Used only for FvwmConsole */ +#undef HAVE_READLINE