mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-02 17:28:30 +00:00
Further refine documentation
This commit is contained in:
parent
1bc3a25505
commit
548dcb9f08
27 changed files with 389 additions and 1478 deletions
|
@ -20,13 +20,13 @@
|
|||
#include "libc/macros.h"
|
||||
#include "libc/runtime/valist.h"
|
||||
|
||||
static void *__va_arg_mem(struct __va *ap, size_t sz, size_t align) {
|
||||
static void *__va_arg_mem(struct __va_list *ap, size_t sz, size_t align) {
|
||||
void *r = (void *)ROUNDUP((intptr_t)ap->overflow_arg_area, align);
|
||||
ap->overflow_arg_area = (void *)ROUNDUP((intptr_t)r + sz, 8);
|
||||
return r;
|
||||
}
|
||||
|
||||
void *__va_arg(struct __va *ap, size_t sz, unsigned align, unsigned k) {
|
||||
void *__va_arg(struct __va_list *ap, size_t sz, unsigned align, unsigned k) {
|
||||
void *r;
|
||||
switch (k) {
|
||||
case 0:
|
||||
|
|
|
@ -3,14 +3,14 @@
|
|||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
struct __va {
|
||||
struct __va_list {
|
||||
uint32_t gp_offset;
|
||||
uint32_t fp_offset;
|
||||
void *overflow_arg_area;
|
||||
void *reg_save_area;
|
||||
};
|
||||
|
||||
void *__va_arg(struct __va *, size_t, unsigned, unsigned);
|
||||
void *__va_arg(struct __va_list *, size_t, unsigned, unsigned);
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue