Roland McGrath 303f241544
[libc] Make template_header optional for hdrgen (#127259)
This allows a YAML file to omit `template_header` and have no
`.h.def` file.  A default template is generated based purely on
the information in the YAML file.  This should handle most of the
cases.  For now, it's exercised (aside from the hdrgen tests)
only for one of the simplest cases: <ctype.h>.

This includes making the parser notice the "standards" YAML field
at the top (header) level, not just in "functions" lists.  The
standards listed for the header overall and for the individual
functions both feed into how a fully-generated header describes
itself in comments.  To go with this, files using the default
generated template must stick to a new uniform set of spellings
for the "standards" lists.  As more custom template files are
retired, the corresponding YAML files will need all their
standards lists normalized.  For now, ctype.yaml is updated
with correct attribution for the POSIX `_l` extensions.
2025-02-14 14:01:18 -08:00

201 lines
3.4 KiB
YAML

header: ctype.h
standards:
- stdc
enums: []
objects: []
functions:
- name: isalnum
standards:
- stdc
return_type: int
arguments:
- type: int
- name: isalpha
standards:
- stdc
return_type: int
arguments:
- type: int
- name: isascii
standards:
- POSIX
return_type: int
arguments:
- type: int
- name: isblank
standards:
- stdc
return_type: int
arguments:
- type: int
- name: iscntrl
standards:
- stdc
return_type: int
arguments:
- type: int
- name: isdigit
standards:
- stdc
return_type: int
arguments:
- type: int
- name: isgraph
standards:
- stdc
return_type: int
arguments:
- type: int
- name: islower
standards:
- stdc
return_type: int
arguments:
- type: int
- name: isprint
standards:
- stdc
return_type: int
arguments:
- type: int
- name: ispunct
standards:
- stdc
return_type: int
arguments:
- type: int
- name: isspace
standards:
- stdc
return_type: int
arguments:
- type: int
- name: isupper
standards:
- stdc
return_type: int
arguments:
- type: int
- name: isxdigit
standards:
- stdc
return_type: int
arguments:
- type: int
- name: toascii
standards:
- GNUExtensions
return_type: int
arguments:
- type: int
- name: tolower
standards:
- stdc
return_type: int
arguments:
- type: int
- name: toupper
standards:
- stdc
return_type: int
arguments:
- type: int
- name: isalnum_l
standards:
- posix
return_type: int
arguments:
- type: int
- type: locale_t
- name: isalpha_l
standards:
- posix
return_type: int
arguments:
- type: int
- type: locale_t
- name: isblank_l
standards:
- posix
return_type: int
arguments:
- type: int
- type: locale_t
- name: iscntrl_l
standards:
- posix
return_type: int
arguments:
- type: int
- type: locale_t
- name: isdigit_l
standards:
- posix
return_type: int
arguments:
- type: int
- type: locale_t
- name: isgraph_l
standards:
- posix
return_type: int
arguments:
- type: int
- type: locale_t
- name: islower_l
standards:
- posix
return_type: int
arguments:
- type: int
- type: locale_t
- name: isprint_l
standards:
- posix
return_type: int
arguments:
- type: int
- type: locale_t
- name: ispunct_l
standards:
- posix
return_type: int
arguments:
- type: int
- type: locale_t
- name: isspace_l
standards:
- posix
return_type: int
arguments:
- type: int
- type: locale_t
- name: isupper_l
standards:
- posix
return_type: int
arguments:
- type: int
- type: locale_t
- name: isxdigit_l
standards:
- posix
return_type: int
arguments:
- type: int
- type: locale_t
- name: tolower_l
standards:
- posix
return_type: int
arguments:
- type: int
- type: locale_t
- name: toupper_l
standards:
- posix
return_type: int
arguments:
- type: int
- type: locale_t