[stsf-commit] stsf/STFontServer/src fontenumerator.c, 1.2,
1.3 fontfamilymanager.c, 1.1.1.1, 1.2 fontprobe.c, 1.2,
1.3 handler.c, 1.2, 1.3 makefile, 1.5, 1.6 metadata.c, 1.1.1.1,
1.2 objectenumerator.c, 1.2, 1.3 pcfprobe.c, 1.2,
1.3 prototest-door.c, 1.1.1.1, 1.2 saverestore.c, 1.2,
1.3 stfs-door.c, 1.3, 1.4 stfs.h, 1.1.1.1, 1.2 truetypeprobe.c,
1.1.1.1, 1.2
Alexander Gelfenbain
stsf-commit at pdx.freedesktop.org
Fri Apr 23 06:56:35 EST 2004
- Previous message: [stsf-commit] stsf/STClientLibrary/src STText.c, 1.2,
1.3 STTypeEnv.c, 1.2, 1.3 serverconnection.c, 1.1.1.1, 1.2
- Next message: [stsf-commit] stsf/interface interface.xml, 1.4, 1.5 protocol.xml,
1.4, 1.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Committed by: adg
Index: fontenumerator.c
===================================================================
RCS file: /cvs/stsf/stsf/STFontServer/src/fontenumerator.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- a/fontenumerator.c 12 Apr 2004 05:57:26 -0000 1.2
+++ b/fontenumerator.c 22 Apr 2004 20:56:32 -0000 1.3
@@ -492,7 +492,7 @@
#if STSF_DEBUG
if (DebugLevel > 4) {
for (i=0; i<vsorter->cur; i++) {
- printf("%64s : %d.\n", vsorter->slots[i].name, listCount(vsorter->slots[i].ids));
+ fprintf(DebugFile, "%64s : %d.\n", vsorter->slots[i].name, listCount(vsorter->slots[i].ids));
}
}
#endif
@@ -569,7 +569,7 @@
{
if (DebugLevel >= 5) {
if (meta != NULL) {
- printf("\t");
+ fprintf(DebugFile, "\t");
FSFontMetaDataPrint(meta);
}
}
@@ -584,11 +584,11 @@
int i;
if (DebugLevel >= 5) {
- printf("FontEnumerator::UpdateFontArray: [%d: ",vfont->bcount);
+ fprintf(DebugFile, "FontEnumerator::UpdateFontArray: [%d: ",vfont->bcount);
for (i=0; i<vfont->bcount; i++) {
- printf("%d ", ((FSBitmapFontRecordPtr)vfont->bfonts[i])->pixelSize);
+ fprintf(DebugFile, "%d ", ((FSBitmapFontRecordPtr)vfont->bfonts[i])->pixelSize);
}
- printf(" ] %d -> '%s %s'\n", fontID, vfont->family, vfont->subfamily);
+ fprintf(DebugFile, " ] %d -> '%s %s'\n", fontID, vfont->family, vfont->subfamily);
}
}
#else
@@ -1149,36 +1149,16 @@
l = 0;
r = namecount - 1;
- // printf("\n\n");
-
do {
j = (l + r) >> 1;
t1 = (names[j].platformID << 16) | names[j].encodingID;
t2 = (names[j].languageID << 16) | names[j].nameID;
-#if 0
- printf("%d %d %d %d | %d %d %d %d | k1: %08X k2: %08X, t1: %08X, t2: %08X\n",
- names[j].platformID, names[j].encodingID, names[j].languageID, names[j].nameID,
- pID, eID, lID, nID, k1, k2, t1, t2);
-#endif
if ((k1 > t1) || ((k1 == t1) && (k2 >= t2))) l = j + 1;
if ((k1 < t1) || ((k1 == t1) && (k2 <= t2))) r = j - 1;
} while (l <= r);
if (l - r == 2) {
-#if 0
- //if (names[j].slen == namelen) {
- if (1) {
- char *p1 = StringToPrintable(names[j].sptr, names[j].slen);
- char *p2 = StringToPrintable(name, namelen);
-
- printf("[%s] [%s]\n", p1, p2);
- free(p1);
- free(p2);
- }
-#endif
-
-
if ((names[l-1].slen == namelen) && !memcmp(names[l-1].sptr, name, namelen)) {
listAppend(idlist, (void *) fp->fontID);
}
@@ -1291,18 +1271,6 @@
if (name != NULL && namelen != 0) {
match2 = match2 && ((names[j].slen == namelen) && !memcmp(names[j].sptr, name, namelen));
-#if 0
- if (names[j].slen == namelen) {
- char *p1 = StringToPrintable(names[j].sptr, namelen);
- char *p2 = StringToPrintable(name, namelen);
-
- printf("[%s] [%s]\n", p1, p2);
- free(p1);
- free(p2);
- }
-#endif
-
-
}
if (match2) {
@@ -1875,23 +1843,8 @@
fsi[i].ptr = f[i];
}
-/* #ifdef STSF_DEBUG */
-#if 0
- printf("\n\nFSIndexCreate UNSORTED\n");
- for (i=0; i<count; i++) {
- printf("%5d -> %X\n", fsi[i].ind, (intptr_t) fsi[i].ptr);
- }
-#endif
-
qsort(fsi, count, sizeof(FSIndex), FSIndexCompare);
-#if 0
- printf("\n\nFSIndexCreate SORTED\n");
- for (i=0; i<count; i++) {
- printf("%5d -> %X\n", fsi[i].ind, (intptr_t) fsi[i].ptr);
- }
-#endif
-
return fsi;
}
Index: fontfamilymanager.c
===================================================================
RCS file: /cvs/stsf/stsf/STFontServer/src/fontfamilymanager.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- a/fontfamilymanager.c 26 Mar 2004 19:19:56 -0000 1.1.1.1
+++ b/fontfamilymanager.c 22 Apr 2004 20:56:32 -0000 1.2
@@ -161,19 +161,7 @@
utf16 *cp1 = l->p;
utf16 *cp2 = r->p;
-#if 0
-
- {
- char *cp1 = UTF16ToPrintable(l->p, l->charcnt);
- char *cp2 = UTF16ToPrintable(r->p, r->charcnt);
- printf("TUStringCompare: <%d '%s'> vs <%d '%s'>\n", l->lang, cp1, r->lang, cp2);
- free(cp1);
- free(cp2);
- }
-#endif
-
if (l->lang != ST_LANGUAGE_DEFAULT && r->lang != ST_LANGUAGE_DEFAULT && l->lang != r->lang) {
- //if (l->lang != r->lang) {
return l->lang - r->lang;
}
@@ -803,15 +791,6 @@
familynamecnt = GetNames(frec, &familynames, TT_NAME_FONTFAMILY);
fontnamecnt = GetNames(frec, &fontnames, TT_NAME_FONTSUBFAMILY);
GetWeightWidthStyle(frec, &weight, &width, &style);
-#if 0
-
- printf("%d -> %s %s %s\n", fontID,
- STFontWeightClassString(weight),
- STFontWidthClassString(width),
- STFontStyleName(style));
-#endif
-
-
FontEnumeratorUnlock(p->fe);
Index: fontprobe.c
===================================================================
RCS file: /cvs/stsf/stsf/STFontServer/src/fontprobe.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- a/fontprobe.c 12 Apr 2004 05:57:26 -0000 1.2
+++ b/fontprobe.c 22 Apr 2004 20:56:32 -0000 1.3
@@ -347,16 +347,16 @@
double pcf_xmin, pcf_xmax, pcf_ymin, pcf_ymax;
double pcf_hascent, pcf_hdescent, pcf_hlinegap;
#if 0
- printf("PixelSize: %d, PointSize: %d, Res: [%d %d], AvgWidth: %d.\n",
+ fprintf(DebugFile, "PixelSize: %d, PointSize: %d, Res: [%d %d], AvgWidth: %d.\n",
pcf->PixelSize, pcf->PointSize, pcf->ResolutionX, pcf->ResolutionY, pcf->AverageWidth);
- printf("Min: [%d %d %d %d %d] [%g %g %g %g %g].\n",
+ fprintf(DebugFile, "Min: [%d %d %d %d %d] [%g %g %g %g %g].\n",
pcf->Min.lsb, pcf->Min.rsb, pcf->Min.aw, pcf->Min.ascent, pcf->Min.descent,
(double) pcf->Min.lsb / (double) pcf->PixelSize,
(double) pcf->Min.rsb / (double) pcf->PixelSize,
(double) pcf->Min.aw / (double) pcf->PixelSize,
(double) pcf->Min.ascent / (double) pcf->PixelSize,
(double) pcf->Min.descent / (double) pcf->PixelSize);
- printf("Max: [%d %d %d %d %d] [%g %g %g %g %g].\n",
+ fprintf(DebugFile, "Max: [%d %d %d %d %d] [%g %g %g %g %g].\n",
pcf->Max.lsb, pcf->Max.rsb, pcf->Max.aw, pcf->Max.ascent, pcf->Max.descent,
(double) pcf->Max.lsb / (double) pcf->PixelSize,
(double) pcf->Max.rsb / (double) pcf->PixelSize,
@@ -395,12 +395,9 @@
}
#if 0
- printf("\n");
+ fprintf(DebugFile, "\n");
#endif
} while (listNext(blist));
-#if 0
- printf("\n\n");
-#endif
if (k != 0) {
xMin /= (double) k;
Index: handler.c
===================================================================
RCS file: /cvs/stsf/stsf/STFontServer/src/handler.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- a/handler.c 12 Apr 2004 22:49:24 -0000 1.2
+++ b/handler.c 22 Apr 2004 20:56:32 -0000 1.3
@@ -46,8 +46,6 @@
* @version 0.8
*/
-#define DEBUG 1
-#define DAEMONIZE 0
#define VERBOSE 1
#include <sttypes.h>
@@ -102,7 +100,7 @@
sendprotoerror(ProtoOpcodeName(opcode), fd, ST_PROTO_PACK, pbuf); \
break; \
} else { \
- DebugStr(9, "UNPACK_AND_CHECK: received: " #name); \
+ DebugStr(8, "UNPACK_AND_CHECK: received: " #name); \
}
@@ -111,7 +109,7 @@
ErrorStr("PACK_AND_SEND: %d > %d",n, pbufsize); \
sendprotoerror(ProtoOpcodeName(reply), fd, ST_PROTO_PACK, pbuf); \
} else { \
- DebugStr(9, "PACK_AND_SEND: sending %s", ProtoOpcodeName(reply)); \
+ DebugStr(8, "PACK_AND_SEND: sending %s", ProtoOpcodeName(reply)); \
sendreply(fd, reply, n, pbuf); \
}
@@ -194,8 +192,7 @@
}
case STFS_CLOSE:
- releaseshmem((fsclient *) cdata);
- DebugStr(1, "stfontserverd: received STFS_CLOSE. Shutting down the connection.");
+ DebugStr(1, "stfontserverd: (thread: %d) received STFS_CLOSE. Shutting down the connection.", pthread_self());
sendreply(fd, STFS_CLOSE_R, 0, pbuf);
return HR_CLOSE;
@@ -427,7 +424,7 @@
UNPACK_AND_CHECK(MAPCHAR, (&fontID, &ch, pbuf, 0, 0));
- DebugStr(2, "MAPCHAR: fontID: %d, ch: %04X.", fontID, ch);
+ DebugStr(9, "MAPCHAR: fontID: %d, ch: %04X.", fontID, ch);
glyph = FSMapChar(fs, fontID, ch);
PACK_AND_SEND(MAPCHAR_R, (ST_OK, glyph, pbuf, pbufsize));
@@ -521,7 +518,7 @@
fracdelta = DOUBLE_XY_TO_FRACDELTA(x, y);
- DebugStr(2, "RENDERGLYPH: instanceID: %d, glyphID: %d.", instanceID, glyphID);
+ DebugStr(9, "RENDERGLYPH: instanceID: %d, glyphID: %d.", instanceID, glyphID);
FSGetScalerIDForInstance(fs, instanceID, &scalerID);
@@ -900,19 +897,6 @@
UNPACK_AND_CHECK(GETNAMETAGS, (&font, pbuf, ibuf, ibufsize));
ret = FSGetNameTags(fs, font, &count, &tags);
-#if 0
- /* XXX */
-
- {
- int i;
- printf("FSGetNameTags(%d) => %d tags.\n", font, count);
- for (i=0; i<count; i++) {
- printf("\t<%d %d %d %d>\n", tags[i].platformID, tags[i].encodingID, tags[i].languageID, tags[i].nameID);
- }
- }
-#endif
-
-
PACK_AND_SEND(GETNAMETAGS_R, (ret, count, tags, pbuf, pbufsize));
if (tags) free(tags);
@@ -932,21 +916,11 @@
if (ret != ST_OK) {
- printf("STFS_GETNAMESTRING: %s\n", ErrorCodeName(ret));
- printf(" font: %d, tag: <%d %d %d %d>\n", font, tag.platformID, tag.encodingID, tag.languageID, tag.nameID);
+ fprintf(DebugFile, "STFS_GETNAMESTRING: %s\n", ErrorCodeName(ret));
+ fprintf(DebugFile, " font: %d, tag: <%d %d %d %d>\n", font, tag.platformID, tag.encodingID, tag.languageID, tag.nameID);
}
-#if 0
- {
- char *p = StringToPrintable(str, count);
- printf("FSSessionGetNameStr: font: %d, tag: <%d %d %d %d>\n", font, tag.platformID, tag.encodingID, tag.languageID, tag.nameID);
- printf("\t<%s>\n", p == NULL ? "(nil)":p);
- if (p != 0) free(p);
-
- }
-#endif
-
if (str) free(str);
}
@@ -967,11 +941,11 @@
#ifdef STSF_DEBUG
if (DebugLevel >= 1) {
- printf("PREFETCHGLYPHS: %d ==>", count);
+ fprintf(DebugFile, "PREFETCHGLYPHS: %d ==>", count);
for (i=0; i<count; i++) {
- printf("[%d %d %d %d] ", gk[i].scalerID, gk[i].instanceID, gk[i].glyphID, gk[i].fracdelta);
+ fprintf(DebugFile, "[%d %d %d %d] ", gk[i].scalerID, gk[i].instanceID, gk[i].glyphID, gk[i].fracdelta);
}
- printf("\n");
+ fprintf(DebugFile,"\n");
}
#endif
if ((offsets = calloc(count, sizeof(uint32_t))) == NULL) {
Index: makefile
===================================================================
RCS file: /cvs/stsf/stsf/STFontServer/src/makefile,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- a/makefile 10 Apr 2004 03:37:26 -0000 1.5
+++ b/makefile 22 Apr 2004 20:56:32 -0000 1.6
@@ -105,7 +105,7 @@
fontmanager: DEFINES+= -DDEBUG
testfe: DEFINES+= -DMAIN
testse: DEFINES+= -DMAIN
-debug: DEFINES+= -DSTSFDEBUG -DDAEMONIZE=0
+debug: DEFINES+= -DSTSF_DEBUG -DDAEMONIZE=0
testfontserver: LIBS+= $(THREAD_LIBS) $(MATH_LIB) $(ZLIB_LIBS) $(CHECKSUM_LIBS) -L$(TOP)/stsflib -lstsf $(DL_LIB)
stpfc: LIBS+= $(THREAD_LIBS) $(MATH_LIB) $(ZLIB_LIBS) $(CHECKSUM_LIBS) -L$(TOP)/stsflib -lstsf $(DL_LIB)
Index: metadata.c
===================================================================
RCS file: /cvs/stsf/stsf/STFontServer/src/metadata.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- a/metadata.c 26 Mar 2004 19:19:56 -0000 1.1.1.1
+++ b/metadata.c 22 Apr 2004 20:56:32 -0000 1.2
@@ -101,27 +101,27 @@
#ifdef STSF_DEBUG
void FSFontMetaDataPrint(FSFontMetaDataPtr p)
{
- printf("FSFontMetaData : ");
+ fprintf(DebugFile, "FSFontMetaData : ");
if (p == NULL) {
- printf("NULL\n");
+ fprintf(DebugFile, "NULL\n");
return;
}
- printf("[ %d (", p->mclass);
+ fprintf(DebugFile, "[ %d (", p->mclass);
switch (p->mclass) {
case FSMD_SESSIONFONT_URL:
{
FSFontMetaDataSFURL *q = (FSFontMetaDataSFURL *) p;
- printf("%s) surl: %s]\n", "FSMD_SESSIONFONT_URL", q->surl == NULL ? NULL : q->surl);
+ fprintf(DebugFile, "%s) surl: %s]\n", "FSMD_SESSIONFONT_URL", q->surl == NULL ? NULL : q->surl);
}
break;
case FSMD_SESSIONFONT_STREAM:
{
- printf("%s) ]\n", "FSMD_SESSIONFONT_STREAM");
+ fprintf(DebugFile, "%s) ]\n", "FSMD_SESSIONFONT_STREAM");
}
break;
default:
- printf(" UNKNOWN mclass)\n");
+ fprintf(DebugFile, " UNKNOWN mclass)\n");
}
}
#endif
Index: objectenumerator.c
===================================================================
RCS file: /cvs/stsf/stsf/STFontServer/src/objectenumerator.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- a/objectenumerator.c 12 Apr 2004 05:57:26 -0000 1.2
+++ b/objectenumerator.c 22 Apr 2004 20:56:32 -0000 1.3
@@ -222,7 +222,7 @@
FSObjectRecordPtr q;
if (handle == 0) {
- printf("ProbeObject:: %s\n", (char *) dlerror());
+ ErrorStr("ProbeObject:: %s", (char *) dlerror());
return 0;
}
Index: pcfprobe.c
===================================================================
RCS file: /cvs/stsf/stsf/STFontServer/src/pcfprobe.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- a/pcfprobe.c 12 Apr 2004 05:57:26 -0000 1.2
+++ b/pcfprobe.c 22 Apr 2004 20:56:32 -0000 1.3
@@ -324,7 +324,7 @@
}
#ifdef XDEBUG
- printf("v: %08X, n: %d\n", version, tocn);
+ fprintf(DebugFile, "v: %08X, n: %d\n", version, tocn);
#endif
family[0] = subfamily[0] = '\0';
@@ -350,7 +350,7 @@
msb = format & PCF_BYTE_MASK;
#ifdef XDEBUG
- printf(" TABLE: %s -> %10d <%08X>\n", TypeName(type), size, format);
+ fprintf(DebugFile, " TABLE: %s -> %10d <%08X>\n", TypeName(type), size, format);
#endif
if (type == PCF_PROPERTIES) {
@@ -364,7 +364,7 @@
n = GetUInt32(ptr+offset, 4, msb);
#ifdef XDEBUG
- printf(" PROPERTIES: %d %d (o: %x)\n", f, n, offset);
+ fprintf(DebugFile, " PROPERTIES: %d %d (o: %x)\n", f, n, offset);
#endif
q = (byte *)ptr+offset+8;
@@ -430,15 +430,6 @@
p->XLFD = strdup(pv);
}
-#if 0
-// #ifdef XDEBUG
- printf(" tname: %08X [%s], is_string: %d, value: %d", name, pstr+name, is_string, value);
-
- if (is_string) {
- printf(" [%s]", pstr+value);
- }
- printf("\n");
-#endif
}
if (p->Foundry == NULL || p->FamilyName == NULL || p->WeightName == NULL || p->Slant == NULL || p->SetwidthName == NULL || p->Spacing == NULL) {
@@ -532,32 +523,32 @@
byte *q = (byte *) ptr + offset;
#ifdef XDEBUG
- printf("\tFormat: %04X.\n", GetUInt32(q, 0, msb));
- printf("\tNoOverlap: %d.\n", q[4]);
- printf("\tConstantMetrics: %d.\n", q[5]);
- printf("\tTerminalFont: %d.\n", q[6]);
- printf("\tConstantWidth: %d.\n", q[7]);
- printf("\tInkInside: %d.\n", q[8]);
- printf("\tInkMetrics: %d.\n", q[9]);
- printf("\tDrawDirection: %d.\n", q[10]);
- printf("\tPad: %d.\n", q[11]);
- printf("\tFontAscent: %d.\n", GetInt32(q, 12, msb));
- printf("\tFontDescent: %d.\n", GetInt32(q, 16, msb));
- printf("\tMaxOverlap: %d.\n", GetInt32(q, 20, msb));
- printf("\tMinBounds:\n");
- printf("\t\tLeftBearing: %d.\n", GetInt16(q+24, 0, msb));
- printf("\t\tRightBearing: %d.\n", GetInt16(q+24, 2, msb));
- printf("\t\tWidth: %d.\n", GetInt16(q+24, 4, msb));
- printf("\t\tAscent: %d.\n", GetInt16(q+24, 6, msb));
- printf("\t\tDescent: %d.\n", GetInt16(q+24, 8, msb));
- printf("\t\tAttributes: %d.\n", GetInt16(q+24, 10, msb));
- printf("\tMaxBounds:\n");
- printf("\t\tLeftBearing: %d.\n", GetInt16(q+32, 0, msb));
- printf("\t\tRightBearing: %d.\n", GetInt16(q+32, 2, msb));
- printf("\t\tWidth: %d.\n", GetInt16(q+32, 4, msb));
- printf("\t\tAscent: %d.\n", GetInt16(q+32, 6, msb));
- printf("\t\tDescent: %d.\n", GetInt16(q+32, 8, msb));
- printf("\t\tAttributes: %d.\n", GetInt16(q+32, 10, msb));
+ fprintf(DebugFile, "\tFormat: %04X.\n", GetUInt32(q, 0, msb));
+ fprintf(DebugFile, "\tNoOverlap: %d.\n", q[4]);
+ fprintf(DebugFile, "\tConstantMetrics: %d.\n", q[5]);
+ fprintf(DebugFile, "\tTerminalFont: %d.\n", q[6]);
+ fprintf(DebugFile, "\tConstantWidth: %d.\n", q[7]);
+ fprintf(DebugFile, "\tInkInside: %d.\n", q[8]);
+ fprintf(DebugFile, "\tInkMetrics: %d.\n", q[9]);
+ fprintf(DebugFile, "\tDrawDirection: %d.\n", q[10]);
+ fprintf(DebugFile, "\tPad: %d.\n", q[11]);
+ fprintf(DebugFile, "\tFontAscent: %d.\n", GetInt32(q, 12, msb));
+ fprintf(DebugFile, "\tFontDescent: %d.\n", GetInt32(q, 16, msb));
+ fprintf(DebugFile, "\tMaxOverlap: %d.\n", GetInt32(q, 20, msb));
+ fprintf(DebugFile, "\tMinBounds:\n");
+ fprintf(DebugFile, "\t\tLeftBearing: %d.\n", GetInt16(q+24, 0, msb));
+ fprintf(DebugFile, "\t\tRightBearing: %d.\n", GetInt16(q+24, 2, msb));
+ fprintf(DebugFile, "\t\tWidth: %d.\n", GetInt16(q+24, 4, msb));
+ fprintf(DebugFile, "\t\tAscent: %d.\n", GetInt16(q+24, 6, msb));
+ fprintf(DebugFile, "\t\tDescent: %d.\n", GetInt16(q+24, 8, msb));
+ fprintf(DebugFile, "\t\tAttributes: %d.\n", GetInt16(q+24, 10, msb));
+ fprintf(DebugFile, "\tMaxBounds:\n");
+ fprintf(DebugFile, "\t\tLeftBearing: %d.\n", GetInt16(q+32, 0, msb));
+ fprintf(DebugFile, "\t\tRightBearing: %d.\n", GetInt16(q+32, 2, msb));
+ fprintf(DebugFile, "\t\tWidth: %d.\n", GetInt16(q+32, 4, msb));
+ fprintf(DebugFile, "\t\tAscent: %d.\n", GetInt16(q+32, 6, msb));
+ fprintf(DebugFile, "\t\tDescent: %d.\n", GetInt16(q+32, 8, msb));
+ fprintf(DebugFile, "\t\tAttributes: %d.\n", GetInt16(q+32, 10, msb));
#endif
if ((type == PCF_ACCELERATORS && done_bdfaccel == 0) ||
(type == PCF_BDF_ACCELERATORS)) {
@@ -736,10 +727,10 @@
if (DebugLevel > 5) {
if (p->Min.lsb != cmin.lsb || p->Min.rsb != cmin.rsb || p->Min.aw != cmin.aw || p->Min.ascent != cmin.ascent || p->Min.descent != cmin.descent ||
p->Max.lsb != cmax.lsb || p->Max.rsb != cmax.rsb || p->Max.aw != cmax.aw || p->Max.ascent != cmax.ascent || p->Max.descent != cmax.descent) {
- printf("MIN and MAX (real) : [%d %d %d %d %d] [%d %d %d %d %d].\n",
+ fprintf(DebugFile, "MIN and MAX (real) : [%d %d %d %d %d] [%d %d %d %d %d].\n",
p->Min.lsb, p->Min.rsb, p->Min.aw, p->Min.ascent, p->Min.descent,
p->Max.lsb, p->Max.rsb, p->Max.aw, p->Max.ascent, p->Max.descent);
- printf("MIN and MAX (computed): [%d %d %d %d %d] [%d %d %d %d %d].\n",
+ fprintf(DebugFile, "MIN and MAX (computed): [%d %d %d %d %d] [%d %d %d %d %d].\n",
cmin.lsb, cmin.rsb, cmin.aw, cmin.ascent, cmin.descent,
cmax.lsb, cmax.rsb, cmax.aw, cmax.ascent, cmax.descent);
}
@@ -873,13 +864,12 @@
MemoryChecksum(ptr, flen, checksum);
if (FSFontProbeEnvFind(fp, checksum) != -1) { /* File has already been loaded */
- // printf(">>> %s - ALREADY LOADED\n", fname);
goto cleanup;
}
#ifdef XDEBUG
- printf(">>> %s\n", fname);
+ fprintf(DebugFile, ">>> %s\n", fname);
#endif
pcfret = ParsePCF(ptr,
Index: prototest-door.c
===================================================================
RCS file: /cvs/stsf/stsf/STFontServer/src/prototest-door.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- a/prototest-door.c 26 Mar 2004 19:19:56 -0000 1.1.1.1
+++ b/prototest-door.c 22 Apr 2004 20:56:32 -0000 1.2
@@ -89,41 +89,6 @@
int ibufsize2 = 0;
-#if 0
-
-void rawdump(const char *ptr, int len)
-{
- int i, j, k;
- byte abuf[17];
- abuf[16] = 0;
-
- for (i = 0; i < len; i++) {
- if (!(i % 16)) {
- printf("%010d: ", i);
- }
-
- printf("%02X ", ptr[i]);
-
- abuf[i & 15] = isprint(ptr[i]) ? ptr[i] : '.';
- if ((i % 16) == 7) {
- printf(" ");
- } else if ((i % 16) == 15) {
- printf("%s\n", (char *)abuf);
- }
- }
-
- if ((k = i % 16) != 0) {
- j = 3 * (16 - k);
- if (k < 8) j++;
- while (j--) printf(" ");
- abuf[k] = 0;
- printf("%s\n", (char *)abuf);
- }
-}
-
-
-#endif
-
void fsexchange(int door, char *send, int nsend, char **recv, int *nrecv)
{
door_arg_t arg;
@@ -175,64 +140,6 @@
}
-#if 0
-
-
-int fssend(int fd, int opcode, int nbytes) /* takes data from the global buf */
-{
- uint16_t header[STFSPHEADER];
-
- header[OPCODE] = opcode;
- header[PACLEN] = B2C32U(nbytes);
-
- if (DebugLevel > 2) {
- PHeaderDump(STFS_OUTGOING, (void *) header);
- }
- conn_write(fd, (void *)header, STFSPHEADERC32U);
-
- if (nbytes != 0) {
- //if (DebugLevel > 2) {
- // HexDump((void *)buf, nbytes);
- //}
- conn_write(fd, buf, B2C32U(nbytes));
- }
-
- return 0;
-}
-
-int fsreceive(int fd, int *opcode, int *nbytes)
-{
- uint16_t header[STFSPHEADER];
- int len;
-
- conn_read(fd, 0, header, STFSPHEADERC32U);
- DebugStr(2, "fsreceive:");
- if (DebugLevel > 2) {
- PHeaderDump(STFS_INCOMING, header);
- }
-
-
- len = header[PACLEN];
- *nbytes = C32U2B(len);
- *opcode = header[OPCODE] & OPCODEMASK ;
-
- DebugStr(2, "fsreceive: nbytes: %d, opcode: %s.", *nbytes, ProtoOpcodeName(*opcode));
-
- if (*nbytes > bufsize) {
- printf("Packet is too big: nbytes: %d, bufsize: %d.\n", *nbytes, bufsize);
- conn_flushiqueue(fd, len);
- return 1;
- }
-
- conn_read(fd, 0, buf, len);
- //if (DebugLevel > 2) {
- // HexDump((byte *) buf, *nbytes);
- //}
- return 0;
-}
-
-#endif
-
int Test_GetFontsForPlatformName(int fd,
byte *fontname,
Index: saverestore.c
===================================================================
RCS file: /cvs/stsf/stsf/STFontServer/src/saverestore.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- a/saverestore.c 12 Apr 2004 05:57:26 -0000 1.2
+++ b/saverestore.c 22 Apr 2004 20:56:32 -0000 1.3
@@ -803,9 +803,6 @@
n += BO_NR_NAMERECORD_S;
}
- //printf("NameRecordArraySave: %d\n", s);
- //HexDump(p, s);
-
}
return s;
@@ -2368,7 +2365,7 @@
l->vdescent != r->vdescent ||
l->hlinegap != r->hlinegap ||
l->vlinegap != r->vlinegap) {
- printf("CheckScalableFontRecord: %s[%d] \n\tsaved: <%g %g %g %g %g %g %g %g %g %g %g>\n\trestored: <%g %g %g %g %g %g %g %g %g %g %g>",
+ fprintf(DebugFile, "CheckScalableFontRecord: %s[%d] \n\tsaved: <%g %g %g %g %g %g %g %g %g %g %g>\n\trestored: <%g %g %g %g %g %g %g %g %g %g %g>",
str, n,
l->italicAngle, l->xMin, l->yMin, l->xMax, l->yMax, l->hascent, l->hdescent, l->vascent, l->vdescent, l->hlinegap, l->vlinegap,
r->italicAngle, r->xMin, r->yMin, r->xMax, r->yMax, r->hascent, r->hdescent, r->vascent, r->vdescent, r->hlinegap, r->vlinegap);
Index: stfs-door.c
===================================================================
RCS file: /cvs/stsf/stsf/STFontServer/src/stfs-door.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- a/stfs-door.c 12 Apr 2004 22:49:24 -0000 1.3
+++ b/stfs-door.c 22 Apr 2004 20:56:32 -0000 1.4
@@ -68,6 +68,7 @@
#include <pthread.h>
#include <signal.h>
#include <door.h>
+#include <errno.h>
#if HAVE_ALLOCA_H
#include <alloca.h>
@@ -186,6 +187,9 @@
free(fsc->shmemfile);
}
+ munmap(fsc->shmaddr, fsc->shmlen); /* that's what releaseshmem() in handler.c used to do */
+ DebugStr(1, "%s: close(%d)", __func__, fsc->fd);
+ close(fsc->fd);
free(fsc);
}
}
@@ -206,49 +210,77 @@
#ifdef STSF_DEBUG
if (DebugLevel > 8) {
- printf("proto_handler: received:\n");
+ fprintf(DebugFile, "proto_handler: received:\n");
HexDump((const byte *) argp, argsize);
}
#endif
ckey = (intptr_t) cookie;
- if ((fsc = (fsclient *) FSGetClientData(fs, ckey)) == NULL) {
+ DebugStr(7, "%s: pthread: %d, request from: %d", __func__, pthread_self(), ckey);
+
+ /* Check if the connection is coming from an unknown client. If the client issued the
+ * STFS_CLOSE request its data has already been deallocated so no other requests
+ * are valid from that client
+ */
+ if ((fsc = (fsclient *) FSGetClientData(fs, ckey)) == NULL && argp != DOOR_UNREF_DATA) {
uint16_t buf[STFSPHEADER+2];
- DebugStr(1, "Unknown client, ckey: %d", ckey);
+ DebugStr(1, "%s: pthread: %d, unknown client, ckey: %d", __func__, pthread_self(), ckey);
sendprotoerror("Unknown client", 0, ST_MEMORY, buf+STFSPHEADER);
- door_return((char *) buf, sizeof(buf), NULL, 0);
+ DebugStr(1, "%s: pthread: %d, BEFORE door_return(), sizeof(buf): %d", __func__, pthread_self(), sizeof(buf));
+ if (door_return((char *) buf, sizeof(buf), NULL, 0) == -1) {
+ DebugStr(1, "%s: door_return() returned -1 [A] len: %d", __func__, sizeof(buf));
+ perror("door_return");
+ if (errno == E2BIG) {
+ if (door_return(NULL, 0, NULL, 0) == -1) {
+ DebugStr(1, "%s: door_return() returned -1 [AA] len: %d", __func__, sizeof(buf));
+ perror("door_return");
+ }
+ }
+ return;
+ }
}
- DebugStr(9, "%s: A", __func__);
- pthread_mutex_lock(&fsc->lock);
- DebugStr(9, "%s: B", __func__);
- fsc->nthr++;
- pthread_mutex_unlock(&fsc->lock);
- DebugStr(9, "%s: C", __func__);
-
-
if (argp == DOOR_UNREF_DATA) {
- DebugStr(9, "%s: DOOR_UNREF_DATA, cookie: %d", __func__, (intptr_t) cookie);
- close(fsc->fd); /* Close the client's door */
+ DebugStr(1, "%s: DOOR_UNREF_DATA, cookie: %d", __func__, (intptr_t) cookie);
+ /* If the client terminated before issuing the STFS_CLOSE request,
+ * deallocate its data now, otherwise, just return
+ */
+ if (fsc != NULL) {
+ //close(fsc->fd); /* Close the client's door */
+
+ DebugStr(8, "%s: D", __func__);
+ pthread_mutex_lock(&fsc->lock);
+ DebugStr(8, "%s: E", __func__);
+ while (fsc->nthr > 0) {
+ DebugStr(8, "%s: F", __func__);
+ pthread_cond_wait(&fsc->cond, &fsc->lock);
+ DebugStr(8, "%s: G", __func__);
+ }
+ FSDeleteClient(fs, ckey);
+ DebugStr(1,"%s: decrementing nthr[A]: pthread: %d, nthr: %d, ckey: %d.", __func__, pthread_self(), fsc->nthr, ckey);
+ DebugStr(8, "%s: H", __func__);
+ pthread_mutex_unlock(&fsc->lock);
+ DebugStr(8, "%s: I", __func__);
- DebugStr(9, "%s: D", __func__);
- pthread_mutex_lock(&fsc->lock);
- DebugStr(9, "%s: E", __func__);
- while (fsc->nthr > 1) {
- DebugStr(9, "%s: F", __func__);
- pthread_cond_wait(&fsc->cond, &fsc->lock);
- DebugStr(9, "%s: G", __func__);
+ fsclient_destroy(fsc);
+ }
+
+ if (door_return(NULL, 0, NULL, 0) == -1) {
+ DebugStr(1, "%s: door_return() returned -1 [B] len: 0", __func__);
+ perror("door_return");
+ return;
}
- FSDeleteClient(fs, ckey);
- DebugStr(9, "%s: H", __func__);
- pthread_mutex_unlock(&fsc->lock);
- DebugStr(9, "%s: I", __func__);
-
- fsclient_destroy(fsc);
- door_return(NULL, 0, NULL, 0);
}
+ DebugStr(8, "%s: pthread: %d A", __func__, pthread_self());
+ pthread_mutex_lock(&fsc->lock);
+ DebugStr(8, "%s: pthread: %d B", __func__, pthread_self());
+ fsc->nthr++;
+ DebugStr(1,"%s: incrementing nthr: pthread: %d, nthr: %d, ckey: %d.", __func__, pthread_self(), fsc->nthr, ckey);
+ pthread_mutex_unlock(&fsc->lock);
+ DebugStr(8, "%s: pthread: %d C", __func__, pthread_self());
+
door_cred(&dcred); /* should never fail */
@@ -258,9 +290,14 @@
pthread_mutex_lock(&fsc->lock);
fsc->nthr--;
+ DebugStr(1,"%s: decrementing nthr[B]: pthread: %d, nthr: %d, ckey: %d.", __func__, pthread_self(), fsc->nthr, ckey);
pthread_mutex_unlock(&fsc->lock);
pthread_cond_signal(&fsc->cond);
- door_return((char*)buf, sizeof(buf), NULL, 0);
+ if (door_return((char*)buf, sizeof(buf), NULL, 0) == -1) {
+ DebugStr(1, "%s: door_return() returned -1 [C] len: %d", __func__, sizeof(buf));
+ perror("door_return");
+ return;
+ }
}
memcpy(pbuf, argp, argsize);
@@ -270,15 +307,13 @@
packlen = ((uint16_t *) argp)[PACKLENINDEX];
bytelen = packlen << 2;
-
-
- DebugStr(9, "%s: J", __func__);
+ DebugStr(8, "%s: J", __func__);
FSLock(fs);
- DebugStr(9, "%s: K", __func__);
+ DebugStr(8, "%s: K", __func__);
handler_status = FSHandleRequest(fs, ckey, (intptr_t) fsc, 0, opcode, packlen, pbuf+4, pbufsize);
- DebugStr(9, "%s: L", __func__);
+ DebugStr(8, "%s: L", __func__);
FSUnlock(fs);
- DebugStr(9, "%s: M", __func__);
+ DebugStr(8, "%s: M", __func__);
switch (handler_status) {
case HR_OPCODE:
@@ -294,6 +329,30 @@
break;
case HR_CLOSE:
+ DebugStr(1, "%s: deallocating the client after receiving HR_CLOSE, nthr: %d", __func__, fsc->nthr);
+ // close(fsc->fd); /* Close the client's door */
+
+ DebugStr(1, "%s: [D1] nthr: %d", __func__, fsc->nthr);
+
+ pthread_mutex_lock(&fsc->lock);
+ while (fsc->nthr > 1) {
+ pthread_cond_wait(&fsc->cond, &fsc->lock);
+ }
+ DebugStr(1, "%s: [D2] nthr: %d", __func__, fsc->nthr);
+ FSDeleteClient(fs, ckey);
+ fsc->nthr--;
+ DebugStr(1, "%s: [D3] nthr: %d", __func__, fsc->nthr);
+ DebugStr(1,"%s: decrementing nthr[C]: pthread: %d, nthr: %d, ckey: %d.", __func__, pthread_self(), fsc->nthr, ckey);
+ pthread_mutex_unlock(&fsc->lock);
+
+ fsclient_destroy(fsc);
+ if (door_return((char*) pbuf, 4 + ((uint16_t *) pbuf)[PACLEN] * 4, NULL, 0) == -1) {
+ DebugStr(1, "%s: door_return() returned -1 [D], len: %d", __func__, 4 + ((uint16_t *) pbuf)[PACLEN] * 4);
+ perror("door_return");
+ return;
+ }
+
+ break;
case HR_CONNECT:
if (!connected) {
@@ -305,23 +364,26 @@
#ifdef STSF_DEBUG
if (DebugLevel > 8) {
- printf("proto_handler: sending back:\n");
+ fprintf(DebugFile, "proto_handler: sending back:\n");
HexDump(pbuf, 4 + ((uint16_t *) pbuf)[PACLEN] * 4);
}
#endif
- DebugStr(9, "%s: N", __func__);
+ DebugStr(8, "%s: N", __func__);
pthread_mutex_lock(&fsc->lock);
- DebugStr(9, "%s: O", __func__);
+ DebugStr(8, "%s: O", __func__);
fsc->nthr--;
+ DebugStr(1,"%s: decrementing nthr[D]: pthread: %d, nthr: %d, ckey: %d.", __func__, pthread_self(), fsc->nthr, ckey);
pthread_mutex_unlock(&fsc->lock);
- DebugStr(9, "%s: P", __func__);
+ DebugStr(8, "%s: P", __func__);
pthread_cond_signal(&fsc->cond);
- DebugStr(9, "%s: Q", __func__);
-
- door_return((char*) pbuf, 4 + ((uint16_t *) pbuf)[PACLEN] * 4, NULL, 0);
+ DebugStr(8, "%s: Q", __func__);
+ if (door_return((char*) pbuf, 4 + ((uint16_t *) pbuf)[PACLEN] * 4, NULL, 0) == -1) {
+ DebugStr(1, "%s: door_return() returned -1 [E], len: %d", __func__, 4 + ((uint16_t *) pbuf)[PACLEN] * 4);
+ perror("door_return");
+ }
}
static void stfs_main_door(void *cookie, char *argp, size_t argsize, door_desc_t *dp, uint_t ndesc)
@@ -344,18 +406,26 @@
#ifdef STSF_DEBUG
if (DebugLevel > 8) {
- printf("stfs_door: received:\n");
+ fprintf(DebugFile, "stfs_door: received:\n");
HexDump((const byte *) argp, argsize);
}
#endif
if (argp == DOOR_UNREF_DATA) {
- door_return(NULL, 0, NULL, 0);
+ if (door_return(NULL, 0, NULL, 0) == -1) {
+ DebugStr(1, "%s: door_return() returned -1 [A], len: 0", __func__);
+ perror("door_return");
+ return;
+ }
}
if (argsize < sizeof(DoorHandshakeIn)) {
out.ret = ST_PROTO_ERROR;
- door_return((char *) &out, sizeof(DoorHandshakeOut), NULL, 0);
+ if (door_return((char *) &out, sizeof(DoorHandshakeOut), NULL, 0) == -1) {
+ DebugStr(1, "%s: door_return() returned -1 [B], len: %d", __func__, sizeof(DoorHandshakeOut));
+ perror("door_return");
+ return;
+ }
}
door_cred(&dcred); /* should never fail */
@@ -367,12 +437,22 @@
if (in->major != STSF_VERSION_MAJOR || in->minor != STSF_VERSION_MINOR || in->proto != STFS_PROTOCOL_VERSION) {
out.ret = ST_PROTO_ERROR;
- door_return((char *) &out, sizeof(DoorHandshakeOut), NULL, 0);
+ if (door_return((char *) &out, sizeof(DoorHandshakeOut), NULL, 0) == -1) {
+ DebugStr(1, "%s: door_return() returned -1 [C], len: %d", __func__, sizeof(DoorHandshakeOut));
+ perror("door_return");
+ return;
+ }
+
}
if ((fsc = fsclient_allocate(dcred.dc_euid, in->cid)) == NULL) {
out.ret = ST_INTERNAL_ERROR;
- door_return((char *) &out, sizeof(DoorHandshakeOut), NULL, 0);
+ if (door_return((char *) &out, sizeof(DoorHandshakeOut), NULL, 0) == -1) {
+ DebugStr(1, "%s: door_return() returned -1 [D], len: %d", __func__, sizeof(DoorHandshakeOut));
+ perror("door_return");
+ return;
+ }
+
}
DebugStr(9, "%s: 1", __func__);
@@ -382,18 +462,29 @@
DebugStr(9, "%s: 2", __func__);
out.ret = ST_INTERNAL_ERROR;
fsclient_destroy(fsc);
- door_return((char *) &out, sizeof(DoorHandshakeOut), NULL, 0);
+ if (door_return((char *) &out, sizeof(DoorHandshakeOut), NULL, 0) == -1) {
+ DebugStr(1, "%s: door_return() returned -1 [E], len: %d", __func__, sizeof(DoorHandshakeOut));
+ perror("door_return");
+ return;
+ }
+
}
DebugStr(1, "Allocated new client, ckey: %d", ckey);
if ((doorfd = door_create(proto_handler, (void *) ckey, DOOR_UNREF)) < 0) {
+ DebugStr(1, "%s: could not create the door.", __func__);
perror("stfontserverd: stfs_main_door()");
fsync(2);
out.ret = ST_CONN_ERROR;
FSDeleteClient(fs, ckey);
fsclient_destroy(fsc);
- door_return((char *) &out, sizeof(DoorHandshakeOut), NULL, 0);
+ if (door_return((char *) &out, sizeof(DoorHandshakeOut), NULL, 0) == -1) {
+ DebugStr(1, "%s: door_return() returned -1 [B], len: %d", __func__, sizeof(DoorHandshakeOut));
+ perror("door_return");
+ return;
+ }
+
}
fsc->fd = doorfd;
@@ -403,7 +494,11 @@
desc.d_attributes = DOOR_DESCRIPTOR;
out.ret = ST_OK;
- door_return((char *) &out, sizeof(DoorHandshakeOut), &desc, 1);
+ if (door_return((char *) &out, sizeof(DoorHandshakeOut), &desc, 1) == -1) {
+ DebugStr(1, "%s: door_return() returned -1 [B], len: %d", __func__, sizeof(DoorHandshakeOut));
+ perror("door_return");
+ }
+
}
@@ -545,17 +640,9 @@
static void sig_handler(int n)
{
#if DAEMONIZE
-#if 0 /* XXX */
- int i;
- printf("%s: terminating (signal %d).\n", modname, n);
- fsync(1);
- for (i=0; i<256; i++) {
- close(i);
- }
-#endif
syslog(LOG_INFO | LOG_DAEMON, "Terminating on receiving signal %d.", n);
#else
- printf("%s: terminating (signal %d).\n", modname, n);
+ fprintf(DebugFile, "%s: terminating (signal %d).\n", modname, n);
/* fsync(1); */
#endif
seteuid(0);
@@ -570,7 +657,7 @@
#if DAEMONIZE
syslog(LOG_INFO | LOG_DAEMON, "Terminating.");
#else
- printf("%s: terminating.\n", modname);
+ fprintf(DebugFile, "%s: terminating.\n", modname);
/* fsync(1); */
#endif
seteuid(0);
@@ -657,15 +744,7 @@
}
-void releaseshmem(fsclient *fsc)
-{
- munmap(fsc->shmaddr, fsc->shmlen);
-}
-
-
-
-int
-main(int argc, char** argv) {
+int main(int argc, char** argv) {
STStatus ret;
#if DAEMONIZE
pid_t pid;
@@ -699,23 +778,9 @@
chdir("/");
for(i = 0; i < 256; i++) close(i);
-
-#if 0 /* XXX */
- remove("/tmp/stsf-0");
- remove("/tmp/stsf-1");
- remove("/tmp/stsf-2");
-
-
- fd1=open("/tmp/stsf-0", O_RDWR | O_CREAT, 0666);
- fd2=open("/tmp/stsf-1", O_RDWR | O_CREAT, 0666);
- fd3=open("/tmp/stsf-2", O_RDWR | O_CREAT, 0666);
- printf("fd1: %d, fd2: %d, fd3: %d.\n", fd1, fd2, fd3);
-#endif
-
-
- /* XXX
+#if HAVE_SETPROCTITLE
setproctitle("-%s", modname);
- */
+#endif
openlog(modname, LOG_PID | LOG_CONS, LOG_DAEMON);
@@ -723,17 +788,11 @@
#endif
signal(SIGQUIT, sig_handler);
- signal(SIGINT, sig_handler);
+ signal(SIGINT, sig_handler);
signal(SIGTERM, sig_handler);
signal(SIGUSR1, sig_handler);
signal(SIGUSR2, sig_handler);
-#if 0
- signal(SIGILL, sig_handler); /* XXX */
- signal(SIGBUS, sig_handler); /* XXX */
- signal(SIGSEGV, sig_handler); /* XXX */
-#endif
-
atexit(exit_handler);
Index: stfs.h
===================================================================
RCS file: /cvs/stsf/stsf/STFontServer/src/stfs.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- a/stfs.h 26 Mar 2004 19:19:56 -0000 1.1.1.1
+++ b/stfs.h 22 Apr 2004 20:56:32 -0000 1.2
@@ -94,8 +94,5 @@
STStatus createshmem(uid_t cuid, char *filename, void **addr, uint32_t *len);
-void releaseshmem(fsclient *);
-
-
#endif /* __STFS_H */
Index: truetypeprobe.c
===================================================================
RCS file: /cvs/stsf/stsf/STFontServer/src/truetypeprobe.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- a/truetypeprobe.c 26 Mar 2004 19:19:56 -0000 1.1.1.1
+++ b/truetypeprobe.c 22 Apr 2004 20:56:32 -0000 1.2
@@ -161,10 +161,6 @@
fm->vdescent = (double) fi->vdescent;
fm->vlinegap = 0.0; /* XXX ??? */
-#if 0
- printf("** xMin: %d, yMin: %d, xMax: %d, yMax: %d, hascent: %f, hdescent: %f, hlinegap: %f.\n",
- fm->xMin, fm->yMin, fm->xMax,fm->yMax, fm->hascent, fm->hdescent, fm->hlinegap);
-#endif
}
int FSProbeFontTrueType(const char *fname, FSFontMetaDataPtr meta, FSFontProbeEnv *fp, int checkext)
@@ -213,8 +209,6 @@
goto cleanup;
}
- // printf("probing: '%s' -> ", fname);
-
tag = GetUInt32(f->ptr, 0, 1);
if (tag == T_ttv1 || tag == T_true) { /* TrueType font */
@@ -241,7 +235,7 @@
GetTTGlobalFontInfo(ttf, &fi);
#if 0
- printf("%s: a: %d, d: %d, lg: %d, "
+ fprintf(DebugFile, "%s: a: %d, d: %d, lg: %d, "
"va: %d, vd: %d, "
"tA: %d, tD: %d, tLG: %d, "
"wA: %d, wD: %d\n",
@@ -331,7 +325,7 @@
}
GetTTGlobalFontInfo(ttf, &fi);
#if 0
- printf("%s: a: %d, d: %d, lg: %d, "
+ fprintf(DebugFile, "%s: a: %d, d: %d, lg: %d, "
"va: %d, vd: %d, "
"tA: %d, tD: %d, tLG: %d, "
"wA: %d, wD: %d\n",
- Previous message: [stsf-commit] stsf/STClientLibrary/src STText.c, 1.2,
1.3 STTypeEnv.c, 1.2, 1.3 serverconnection.c, 1.1.1.1, 1.2
- Next message: [stsf-commit] stsf/interface interface.xml, 1.4, 1.5 protocol.xml,
1.4, 1.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the stsf-commit
mailing list