Changeset 49 for trunk/pin/src


Ignore:
Timestamp:
Dec 17, 2014, 1:36:21 PM (11 years ago)
Author:
Alex Taylor
Message:

Updates for v0.50:
Moved much of the PPD-import logic into a shared function.
Automatically reimport previously-imported PPDs when updating to a new version of a known PostScript driver.
Ask if the user wants to update the active copy of a driver when the repository version is updated.
Fixed error in locating cupswiz.exe when the desktop object doesn't exist.
Fixed broken update of PRDESC.LST when upgrading to a new version of a known PostScript driver.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pin/src/conv_ppd.c

    r3 r49  
    103103#include <ctype.h>
    104104#ifndef __KLIBC__
    105         #include <builtin.h>
     105#include <builtin.h>
    106106#else
    107         typedef INT      *PINT;
    108         #define strcmpi strcmp
     107typedef INT      *PINT;
     108#define strcmpi strcmp
    109109#endif
    110110
     
    809809        if( str == NULL || *str == 0 ) return;
    810810
    811         while( (*str) !=0 ) str++;  // find the end of the string
     811    while( (*str) !=0 ) str++;  // find the end of the string
    812812        str--; // get to last character (step over 0)
    813813        while( isblank(*str) ) str--; // see if the character is blank, keep backstepping
     
    12171217  if (desPpd.desItems.iResDpi == 0)
    12181218  {
     1219#if 0
    12191220    desPpd.desItems.iResDpi = 300;
     1221#else
     1222    desPpd.desItems.iResDpi = 1440;  // workaround for WordPro printing problem
     1223#endif
    12201224  }
    12211225
     
    13811385         i = SkipBlank(px);
    13821386         px += i;
    1383          desPpd.desPage.iCustomPageSizeMinHeight = atoi(px);
     1387         desPpd.desPage.iCustomPageSizeMinHeight = (SHORT)atoi(px); // ALT
    13841388         i = MovePast( px, ' ' );
    13851389         px += i;
    1386          desPpd.desPage.iCustomPageSizeMaxHeight = atoi(px);
     1390         desPpd.desPage.iCustomPageSizeMaxHeight = (SHORT)atoi(px); // ALT
    13871391       }
    13881392     }
     
    23622366      if(stricmp(pCompare,"Resolution")==0)
    23632367      {
    2364         ULONG uiResStr;
    2365         // we are in resolution processing
    2366         uiResStr = uiStrLen + MovePast( pbPrBuffer + uiStrLen, ':' );
    2367         uiResStr += SkipBlank( pbPrBuffer + uiResStr );
    2368         if(strnicmp(pbPrBuffer+uiResStr,"\"\"",2)==0)
    2369         {
    2370                 // we found a empty resolution string so skip this one
    2371                 bSkipEntry = TRUE;
    2372         }       
     2368        ULONG uiResStr;
     2369        // we are in resolution processing
     2370        uiResStr = uiStrLen + MovePast( pbPrBuffer + uiStrLen, ':' );
     2371        uiResStr += SkipBlank( pbPrBuffer + uiResStr );
     2372        if(strnicmp(pbPrBuffer+uiResStr,"\"\"",2)==0)
     2373        {
     2374            // we found a empty resolution string so skip this one
     2375            bSkipEntry = TRUE;
     2376        }
    23732377      }
    23742378
Note: See TracChangeset for help on using the changeset viewer.