2020-08-25 11:23:25 +00:00
|
|
|
#ifndef COSMOPOLITAN_TOOL_BUILD_LIB_BUFFER_H_
|
|
|
|
#define COSMOPOLITAN_TOOL_BUILD_LIB_BUFFER_H_
|
|
|
|
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
|
|
|
COSMOPOLITAN_C_START_
|
|
|
|
|
|
|
|
struct Buffer {
|
2020-10-29 11:53:20 +00:00
|
|
|
unsigned i, n;
|
2020-08-25 11:23:25 +00:00
|
|
|
char *p;
|
|
|
|
};
|
|
|
|
|
|
|
|
void AppendChar(struct Buffer *, char);
|
2020-10-29 11:53:20 +00:00
|
|
|
void AppendData(struct Buffer *, char *, unsigned);
|
2020-08-25 11:23:25 +00:00
|
|
|
void AppendStr(struct Buffer *, const char *);
|
|
|
|
void AppendWide(struct Buffer *, wint_t);
|
2020-10-27 10:39:46 +00:00
|
|
|
int AppendFmt(struct Buffer *, const char *, ...);
|
2020-08-25 11:23:25 +00:00
|
|
|
ssize_t WriteBuffer(struct Buffer *, int);
|
|
|
|
|
|
|
|
COSMOPOLITAN_C_END_
|
|
|
|
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
|
|
|
#endif /* COSMOPOLITAN_TOOL_BUILD_LIB_BUFFER_H_ */
|