From: Reginald Kennedy Date: Thu, 1 Nov 2012 17:26:30 +0000 (+0800) Subject: Fix fparseln flags to remove escape characters in the result. X-Git-Url: https://jasonwoof.com/gitweb/?a=commitdiff_plain;h=214aca697c8423be1f88948c09bc7e25b8e8d7f8;p=spectrwm.git Fix fparseln flags to remove escape characters in the result. For example, \# should result in #. Add note in manpage that # must be escaped when not used in an option. --- diff --git a/spectrwm.1 b/spectrwm.1 index 38c208e..b90227b 100644 --- a/spectrwm.1 +++ b/spectrwm.1 @@ -82,6 +82,9 @@ Colors need to be specified per the .Xr XQueryColor 3 specification. .Pp +Comments begin with a #. When a literal '#' is desired in an option, then it +must be escaped with a backslash. i.e. \e# +.Pp The file supports the following keywords: .Bl -tag -width 2m .It Ic autorun @@ -427,6 +430,9 @@ is the desired program, and .Aq arg is zero or more arguments to the program. .Pp +Remember that when using # in your program call, it must be escaped with a +backslash. i.e. \e# +.Pp The following argument variables will be substituted for values at the time the program is spawned: .Pp diff --git a/spectrwm.c b/spectrwm.c index 16cb8b3..4530bd7 100644 --- a/spectrwm.c +++ b/spectrwm.c @@ -7246,8 +7246,8 @@ conf_load(const char *filename, int keymapping) if (line) free(line); - if ((line = fparseln(config, &linelen, &lineno, NULL, 0)) - == NULL) { + if ((line = fparseln(config, &linelen, &lineno, NULL, + FPARSELN_UNESCCOMM | FPARSELN_UNESCCONT)) == NULL) { if (ferror(config)) err(1, "%s", filename); else