|
From: <md...@us...> - 2007-08-02 22:49:03
|
Revision: 3669
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=3669&view=rev
Author: mdboom
Date: 2007-08-02 15:49:01 -0700 (Thu, 02 Aug 2007)
Log Message:
-----------
Reverting last change since it breaks on gcc-4.2
Modified Paths:
--------------
trunk/matplotlib/src/_ttconv.cpp
trunk/matplotlib/src/ft2font.cpp
trunk/matplotlib/ttconv/pprdrv_tt.cpp
trunk/matplotlib/ttconv/truetype.h
Modified: trunk/matplotlib/src/_ttconv.cpp
===================================================================
--- trunk/matplotlib/src/_ttconv.cpp 2007-08-02 21:32:30 UTC (rev 3668)
+++ trunk/matplotlib/src/_ttconv.cpp 2007-08-02 22:49:01 UTC (rev 3669)
@@ -83,10 +83,10 @@
int fonttype;
std::vector<int> glyph_ids;
- static const char *kwlist[] = { "filename", "output", "fonttype", "glyph_ids", NULL };
+ static char *kwlist[] = { "filename", "output", "fonttype", "glyph_ids", NULL };
if (! PyArg_ParseTupleAndKeywords
(args, kwds,
- "sO&i|O&:convert_ttf_to_ps", (char **)kwlist,
+ "sO&i|O&:convert_ttf_to_ps", kwlist,
&filename,
fileobject_to_PythonFileWriter,
&output,
@@ -140,10 +140,10 @@
std::vector<int> glyph_ids;
PyObject* result;
- static const char *kwlist[] = { "filename", "glyph_ids", NULL };
+ static char *kwlist[] = { "filename", "glyph_ids", NULL };
if (! PyArg_ParseTupleAndKeywords
(args, kwds,
- "s|O&:convert_ttf_to_ps", (char **)kwlist,
+ "s|O&:convert_ttf_to_ps", kwlist,
&filename,
pyiterable_to_vector_int,
&glyph_ids))
Modified: trunk/matplotlib/src/ft2font.cpp
===================================================================
--- trunk/matplotlib/src/ft2font.cpp 2007-08-02 21:32:30 UTC (rev 3668)
+++ trunk/matplotlib/src/ft2font.cpp 2007-08-02 22:49:01 UTC (rev 3669)
@@ -1370,8 +1370,8 @@
std::string tagname = Py::String(args[0]);
int tag;
- static const char *tags[] = {"head", "maxp", "OS/2", "hhea",
- "vhea", "post", "pclt", NULL};
+ char *tags[] = {"head", "maxp", "OS/2", "hhea",
+ "vhea", "post", "pclt", NULL};
for (tag=0; tags[tag] != NULL; tag++)
if (strcmp(tagname.c_str(), tags[tag]) == 0)
Modified: trunk/matplotlib/ttconv/pprdrv_tt.cpp
===================================================================
--- trunk/matplotlib/ttconv/pprdrv_tt.cpp 2007-08-02 21:32:30 UTC (rev 3668)
+++ trunk/matplotlib/ttconv/pprdrv_tt.cpp 2007-08-02 22:49:01 UTC (rev 3669)
@@ -107,7 +107,7 @@
** is always 4 characters, though the last characters may be
** padding spaces.
-----------------------------------------------------------------------*/
-BYTE *GetTable(struct TTFONT *font, const char *name)
+BYTE *GetTable(struct TTFONT *font, char *name)
{
BYTE *ptr;
ULONG x;
@@ -654,7 +654,7 @@
*/
void ttfont_sfnts(TTStreamWriter& stream, struct TTFONT *font)
{
- const char *table_names[]= /* The names of all tables */
+ char *table_names[]= /* The names of all tables */
{ /* which it is worth while */
"cvt ", /* to include in a Type 42 */
"fpgm", /* PostScript font. */
@@ -828,7 +828,7 @@
** this array will instead convert PostScript character names
** to executable proceedures.
--------------------------------------------------------------*/
-const char *Apple_CharStrings[]={
+char *Apple_CharStrings[]={
".notdef",".null","nonmarkingreturn","space","exclam","quotedbl","numbersign",
"dollar","percent","ampersand","quotesingle","parenleft","parenright",
"asterisk","plus", "comma","hyphen","period","slash","zero","one","two",
@@ -871,7 +871,7 @@
** This routine is called by the one below.
** It is also called from pprdrv_tt2.c
*/
-const char *ttfont_CharStrings_getname(struct TTFONT *font, int charindex)
+char *ttfont_CharStrings_getname(struct TTFONT *font, int charindex)
{
int GlyphIndex;
static char temp[80];
@@ -1227,7 +1227,7 @@
i != glyph_ids.end(); ++i) {
StringStreamWriter writer;
tt_type3_charproc(writer, &font, *i);
- const char* name = ttfont_CharStrings_getname(&font, *i);
+ char* name = ttfont_CharStrings_getname(&font, *i);
dict.add_pair(name, writer.str().c_str());
}
}
Modified: trunk/matplotlib/ttconv/truetype.h
===================================================================
--- trunk/matplotlib/ttconv/truetype.h 2007-08-02 21:32:30 UTC (rev 3668)
+++ trunk/matplotlib/ttconv/truetype.h 2007-08-02 22:49:01 UTC (rev 3669)
@@ -51,13 +51,13 @@
font_type_enum target_type; /* 42 or 3 for PS, or -3 for PDF */
ULONG numTables; /* number of tables present */
- const char *PostName; /* Font's PostScript name */
- const char *FullName; /* Font's full name */
- const char *FamilyName; /* Font's family name */
- const char *Style; /* Font's style string */
- const char *Copyright; /* Font's copyright string */
- const char *Version; /* Font's version string */
- const char *Trademark; /* Font's trademark string */
+ char *PostName; /* Font's PostScript name */
+ char *FullName; /* Font's full name */
+ char *FamilyName; /* Font's family name */
+ char *Style; /* Font's style string */
+ char *Copyright; /* Font's copyright string */
+ char *Version; /* Font's version string */
+ char *Trademark; /* Font's trademark string */
int llx,lly,urx,ury; /* bounding box */
Fixed TTVersion; /* Truetype version number from offset table */
@@ -98,7 +98,7 @@
/* This is the one routine in pprdrv_tt.c that is */
/* called from pprdrv_tt.c. */
-const char *ttfont_CharStrings_getname(struct TTFONT *font, int charindex);
+char *ttfont_CharStrings_getname(struct TTFONT *font, int charindex);
void tt_type3_charproc(TTStreamWriter& stream, struct TTFONT *font, int charindex);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|