#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include "system.h"
#include "charset.h"
#include "string16.h"
#include "stdio16.h"
#include <errno.h>
Go to the source code of this file.
|
#define | WIN_IMP |
|
#define | ERR(m) fprintf(stderr,m) |
|
#define | ERR1(m, x) fprintf(stderr,m,x) |
|
#define | ERR2(m, x, y) fprintf(stderr,m,x,y) |
|
#define | BufferSize 4096 |
|
#define | FILE16_read 0x01 |
|
#define | FILE16_write 0x02 |
|
#define | FILE16_close_underlying 0x04 |
|
#define | put(x) {nchars++; if(count == sizeof(buf)) {if(ConvertASCII(buf, count, file) == -1) return -1; count = 0;} buf[count++] = x;} |
|
|
void | init_stdio16 (void) |
|
int | Readu (FILE16 *file, unsigned char *buf, int max_count) |
|
int | Writeu (FILE16 *file, unsigned char *buf, int count) |
|
int | Fclose (FILE16 *file) |
|
int | Fseek (FILE16 *file, long offset, int ptrname) |
|
int | Fflush (FILE16 *file) |
|
FILE * | GetFILE (FILE16 *file) |
|
void | SetCloseUnderlying (FILE16 *file, int cu) |
|
void | SetFileEncoding (FILE16 *file, CharacterEncoding encoding) |
|
CharacterEncoding | GetFileEncoding (FILE16 *file) |
|
int | Fprintf (FILE16 *file, const char *format,...) |
|
int | Printf (const char *format,...) |
|
int | Sprintf (void *buf, CharacterEncoding enc, const char *format,...) |
|
int | Vprintf (const char *format, va_list args) |
|
int | Vsprintf (void *buf, CharacterEncoding enc, const char *format, va_list args) |
|
int | Vfprintf (FILE16 *file, const char *format, va_list args) |
|
FILE16 * | MakeFILE16FromFILE (FILE *f, const char *type) |
|
FILE16 * | MakeFILE16FromString (void *buf, long size, const char *type) |
|
#define ERR |
( |
|
m | ) |
fprintf(stderr,m) |
#define ERR1 |
( |
|
m, |
|
|
|
x |
|
) |
| fprintf(stderr,m,x) |
#define ERR2 |
( |
|
m, |
|
|
|
x, |
|
|
|
y |
|
) |
| fprintf(stderr,m,x,y) |
#define FILE16_write 0x02 |
#define FILE16_close_underlying 0x04 |
#define put |
( |
|
x | ) |
{nchars++; if(count == sizeof(buf)) {if(ConvertASCII(buf, count, file) == -1) return -1; count = 0;} buf[count++] = x;} |
typedef int ReadProc(FILE16 *file, unsigned char *buf, int max_count) |
typedef int WriteProc(FILE16 *file, const unsigned char *buf, int count) |
typedef int SeekProc(FILE16 *file, long offset, int ptrname) |
typedef int FlushProc(FILE16 *file) |
typedef int CloseProc(FILE16 *file) |
void init_stdio16 |
( |
void |
| ) |
|
int Readu |
( |
FILE16 * |
file, |
|
|
unsigned char * |
buf, |
|
|
int |
max_count |
|
) |
| |
int Writeu |
( |
FILE16 * |
file, |
|
|
unsigned char * |
buf, |
|
|
int |
count |
|
) |
| |
int Fclose |
( |
FILE16 * |
file | ) |
|
int Fseek |
( |
FILE16 * |
file, |
|
|
long |
offset, |
|
|
int |
ptrname |
|
) |
| |
int Fflush |
( |
FILE16 * |
file | ) |
|
FILE* GetFILE |
( |
FILE16 * |
file | ) |
|
void SetCloseUnderlying |
( |
FILE16 * |
file, |
|
|
int |
cu |
|
) |
| |
int Fprintf |
( |
FILE16 * |
file, |
|
|
const char * |
format, |
|
|
|
... |
|
) |
| |
int Printf |
( |
const char * |
format, |
|
|
|
... |
|
) |
| |
int Vprintf |
( |
const char * |
format, |
|
|
va_list |
args |
|
) |
| |
int Vfprintf |
( |
FILE16 * |
file, |
|
|
const char * |
format, |
|
|
va_list |
args |
|
) |
| |
FILE16* MakeFILE16FromFILE |
( |
FILE * |
f, |
|
|
const char * |
type |
|
) |
| |
FILE16* MakeFILE16FromString |
( |
void * |
buf, |
|
|
long |
size, |
|
|
const char * |
type |
|
) |
| |