Files
RedBear-OS/local/recipes/dev/libclc/source/libc/include/stdio.yaml
T
vasilito cb424d7448 build: static patch-sanity linter (shift-left the malformed-patch class)
verify-patch-sanity.py validates every active recipe .patch has internally-
consistent hunk line counts — catching the 'malformed patch at line N' failure
at commit/CI/preflight time instead of hours into a cook. This cycle hit that
class three times (qtwaylandscanner, sddm, xwayland), each only discovered when
cookbook tried to apply the patch.

Running it across the repo found 29 latent malformed patches (validated against
GNU patch: e.g. relibc/P3-sysv-ipc reproduces 'malformed patch at line 22').
They were harmless only because they sit in vendored recipes (baked, not re-
applied) — but would fail on any version-bump re-derivation. --fix recounts the
hunk headers (body untouched) and repaired all 29.

Wired into build-preflight.sh (Phase 1.0D) and redbear-ci.yml, with a unit test
(test-patch-sanity.sh). Skips archived/legacy trees and unvalidatable formats
(empty placeholders, bare-@@ git hunks).
2026-08-01 05:13:02 +03:00

407 lines
7.9 KiB
YAML

header: stdio.h
header_template: stdio.h.def
macros:
- macro_name: NULL
macro_header: null-macro.h
- macro_name: stdout
macro_value: stdout
- macro_name: stdin
macro_value: stdin
- macro_name: stderr
macro_value: stderr
types:
- type_name: size_t
- type_name: off_t
- type_name: cookie_io_functions_t
- type_name: FILE
enums: []
objects:
- object_name: stdin
object_type: FILE *
- object_name: stdout
object_type: FILE *
- object_name: stderr
object_type: FILE *
functions:
- name: asprintf
standards:
- GNUExtensions
return_type: int
arguments:
- type: char **__restrict
- type: const char *__restrict
- type: '...'
- name: clearerr
standards:
- stdc
return_type: void
arguments:
- type: FILE *
- name: clearerr_unlocked
standards:
- GNUExtensions
return_type: void
arguments:
- type: FILE *
- name: fclose
standards:
- stdc
return_type: int
arguments:
- type: FILE *
- name: fdopen
standards:
- POSIX
return_type: FILE *
arguments:
- type: int
- type: const char *
- name: feof
standards:
- stdc
return_type: int
arguments:
- type: FILE *
- name: feof_unlocked
standards:
- GNUExtensions
return_type: int
arguments:
- type: FILE *
- name: ferror
standards:
- stdc
return_type: int
arguments:
- type: FILE *
- name: ferror_unlocked
standards:
- GNUExtensions
return_type: int
arguments:
- type: FILE *
- name: fflush
standards:
- stdc
return_type: int
arguments:
- type: FILE *
- name: fgetc
standards:
- stdc
return_type: int
arguments:
- type: FILE *
- name: fgetc_unlocked
standards:
- GNUExtensions
return_type: int
arguments:
- type: FILE *
- name: fgets
standards:
- stdc
return_type: char *
arguments:
- type: char *__restrict
- type: int
- type: FILE *__restrict
- name: fileno
standards:
- POSIX
return_type: int
arguments:
- type: FILE *
- name: flockfile
standards:
- POSIX
return_type: void
arguments:
- type: FILE *
- name: fopen
standards:
- stdc
return_type: FILE *
arguments:
- type: const char *
- type: const char *
- name: fopencookie
standards:
- GNUExtensions
return_type: FILE *
arguments:
- type: void *
- type: const char *
- type: cookie_io_functions_t
- name: fprintf
standards:
- stdc
return_type: int
arguments:
- type: FILE *__restrict
- type: const char *__restrict
- type: '...'
- name: fputc
standards:
- stdc
return_type: int
arguments:
- type: int
- type: FILE *
- name: fputs
standards:
- stdc
return_type: int
arguments:
- type: const char *__restrict
- type: FILE *__restrict
- name: fread
standards:
- stdc
return_type: size_t
arguments:
- type: void *__restrict
- type: size_t
- type: size_t
- type: FILE *__restrict
- name: fread_unlocked
standards:
- GNUExtensions
return_type: size_t
arguments:
- type: void *__restrict
- type: size_t
- type: size_t
- type: FILE *__restrict
- name: fscanf
standards:
- stdc
return_type: int
arguments:
- type: FILE *__restrict
- type: const char *__restrict
- type: '...'
- name: vfscanf
standards:
- stdc
return_type: int
arguments:
- type: FILE *__restrict
- type: const char *__restrict
- type: va_list
- name: fseek
standards:
- stdc
return_type: int
arguments:
- type: FILE *
- type: long
- type: int
- name: ftell
standards:
- stdc
return_type: long
arguments:
- type: FILE *
- name: funlockfile
standards:
- POSIX
return_type: void
arguments:
- type: FILE *
- name: fwrite
standards:
- stdc
return_type: size_t
arguments:
- type: const void *__restrict
- type: size_t
- type: size_t
- type: FILE *__restrict
- name: fwrite_unlocked
standards:
- GNUExtensions
return_type: size_t
arguments:
- type: const void *__restrict
- type: size_t
- type: size_t
- type: FILE *__restrict
- name: getc
standards:
- stdc
return_type: int
arguments:
- type: FILE *
- name: getc_unlocked
standards:
- POSIX
return_type: int
arguments:
- type: FILE *
- name: getchar
standards:
- stdc
return_type: int
arguments: []
- name: getchar_unlocked
standards:
- POSIX
return_type: int
arguments: []
- name: perror
standards:
- stdc
return_type: void
arguments:
- type: const char *
- name: printf
standards:
- stdc
return_type: int
arguments:
- type: const char *__restrict
- type: '...'
- name: putc
standards:
- stdc
return_type: int
arguments:
- type: int
- type: FILE *
- name: putchar
standards:
- stdc
return_type: int
arguments:
- type: int
- name: puts
standards:
- stdc
return_type: int
arguments:
- type: const char *
- name: remove
standards:
- stdc
return_type: int
arguments:
- type: const char *
- name: rename
standards:
- stdc
return_type: int
arguments:
- type: const char *
- type: const char *
- name: scanf
standards:
- stdc
return_type: int
arguments:
- type: const char *__restrict
- type: '...'
- name: vscanf
standards:
- stdc
return_type: int
arguments:
- type: const char *__restrict
- type: va_list
- name: setbuf
standards:
- stdc
return_type: void
arguments:
- type: FILE *__restrict
- type: char *__restrict
- name: setvbuf
standards:
- stdc
return_type: int
arguments:
- type: FILE *__restrict
- type: char *__restrict
- type: int
- type: size_t
- name: snprintf
standards:
- stdc
return_type: int
arguments:
- type: char *__restrict
- type: size_t
- type: const char *__restrict
- type: '...'
- name: sprintf
standards:
- stdc
return_type: int
arguments:
- type: char *__restrict
- type: const char *__restrict
- type: '...'
- name: sscanf
standards:
- stdc
return_type: int
arguments:
- type: const char *__restrict
- type: const char *__restrict
- type: '...'
- name: ungetc
standards:
- stdc
return_type: int
arguments:
- type: int
- type: FILE *
- name: vasprintf
standards:
- GNUExtensions
return_type: int
arguments:
- type: char **__restrict
- type: const char *__restrict
- type: va_list
- name: vfprintf
standards:
- stdc
return_type: int
arguments:
- type: FILE *__restrict
- type: const char *__restrict
- type: va_list
- name: vprintf
standards:
- stdc
return_type: int
arguments:
- type: const char *__restrict
- type: va_list
- name: vsnprintf
standards:
- stdc
return_type: int
arguments:
- type: char *__restrict
- type: size_t
- type: const char *__restrict
- type: va_list
- name: vsprintf
standards:
- stdc
return_type: int
arguments:
- type: char *__restrict
- type: const char *__restrict
- type: va_list
- name: vsscanf
standards:
- stdc
return_type: int
arguments:
- type: const char *__restrict
- type: const char *__restrict
- type: va_list