summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libs/libgroff/nametoindex.cpp5
-rw-r--r--src/roff/troff/input.cpp7
2 files changed, 10 insertions, 2 deletions
diff --git a/src/libs/libgroff/nametoindex.cpp b/src/libs/libgroff/nametoindex.cpp
index 2dfe079d..ea69d9e8 100644
--- a/src/libs/libgroff/nametoindex.cpp
+++ b/src/libs/libgroff/nametoindex.cpp
@@ -1,5 +1,6 @@
// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2003, 2004, 2006
+/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2003, 2004, 2006,
+ 2008
Free Software Foundation, Inc.
Written by James Clark (jjc@jclark.com)
@@ -145,6 +146,8 @@ glyph *number_to_glyph(int n)
return indexer.numbered_char_glyph(n);
}
+// troff overrides this function with its own version.
+
glyph *name_to_glyph(const char *s)
{
assert(s != 0 && s[0] != '\0' && s[0] != ' ');
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index 6722b193..88628f60 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -1,6 +1,6 @@
// -*- C++ -*-
/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2003, 2004, 2005,
- 2006, 2007
+ 2006, 2007, 2008
Free Software Foundation, Inc.
Written by James Clark (jjc@jclark.com)
@@ -8326,6 +8326,11 @@ charinfo *get_charinfo_by_number(int n)
}
}
+// This overrides the same function from libgroff; while reading font
+// definition files it puts single-letter glyph names into `charset_table'
+// and converts glyph names of the form `\x' (`x' a single letter) into `x'.
+// Consequently, symbol("x") refers to glyph name `\x', not `x'.
+
glyph *name_to_glyph(const char *nm)
{
charinfo *ci;