2007-05-02 01:07:00 +00:00
|
|
|
/*
|
2007-06-18 00:31:00 +00:00
|
|
|
* $Id: stdio.h,v 1.5 2007/06/16 13:34:47 bacon Exp $
|
2007-05-02 01:07:00 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _ASE_UTL_STDIO_H_
|
|
|
|
#define _ASE_UTL_STDIO_H_
|
|
|
|
|
|
|
|
#include <ase/cmn/types.h>
|
|
|
|
#include <ase/cmn/macros.h>
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdarg.h>
|
|
|
|
#include <wchar.h>
|
|
|
|
|
|
|
|
#if defined(_WIN32)
|
|
|
|
#include <tchar.h>
|
|
|
|
|
|
|
|
#define ase_printf _tprintf
|
|
|
|
#define ase_vprintf _vtprintf
|
|
|
|
#define ase_fprintf _ftprintf
|
|
|
|
#define ase_vfprintf _vftprintf
|
|
|
|
|
|
|
|
#define ase_fgets _fgetts
|
|
|
|
#define ase_fgetc _fgettc
|
2007-05-14 00:48:00 +00:00
|
|
|
#define ase_fputs _fputts
|
|
|
|
#define ase_fputc _fputtc
|
2007-05-02 01:07:00 +00:00
|
|
|
#elif defined(ASE_CHAR_IS_MCHAR)
|
|
|
|
#define ase_fgets fgets
|
|
|
|
#define ase_fgetc fgetc
|
2007-05-14 00:48:00 +00:00
|
|
|
#define ase_fputs fputs
|
|
|
|
#define ase_fputc fputc
|
2007-05-02 01:07:00 +00:00
|
|
|
#else
|
|
|
|
#define ase_fgets fgetws
|
|
|
|
#define ase_fgetc fgetwc
|
2007-05-14 00:48:00 +00:00
|
|
|
#define ase_fputs fputws
|
|
|
|
#define ase_fputc fputwc
|
2007-05-02 01:07:00 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
int ase_vsprintf (ase_char_t* buf, size_t size, const ase_char_t* fmt, va_list ap);
|
|
|
|
int ase_sprintf (ase_char_t* buf, size_t size, const ase_char_t* fmt, ...);
|
|
|
|
|
2007-06-18 00:31:00 +00:00
|
|
|
#if !defined(_WIN32)
|
2007-05-02 01:07:00 +00:00
|
|
|
int ase_vfprintf (FILE *stream, const ase_char_t* fmt, va_list ap);
|
|
|
|
int ase_vprintf (const ase_char_t* fmt, va_list ap);
|
|
|
|
int ase_fprintf (FILE* file, const ase_char_t* fmt, ...);
|
|
|
|
int ase_printf (const ase_char_t* fmt, ...);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
int ase_dprintf (const ase_char_t* fmt, ...);
|
|
|
|
FILE* ase_fopen (const ase_char_t* path, const ase_char_t* mode);
|
|
|
|
FILE* ase_popen (const ase_char_t* cmd, const ase_char_t* mode);
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|