RWS@ZERMATT.LCS.MIT.EDU (Robert Scheifler) (10/27/87)
Date: Mon, 26 Oct 87 14:29:26 MST From: engquist@hc.dspo.gov (Eric Engquist) I received a bug via xpert mailing list which I can't find in the bug reports 1-30. The bug description was sent out Fri Oct 16 and its description was xwd stored bogosity for the window name. Is this a genuine bug? FIX: Yes, it is a genuine bug and fix. I can't find it either, so I repeat the fix here. in clients/xwd/xwd.c: *** /tmp/,RCSt1005639 Mon Oct 26 17:10:32 1987 --- xwd.c Fri Oct 9 14:37:10 1987 *************** *** 37,43 **** */ #ifndef lint ! static char *rcsid_xwd_c = "$Header: xwd.c,v 1.28 87/09/11 16:57:09 rws Exp $"; #endif /*% --- 37,43 ---- */ #ifndef lint ! static char *rcsid_xwd_c = "$Header: xwd.c,v 1.29 87/10/09 14:36:37 newman Exp $"; #endif /*% *************** *** 140,146 **** int win_name_size; int header_size; int ncolors, i; ! char win_name[100]; XWindowAttributes win_info; XImage *image; --- 140,146 ---- int win_name_size; int header_size; int ncolors, i; ! char *win_name; XWindowAttributes win_info; XImage *image; *************** *** 159,167 **** if(!XGetWindowAttributes(dpy, window, &win_info)) Fatal_Error("Can't get target window attributes."); ! XFetchName(dpy, window, win_name); ! if (!win_name[0]) ! strcpy(win_name, "xwdump"); /* sizeof(char) is included for the null string terminator. */ win_name_size = strlen(win_name) + sizeof(char); --- 159,167 ---- if(!XGetWindowAttributes(dpy, window, &win_info)) Fatal_Error("Can't get target window attributes."); ! XFetchName(dpy, window, &win_name); ! if (!win_name || !win_name[0]) ! win_name = "xwdump"; /* sizeof(char) is included for the null string terminator. */ win_name_size = strlen(win_name) + sizeof(char);