Coverage Report

Created: 2026-02-26 07:48

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/fontconfig/src/fcname.c
Line
Count
Source
1
/*
2
 * fontconfig/src/fcname.c
3
 *
4
 * Copyright © 2000 Keith Packard
5
 *
6
 * Permission to use, copy, modify, distribute, and sell this software and its
7
 * documentation for any purpose is hereby granted without fee, provided that
8
 * the above copyright notice appear in all copies and that both that
9
 * copyright notice and this permission notice appear in supporting
10
 * documentation, and that the name of the author(s) not be used in
11
 * advertising or publicity pertaining to distribution of the software without
12
 * specific, written prior permission.  The authors make no
13
 * representations about the suitability of this software for any purpose.  It
14
 * is provided "as is" without express or implied warranty.
15
 *
16
 * THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
17
 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
18
 * EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
19
 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
20
 * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
21
 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
22
 * PERFORMANCE OF THIS SOFTWARE.
23
 */
24
25
#include "fcint.h"
26
27
#include <ctype.h>
28
#include <stdio.h>
29
#include <stdlib.h>
30
#include <string.h>
31
32
static const FcObjectType FcObjects[] = {
33
#define FC_OBJECT(NAME, Type, Cmp) { FC_##NAME, Type },
34
#include "fcobjs.h"
35
#undef FC_OBJECT
36
};
37
38
0
#define NUM_OBJECT_TYPES ((int)(sizeof FcObjects / sizeof FcObjects[0]))
39
40
static const FcObjectType *
41
FcObjectFindById (FcObject object)
42
0
{
43
0
    if (1 <= object && object <= NUM_OBJECT_TYPES)
44
0
  return &FcObjects[object - 1];
45
0
    return FcObjectLookupOtherTypeById (object);
46
0
}
47
48
FcBool
49
FcNameRegisterObjectTypes (const FcObjectType *types, int ntypes)
50
0
{
51
    /* Deprecated. */
52
0
    return FcFalse;
53
0
}
54
55
FcBool
56
FcNameUnregisterObjectTypes (const FcObjectType *types, int ntypes)
57
0
{
58
    /* Deprecated. */
59
0
    return FcFalse;
60
0
}
61
62
const FcObjectType *
63
FcNameGetObjectType (const char *object)
64
0
{
65
0
    int id = FcObjectLookupBuiltinIdByName (object);
66
67
0
    if (!id)
68
0
  return FcObjectLookupOtherTypeByName (object);
69
70
0
    return &FcObjects[id - 1];
71
0
}
72
73
FcBool
74
FcObjectValidType (FcObject object, FcType type)
75
0
{
76
0
    const FcObjectType *t = FcObjectFindById (object);
77
78
0
    if (t) {
79
0
  switch ((int)t->type) {
80
0
  case FcTypeUnknown:
81
0
      return FcTrue;
82
0
  case FcTypeDouble:
83
0
  case FcTypeInteger:
84
0
      if (type == FcTypeDouble || type == FcTypeInteger)
85
0
    return FcTrue;
86
0
      break;
87
0
  case FcTypeLangSet:
88
0
      if (type == FcTypeLangSet || type == FcTypeString)
89
0
    return FcTrue;
90
0
      break;
91
0
  case FcTypeRange:
92
0
      if (type == FcTypeRange ||
93
0
          type == FcTypeDouble ||
94
0
          type == FcTypeInteger)
95
0
    return FcTrue;
96
0
      break;
97
0
  default:
98
0
      if (type == t->type)
99
0
    return FcTrue;
100
0
      break;
101
0
  }
102
0
  return FcFalse;
103
0
    }
104
0
    return FcTrue;
105
0
}
106
107
FcObject
108
FcObjectFromName (const char *name)
109
0
{
110
0
    return FcObjectLookupIdByName (name);
111
0
}
112
113
FcObjectSet *
114
FcObjectGetSet (void)
115
0
{
116
0
    int          i;
117
0
    FcObjectSet *os = NULL;
118
119
0
    os = FcObjectSetCreate();
120
0
    for (i = 0; i < NUM_OBJECT_TYPES; i++)
121
0
  FcObjectSetAdd (os, FcObjects[i].object);
122
123
0
    return os;
124
0
}
125
126
const char *
127
FcObjectName (FcObject object)
128
0
{
129
0
    const FcObjectType *o = FcObjectFindById (object);
130
131
0
    if (o)
132
0
  return o->object;
133
134
0
    return FcObjectLookupOtherNameById (object);
135
0
}
136
137
typedef FcChar8 *FC8;
138
139
#include "fcconst.h"
140
141
142
FcBool
143
FcNameRegisterConstants (const FcConstant *consts, int nconsts)
144
0
{
145
    /* Deprecated. */
146
0
    return FcFalse;
147
0
}
148
149
FcBool
150
FcNameUnregisterConstants (const FcConstant *consts, int nconsts)
151
0
{
152
    /* Deprecated. */
153
0
    return FcFalse;
154
0
}
155
156
static int
157
FcNameFindConstant (const FcChar8 *string)
158
0
{
159
0
    int min, max;
160
0
    int last = NUM_FC_CONST_SYMBOLS - 1;
161
0
    FcChar8 c = FcToLower (string[0]);
162
0
    FcChar8 b = FcToLower (_FcBaseConstantSymbols[0].name[0]);
163
0
    FcChar8 e = FcToLower (_FcBaseConstantSymbols[last - 1].name[0]);
164
165
0
    if (c < b || c > e)
166
0
  return -1; /* not found */
167
0
    for (min = 0, max = last; min <= max;) {
168
0
  int mid = (min + max) / 2;
169
0
  int ret;
170
171
0
  ret = FcStrCmpIgnoreCase (_FcBaseConstantSymbols[mid].name, string);
172
0
  if (ret > 0)
173
0
      max = mid - 1;
174
0
  else if (ret < 0)
175
0
      min = mid + 1;
176
0
  else
177
0
      return mid;
178
0
    }
179
0
    return -1;
180
0
}
181
182
const FcConstant *
183
FcNameGetConstant (const FcChar8 *string)
184
0
{
185
0
    int pos = FcNameFindConstant (string);
186
187
0
    if (pos >= 0) {
188
0
  const FcConstSymbolMap *sym = &_FcBaseConstantSymbols[pos];
189
190
0
  if (sym->values[1].object != FC_INVALID_OBJECT) {
191
0
      fprintf (stderr, "Fontconfig error: the ambiguous constant name: %s: Use :<property name>=<keyword> instead of :<keyword>\n", string);
192
0
      return NULL;
193
0
  } else {
194
0
            return &_FcBaseConstantObjects[sym->values[0].idx_obj].values[sym->values[0].idx_variant];
195
0
  }
196
0
    }
197
0
    return NULL;
198
0
}
199
200
static const FcConstant *
201
FcNameGetConstantForObject (const FcChar8 *string, FcObject object)
202
0
{
203
0
    int i;
204
205
0
    if (object > FC_MAX_BASE_OBJECT)
206
0
  return NULL;
207
0
    for (i = 0; _FcBaseConstantObjects[object].values[i].name != NULL; i++) {
208
0
  FcChar8 c = FcToLower (string[0]);
209
0
  FcChar8 b = FcToLower (_FcBaseConstantObjects[object].values[i].name[0]);
210
0
  int     ret;
211
212
0
  if (c < b)
213
0
      return NULL;
214
0
  ret = FcStrCmpIgnoreCase (_FcBaseConstantObjects[object].values[i].name, string);
215
0
  if (ret > 0)
216
0
      return NULL;
217
0
  else if (ret == 0) {
218
0
      return &_FcBaseConstantObjects[object].values[i];
219
0
  }
220
0
    }
221
0
    return NULL;
222
0
}
223
224
const FcConstant *
225
FcNameGetConstantFor (const FcChar8 *string, const char *object)
226
0
{
227
0
    FcObject o = FcObjectFromName (object);
228
229
0
    return FcNameGetConstantForObject (string, o);
230
0
}
231
232
FcBool
233
FcNameConstant (const FcChar8 *string, int *result)
234
0
{
235
0
    const FcConstant *c;
236
237
0
    if ((c = FcNameGetConstant (string))) {
238
0
  *result = c->value;
239
0
  return FcTrue;
240
0
    }
241
0
    return FcFalse;
242
0
}
243
244
FcBool
245
FcNameConstantWithObjectCheck (const FcChar8 *string, FcObject object, int *result)
246
0
{
247
0
    const FcConstant *c;
248
249
0
    c = FcNameGetConstantForObject (string, object);
250
0
    if (c) {
251
0
  *result = c->value;
252
0
  return FcTrue;
253
0
    }
254
0
    return FcFalse;
255
0
}
256
257
const FcChar8 *
258
FcNameGetConstantNameFromObject (FcObject object, int value)
259
0
{
260
0
    int i;
261
262
0
    if (object > FC_MAX_BASE_OBJECT)
263
0
  return NULL;
264
0
    for (i = 0; _FcBaseConstantObjects[object].values[i].name != NULL; i++) {
265
0
  if (_FcBaseConstantObjects[object].values[i].value == value) {
266
0
      return _FcBaseConstantObjects[object].values[i].name;
267
0
  }
268
0
    }
269
0
    return NULL;
270
0
}
271
272
const FcChar8 *
273
FcNameGetConstantNameFrom (const char *object, int value)
274
0
{
275
0
    return FcNameGetConstantNameFromObject (FcObjectFromName ((const char *)object), value);
276
0
}
277
278
FcBool
279
FcNameBool (const FcChar8 *v, FcBool *result)
280
0
{
281
0
    char c0, c1;
282
283
0
    c0 = *v;
284
0
    c0 = FcToLower (c0);
285
0
    if (c0 == 't' || c0 == 'y' || c0 == '1') {
286
0
  *result = FcTrue;
287
0
  return FcTrue;
288
0
    }
289
0
    if (c0 == 'f' || c0 == 'n' || c0 == '0') {
290
0
  *result = FcFalse;
291
0
  return FcTrue;
292
0
    }
293
0
    if (c0 == 'd' || c0 == 'x' || c0 == '2') {
294
0
  *result = FcDontCare;
295
0
  return FcTrue;
296
0
    }
297
0
    if (c0 == 'o') {
298
0
  c1 = v[1];
299
0
  c1 = FcToLower (c1);
300
0
  if (c1 == 'n') {
301
0
      *result = FcTrue;
302
0
      return FcTrue;
303
0
  }
304
0
  if (c1 == 'f') {
305
0
      *result = FcFalse;
306
0
      return FcTrue;
307
0
  }
308
0
  if (c1 == 'r') {
309
0
      *result = FcDontCare;
310
0
      return FcTrue;
311
0
  }
312
0
    }
313
0
    return FcFalse;
314
0
}
315
316
static FcValue
317
FcNameConvert (FcType type, const char *object, FcChar8 *string)
318
0
{
319
0
    FcValue  v;
320
0
    FcMatrix m;
321
0
    double   b, e;
322
0
    char    *p;
323
0
    FcObject o = FcObjectFromName (object);
324
325
0
    v.type = type;
326
0
    switch ((int)v.type) {
327
0
    case FcTypeInteger:
328
0
  if (!FcNameConstantWithObjectCheck (string, o, &v.u.i))
329
0
      v.u.i = atoi ((char *)string);
330
0
  break;
331
0
    case FcTypeString:
332
0
  v.u.s = FcStrCopy (string);
333
0
  if (!v.u.s)
334
0
      v.type = FcTypeVoid;
335
0
  break;
336
0
    case FcTypeBool:
337
0
  if (!FcNameBool (string, &v.u.b))
338
0
      v.u.b = FcFalse;
339
0
  break;
340
0
    case FcTypeDouble:
341
0
  v.u.d = strtod ((char *)string, 0);
342
0
  break;
343
0
    case FcTypeMatrix:
344
0
  FcMatrixInit (&m);
345
0
  sscanf ((char *)string, "%lg %lg %lg %lg", &m.xx, &m.xy, &m.yx, &m.yy);
346
0
  v.u.m = FcMatrixCopy (&m);
347
0
  break;
348
0
    case FcTypeCharSet:
349
0
  v.u.c = FcNameParseCharSet (string);
350
0
  if (!v.u.c)
351
0
      v.type = FcTypeVoid;
352
0
  break;
353
0
    case FcTypeLangSet:
354
0
  v.u.l = FcNameParseLangSet (string);
355
0
  if (!v.u.l)
356
0
      v.type = FcTypeVoid;
357
0
  break;
358
0
    case FcTypeRange:
359
0
  if (sscanf ((char *)string, "[%lg %lg]", &b, &e) != 2) {
360
0
      char  *sc, *ec;
361
0
      size_t len = strlen ((const char *)string);
362
0
      int    si, ei;
363
364
0
      sc = malloc (len + 1);
365
0
      ec = malloc (len + 1);
366
0
      if (sc && ec && sscanf ((char *)string, "[%s %[^]]]", sc, ec) == 2) {
367
0
    if (FcNameConstantWithObjectCheck ((const FcChar8 *)sc, o, &si) &&
368
0
        FcNameConstantWithObjectCheck ((const FcChar8 *)ec, o, &ei))
369
0
        v.u.r = FcRangeCreateDouble (si, ei);
370
0
    else
371
0
        goto bail1;
372
0
      } else {
373
0
      bail1:
374
0
    v.type = FcTypeDouble;
375
0
    if (FcNameConstantWithObjectCheck (string, o, &si)) {
376
0
        v.u.d = (double)si;
377
0
    } else {
378
0
        v.u.d = strtod ((char *)string, &p);
379
0
        if (p != NULL && p[0] != 0)
380
0
      v.type = FcTypeVoid;
381
0
    }
382
0
      }
383
0
      if (sc)
384
0
    free (sc);
385
0
      if (ec)
386
0
    free (ec);
387
0
  } else
388
0
      v.u.r = FcRangeCreateDouble (b, e);
389
0
  break;
390
0
    default:
391
  /* No valid type to convert */
392
0
  v.type = FcTypeVoid;
393
0
  break;
394
0
    }
395
0
    return v;
396
0
}
397
398
static const FcChar8 *
399
FcNameFindNext (const FcChar8 *cur, const char *delim, FcChar8 *save, FcChar8 *last)
400
0
{
401
0
    FcChar8 c;
402
403
0
    while ((c = *cur)) {
404
0
  if (!isspace (c))
405
0
      break;
406
0
  ++cur;
407
0
    }
408
0
    while ((c = *cur)) {
409
0
  if (c == '\\') {
410
0
      ++cur;
411
0
      if (!(c = *cur))
412
0
    break;
413
0
  } else if (strchr (delim, c))
414
0
      break;
415
0
  ++cur;
416
0
  *save++ = c;
417
0
    }
418
0
    *save = 0;
419
0
    *last = *cur;
420
0
    if (*cur)
421
0
  cur++;
422
0
    return cur;
423
0
}
424
425
FcPattern *
426
FcNameParse (const FcChar8 *name)
427
0
{
428
0
    FcChar8            *save;
429
0
    FcPattern          *pat;
430
0
    double              d;
431
0
    FcChar8            *e;
432
0
    FcChar8             delim;
433
0
    FcValue             v;
434
0
    const FcObjectType *t;
435
0
    const FcConstant   *c;
436
437
    /* freed below */
438
0
    save = malloc (strlen ((char *)name) + 1);
439
0
    if (!save)
440
0
  goto bail0;
441
0
    pat = FcPatternCreate();
442
0
    if (!pat)
443
0
  goto bail1;
444
445
0
    for (;;) {
446
0
  name = FcNameFindNext (name, "-,:", save, &delim);
447
0
  if (save[0]) {
448
0
      if (!FcPatternObjectAddString (pat, FC_FAMILY_OBJECT, save))
449
0
    goto bail2;
450
0
  }
451
0
  if (delim != ',')
452
0
      break;
453
0
    }
454
0
    if (delim == '-') {
455
0
  for (;;) {
456
0
      name = FcNameFindNext (name, "-,:", save, &delim);
457
0
      d = strtod ((char *)save, (char **)&e);
458
0
      if (e != save) {
459
0
    if (!FcPatternObjectAddDouble (pat, FC_SIZE_OBJECT, d))
460
0
        goto bail2;
461
0
      }
462
0
      if (delim != ',')
463
0
    break;
464
0
  }
465
0
    }
466
0
    while (delim == ':') {
467
0
  name = FcNameFindNext (name, "=_:", save, &delim);
468
0
  if (save[0]) {
469
0
      if (delim == '=' || delim == '_') {
470
0
    t = FcNameGetObjectType ((char *)save);
471
0
    for (;;) {
472
0
        name = FcNameFindNext (name, ":,", save, &delim);
473
0
        if (t) {
474
0
      v = FcNameConvert (t->type, t->object, save);
475
0
      if (!FcPatternAdd (pat, t->object, v, FcTrue)) {
476
0
          FcValueDestroy (v);
477
0
          goto bail2;
478
0
      }
479
0
      FcValueDestroy (v);
480
0
        }
481
0
        if (delim != ',')
482
0
      break;
483
0
    }
484
0
      } else {
485
0
    if ((c = FcNameGetConstant (save))) {
486
0
        t = FcNameGetObjectType ((char *)c->object);
487
0
        if (t == NULL)
488
0
      goto bail2;
489
0
        switch ((int)t->type) {
490
0
        case FcTypeInteger:
491
0
        case FcTypeDouble:
492
0
      if (!FcPatternAddInteger (pat, c->object, c->value))
493
0
          goto bail2;
494
0
      break;
495
0
        case FcTypeBool:
496
0
      if (!FcPatternAddBool (pat, c->object, c->value))
497
0
          goto bail2;
498
0
      break;
499
0
        case FcTypeRange:
500
0
      if (!FcPatternAddInteger (pat, c->object, c->value))
501
0
          goto bail2;
502
0
      break;
503
0
        default:
504
0
      break;
505
0
        }
506
0
    }
507
0
      }
508
0
  }
509
0
    }
510
511
0
    free (save);
512
0
    return pat;
513
514
0
bail2:
515
0
    FcPatternDestroy (pat);
516
0
bail1:
517
0
    free (save);
518
0
bail0:
519
0
    return 0;
520
0
}
521
static FcBool
522
FcNameUnparseString (FcStrBuf      *buf,
523
                     const FcChar8 *string,
524
                     const FcChar8 *escape)
