1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-06-03 07:29:37 +00:00
kickc/src/main/kc/include/stdio.h
Flight_Control 00df07b7bf - Fixed test cases. Full retest of all test cases.
- Treat global variables of libraries, as part of the .asm library .namespace.
- Fix bugs.
- Assign meaningful struct names to .asm internal variables and labels. (Remove the $x notation).
2024-04-20 07:03:31 +03:00

38 lines
934 B
C

/// @file
/// Functions for performing input and output.
#include <stddef.h>
#include <errno.h>
#include <printf.h>
#include <sprintf.h>
#if defined(__CX16__) // For the moment only supported for the CX16 ...
#ifndef __STDIO_FILELEN
#define __STDIO_FILELEN 32
#endif
#ifndef __STDIO_ERRORLEN
#define __STDIO_ERRORLEN 32
#endif
#ifndef __STDIO_FILECOUNT
#define __STDIO_FILECOUNT 4
#endif
typedef struct {
char filename[__STDIO_FILECOUNT*__STDIO_FILELEN];
char channel[__STDIO_FILECOUNT];
char device[__STDIO_FILECOUNT];
char secondary[__STDIO_FILECOUNT];
char status[__STDIO_FILECOUNT];
} FILE;
FILE *fopen(const char *path, const char *mode);
int fclose(FILE *stream);
unsigned int fgets(char *ptr, unsigned int size, FILE *stream);
int ferror(FILE *stream);
void perror(char* prefix);
#endif