git » libfiu » commit 7b8c94d

Escape "-" to ensure interpretation as minus sign, not hyphen

author Chris Lamb
2009-07-24 09:37:20 UTC
committer Chris Lamb
2009-07-24 09:37:20 UTC
parent c16e44376dfdf6cabb8ccb68c9888b1716759d6a

Escape "-" to ensure interpretation as minus sign, not hyphen

"-" chars are interpreted as hyphens (U+2010) by groff, not as minus
signs (U+002D). Since options to programs use minus signs (U+002D), this
means for example in UTF-8 locales that you cannot cut&paste options,
nor search for them easily.

"-" must be escaped ("\-") to be interpreted as minus. If we really
intend a hyphen, we can write it as "\(hy" to emphasise that fact. See
groff(7) and especially groff_char(7) for details.

It might be possible to fix ths by jumping into a different context,
but I don't know enough manpage stuff.

Signed-off-by: Chris Lamb <lamby@debian.org>

preload/run/fiu-run.1 +1 -1
utils/fiu-ctrl.1 +2 -2

diff --git a/preload/run/fiu-run.1 b/preload/run/fiu-run.1
index bcc9788..888cce4 100644
--- a/preload/run/fiu-run.1
+++ b/preload/run/fiu-run.1
@@ -62,7 +62,7 @@ enable failure points in the POSIX and libc functions):
 
 .RS
 .nf
-fiu-run -x -e posix/io/* -p 10 -e libc/mm/malloc -p 5 fortune
+fiu\-run \-x \-e posix/io/* \-p 10 \-e libc/mm/malloc \-p 5 fortune
 .fi
 .RE
 
diff --git a/utils/fiu-ctrl.1 b/utils/fiu-ctrl.1
index ceafd6b..d739f9a 100644
--- a/utils/fiu-ctrl.1
+++ b/utils/fiu-ctrl.1
@@ -49,7 +49,7 @@ failure point \fIlibc/mm/malloc\fR with a 5% of probability to fail:
 
 .RS
 .nf
-fiu-ctrl -e posix/io/read -p 25 -e libc/mm/malloc -p 5 12345
+fiu\-ctrl \-e posix/io/read \-p 25 \-e libc/mm/malloc \-p 5 12345
 .fi
 .RE
 
@@ -58,7 +58,7 @@ failure point \fIposix/io/read\fR:
 
 .RS
 .nf
-fiu-ctrl -d posix/io/read 12345
+fiu\-ctrl \-d posix/io/read 12345
 .fi
 .RE