Coverage Report

Created: 2026-11-06 11:29

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/work/workdir/UnpackedTarball/fontconfig/src/fcgenericalias.c
Line
Count
Source
1
/* Copyright (C) 2026 fontconfig Authors */
2
/* SPDX-License-Identifier: HPND */
3
4
#include "fcint.h"
5
6
#include <stdint.h>
7
8
static unsigned int
9
fc_generic_family_hash (register const char *str, register FC_GPERF_SIZE_T len);
10
11
static const struct FcGenericFamilyEntry *
12
fc_generic_family_lookup (register const char *str, register FC_GPERF_SIZE_T len);
13
14
#define GPERF_DOWNCASE    1
15
#define GPERF_CASE_STRCMP 1
16
static int
17
gperf_case_strcmp (register const char *s1, register const char *s2)
18
17
{
19
17
    return FcStrCmpIgnoreBlanksAndCase ((const FcChar8 *)s1, (const FcChar8 *)s2);
20
17
}
21
22
#include "fcgenericfamily.h"
23
24
uint32_t
25
FcGenericAliasGetClassification (const char *family)
26
13.4k
{
27
13.4k
    const struct FcGenericFamilyEntry *entry;
28
13.4k
    size_t                             len;
29
13.4k
    uint32_t                           result = FC_FAMILY_UNKNOWN;
30
31
13.4k
    if (!family)
32
0
  return FC_FAMILY_UNKNOWN;
33
34
13.4k
    len = strlen (family);
35
13.4k
    entry = fc_generic_family_lookup (family, len);
36
13.4k
    if (entry)
37
15
  result = entry->classification;
38
39
13.4k
    return result;
40
13.4k
}