Graphviz 13.0.0~dev.20241220.2304
|
replacements for ctype.h functions More...
#include <stdbool.h>
Go to the source code of this file.
Functions | |
static bool | gv_islower (int c) |
static bool | gv_isupper (int c) |
static bool | gv_isalpha (int c) |
static bool | gv_isblank (int c) |
static bool | gv_iscntrl (int c) |
static bool | gv_isdigit (int c) |
static bool | gv_isalnum (int c) |
static bool | gv_isgraph (int c) |
static bool | gv_isprint (int c) |
static bool | gv_ispunct (int c) |
static bool | gv_isspace (int c) |
static bool | gv_isxdigit (int c) |
static char | gv_tolower (int c) |
static void | gv_tolower_str (char *s) |
static char | gv_toupper (int c) |
static void | gv_toupper_str (char *s) |
The behavior of the ctype.h functions is locale-dependent, while Graphviz code typically wants to ask about character data specifically interpreted as ASCII. The current locale is frequently irrelevant because Graphviz (1) supports input in encodings different than the user’s locale via the charset
attribute and (2) is often producing output formats that are implicitly ASCII-only.
This discrepancy leads to misbehavior when trying to use the ctype.h functions as-is. For example, certain Windows environments with a signed char
type crash when isdigit
is called with a char
that is part of a multi-byte unicode character and has its high bit set.
There are various solutions to this like using a full internationalization library or constructing an ASCII locale and calling the *_l
variants. But for simplicity we just implement the exact discriminators we need.
Definition in file gv_ctype.h.
|
inlinestatic |
Definition at line 43 of file gv_ctype.h.
References gv_isalpha(), and gv_isdigit().
Referenced by _agstrcanon(), canoncolor(), exop(), extoken_fn(), gv_ispunct(), is_id_char(), isLegal(), legalGXLName(), onematch(), parseXDotColor(), prformat(), and sfprint().
|
inlinestatic |
Definition at line 29 of file gv_ctype.h.
References gv_islower(), and gv_isupper().
Referenced by extoken_fn(), font_name_equal_permissive(), gv_isalnum(), late_quadtree_scheme(), late_smooth(), legalGXLName(), onematch(), parseID(), parseKind(), prformat(), setSeed(), sfprint(), and xml_isentity().
|
inlinestatic |
Definition at line 31 of file gv_ctype.h.
Referenced by onematch().
|
inlinestatic |
Definition at line 33 of file gv_ctype.h.
Referenced by check_fontname(), default_usererrf(), fmtquote(), and onematch().
|
inlinestatic |
Definition at line 41 of file gv_ctype.h.
Referenced by _agstrcanon(), agwrite(), chkNum(), chkNum(), colorxlate(), colorxlate(), config_extra_args(), extoken_fn(), fdp_xLayout(), getNum(), gv_isalnum(), gv_isxdigit(), init(), is_natural_number(), late_quadtree_scheme(), late_smooth(), mapBool(), onematch(), replace(), setSeed(), sffmtint(), sfprint(), sfvscanf(), versionStr2Version(), and xml_isentity().
|
inlinestatic |
Definition at line 45 of file gv_ctype.h.
Referenced by onematch().
|
inlinestatic |
Definition at line 25 of file gv_ctype.h.
Referenced by gv_isalpha(), gv_toupper(), onematch(), and prformat().
|
inlinestatic |
Definition at line 47 of file gv_ctype.h.
Referenced by fmtquote(), and onematch().
|
inlinestatic |
Definition at line 49 of file gv_ctype.h.
References gv_isalnum().
Referenced by onematch().
|
inlinestatic |
Definition at line 55 of file gv_ctype.h.
Referenced by default_usererrf(), emit_attachment(), excontext(), extoken_fn(), fmtquote(), getRankseps(), gettok(), isNumber(), numFields(), onematch(), parseFactor(), parseOp(), sfvscanf(), skipNWS(), skipWS(), skipWS(), skipWS(), skipWS(), style_token(), and user_spline().
|
inlinestatic |
Definition at line 27 of file gv_ctype.h.
Referenced by gv_isalpha(), gv_tolower(), onematch(), prformat(), and sfprint().
|
inlinestatic |
Definition at line 71 of file gv_ctype.h.
References gv_isdigit().
Referenced by extoken_fn(), onematch(), and xml_isentity().
|
inlinestatic |
Definition at line 81 of file gv_ctype.h.
References gv_isupper().
Referenced by gv_tolower_str(), setAction(), and toLower().
|
inlinestatic |
Definition at line 87 of file gv_ctype.h.
References gv_tolower().
Referenced by dotneato_basename(), and prformat().
|
inlinestatic |
Definition at line 93 of file gv_ctype.h.
References gv_islower().
Referenced by copyUpper(), gv_toupper_str(), and toUpper().
|
inlinestatic |
Definition at line 99 of file gv_ctype.h.
References gv_toupper().
Referenced by prformat().