2007-02-20 14:04:22 +00:00
|
|
|
/*
|
2007-03-06 14:16:53 +00:00
|
|
|
* $Id: stdio.h,v 1.6 2007-03-06 14:16:53 bacon Exp $
|
2007-02-20 14:04:22 +00:00
|
|
|
*/
|
|
|
|
|
2007-02-22 14:32:08 +00:00
|
|
|
#ifndef _ASE_UTL_STDIO_H_
|
|
|
|
#define _ASE_UTL_STDIO_H_
|
2007-02-20 14:04:22 +00:00
|
|
|
|
2007-03-06 14:16:53 +00:00
|
|
|
#include <ase/cmn/types.h>
|
|
|
|
#include <ase/cmn/macros.h>
|
2007-02-20 14:04:22 +00:00
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdarg.h>
|
2007-02-23 10:57:09 +00:00
|
|
|
#include <wchar.h>
|
2007-02-20 14:04:22 +00:00
|
|
|
|
|
|
|
#if defined(_WIN32)
|
|
|
|
#include <tchar.h>
|
|
|
|
|
|
|
|
#define ase_printf _tprintf
|
|
|
|
#define ase_vprintf _vtprintf
|
|
|
|
#define ase_fprintf _ftprintf
|
|
|
|
#define ase_vfprintf _vftprintf
|
|
|
|
|
2007-02-21 04:18:09 +00:00
|
|
|
#define ase_fgets _fgetts
|
|
|
|
#define ase_fgetc _fgettc
|
2007-02-20 14:04:22 +00:00
|
|
|
#elif defined(ASE_CHAR_IS_MCHAR)
|
2007-02-21 04:18:09 +00:00
|
|
|
#define ase_fgets fgets
|
|
|
|
#define ase_fgetc fgetc
|
2007-02-20 14:04:22 +00:00
|
|
|
#else
|
2007-02-21 04:18:09 +00:00
|
|
|
#define ase_fgets fgetws
|
|
|
|
#define ase_fgetc fgetwc
|
2007-02-20 14:04:22 +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, ...);
|
|
|
|
|
|
|
|
#if !defined(WIN32)
|
|
|
|
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
|
|
|
|
|
2007-02-28 09:57:13 +00:00
|
|
|
int ase_dprintf (const ase_char_t* fmt, ...);
|
2007-02-20 14:04:22 +00:00
|
|
|
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
|