/* ===EmacsMode: -*- Mode: C; tab-width:4; c-basic-offset: 4; -*- === */
/* ===FileName: ===
Copyright (c) 1998 Takuya SHIOZAKI, All Rights reserved.
- Copyright (c) 1998 X-TrueType Server Project, All rights reserved.
+ Copyright (c) 1998 X-TrueType Server Project, All rights reserved.
Copyright (c) 2003 After X-TT Project, All rights reserved.
===Notice
{
Bool result = False;
int i;
-
+
*refRefRecord = NULL;
for (i=0; i<numOfValidRecords; i++) {
if (!strcasecmp(validRecords[i].strRecordName, strName)) {
break;
}
}
-
+
return result;
}
{
int val;
char *endPtr;
-
+
val = strtol(strValue, &endPtr, 0);
if ('\0' != *endPtr) {
fprintf(stderr,
{
double val;
char *endPtr;
-
+
val = strtod(strValue, &endPtr);
if ('\0' != *endPtr) {
fprintf(stderr,
case eRecTypeBool:
{
Bool val;
-
+
if (!strcasecmp(strValue, "yes"))
val = True;
else if (!strcasecmp(strValue, "y"))
case eRecTypeString:
{
char *p;
-
+
if (NULL == (p = malloc(strlen(strValue)+1))) {
fprintf(stderr,
"truetype font property : "
{
/* add to list */
SPropRecValListNodeP *newNode;
-
+
if (NULL == (newNode = malloc(sizeof(*newNode)))) {
fprintf(stderr,
"truetype font property : "
Bool flInDoubleQuote = False;
Bool flBackSlash = False;
Bool flFirstElement = True;
-
+
*buf = '\0';
for (;;) {
int c = fgetc(is);
-
+
if (ferror(is)) {
fprintf(stderr, "truetype font property file : read error.\n");
result = True;
Bool result = False;
char *buf = NULL;
char *recordHead, *valueHead = NULL;
-
+
if (NULL == (buf = malloc(LEN_LINEBUF))) {
fprintf(stderr,
"truetype font property file : cannot allocate memory.\n");
}
quit:
free(buf);
- abort:
+ abort:
return result;
}
{
Bool result = False;
FILE *is;
-
+
#if 1
if (!strcmp(strFileName, "-"))
is = stdin;
SPropRecValList_new(SDynPropRecValList *pThisList)
{
Bool result = False;
-
+
pThisList->headNode = NULL;
return result;
{
Bool result = False;
SPropRecValListNodeP *p;
-
+
*refRecValue = NULL;
for (p=pThisList->headNode; NULL!=p; p=p->nextNode) {
if (!strcasecmp(p->containerE.refRecordType->strRecordName,
Bool result = False;
/* SPropertyRecord const *refRecordType; */
char const *term;
-
+
if (NULL == (term = strrchr(strCapHead, ':')))
goto abort;
char *duplicated = malloc((nextColon-strCapHead)+1);
{
char *value;
-
+
memcpy(duplicated, strCapHead, nextColon-strCapHead);
duplicated[nextColon-strCapHead] = '\0';
if (NULL != (value=strchr(duplicated, '='))) {
value++;
} else
value = &duplicated[nextColon-strCapHead];
-
+
for (i=0; i<numOfCorrespondRelations; i++) {
if (!strcasecmp(correspondRelations[i].capVariable,
duplicated)) {
}
strCapHead = nextColon+1;
}
-
+
/* quit: */
abort:
return result;
XttXstrdup(char const *str)
{
char *result;
-
+
result = malloc(strlen(str)+1);
if (result)