MyOS Libc
|
#include <stdio.h>
#include <serdes.h>
#include <rpc.h>
#include <stdlib.h>
#include <limits.h>
#include <string.h>
#include <dbg.h>
Functions | |
void | __stdio_init () |
FILE * | fopen (char *filename, char *mode) |
int | putc (int c, FILE *stream) |
int | fputc (int c, FILE *stream) |
int | getc (FILE *stream) |
int | fgetc (FILE *stream) |
char * | gets (char *s) |
char * | fgets (char *str, int count, FILE *stream) |
size_t | fread (void *buffer_ptr, size_t size, size_t count, FILE *stream) |
int | puts (const char *s) |
int | fputs (const char *s, FILE *stream) |
size_t | fwrite (void *buffer_ptr, size_t size, size_t count, FILE *stream) |
void | register_fs (const char *name, pid_t pid) |
int | mount (char *file, char *type, char *path) |
int | vfprintf (FILE *stream, const char *format, va_list arg) |
int | fprintf (FILE *stream, const char *format,...) |
int | printf (const char *format,...) |
int | fseek (FILE *stream, long offset, int origin) |
Variables | |
FILE * | stdin =NULL |
Standard input. | |
FILE * | stdout =NULL |
Standard output. | |
FILE * | stderr =NULL |
Standard error. | |
void __stdio_init | ( | ) |
Initialize stdio. Must not be called by user code.
int fgetc | ( | FILE * | stream | ) |
Gets a character from a file
stream | The file to read from |
char* fgets | ( | char * | str, |
int | count, | ||
FILE * | stream | ||
) |
Gets a newline delimeted string from a file
str | The buffer to read into |
count | The maximum size of the string to read |
stream | The file to read from |
FILE* fopen | ( | char * | filename, |
char * | mode | ||
) |
Opens a file with the specified mode
filename | The path to the file to open |
mode | The mode to open the file with (r,w,a,r+,w+,a+) |
int fprintf | ( | FILE * | stream, |
const char * | format, | ||
... | |||
) |
Format a string and writte it to a file
stream | The fike to write to |
format | The format string |
... | The arguments for the format string |
int fputc | ( | int | c, |
FILE * | stream | ||
) |
Writes a character to a file
c | The character to write |
stream | The stream to write to |
int fputs | ( | const char * | s, |
FILE * | stream | ||
) |
Writes a string to a file
s | The string to write |
stream | The file to write to |
size_t fread | ( | void * | buffer, |
size_t | size, | ||
size_t | count, | ||
FILE * | stream | ||
) |
Reads from a file
buffer | The buffer to read into |
size | The size of each elemnt to read |
count | The number of elements to read |
stream | The file to read from |
int fseek | ( | FILE * | stream, |
long | offset, | ||
int | origin | ||
) |
Seeks to a position in a file
stream | The file to seek in |
offset | The offset to seek to |
origin | The origin of seeking (SEEK_CUR,SEEK_END,SEEK_SET) |
size_t fwrite | ( | void * | buffer_ptr, |
size_t | size, | ||
size_t | count, | ||
FILE * | stream | ||
) |
Writes to a file
buffer_ptr | The buffer to write |
size | The size of each elemnt to write |
count | The number of elements to write |
stream | The file to write to |
int getc | ( | FILE * | stream | ) |
Gets a character from a file
stream | The file to read from |
char* gets | ( | char * | str | ) |
Gets a newline delimeted string from stdin
str | The buffer to read into |
int mount | ( | char * | file, |
char * | type, | ||
char * | path | ||
) |
Mounts a filesystem
file | The file to mount |
type | The type of the filesystem to mount |
path | The path to mount the filesytem at |
int printf | ( | const char * | format, |
... | |||
) |
Format a string and write it to stdout
format | The format string |
... | The arguments for the format string |
int putc | ( | int | c, |
FILE * | stream | ||
) |
Writes a character to a file
c | The character to write |
stream | The stream to write to |
int puts | ( | const char * | s | ) |
Writes a string followed by a newline to stdin
s | The string to write |
void register_fs | ( | const char * | name, |
pid_t | pid | ||
) |
Registers a file system type with the VFS
name | The name of the type to register |
pid | The PID of the filesytem driver |
int vfprintf | ( | FILE * | stream, |
const char * | format, | ||
va_list | arg | ||
) |
Format a string and writte it to a file
stream | The fike to write to |
format | The format string |
arg | The arguments for the format string |