[cairo] Assorted patches to fix warnings
Pavel Roskin
proski at gnu.org
Sun Aug 13 02:40:56 PDT 2006
On Sun, 2006-08-13 at 05:10 -0400, Behdad Esfahbod wrote:
> On Sun, 2006-08-13 at 01:57 -0400, Pavel Roskin wrote:
> > I also wonder if ps_standard_encoding in src/cairo-type1-subset.c is
> > supposed to correspond to ISO-8859-1 encoding. If so, it needs to be
> > seriously rearranged.
>
> No, I don't think this is Latin1. This is a PS-specific default
> encoding I guess.
I see. I looked on Google and here's what I found:
http://www.kostis.net/charsets/adobestd.htm
It turns out I also failed to get the indices right. Sorry. Here's the
updated patch.
---
Use NULL instead of 0, fix comments for indices
Using NULL is encouraged for pointers. While fixing that, it turned out
that the comments indicating the current index were wrong, so I'm fixing
them too.
Signed-off-by: Pavel Roskin <proski at gnu.org>
---
src/cairo-type1-subset.c | 76 +++++++++++++++++++++++++---------------------
1 files changed, 42 insertions(+), 34 deletions(-)
diff --git a/src/cairo-type1-subset.c b/src/cairo-type1-subset.c
index 52f05f8..91ae986 100644
--- a/src/cairo-type1-subset.c
+++ b/src/cairo-type1-subset.c
@@ -481,45 +481,53 @@ cairo_type1_font_subset_decode_integer (
}
static const char *ps_standard_encoding[256] = {
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0 */
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 16 */
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 0 */
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 16 */
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
"space", "exclam", "quotedbl", "numbersign", /* 32 */
"dollar", "percent", "ampersand", "quoteright",
"parenleft", "parenright", "asterisk", "plus",
"comma", "hyphen", "period", "slash",
"zero", "one", "two", "three", /* 48 */
- "four", "five", "six", "seven", "eight",
- "nine", "colon", "semicolon", "less",
- "equal", "greater", "question", "at",
- "A", "B", "C", "D", "E", "F", "G", "H", /* 64 */
- "I", "J", "K", "L", "M", "N", "O", "P",
- "Q", "R", "S", "T", "U", "V", "W", "X", /* 80 */
- "Y", "Z", "bracketleft", "backslash",
- "bracketright", "asciicircum", "underscore", "quoteleft",
- "a", "b", "c", "d", "e", "f", "g", "h", /* 96 */
- "i", "j", "k", "l", "m", "n", "o", "p",
- "q", "r", "s", "t", "u", "v", "w", "x", /* 112 */
- "y", "z", "braceleft", "bar",
- "braceright", "asciitilde", 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 128 */
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 144 */
- "exclamdown", "cent", "sterling", "fraction",
- "yen", "florin", "section", "currency",
- "quotesingle", "quotedblleft", "guillemotleft", "guilsinglleft",
- "guilsinglright", "fi", "fl", NULL,
- "endash", "dagger", "daggerdbl", "periodcentered", /* 160 */
- NULL, "paragraph", "bullet", "quotesinglbase",
- "quotedblbase", "quotedblright", "guillemotright", "ellipsis",
- "perthousand", NULL, "questiondown", NULL,
- "grave", "acute", "circumflex", "tilde", /* 176 */
- "macron", "breve", "dotaccent", "dieresis",
- NULL, "ring", "cedilla", NULL,
- "hungarumlaut", "ogonek", "caron", "emdash",
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 192 */
- "AE", 0, "ordfeminine", 0, 0, 0, 0, "Lslash", /* 208 */
- "Oslash", "OE", "ordmasculine", 0, 0, 0, 0, 0,
- "ae", 0, 0, 0, "dotlessi", 0, 0, "lslash", /* 224 */
- "oslash", "oe", "germandbls", 0, 0, 0, 0
+ "four", "five", "six", "seven",
+ "eight", "nine", "colon", "semicolon",
+ "less", "equal", "greater", "question",
+ "at", "A", "B", "C", "D", "E", "F", "G", /* 64 */
+ "H", "I", "J", "K", "L", "M", "N", "O",
+ "P", "Q", "R", "S", "T", "U", "V", "W", /* 80 */
+ "X", "Y", "Z", "bracketleft",
+ "backslash", "bracketright", "asciicircum", "underscore",
+ "quoteleft", "a", "b", "c", /* 96 */
+ "d", "e", "f", "g",
+ "h", "i", "j", "k", "l", "m", "n", "o",
+ "p", "q", "r", "s", "t", "u", "v", "w", /* 112 */
+ "x", "y", "z", "braceleft",
+ "bar", "braceright", "asciitilde", NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 128 */
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 144 */
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, "exclamdown", "cent", "sterling", /* 160 */
+ "fraction", "yen", "florin", "section",
+ "currency", "quotesingle", "quotedblleft", "guillemotleft",
+ "guilsinglleft", "guilsinglright", "fi", "fl",
+ NULL, "endash", "dagger", "daggerdbl", /* 176 */
+ "periodcentered", NULL, "paragraph", "bullet",
+ "quotesinglbase", "quotedblbase", "quotedblright", "guillemotright",
+ "ellipsis", "perthousand", NULL, "questiondown",
+ NULL, "grave", "acute", "circumflex", /* 192 */
+ "tilde", "macron", "breve", "dotaccent",
+ "dieresis", NULL, "ring", "cedilla",
+ NULL, "hungarumlaut", "ogonek", "caron",
+ "emdash", NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 208 */
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, "AE", NULL, "ordfeminine", /* 224 */
+ NULL, NULL, NULL, NULL,
+ "Lslash", "Oslash", "OE", "ordmasculine", NULL, NULL, NULL, NULL,
+ NULL, "ae", NULL, NULL, /* 240 */
+ NULL, "dotlessi", NULL, NULL,
+ "lslash", "oslash", "oe", "germandbls", NULL, NULL, NULL, NULL
};
static void
--
Regards,
Pavel Roskin
More information about the cairo
mailing list