525
0
{
526
0
    FcChar8 c;
527
0
    while ((c = *string++)) {
528
0
  if (escape && strchr ((char *)escape, (char)c)) {
529
0
      if (!FcStrBufChar (buf, escape[0]))
530
0
    return FcFalse;
531
0
  }
532
0
  if (!FcStrBufChar (buf, c))
533
0
      return FcFalse;
534
0
    }
535
0
    return FcTrue;
536
0
}
537
538
FcBool
539
FcNameUnparseValue (FcStrBuf *buf,
540
                    FcValue  *v0,
541
                    FcChar8  *escape)
542
0
{
543
0
    FcChar8 temp[1024];
544
0
    FcValue v = FcValueCanonicalize (v0);
545
546
0
    switch (v.type) {
547
0
    case FcTypeUnknown:
548
0
    case FcTypeVoid:
549
0
  return FcTrue;
550
0
    case FcTypeInteger:
551
0
  sprintf ((char *)temp, "%d", v.u.i);
552
0
  return FcNameUnparseString (buf, temp, 0);
553
0
    case FcTypeDouble:
554
0
  sprintf ((char *)temp, "%g", v.u.d);
555
0
  return FcNameUnparseString (buf, temp, 0);
556
0
    case FcTypeString:
557
0
  return FcNameUnparseString (buf, v.u.s, escape);
558
0
    case FcTypeBool:
559
0
  return FcNameUnparseString (buf,
560
0
                              v.u.b == FcTrue ? (FcChar8 *)"True" : v.u.b == FcFalse ? (FcChar8 *)"False"
561
0
                                                                                     : (FcChar8 *)"DontCare",
562
0
                              0);
563
0
    case FcTypeMatrix:
564
0
  sprintf ((char *)temp, "%g %g %g %g",
565
0
           v.u.m->xx, v.u.m->xy, v.u.m->yx, v.u.m->yy);
566
0
  return FcNameUnparseString (buf, temp, 0);
567
0
    case FcTypeCharSet:
568
0
  return FcNameUnparseCharSet (buf, v.u.c);
569
0
    case FcTypeLangSet:
570
0
  return FcNameUnparseLangSet (buf, v.u.l);
571
0
    case FcTypeFTFace:
572
0
  return FcTrue;
573
0
    case FcTypeRange:
574
0
  sprintf ((char *)temp, "[%g %g]", v.u.r->begin, v.u.r->end);
575
0
  return FcNameUnparseString (buf, temp, 0);
576
0
    }
577
0
    return FcFalse;
578
0
}
579
580
FcBool
581
FcNameUnparseValueList (FcStrBuf      *buf,
582
                        FcValueListPtr v,
583
                        FcChar8       *escape)
