Remove unused code

Ian Pilcher ian.pilcher at home.com
Thu Aug 9 14:46:05 CDT 2001


This patch removes the code that was only disabled by the Unicode patch.

Modified files:
    dlls/wineps: font.c ps.c

Log message:
    Ian Pilcher <ian.pilcher at home.com>
    WINEPS: remove previously disabled code
-- 
========================================================================
Ian Pilcher                                         ian.pilcher at home.com
========================================================================
-------------- next part --------------
diff -urN ../wine-20010809cvs/dlls/wineps/font.c ./dlls/wineps/font.c
--- ../wine-20010809cvs/dlls/wineps/font.c	Wed Aug  8 14:23:55 2001
+++ ./dlls/wineps/font.c	Thu Aug  9 14:18:25 2001
@@ -264,36 +264,6 @@
     return TRUE;
 }
 
-#if 0
-/***********************************************************************
- *           PSDRV_UnicodeToANSI
- */
-char PSDRV_UnicodeToANSI(int u)
-{
-    if((u & 0xff) == u)
-        return u;
-    switch(u) {
-    case 0x2013: /* endash */
-        return 0x96;
-    case 0x2014: /* emdash */
-        return 0x97;
-    case 0x2018: /* quoteleft */
-        return 0x91;
-    case 0x2019: /* quoteright */
-        return 0x92;
-    case 0x201c: /* quotedblleft */
-       return 0x93;
-    case 0x201d: /* quotedblright */
-        return 0x94;
-    case 0x2022: /* bullet */
-        return 0x95;
-    default:
-        WARN("Umapped unicode char U%04x\n", u);
-	return 0xff;
-    }
-}
-#endif
-
 /******************************************************************************
  *  	PSDRV_UVMetrics
  *
@@ -336,31 +306,6 @@
 /***********************************************************************
  *           PSDRV_GetTextExtentPoint
  */
-#if 0
-BOOL PSDRV_GetTextExtentPoint( DC *dc, LPCWSTR str, INT count,
-                                  LPSIZE size )
-{
-    PSDRV_PDEVICE *physDev = (PSDRV_PDEVICE *)dc->physDev;
-    INT i;
-    float width;
-
-    width = 0.0;
-
-    for(i = 0; i < count && str[i]; i++) {
-        char c = PSDRV_UnicodeToANSI(str[i]);
-        width += physDev->font.afm->CharWidths[(int)(unsigned char)c];
-/*	TRACE(psdrv, "Width after %dth char '%c' = %f\n", i, str[i], width);*/
-    }
-    width *= physDev->font.scale;
-    TRACE("Width after scale (%f) is %f\n", physDev->font.scale, width);
-
-    size->cx = GDI_ROUND((FLOAT)width * dc->xformVport2World.eM11);
-    size->cy = GDI_ROUND((FLOAT)physDev->font.tm.tmHeight  * dc->xformVport2World.eM22);
-
-    return TRUE;
-}
-#endif
-
 BOOL PSDRV_GetTextExtentPoint(DC *dc, LPCWSTR str, INT count, LPSIZE size)
 {
     PSDRV_PDEVICE   *physDev = (PSDRV_PDEVICE *)dc->physDev;
@@ -386,23 +331,6 @@
 /***********************************************************************
  *           PSDRV_GetCharWidth
  */
-#if 0
-BOOL PSDRV_GetCharWidth( DC *dc, UINT firstChar, UINT lastChar,
-			   LPINT buffer )
-{
-    PSDRV_PDEVICE *physDev = (PSDRV_PDEVICE *)dc->physDev;
-    UINT i;
-
-    TRACE("first = %d last = %d\n", firstChar, lastChar);
-
-    if(lastChar > 0xff) return FALSE;
-    for( i = firstChar; i <= lastChar; i++ )
-        *buffer++ = physDev->font.afm->CharWidths[i] * physDev->font.scale;
-
-    return TRUE;
-}
-#endif
-
 BOOL PSDRV_GetCharWidth(DC *dc, UINT firstChar, UINT lastChar, LPINT buffer)
 {
     PSDRV_PDEVICE   *physDev = (PSDRV_PDEVICE *)dc->physDev;
diff -urN ../wine-20010809cvs/dlls/wineps/ps.c ./dlls/wineps/ps.c
--- ../wine-20010809cvs/dlls/wineps/ps.c	Wed Aug  8 14:23:55 2001
+++ ./dlls/wineps/ps.c	Thu Aug  9 14:19:25 2001
@@ -112,11 +112,6 @@
 "%d 0 rlineto\n"
 "closepath\n";
 
-#if 0
-static char psshow[] = /* string */
-"(%s) show\n";
-#endif
-
 static const char psglyphshow[] = /* glyph name */
 "/%s glyphshow\n";
 
@@ -638,46 +633,6 @@
     HeapFree(PSDRV_Heap, 0, buf);
     return TRUE;
 }    
-
-#if 0
-BOOL PSDRV_WriteShow(DC *dc, LPCWSTR str, INT count)
-{
-    char *buf, *buf1;
-    INT buflen = count + 10, i, done;
-
-    buf = (char *)HeapAlloc( PSDRV_Heap, 0, buflen );
-    
-    for(i = done = 0; i < count; i++) {
-        char c = PSDRV_UnicodeToANSI(str[i]);
-        if(!isprint(c)) {
-	    if(done + 4 >= buflen)
-	        buf = HeapReAlloc( PSDRV_Heap, 0, buf, buflen += 10 );
-	    sprintf(buf + done, "\\%03o", (int)(unsigned char)c);
-	    done += 4;
-	} else if(c == '\\' || c == '(' || c == ')' ) {
-	    if(done + 2 >= buflen)
-	        buf = HeapReAlloc( PSDRV_Heap, 0, buf, buflen += 10 );
-	    buf[done++] = '\\';
-	    buf[done++] = c;
-	} else {
-	    if(done + 1 >= buflen)
-	        buf = HeapReAlloc( PSDRV_Heap, 0, buf, buflen += 10 );
-	    buf[done++] = c;
-	}
-    }
-    buf[done] = '\0';
-
-    buf1 = (char *)HeapAlloc( PSDRV_Heap, 0, sizeof(psshow) + done);
-
-    sprintf(buf1, psshow, buf);
-
-    PSDRV_WriteSpool(dc, buf1, strlen(buf1));
-    HeapFree(PSDRV_Heap, 0, buf);
-    HeapFree(PSDRV_Heap, 0, buf1);
-
-    return TRUE;
-}    
-#endif
 
 BOOL PSDRV_WriteShow(DC *dc, LPCWSTR str, INT count)
 {


More information about the wine-patches mailing list