This adds a new main command-line entry point for hdrgen, in the new main.py. This new interface is used for generating a header. The old ways of invoking yaml_to_classes.py for other purposes are left there for now, but `--e` is renamed to `--entry-point` for consistency with the new CLI. The YAML schema is expanded with the `header_template` key where the corresponding `.h.def` file's path is given relative to where the YAML file is found. The build integration no longer gives the `.h.def` path on the command line. Instead, the script now emits a depfile that's used by the cmake rules to track that. The output file is always explicit in the script command line rather than sometimes being derived from a directory path.
107 lines
2.0 KiB
YAML
107 lines
2.0 KiB
YAML
header: time.h
|
|
header_template: time.h.def
|
|
macros: []
|
|
types:
|
|
- type_name: struct_timeval
|
|
- type_name: clockid_t
|
|
- type_name: struct_timespec
|
|
- type_name: struct_tm
|
|
- type_name: time_t
|
|
- type_name: clock_t
|
|
- type_name: size_t
|
|
enums: []
|
|
objects: []
|
|
functions:
|
|
- name: asctime
|
|
standard:
|
|
- stdc
|
|
return_type: char *
|
|
arguments:
|
|
- type: const struct tm *
|
|
- name: asctime_r
|
|
standard:
|
|
- stdc
|
|
return_type: char *
|
|
arguments:
|
|
- type: struct tm *
|
|
- type: char *
|
|
- name: ctime
|
|
standard:
|
|
- stdc
|
|
return_type: char *
|
|
arguments:
|
|
- type: const time_t *
|
|
- name: ctime_r
|
|
standard:
|
|
- stdc
|
|
return_type: char *
|
|
arguments:
|
|
- type: const time_t *
|
|
- type: char *
|
|
- name: clock
|
|
standard:
|
|
- stdc
|
|
return_type: clock_t
|
|
arguments:
|
|
- type: void
|
|
- name: clock_gettime
|
|
standard:
|
|
- POSIX
|
|
return_type: int
|
|
arguments:
|
|
- type: clockid_t
|
|
- type: struct timespec *
|
|
- name: difftime
|
|
standard:
|
|
- stdc
|
|
return_type: double
|
|
arguments:
|
|
- type: time_t
|
|
- type: time_t
|
|
- name: gettimeofday
|
|
standard:
|
|
- POSIX
|
|
return_type: int
|
|
arguments:
|
|
- type: struct timeval *
|
|
- type: void *
|
|
- name: gmtime
|
|
standard:
|
|
- stdc
|
|
return_type: struct tm *
|
|
arguments:
|
|
- type: time_t *
|
|
- name: gmtime_r
|
|
standard:
|
|
- stdc
|
|
return_type: struct tm *
|
|
arguments:
|
|
- type: time_t *
|
|
- type: struct tm *
|
|
- name: mktime
|
|
standard:
|
|
- stdc
|
|
return_type: time_t
|
|
arguments:
|
|
- type: struct tm *
|
|
- name: nanosleep
|
|
standard:
|
|
- POSIX
|
|
return_type: int
|
|
arguments:
|
|
- type: const struct timespec *
|
|
- type: struct timespec *
|
|
- name: time
|
|
standard:
|
|
- stdc
|
|
return_type: time_t
|
|
arguments:
|
|
- type: time_t *
|
|
- name: timespec_get
|
|
standard:
|
|
- stdc
|
|
return_type: int
|
|
arguments:
|
|
- type: struct timespec *
|
|
- type: int
|