[stsf-commit] stsf/stsflib datamgr.c, 1.1.1.1, 1.2 sft.c, 1.1.1.1,
1.2 sharedcache.c, 1.1.1.1, 1.2 stmath.c, 1.1.1.1,
1.2 stsfutil.c, 1.6, 1.7
Alexander Gelfenbain
stsf-commit at pdx.freedesktop.org
Fri Apr 23 06:56:35 EST 2004
Committed by: adg
Index: datamgr.c
===================================================================
RCS file: /cvs/stsf/stsf/stsflib/datamgr.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- a/datamgr.c 26 Mar 2004 19:19:54 -0000 1.1.1.1
+++ b/datamgr.c 22 Apr 2004 20:56:32 -0000 1.2
@@ -313,23 +313,23 @@
OpaqueDataManager *p = (OpaqueDataManager *) g;
int i;
- printf("OpaqueDataManager: <buckets: %d, elements: %d>\n", p->nbuckets, p->count);
+ fprintf(DebugFile, "OpaqueDataManager: <buckets: %d, elements: %d>\n", p->nbuckets, p->count);
for (i=0; i<p->nbuckets; i++) {
- printf("%d ", listCount(p->buckets[i]));
+ fprintf(DebugFile, "%d ", listCount(p->buckets[i]));
}
- printf("\n");
+ fprintf(DebugFile, "\n");
if (printRefCnt) {
for (i=0; i<p->nbuckets; i++) {
int count = listCount(p->buckets[i]);
- printf("#%d -> %d: [", i, count);
+ fprintf(DebugFile, "#%d -> %d: [", i, count);
if (count > 0) {
listToFirst(p->buckets[i]);
do {
- printf("%d ", ((Node *)listCurrent(p->buckets[i]))->refCnt);
+ fprintf(DebugFile, "%d ", ((Node *)listCurrent(p->buckets[i]))->refCnt);
} while (listNext(p->buckets[i]));
}
- printf("]\n");
+ fprintf(DebugFile,"]\n");
}
}
}
@@ -355,43 +355,43 @@
DataManagerDump(g, TRUE);
- printf("DataManagerInsert(g, 1, 2, 0);\n");
+ fprintf(DebugFile, "DataManagerInsert(g, 1, 2, 0);\n");
DataManagerInsert(g, 1, 2, 0);
DataManagerDump(g, TRUE);
- printf("p = DataManagerRetrieve(g, 1, 2);\n");
+ fprintf(DebugFile, "p = DataManagerRetrieve(g, 1, 2);\n");
p = DataManagerRetrieve(g, 1, 2);
DataManagerDump(g, TRUE);
- printf("p = DataManagerRetrieve(g, 2, 3);\n");
+ fprintf(DebugFile, "p = DataManagerRetrieve(g, 2, 3);\n");
p = DataManagerRetrieve(g, 2, 3);
DataManagerDump(g, TRUE);
- printf("DataManagerInsert(g, 2, 3, 0);\n");
+ fprintf(DebugFile,"DataManagerInsert(g, 2, 3, 0);\n");
DataManagerInsert(g, 2, 3, 0);
DataManagerDump(g, TRUE);
- printf("DataManagerInsert(g, 2, 3, 0);\n");
+ fprintf(DebugFile,"DataManagerInsert(g, 2, 3, 0);\n");
DataManagerInsert(g, 2, 3, 0);
DataManagerDump(g, TRUE);
- printf("DataManagerRemove(g, 1, 2);\n");
+ fprintf(DebugFile, "DataManagerRemove(g, 1, 2);\n");
DataManagerRemove(g, 1, 2);
DataManagerDump(g, TRUE);
- printf("DataManagerRemove(g, 2, 3);\n");
+ fprintf(DebugFile, "DataManagerRemove(g, 2, 3);\n");
DataManagerRemove(g, 2, 3);
DataManagerDump(g, TRUE);
- printf("DataManagerRemove(g, 1, 2);\n");
+ fprintf(DebugFile, "DataManagerRemove(g, 1, 2);\n");
DataManagerRemove(g, 1, 2);
DataManagerDump(g, TRUE);
- printf("DataManagerRemove(g, 1, 2);\n");
+ fprintf(DebugFile, "DataManagerRemove(g, 1, 2);\n");
DataManagerRemove(g, 1, 2);
DataManagerDump(g, TRUE);
Index: sft.c
===================================================================
RCS file: /cvs/stsf/stsf/stsflib/sft.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- a/sft.c 26 Mar 2004 19:19:54 -0000 1.1.1.1
+++ b/sft.c 22 Apr 2004 20:56:32 -0000 1.2
@@ -1470,7 +1470,7 @@
default:
#ifdef DEBUG
/*- if the cmap table is really broken */
- printf("%s: %d is not a recognized cmap format.\n", ttf->fname, GetUInt16(ttf->cmap, 0, 1));
+ fprintf(stderr, "%s: %d is not a recognized cmap format.\n", ttf->fname, GetUInt16(ttf->cmap, 0, 1));
#endif
ttf->cmapType = CMAP_NOT_USABLE;
ttf->cmap = 0;
@@ -2871,7 +2871,6 @@
if (!nGlyphs || !glyphArray) return 0; /* invalid parameters */
- //printf("ReadGlyphMetrics: hmtx: %x, vmtx: %x, hcount: %d, vcount: %d\n", hmtx, vmtx, hcount, vcount);
res = calloc(nGlyphs, sizeof(TTFullSimpleGlyphMetrics)); assert(res != 0);
for (i = 0; i < nGlyphs; i++) {
Index: sharedcache.c
===================================================================
RCS file: /cvs/stsf/stsf/stsflib/sharedcache.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- a/sharedcache.c 26 Mar 2004 19:19:54 -0000 1.1.1.1
+++ b/sharedcache.c 22 Apr 2004 20:56:32 -0000 1.2
@@ -264,22 +264,22 @@
{
SCHeader *sc = (SCHeader *) cache;
int i;
- printf("<SharedCache size='%d' ioffs='%d' icur='%d' ilimit='%d' itotal='%d' boffs='%d' bcur='%d' bbrk='%d'>\n",
+ fprintf(DebugFile,"<SharedCache size='%d' ioffs='%d' icur='%d' ilimit='%d' itotal='%d' boffs='%d' bcur='%d' bbrk='%d'>\n",
sc->size, sc->ioffs, sc->icur, sc->ilimit, sc->itotal, sc->boffs, sc->bcur, sc->bbrk);
for (i=0; i<sc->itotal; i++) {
SCIndexEntry *e = (SCIndexEntry *) (cache + sc->ioffs) + i;
if (e->props != SLOT_EMPTY) {
- printf(" <e props='%s'", PropsToString(e->props));
+ fprintf(DebugFile," <e props='%s'", PropsToString(e->props));
if (e->props == SLOT_OCCUPIED) {
- printf(" key ='[%d %d %d %d]' dataoffset='%d' datasize='%d'",
+ fprintf(DebugFile," key ='[%d %d %d %d]' dataoffset='%d' datasize='%d'",
e->scalerID, e->instanceID, e->glyphID, e->fracdelta, e->dataoffset, e->datasize);
}
- printf(" />\n");
+ fprintf(DebugFile," />\n");
}
}
- printf("</SharedCache>\n");
+ fprintf(DebugFile,"</SharedCache>\n");
}
#endif
Index: stmath.c
===================================================================
RCS file: /cvs/stsf/stsf/stsflib/stmath.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- a/stmath.c 26 Mar 2004 19:19:54 -0000 1.1.1.1
+++ b/stmath.c 22 Apr 2004 20:56:32 -0000 1.2
@@ -57,7 +57,7 @@
#include "stmath.h"
#ifdef MATRIX_PRINT
-#include <stdio.h>
+#include "stsfutil.h"
#endif
#ifdef __GNUC__
@@ -363,9 +363,9 @@
#ifdef MATRIX_PRINT
void STMatrixPrint(STMatrixPtr m)
{
- printf("| %10.4f %10.4f %10.4f |\n", m->xx, m->xy, m->tx);
- printf("| %10.4f %10.4f %10.4f |\n", m->yx, m->yy, m->ty);
- printf("| %10.4f %10.4f %10.4f |\n", 0.0, 0.0, 1.0);
+ fprintf(DebugFile, "| %10.4f %10.4f %10.4f |\n", m->xx, m->xy, m->tx);
+ fprintf(DebugFile, "| %10.4f %10.4f %10.4f |\n", m->yx, m->yy, m->ty);
+ fprintf(DebugFile, "| %10.4f %10.4f %10.4f |\n", 0.0, 0.0, 1.0);
}
#endif
Index: stsfutil.c
===================================================================
RCS file: /cvs/stsf/stsf/stsflib/stsfutil.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- a/stsfutil.c 12 Apr 2004 05:57:27 -0000 1.6
+++ b/stsfutil.c 22 Apr 2004 20:56:32 -0000 1.7
@@ -216,15 +216,15 @@
int i;
if (p == NULL) {
- printf("(nil)\n");
+ fprintf(DebugFile,"(nil)\n");
return;
}
for (i=0; i<len; i++) {
if (isprint(p[i])) {
- putchar(p[i]);
+ fputc(p[i], DebugFile);
} else {
- putchar('.');
+ fputc('.', DebugFile);
}
}
}
@@ -236,31 +236,31 @@
abuf[16] = 0;
if (ptr == NULL) {
- printf("(nil)\n");
+ fprintf(DebugFile, "(nil)\n");
return;
}
for (i = 0; i < len; i++) {
if (!(i % 16)) {
- printf("%010d: ", i);
+ fprintf(DebugFile, "%010d: ", i);
}
- printf("%02X ", ptr[i]);
+ fprintf(DebugFile, "%02X ", ptr[i]);
abuf[i & 15] = isprint(ptr[i]) ? ptr[i] : '.';
if ((i % 16) == 7) {
- printf(" ");
+ fprintf(DebugFile, " ");
} else if ((i % 16) == 15) {
- printf("%s\n", (char *)abuf);
+ fprintf(DebugFile, "%s\n", (char *)abuf);
}
}
if ((k = i % 16) != 0) {
j = 3 * (16 - k);
if (k < 8) j++;
- while (j--) printf(" ");
+ while (j--) fprintf(DebugFile, " ");
abuf[k] = 0;
- printf("%s\n", (char *)abuf);
+ fprintf(DebugFile, "%s\n", (char *)abuf);
}
}
@@ -757,22 +757,22 @@
switch(direction) {
case STFS_OUTGOING:
- printf(">>>\t");
+ fprintf(DebugFile, ">>>\t");
break;
case STFS_INCOMING:
- printf("<<<\t");
+ fprintf(DebugFile, "<<<\t");
break;
}
- printf("[");
+ fprintf(DebugFile, "[");
if ((c16[OPCODE] >> 8) != 0) {
- printf("ctx: %X ", c16[OPCODE]); /* context ID */
+ fprintf(DebugFile, "ctx: %X ", c16[OPCODE]); /* context ID */
}
- printf("%s (%X) ", ProtoOpcodeName(c16[OPCODE] & OPCODEMASK), c16[OPCODE] & OPCODEMASK);
+ fprintf(DebugFile, "%s (%X) ", ProtoOpcodeName(c16[OPCODE] & OPCODEMASK), c16[OPCODE] & OPCODEMASK);
- printf("len: %d]\n", c16[PACLEN]);
+ fprintf(DebugFile, "len: %d]\n", c16[PACLEN]);
}
@@ -1309,8 +1309,8 @@
}
#if 0
- printf("savestring: str: ["); DumpData(str, len); printf("]\n");
- printf(" res: ["); DumpData(res, expandToUCS2 ? len * 2 : len); printf("]\n");
+ fprintf(DebugFile, "savestring: str: ["); DumpData(str, len); printf("]\n");
+ fprintf(DebugFile, " res: ["); DumpData(res, expandToUCS2 ? len * 2 : len); printf("]\n");
#endif
return res;
@@ -1375,8 +1375,6 @@
tt = STTerritoryForPosixStr(terrstr);
-/* printf("langstr: %s, terrstr: %s, encstr: %s.\n", langstr, terrstr, encstr); */
-
if (*encstr) {
tx = XSTEncodingForPosixStr(encstr);
} else {
More information about the stsf-commit
mailing list