wineps.drv: Don't use strcasecmp.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Piotr Caban 2019-04-04 16:00:50 +02:00 committed by Alexandre Julliard
parent 8c4b75f252
commit c191a1d44d
5 changed files with 22 additions and 18 deletions

View file

@ -28,6 +28,7 @@
#include "winerror.h"
#include "wingdi.h"
#include "winnls.h"
#include "winternl.h"
#include "psdrv.h"
#include "wine/debug.h"
@ -168,7 +169,7 @@ BOOL PSDRV_SelectBuiltinFont(PHYSDEV dev, HFONT hfont,
/* Look for a matching font family */
for(family = physDev->pi->Fonts; family; family = family->next) {
if(!strcasecmp(FaceName, family->FamilyName))
if(!_strnicmp(FaceName, family->FamilyName, -1))
break;
}

View file

@ -27,6 +27,7 @@
#include "wingdi.h"
#include "winnls.h"
#include "winspool.h"
#include "winternl.h"
#include "psdrv.h"
#include "wine/debug.h"
@ -93,8 +94,8 @@ HFONT PSDRV_SelectFont( PHYSDEV dev, HFONT hfont, UINT *aa_flags )
for (i = 0; i < physDev->pi->FontSubTableSize; ++i)
{
if (!strcasecmp (FaceName,
physDev->pi->FontSubTable[i].pValueName))
if (!_strnicmp (FaceName,
physDev->pi->FontSubTable[i].pValueName, -1))
{
TRACE ("substituting facename '%s' for '%s'\n",
(LPSTR) physDev->pi->FontSubTable[i].pData, FaceName);

View file

@ -190,8 +190,8 @@ static void read_afms(FILE *f_c, FILE *f_h)
char *cp, linebuf[256], font_family[128];
int i, num_metrics;
cp = strrchr(de->d_name, '.'); /* Does it end in */
if (cp == NULL || strcasecmp(cp, ".afm") != 0) /* .afm or .AFM? */
cp = strrchr(de->d_name, '.'); /* Does it end in */
if (cp == NULL || _strnicmp(cp, ".afm", -1) != 0) /* .afm or .AFM? */
continue;
f = fopen(de->d_name, "r");

View file

@ -30,6 +30,7 @@
#include <assert.h>
#include "windef.h"
#include "winbase.h"
#include "winternl.h"
#include "wine/debug.h"
#include "psdrv.h"
@ -748,7 +749,7 @@ PPD *PSDRV_ParsePPD( const WCHAR *fname, HANDLE printer )
}
else if(!strcmp("*ColorDevice", tuple.key)) {
if(!strcasecmp(tuple.value, "true"))
if(!_strnicmp(tuple.value, "true", -1))
ppd->ColorDevice = CD_True;
else
ppd->ColorDevice = CD_False;
@ -966,13 +967,13 @@ PPD *PSDRV_ParsePPD( const WCHAR *fname, HANDLE printer )
}
else if(!strcmp("*TTRasterizer", tuple.key)) {
if(!strcasecmp("None", tuple.value))
if(!_strnicmp("None", tuple.value, -1))
ppd->TTRasterizer = RO_None;
else if(!strcasecmp("Accept68K", tuple.value))
else if(!_strnicmp("Accept68K", tuple.value, -1))
ppd->TTRasterizer = RO_Accept68K;
else if(!strcasecmp("Type42", tuple.value))
else if(!_strnicmp("Type42", tuple.value, -1))
ppd->TTRasterizer = RO_Type42;
else if(!strcasecmp("TrueImage", tuple.value))
else if(!_strnicmp("TrueImage", tuple.value, -1))
ppd->TTRasterizer = RO_TrueImage;
else {
FIXME("Unknown option %s for *TTRasterizer\n",
@ -988,14 +989,14 @@ PPD *PSDRV_ParsePPD( const WCHAR *fname, HANDLE printer )
duplex->Name = tuple.option;
duplex->FullName = tuple.opttrans;
duplex->InvocationString = tuple.value;
if(!strcasecmp("None", tuple.option) || !strcasecmp("False", tuple.option)
|| !strcasecmp("Simplex", tuple.option))
if(!_strnicmp("None", tuple.option, -1) || !_strnicmp("False", tuple.option, -1)
|| !_strnicmp("Simplex", tuple.option, -1))
duplex->WinDuplex = DMDUP_SIMPLEX;
else if(!strcasecmp("DuplexNoTumble", tuple.option))
else if(!_strnicmp("DuplexNoTumble", tuple.option, -1))
duplex->WinDuplex = DMDUP_VERTICAL;
else if(!strcasecmp("DuplexTumble", tuple.option))
else if(!_strnicmp("DuplexTumble", tuple.option, -1))
duplex->WinDuplex = DMDUP_HORIZONTAL;
else if(!strcasecmp("Notcapable", tuple.option))
else if(!_strnicmp("Notcapable", tuple.option, -1))
duplex->WinDuplex = 0;
else {
FIXME("Unknown option %s for *Duplex defaulting to simplex\n", tuple.option);

View file

@ -48,6 +48,7 @@
#include "winerror.h"
#include "winreg.h"
#include "winnls.h"
#include "winternl.h"
#include "psdrv.h"
#include "wine/debug.h"
@ -464,7 +465,7 @@ static BOOL ReadFixedPitch(FILE *file, CHAR buffer[], INT bufsize, AFM *afm,
return TRUE;
}
if (strcasecmp(sz, "false") == 0)
if (_strnicmp(sz, "false", -1) == 0)
{
afm->IsFixedPitch = FALSE;
*p_found = TRUE;
@ -472,7 +473,7 @@ static BOOL ReadFixedPitch(FILE *file, CHAR buffer[], INT bufsize, AFM *afm,
return TRUE;
}
if (strcasecmp(sz, "true") == 0)
if (_strnicmp(sz, "true", -1) == 0)
{
afm->IsFixedPitch = TRUE;
*p_found = TRUE;
@ -1142,7 +1143,7 @@ static BOOL ReadAFMDir(LPCSTR dirname)
CHAR *file_extension = strchr(dent->d_name, '.');
int fn_len;
if (file_extension == NULL || strcasecmp(file_extension, ".afm") != 0)
if (file_extension == NULL || _strnicmp(file_extension, ".afm", -1) != 0)
continue;
fn_len = snprintf(filename, 256, "%s/%s", dirname, dent->d_name);