mirror of
https://github.com/tailix/libkernaux.git
synced 2024-10-30 11:54:01 -04:00
32 lines
823 B
C
32 lines
823 B
C
#ifndef KERNAUX_INCLUDED_FILE
|
|
#define KERNAUX_INCLUDED_FILE
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#include <kernaux/macro.h>
|
|
|
|
#include <stddef.h>
|
|
|
|
#define KERNAUX_EOF (-1)
|
|
|
|
typedef int (*KernAux_File_Putc) (void *file, unsigned char c);
|
|
typedef int (*KernAux_File_Puts) (void *file, const char *s);
|
|
typedef int (*KernAux_File_Write)(void *file, const void *buffer, size_t count);
|
|
|
|
typedef const struct KernAux_File {
|
|
KernAux_File_Putc KERNAUX_PROTECTED_FIELD(putc);
|
|
KernAux_File_Puts KERNAUX_PROTECTED_FIELD(puts);
|
|
KernAux_File_Write KERNAUX_PROTECTED_FIELD(write);
|
|
} *KernAux_File;
|
|
|
|
int KernAux_File_putc (KernAux_File file, int c);
|
|
int KernAux_File_puts (KernAux_File file, const char *s);
|
|
int KernAux_File_write(KernAux_File file, const void *buffer, size_t count);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|