1 /*****************************************************************************\
3 *****************************************************************************
4 * This file is part of nvramtool, a utility for reading/writing coreboot
5 * parameters and displaying information from the coreboot table.
6 * For details, see https://coreboot.org/nvramtool.
8 * Please also read the file DISCLAIMER which is included in this software
11 * This program is free software; you can redistribute it and/or modify it
12 * under the terms of the GNU General Public License (as published by the
13 * Free Software Foundation) version 2, dated June 1991.
15 * This program is distributed in the hope that it will be useful, but
16 * WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
18 * conditions of the GNU General Public License for more details.
19 \*****************************************************************************/
23 #include "layout-text.h"
25 static int is_ident_nondigit(int c
)
29 case 'A': case 'B': case 'C': case 'D':
30 case 'E': case 'F': case 'G': case 'H':
31 case 'I': case 'J': case 'K': case 'L':
32 case 'M': case 'N': case 'O': case 'P':
33 case 'Q': case 'R': case 'S': case 'T':
34 case 'U': case 'V': case 'W': case 'X':
36 case 'a': case 'b': case 'c': case 'd':
37 case 'e': case 'f': case 'g': case 'h':
38 case 'i': case 'j': case 'k': case 'l':
39 case 'm': case 'n': case 'o': case 'p':
40 case 'q': case 'r': case 's': case 't':
41 case 'u': case 'v': case 'w': case 'x':
53 int is_ident(char *str
)
59 if (is_ident_nondigit(ch
)) {
63 } while(ch
&& (is_ident_nondigit(ch
) || (isdigit(ch
))));
64 result
= (ch
== '\0');