/*
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
/* Code copied from libXfont is:
Copyright 1991, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
/*
* Ensure that a fonts.alias file only contains aliases for fonts that exist
* We do this by first reading in the fonts.dir file and then for
* each entry in the fonts.alias file we verify that the alias can
* be resolved. Most this of this code is borrowed from
* libXfont with minor modifications.
*/
#include <stdio.h>
#include <errno.h>
#include <ctype.h>
#include <limits.h>
#include <stdarg.h>
#include <stdlib.h>
#define EBadFontPath 0
#define EBadFontName 0
#define EAllocError 0
static char *programName;
void
ErrorF (const char * f, ...)
{
}
/* Provide pseudo renderers for font file formats we may find in fonts.dir
files during installation, but which libXfont does not support */
/* ARGSUSED */
static int
{
return 1;
}
/* ARGSUSED */
static int
{
return 1;
}
};
static void
{
int i;
for (i = 0; i < (sizeof(PseudoRenderers) / sizeof(FontRendererRec)); i++) {
}
}
int
char *directory,
{
int count, i;
if (file) {
return EBadFontPath;
return EBadFontPath;
}
return EBadFontPath;
}
while ((count =
!= EOF) {
if (count != 2) {
return EBadFontPath;
}
{
return EBadFontPath;
}
}
return EBadFontPath;
}
if (!dir)
return EBadFontPath;
return Success;
}
#define NAME 0
#define QUOTE 0
static int charClass;
static int
char **lexToken)
{
int c;
char *t;
enum state {
} state;
int count;
static unsigned int tokenSize = 0;
t = tokenBuf;
count = 0;
for (;;) {
unsigned int nsize;
char *nbuf;
if (!nbuf)
return EALLOC;
}
switch (charClass) {
case QUOTE:
switch (state) {
case Begin:
case Normal:
break;
case Quoted:
break;
}
break;
case WHITE:
switch (state) {
case Begin:
continue;
case Normal:
*t = '\0';
return NAME;
case Quoted:
break;
}
/* fall through */
case NORMAL:
switch (state) {
case Begin:
}
*t++ = c;
++count;
break;
case END:
case NL:
switch (state) {
case Begin:
default:
*t = '\0';
return NAME;
}
}
}
}
static int
{
int c;
switch (c) {
case EOF:
break;
case '\\':
if (c == EOF)
else
break;
case '"':
break;
case ' ':
case '\t':
break;
case '\n':
break;
default:
break;
}
return c;
}
static inline unsigned char
{
return source;
}
static void
{
int i;
*dest = '\0';
}
static int
char *alias,
char *font_name)
{
int token;
char *lexToken;
switch (token) {
case NEWLINE:
break;
case DONE:
return FileClosed;
case EALLOC:
break;
case NAME:
switch (token) {
case NEWLINE:
break;
case DONE:
break;
case EALLOC:
break;
case NAME:
return status;
}
}
}
return FileClosed;
}
static int
char *name,
int namelen,
{
char *p;
int ret = 0;
if (namelen >= MAXFONTNAMELEN)
return EAllocError;
/* Match XLFD patterns */
{
if (entry) {
return Success;
}
}
else
{
}
/* Match non XLFD pattern */
{
case FONT_ENTRY_BITMAP:
break;
case FONT_ENTRY_ALIAS:
} else {
ret = EBadFontName;
}
break;
case FONT_ENTRY_BC:
break;
default:
ret = EBadFontName;
}
}
else
{
scaleAlias = FALSE;
if (isxlfd)
{
scaleAlias = TRUE;
}
else
{
p--;
if (*p)
{
if (p[-1] == '-')
p--;
if (p > lowerName)
{
*p = '\0';
vals.x = 0;
vals.y = 0;
scaleAlias = TRUE;
}
}
}
if (scaleAlias &&
{
return FontAliasEntry;
} else {
return EBadFontName;
}
}
else
{
ret = EBadFontName;
}
}
return ret;
}
static void
const char *aliasfilename)
{
int ret;
int retvalue;
int containsSpace = 0;
if (!file)
return; /* fail silently -- if no alias file, we're done */
else
return;
if (!newfile) {
return;
}
== FontAliasEntry) {
continue;
}
/* 4258475: don't add if the names are the same */
#ifdef DEBUG
#endif
/* add this alias to list of known aliases */
containsSpace = 1;
#ifdef DEBUG
#else
; /* do nothing -- fail silently */
#endif /* DEBUG */
if (containsSpace) {
containsSpace = 0;
} else {
}
}
#ifdef DEBUG
else
#endif /* DEBUG */
}
if (ret < 0) {
}
return;
}
int
GetDefaultPointSize (void)
{
return 120;
}
/* ARGSUSED */
{
return 0;
}
/* ARGSUSED */
{
return 0;
}
void
InitFontFileFunctions(void)
{
return;
}
int
{
int i = 0, ret;
programName = argv[0];
if (argc > 1) {
}
if (argc > 2) {
i = 2;
}
for (/* i initialized above */ ; i < directoryCount; i++) {
} else {
}
exit (1);
}
}
exit (0);
}