Graphviz 13.0.0~dev.20241220.2304
Loading...
Searching...
No Matches
gv_ctype.h File Reference

replacements for ctype.h functions More...

#include <stdbool.h>
Include dependency graph for gv_ctype.h:
This graph shows which files directly or indirectly include this file:

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)
 

Detailed Description

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.

Function Documentation

◆ gv_isalnum()

static bool gv_isalnum ( int  c)
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gv_isalpha()

static bool gv_isalpha ( int  c)
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gv_isblank()

static bool gv_isblank ( int  c)
inlinestatic

Definition at line 31 of file gv_ctype.h.

Referenced by onematch().

Here is the caller graph for this function:

◆ gv_iscntrl()

static bool gv_iscntrl ( int  c)
inlinestatic

Definition at line 33 of file gv_ctype.h.

Referenced by check_fontname(), default_usererrf(), fmtquote(), and onematch().

Here is the caller graph for this function:

◆ gv_isdigit()

static bool gv_isdigit ( int  c)
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().

Here is the caller graph for this function:

◆ gv_isgraph()

static bool gv_isgraph ( int  c)
inlinestatic

Definition at line 45 of file gv_ctype.h.

Referenced by onematch().

Here is the caller graph for this function:

◆ gv_islower()

static bool gv_islower ( int  c)
inlinestatic

Definition at line 25 of file gv_ctype.h.

Referenced by gv_isalpha(), gv_toupper(), onematch(), and prformat().

Here is the caller graph for this function:

◆ gv_isprint()

static bool gv_isprint ( int  c)
inlinestatic

Definition at line 47 of file gv_ctype.h.

Referenced by fmtquote(), and onematch().

Here is the caller graph for this function:

◆ gv_ispunct()

static bool gv_ispunct ( int  c)
inlinestatic

Definition at line 49 of file gv_ctype.h.

References gv_isalnum().

Referenced by onematch().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gv_isspace()

static bool gv_isspace ( int  c)
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().

Here is the caller graph for this function:

◆ gv_isupper()

static bool gv_isupper ( int  c)
inlinestatic

Definition at line 27 of file gv_ctype.h.

Referenced by gv_isalpha(), gv_tolower(), onematch(), prformat(), and sfprint().

Here is the caller graph for this function:

◆ gv_isxdigit()

static bool gv_isxdigit ( int  c)
inlinestatic

Definition at line 71 of file gv_ctype.h.

References gv_isdigit().

Referenced by extoken_fn(), onematch(), and xml_isentity().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gv_tolower()

static char gv_tolower ( int  c)
inlinestatic

Definition at line 81 of file gv_ctype.h.

References gv_isupper().

Referenced by gv_tolower_str(), setAction(), and toLower().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gv_tolower_str()

static void gv_tolower_str ( char *  s)
inlinestatic

Definition at line 87 of file gv_ctype.h.

References gv_tolower().

Referenced by dotneato_basename(), and prformat().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gv_toupper()

static char gv_toupper ( int  c)
inlinestatic

Definition at line 93 of file gv_ctype.h.

References gv_islower().

Referenced by copyUpper(), gv_toupper_str(), and toUpper().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gv_toupper_str()

static void gv_toupper_str ( char *  s)
inlinestatic

Definition at line 99 of file gv_ctype.h.

References gv_toupper().

Referenced by prformat().

Here is the call graph for this function:
Here is the caller graph for this function: