[stsf-commit] stsf/stsflib fscomm.c,1.3,1.4 stsfutil.c,1.9,1.10

Alexander Gelfenbain stsf-commit at pdx.freedesktop.org
Tue May 25 19:58:53 PDT 2004


Committed by: adg


Index: fscomm.c
===================================================================
RCS file: /cvs/stsf/stsf/stsflib/fscomm.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- a/fscomm.c	25 May 2004 02:47:25 -0000	1.3
+++ b/fscomm.c	26 May 2004 02:58:50 -0000	1.4
@@ -1172,7 +1172,7 @@
     uint32_t n = sizeof(fsc_getextfontinfo_in);
     
     if (s < n) return n;
-    q->opcode = FS_GETEXTFONTINFO_IN;
+    q->opcode = FS_GETFONTMETRICS_IN;
     q->font = font;
     return 0;
 }
@@ -1189,7 +1189,7 @@
     uint32_t n = sizeof(fsc_getextfontinfo_in);
     
     if (s < n) return n;
-    q->opcode = FS_GETEXTFONTINFO_IN;
+    q->opcode = FS_GETFONTMETRICS_OUT;
     memcpy(&q->fontmetrics, fontmetrics, sizeof(STFontMetrics));
     return 0;
 }
@@ -1786,11 +1786,11 @@
         for (i=0; i<urlcount; i++) {
             len = safe_strlen(url[i]);
             if (len != 0) {
-                *(char **)(p + l) = (char *) curoffs;
+                ((char **)(p + l))[i] = (char *) curoffs;
                 memcpy(p+curoffs, url[i], len);
                 curoffs += len;
             } else {
-                *(char **)(p + l) = NULL;
+                ((char **)(p + l))[i] = NULL;
             }
         }
     } else {
@@ -1813,7 +1813,7 @@
 
         for (i=0; i<q->urlcount; i++) {
             if (q->url[i] != NULL) {
-                q->url[i] = (char *) (p + (uintptr_t) q->url);
+                q->url[i] = (char *) (p + (uintptr_t) q->url[i]);
             }
         }
     }
@@ -1996,7 +1996,7 @@
     uint32_t n = sizeof(fsc_destroyfonts_in);
 
     if (s < n) return n;
-    q->opcode = FS_DESTROYFONTS_IN;
+    q->opcode = FS_DESTROYFONTS_OUT;
     return 0;
 }
 

Index: stsfutil.c
===================================================================
RCS file: /cvs/stsf/stsf/stsflib/stsfutil.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- a/stsfutil.c	25 May 2004 02:47:25 -0000	1.9
+++ b/stsfutil.c	26 May 2004 02:58:50 -0000	1.10
@@ -193,10 +193,14 @@
     va_list list;
     va_start(list, format);
     if (dlevel <= DebugLevel) {
-	InitFiles();
-        fprintf(DebugFile,"STSF: ");
-        vfprintf(DebugFile, format, list);
-        fprintf(DebugFile,"\n");
+        InitFiles();
+        if (dlevel < 0) {              /* printf replacement */
+            vfprintf(DebugFile, format, list);
+        } else {
+            fprintf(DebugFile,"STSF: ");
+            vfprintf(DebugFile, format, list);
+            fprintf(DebugFile,"\n");
+        }
         fflush(DebugFile);
         fsync(fileno(DebugFile));
     }




More information about the stsf-commit mailing list