584
0
{
585
0
    while (v) {
586
0
  if (!FcNameUnparseValue (buf, &v->value, escape))
587
0
      return FcFalse;
588
0
  if ((v = FcValueListNext (v)) != NULL)
589
0
      if (!FcNameUnparseString (buf, (FcChar8 *)",", 0))
590
0
    return FcFalse;
591
0
    }
592
0
    return FcTrue;
593
0
}
594
595
0
#define FC_ESCAPE_FIXED    "\\-:,"
596
0
#define FC_ESCAPE_VARIABLE "\\=_:,"
597
598
FcChar8 *
599
FcNameUnparse (FcPattern *pat)
600
0
{
601
0
    return FcNameUnparseEscaped (pat, FcTrue);
602
0
}
603
604
FcChar8 *
605
FcNameUnparseEscaped (FcPattern *pat, FcBool escape)
606
0
{
607
0
    FcStrBuf      buf, buf2;
608
0
    FcChar8       buf_static[8192], buf2_static[256];
609
0
    int           i;
610
0
    FcPatternElt *e;
611
612
0
    FcStrBufInit (&buf, buf_static, sizeof (buf_static));
613
0
    FcStrBufInit (&buf2, buf2_static, sizeof (buf2_static));
614
0
    e = FcPatternObjectFindElt (pat, FC_FAMILY_OBJECT);
615
0
    if (e) {
616
0
  if (!FcNameUnparseValueList (&buf, FcPatternEltValues (e), escape ? (FcChar8 *)FC_ESCAPE_FIXED : 0))
617
0
      goto bail0;
618
0
    }
619
0
    e = FcPatternObjectFindElt (pat, FC_SIZE_OBJECT);
620
0
    if (e) {
621
0
  FcChar8 *p;
622
623
0
  if (!FcNameUnparseString (&buf2, (FcChar8 *)"-", 0))
624
0
      goto bail0;
625
0
  if (!FcNameUnparseValueList (&buf2, FcPatternEltValues (e), escape ? (FcChar8 *)FC_ESCAPE_FIXED : 0))
626
0
      goto bail0;
627
0
  p = FcStrBufDoneStatic (&buf2);
628
0
  FcStrBufDestroy (&buf2);
629
0
  if (strlen ((const char *)p) > 1)
630
0
      if (!FcStrBufString (&buf, p))
631
0
    goto bail0;
632
0
    }
633
0
    for (i = 0; i < NUM_OBJECT_TYPES; i++) {
634
0
  FcObject            id = i + 1;
635
0
  const FcObjectType *o;
636
0
  o = &FcObjects[i];
637
0
  if (!strcmp (o->object, FC_FAMILY) ||
638
0
      !strcmp (o->object, FC_SIZE))
639
0
      continue;
640
641
0
  e = FcPatternObjectFindElt (pat, id);
642
0
  if (e) {
643
0
      if (!FcNameUnparseString (&buf, (FcChar8 *)":", 0))
644
0
    goto bail0;
645
0
      if (!FcNameUnparseString (&buf, (FcChar8 *)o->object, escape ? (FcChar8 *)FC_ESCAPE_VARIABLE : 0))
646
0
    goto bail0;
647
0
      if (!FcNameUnparseString (&buf, (FcChar8 *)"=", 0))
648
0
    goto bail0;
649
0
      if (!FcNameUnparseValueList (&buf, FcPatternEltValues (e), escape ? (FcChar8 *)FC_ESCAPE_VARIABLE : 0))
650
0
    goto bail0;
651
0
  }
652
0
    }
653
0
    return FcStrBufDone (&buf);
654
0
bail0:
655
0
    FcStrBufDestroy (&buf);
656
0
    return 0;
657
0
}
658
#define __fcname__
659
#include "fcaliastail.h"
660
#undef __fcname__