29 lines
547 B
C
29 lines
547 B
C
/****
|
|
* Tiny standard C library
|
|
* subset implementation
|
|
****/
|
|
|
|
#pragma once
|
|
|
|
#define SPACE " "
|
|
#define WIDTH 80
|
|
|
|
// FILE type
|
|
typedef struct FILE
|
|
{
|
|
unsigned fd;
|
|
unsigned short*offset;
|
|
unsigned int seek;
|
|
} FILE;
|
|
|
|
extern FILE*stdout;
|
|
|
|
void fprint(FILE*f,char*s);
|
|
void fprinti(FILE*f,int d);
|
|
void fputc(char c,FILE*f);
|
|
void fputs(FILE*f,char*s);
|
|
|
|
#define puts(x) fputs(stdout,x)
|
|
#define printi(x) fprinti(stdout,x)
|
|
#define print(x) fprint(stdout,x)
|