PSXSDK
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
stdio.h File Reference
#include <stdarg.h>
#include <stdbool.h>

Go to the source code of this file.

Data Structures

struct  FILE
 File stream. More...
 

Macros

#define SEEK_SET   0
 
#define SEEK_CUR   1
 
#define SEEK_END   2
 
#define EOF   -1
 
#define NULL   (void*)0
 
#define dprintf(fmt,...)
 
#define getc(f)   fgetc(f)
 
#define delete(x)   remove(x)
 

Typedefs

typedef unsigned int size_t
 
typedef signed int ssize_t
 

Enumerations

enum  stdio_directions { STDIO_DIRECTION_BIOS, STDIO_DIRECTION_SIO }
 

Functions

int putchar (int c)
 
int puts (const char *str)
 
int printf (const char *format,...)
 BIOS printf() implementation.
 
int vsnprintf (char *string, size_t size, const char *fmt, va_list ap)
 
int vsprintf (char *string, const char *fmt, va_list ap)
 
int sprintf (char *string, const char *fmt,...)
 
int snprintf (char *string, size_t size, const char *fmt,...)
 
int vprintf (char *fmt, va_list ap)
 
FILEfdopen (int fildes, const char *mode)
 
FILEfopen (char *path, const char *mode)
 
int fclose (FILE *stream)
 
int fread (void *ptr, int size, int nmemb, FILE *f)
 
int fgetc (FILE *f)
 
int ftell (FILE *f)
 
int fseek (FILE *f, int offset, int whence)
 
int rename (char *oldname, char *newname)
 
int remove (char *filename)
 
void redirect_stdio_to_sio (void)
 Redirects STDIO to SIO (serial port)
 
void sio_stdio_mapcr (unsigned int setting)
 Sets whether a carriage return must be written before a line feed.
 
int vsscanf (const char *str, const char *fmt, va_list ap)
 scanf and friends
 
int sscanf (const char *str, const char *fmt,...)
 
int sio_putchar (int c)
 STDIO for SIO.
 
int sio_puts (const char *str)
 
int sio_printf (const char *fmt,...)
 
int sio_vprintf (const char *fmt, va_list ap)
 

Variables

int __stdio_direction
 

Macro Definition Documentation

#define delete (   x)    remove(x)
#define dprintf (   fmt,
  ... 
)
#define EOF   -1
#define getc (   f)    fgetc(f)
#define NULL   (void*)0
#define SEEK_CUR   1
#define SEEK_END   2
#define SEEK_SET   0

Typedef Documentation

typedef unsigned int size_t
typedef signed int ssize_t

Enumeration Type Documentation

Enumerator:
STDIO_DIRECTION_BIOS 
STDIO_DIRECTION_SIO 

Function Documentation

int fclose ( FILE stream)
FILE* fdopen ( int  fildes,
const char *  mode 
)
int fgetc ( FILE f)
FILE* fopen ( char *  path,
const char *  mode 
)
int fread ( void *  ptr,
int  size,
int  nmemb,
FILE f 
)
int fseek ( FILE f,
int  offset,
int  whence 
)
int ftell ( FILE f)
int printf ( const char *  format,
  ... 
)

BIOS printf() implementation.

Does not support floating point. NOTE: when redirect_stdio_to_sio() is used, PSXSDK's internal implementation is used instead.

int putchar ( int  c)
int puts ( const char *  str)
void redirect_stdio_to_sio ( void  )

Redirects STDIO to SIO (serial port)

int remove ( char *  filename)
int rename ( char *  oldname,
char *  newname 
)
int sio_printf ( const char *  fmt,
  ... 
)
int sio_putchar ( int  c)

STDIO for SIO.

int sio_puts ( const char *  str)
void sio_stdio_mapcr ( unsigned int  setting)

Sets whether a carriage return must be written before a line feed.

In simpler words, whether '
' must be translated to a '
' sequence. If you come from the Unix world, you most likely want to set this.

Parameters
settingNew status of the setting (0 = disabled, 1 = enabled)
int sio_vprintf ( const char *  fmt,
va_list  ap 
)
int snprintf ( char *  string,
size_t  size,
const char *  fmt,
  ... 
)
int sprintf ( char *  string,
const char *  fmt,
  ... 
)
int sscanf ( const char *  str,
const char *  fmt,
  ... 
)
int vprintf ( char *  fmt,
va_list  ap 
)
int vsnprintf ( char *  string,
size_t  size,
const char *  fmt,
va_list  ap 
)
int vsprintf ( char *  string,
const char *  fmt,
va_list  ap 
)
int vsscanf ( const char *  str,
const char *  fmt,
va_list  ap 
)

scanf and friends

Variable Documentation

int __stdio_direction