-----BEGIN PGP SIGNED MESSAGE-----
When I switched over to fvwm-2, I found this really helped me with debugging
my .fvwmrc since it told on which line it found the problem. It also adds
the filename in case you use M4 or cpp.
This is against patchlevel 33, but should apply easily to newer ones.
===================================================================
RCS file: fvwm.c,v
retrieving revision 1.1
diff -c -r1.1 fvwm.c
*** fvwm.c 1995/08/10 14:44:05 1.1
- --- fvwm.c 1995/08/10 14:44:59
***************
*** 1032,1040 ****
void fvwm_err(char *message, char *arg1, char *arg2, char *arg3)
{
char line[255];
char temp[1000];
! strcpy(line,"fvwm: ");
sprintf(temp,message,arg1,arg2,arg3);
strncat(line,temp,248);
line[248+6] = 0;
- --- 1032,1043 ----
void fvwm_err(char *message, char *arg1, char *arg2, char *arg3)
{
+ extern char *fvwm_file;
+ extern int LineNumber;
+
char line[255];
char temp[1000];
! sprintf(line,"fvwm: at %s:%d: ", fvwm_file, LineNumber);
sprintf(temp,message,arg1,arg2,arg3);
strncat(line,temp,248);
line[248+6] = 0;
===================================================================
RCS file: read.c,v
retrieving revision 1.1
diff -c -r1.1 read.c
*** read.c 1995/08/10 14:41:08 1.1
- --- read.c 1995/08/10 14:44:21
***************
*** 21,26 ****
- --- 21,28 ----
#include "module.h"
char *fvwm_file = NULL;
+ int LineNumber = 0;
+
#include <fcntl.h>
void AddToModList(char *tline);
***************
*** 105,113 ****
- --- 107,117 ----
free(fvwm_file);
fvwm_file = filename;
+ LineNumber = 0;
tline = fgets(line,(sizeof line)-1,fd);
while(tline != (char *)0)
{
+ LineNumber++;
while(isspace(*tline))tline++;
if((strlen(&tline[0])>1)&&(tline[0]!='#')&&(tline[0]!='*'))
ExecuteFunction(tline,tmp_win,eventp,context,*Module);
-----BEGIN PGP SIGNATURE-----
Version: 2.6.2
Comment: Processed by Mailcrypt 3.3, an Emacs/PGP interface
iQCVAwUBMI5AHqSyilkXM3tNAQGxuQQAmtpdlPieUQeEHjMAL6GauD5rgmCFf9/p
dKFLMbwzWJ8jSFTNDKUu5sT2dda0ITJz/h0AyWVtlX1i3BlqMspXqxjMhAKZtO9e
837UZbX15BktJDBVBG1bj5YR48Z5Kya6xN+sLjXCfiMfwb/x51a4a55FE6Wy9i6+
gGtzSk4WOWw=
=fKlf
-----END PGP SIGNATURE-----
--
Jeff Sparkes
jsparkes_at_bnr.ca Bell-Northern Research, Ottawa, Ontario, Canada
--
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_hpc.uh.edu.
To report problems, send mail to fvwm-owner_at_hpc.uh.edu.
Received on Wed Oct 25 1995 - 08:50:14 GMT