/*
* $RCSId: xc/lib/fontconfig/fc-lang/fc-lang.c,v 1.3 2002/08/22 07:36:43 keithp Exp $
*
- * Copyright © 2002 Keith Packard
+ * Copyright © 2002 Keith Packard
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
{
}
+int
+FcCacheBankToIndex (int bank)
+{
+ return -1;
+}
+
FcChar8 *
FcConfigHome (void)
{
- return getenv ("HOME");
+ return (FcChar8 *) getenv ("HOME");
}
static void
-fatal (char *file, int lineno, char *msg)
+fatal (const char *file, int lineno, const char *msg)
{
- fprintf (stderr, "%s:%d: %s\n", file, lineno, msg);
+ if (lineno)
+ fprintf (stderr, "%s:%d: %s\n", file, lineno, msg);
+ else
+ fprintf (stderr, "%s:%d: %s\n", file, lineno, msg);
exit (1);
}
FILE *f;
int ncountry = 0;
int i = 0;
- FcCharLeaf **leaves, **sleaves;
+ int argi;
+ FcCharLeaf **leaves;
int total_leaves = 0;
int l, sl, tl;
int c;
int setRangeEnd[26];
FcChar8 setRangeChar;
- while (*++argv)
+ argi = 1;
+ while (argv[argi])
{
- if (!strcmp (*argv, "-d"))
+ if (!strcmp (argv[argi], "-d"))
{
- dir = *++argv;
+ argi++;
+ dir = argv[argi++];
continue;
}
if (i == MAX_LANG)
- fatal (*argv, 0, "Too many languages");
- files[i++] = *argv;
+ fatal (argv[0], 0, "Too many languages");
+ files[i++] = argv[argi++];
}
files[i] = 0;
qsort (files, i, sizeof (char *), compare);
*/
for (i = 0; sets[i]; i++)
{
- sleaves = sets[i]->leaves;
for (sl = 0; sl < sets[i]->num; sl++)
{
for (l = 0; l < tl; l++)
- if (leaves[l] == sleaves[sl])
+ if (leaves[l] == FcCharSetGetLeaf(sets[i], sl))
break;
if (l == tl)
- leaves[tl++] = sleaves[sl];
+ leaves[tl++] = FcCharSetGetLeaf(sets[i], sl);
}
}
if (n % 8 == 0)
printf (" ");
for (l = 0; l < tl; l++)
- if (leaves[l] == sets[i]->leaves[n])
+ if (leaves[l] == FcCharSetGetLeaf(sets[i], n))
break;
if (l == tl)
fatal (names[i], 0, "can't find leaf");
{
if (n % 8 == 0)
printf (" ");
- printf (" 0x%04x,", sets[i]->numbers[n]);
+ printf (" 0x%04x,", FcCharSetGetNumbers(sets[i])[n]);
if (n % 8 == 7)
printf ("\n");
}
if (j < 0)
j = i;
printf (" { (FcChar8 *) \"%s\",\n"
- " { FC_REF_CONSTANT, %d, "
- "(FcCharLeaf **) leaves_%s, "
- "(FcChar16 *) numbers_%s } },\n",
+ " { FC_REF_CONSTANT, %d, FC_BANK_DYNAMIC, "
+ "{ { (FcCharLeaf **) leaves_%s, "
+ "(FcChar16 *) numbers_%s } } } },\n",
langs[i],
sets[j]->num, names[j], names[j]);
}