aboutsummaryrefslogtreecommitdiff
path: root/libXfont/src/fontfile/fontfile.c
diff options
context:
space:
mode:
Diffstat (limited to 'libXfont/src/fontfile/fontfile.c')
-rw-r--r--libXfont/src/fontfile/fontfile.c84
1 files changed, 42 insertions, 42 deletions
diff --git a/libXfont/src/fontfile/fontfile.c b/libXfont/src/fontfile/fontfile.c
index eb37a8705..05a961072 100644
--- a/libXfont/src/fontfile/fontfile.c
+++ b/libXfont/src/fontfile/fontfile.c
@@ -50,7 +50,7 @@ ISOLatin1ToLower(unsigned char source)
}
_X_HIDDEN void
-CopyISOLatin1Lowered(char *dest, char *source, int length)
+CopyISOLatin1Lowered(char *dest, const char *source, int length)
{
int i;
for (i = 0; i < length; i++, source++, dest++)
@@ -62,14 +62,14 @@ CopyISOLatin1Lowered(char *dest, char *source, int length)
* Map FPE functions to renderer functions
*/
-static int FontFileOpenBitmapNCF (FontPathElementPtr fpe, FontPtr *pFont,
- int flags, FontEntryPtr entry,
- fsBitmapFormat format,
+static int FontFileOpenBitmapNCF (FontPathElementPtr fpe, FontPtr *pFont,
+ int flags, FontEntryPtr entry,
+ fsBitmapFormat format,
fsBitmapFormatMask fmask,
FontPtr non_cachable_font);
int
-FontFileNameCheck (char *name)
+FontFileNameCheck (const char *name)
{
#ifndef NCD
#if defined(WIN32)
@@ -119,14 +119,14 @@ FontFileResetFPE (FontPathElementPtr fpe)
if (FontFileDirectoryChanged (dir))
{
/* can't do it, so tell the caller to close and re-open */
- return FPEResetFailed;
+ return FPEResetFailed;
}
- else
+ else
{
if (dir->nonScalable.used > 0)
if (!FontFileRegisterBitmapSource (fpe))
{
- return FPEResetFailed;
+ return FPEResetFailed;
}
return Successful;
}
@@ -141,7 +141,7 @@ FontFileFreeFPE (FontPathElementPtr fpe)
}
static int
-transfer_values_to_alias(char *entryname, int entrynamelength,
+transfer_values_to_alias(char *entryname, int entrynamelength,
char *resolvedname,
char **aliasName, FontScalablePtr vals)
{
@@ -253,10 +253,10 @@ transfer_values_to_alias(char *entryname, int entrynamelength,
/* ARGSUSED */
int
-FontFileOpenFont (pointer client, FontPathElementPtr fpe, Mask flags,
- char *name, int namelen,
+FontFileOpenFont (pointer client, FontPathElementPtr fpe, Mask flags,
+ const char *name, int namelen,
fsBitmapFormat format, fsBitmapFormatMask fmask,
- XID id, FontPtr *pFont, char **aliasName,
+ XID id, FontPtr *pFont, char **aliasName,
FontPtr non_cachable_font)
{
FontDirectoryPtr dir;
@@ -272,7 +272,7 @@ FontFileOpenFont (pointer client, FontPathElementPtr fpe, Mask flags,
Bool noSpecificSize;
int nranges;
fsRange *ranges;
-
+
if (namelen >= MAXFONTNAMELEN)
return AllocError;
dir = (FontDirectoryPtr) fpe->private;
@@ -510,8 +510,8 @@ FontFileCloseFont (FontPathElementPtr fpe, FontPtr pFont)
}
static int
-FontFileOpenBitmapNCF (FontPathElementPtr fpe, FontPtr *pFont,
- int flags, FontEntryPtr entry,
+FontFileOpenBitmapNCF (FontPathElementPtr fpe, FontPtr *pFont,
+ int flags, FontEntryPtr entry,
fsBitmapFormat format, fsBitmapFormatMask fmask,
FontPtr non_cachable_font)
{
@@ -528,7 +528,7 @@ FontFileOpenBitmapNCF (FontPathElementPtr fpe, FontPtr *pFont,
return BadFontName;
strcpy (fileName, dir->directory);
strcat (fileName, bitmap->fileName);
- ret = (*bitmap->renderer->OpenBitmap)
+ ret = (*bitmap->renderer->OpenBitmap)
(fpe, pFont, flags, entry, fileName, format, fmask,
non_cachable_font);
if (ret == Successful)
@@ -540,8 +540,8 @@ FontFileOpenBitmapNCF (FontPathElementPtr fpe, FontPtr *pFont,
}
int
-FontFileOpenBitmap (FontPathElementPtr fpe, FontPtr *pFont,
- int flags, FontEntryPtr entry,
+FontFileOpenBitmap (FontPathElementPtr fpe, FontPtr *pFont,
+ int flags, FontEntryPtr entry,
fsBitmapFormat format, fsBitmapFormatMask fmask)
{
return FontFileOpenBitmapNCF (fpe, pFont, flags, entry, format, fmask,
@@ -549,7 +549,7 @@ FontFileOpenBitmap (FontPathElementPtr fpe, FontPtr *pFont,
}
static int
-FontFileGetInfoBitmap (FontPathElementPtr fpe, FontInfoPtr pFontInfo,
+FontFileGetInfoBitmap (FontPathElementPtr fpe, FontInfoPtr pFontInfo,
FontEntryPtr entry)
{
FontBitmapEntryPtr bitmap;
@@ -570,8 +570,8 @@ FontFileGetInfoBitmap (FontPathElementPtr fpe, FontInfoPtr pFontInfo,
}
static void
-_FontFileAddScalableNames(FontNamesPtr names, FontNamesPtr scaleNames,
- FontNamePtr nameptr, char *zeroChars,
+_FontFileAddScalableNames(FontNamesPtr names, FontNamesPtr scaleNames,
+ FontNamePtr nameptr, char *zeroChars,
FontScalablePtr vals, fsRange *ranges,
int nranges, int *max)
{
@@ -687,8 +687,8 @@ _FontFileAddScalableNames(FontNamesPtr names, FontNamesPtr scaleNames,
/* ARGSUSED */
static int
-_FontFileListFonts (pointer client, FontPathElementPtr fpe,
- char *pat, int len, int max, FontNamesPtr names,
+_FontFileListFonts (pointer client, FontPathElementPtr fpe,
+ const char *pat, int len, int max, FontNamesPtr names,
int mark_aliases)
{
FontDirectoryPtr dir;
@@ -794,15 +794,15 @@ typedef struct _LFWIData {
} LFWIDataRec, *LFWIDataPtr;
int
-FontFileListFonts (pointer client, FontPathElementPtr fpe, char *pat,
+FontFileListFonts (pointer client, FontPathElementPtr fpe, const char *pat,
int len, int max, FontNamesPtr names)
{
return _FontFileListFonts (client, fpe, pat, len, max, names, 0);
}
int
-FontFileStartListFonts(pointer client, FontPathElementPtr fpe,
- char *pat, int len, int max,
+FontFileStartListFonts(pointer client, FontPathElementPtr fpe,
+ const char *pat, int len, int max,
pointer *privatep, int mark_aliases)
{
LFWIDataPtr data;
@@ -832,8 +832,8 @@ FontFileStartListFonts(pointer client, FontPathElementPtr fpe,
int
-FontFileStartListFontsWithInfo(pointer client, FontPathElementPtr fpe,
- char *pat, int len, int max,
+FontFileStartListFontsWithInfo(pointer client, FontPathElementPtr fpe,
+ const char *pat, int len, int max,
pointer *privatep)
{
return FontFileStartListFonts(client, fpe, pat, len, max, privatep, 0);
@@ -841,8 +841,8 @@ FontFileStartListFontsWithInfo(pointer client, FontPathElementPtr fpe,
/* ARGSUSED */
static int
-FontFileListOneFontWithInfo (pointer client, FontPathElementPtr fpe,
- char **namep, int *namelenp,
+FontFileListOneFontWithInfo (pointer client, FontPathElementPtr fpe,
+ char **namep, int *namelenp,
FontInfoPtr *pFontInfo)
{
FontDirectoryPtr dir;
@@ -858,14 +858,14 @@ FontFileListOneFontWithInfo (pointer client, FontPathElementPtr fpe,
Bool noSpecificSize;
int nranges;
fsRange *ranges;
-
+
char *name = *namep;
int namelen = *namelenp;
-
+
if (namelen >= MAXFONTNAMELEN)
return AllocError;
dir = (FontDirectoryPtr) fpe->private;
-
+
/* Match non-scalable pattern */
CopyISOLatin1Lowered (lowerName, name, namelen);
lowerName[namelen] = '\0';
@@ -882,7 +882,7 @@ FontFileListOneFontWithInfo (pointer client, FontPathElementPtr fpe,
tmpName.length = strlen(lowerName);
entry = FontFileFindNameInDir (&dir->nonScalable, &tmpName);
}
-
+
if (entry)
{
switch (entry->type) {
@@ -914,7 +914,7 @@ FontFileListOneFontWithInfo (pointer client, FontPathElementPtr fpe,
{
ret = BadFontName;
}
-
+
if (ret != BadFontName)
{
if (ranges) free(ranges);
@@ -945,7 +945,7 @@ FontFileListOneFontWithInfo (pointer client, FontPathElementPtr fpe,
tmpName.ndashes = entry->name.ndashes;
}
}
-
+
if (entry)
{
noSpecificSize = FALSE; /* TRUE breaks XLFD enhancements */
@@ -1001,7 +1001,7 @@ FontFileListOneFontWithInfo (pointer client, FontPathElementPtr fpe,
vals.xlfdName = origName;
vals.ranges = ranges;
vals.nranges = nranges;
-
+
/* Make a new scaled instance */
if (strlen(dir->directory) + strlen(scalable->fileName) >=
sizeof(fileName)) {
@@ -1037,8 +1037,8 @@ FontFileListOneFontWithInfo (pointer client, FontPathElementPtr fpe,
}
int
-FontFileListNextFontWithInfo(pointer client, FontPathElementPtr fpe,
- char **namep, int *namelenp,
+FontFileListNextFontWithInfo(pointer client, FontPathElementPtr fpe,
+ char **namep, int *namelenp,
FontInfoPtr *pFontInfo,
int *numFonts, pointer private)
{
@@ -1066,15 +1066,15 @@ FontFileListNextFontWithInfo(pointer client, FontPathElementPtr fpe,
}
int
-FontFileStartListFontsAndAliases(pointer client, FontPathElementPtr fpe,
- char *pat, int len, int max,
+FontFileStartListFontsAndAliases(pointer client, FontPathElementPtr fpe,
+ const char *pat, int len, int max,
pointer *privatep)
{
return FontFileStartListFonts(client, fpe, pat, len, max, privatep, 1);
}
int
-FontFileListNextFontOrAlias(pointer client, FontPathElementPtr fpe,
+FontFileListNextFontOrAlias(pointer client, FontPathElementPtr fpe,
char **namep, int *namelenp, char **resolvedp,
int *resolvedlenp, pointer private)
{