installalias.c revision 705
#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;
ErrorF (const char * f, ...)
char *directory,
int count, i;
if (file) {
return EBadFontPath;
return EBadFontPath;
return EBadFontPath;
!= EOF) {
return EBadFontPath;
return EBadFontPath;
return EBadFontPath;
if (!dir)
return EBadFontPath;
return Success;
#define NAME 0
#define QUOTE 0
static int charClass;
char **lexToken)
enum state {
} state;
int count;
static unsigned int tokenSize = 0;
t = tokenBuf;
count = 0;
unsigned int nsize;
char *nbuf;
if (!nbuf)
return EALLOC;
switch (charClass) {
case QUOTE:
switch (state) {
case Begin:
case Normal:
case Quoted:
case WHITE:
switch (state) {
case Begin:
case Normal:
return NAME;
case Quoted:
case NORMAL:
switch (state) {
case Begin:
++count;
case END:
case NL:
switch (state) {
case Begin:
return NAME;
case EOF:
if (c == EOF)
return source;
char *alias,
char *font_name)
int token;
char *lexToken;
switch (token) {
case NEWLINE:
case DONE:
return FileClosed;
case EALLOC:
case NAME:
switch (token) {
case NEWLINE:
case DONE:
case EALLOC:
case NAME:
return status;
return FileClosed;
char *name,
int namelen,
int ret = 0;
return EAllocError;
if (entry) {
return Success;
case FONT_ENTRY_BITMAP:
case FONT_ENTRY_ALIAS:
case FONT_ENTRY_BC:
if (isxlfd)
if (p > lowerName)
vals.x = 0;
vals.y = 0;
if (scaleAlias &&
return FontAliasEntry;
return EBadFontName;
return ret;
const char *aliasfilename)
int ret;
int retvalue;
int containsSpace = 0;
if (!file)
if (!newfile) {
== FontAliasEntry) {
#ifdef DEBUG
#ifdef DEBUG
if (containsSpace) {
containsSpace = 0;
#ifdef DEBUG
if (ret < 0) {
GetDefaultPointSize (void)
InitFontFileFunctions(void)
int i = 0, ret;
exit (0);