2003-04-30 21:08:44 +00:00
|
|
|
/* ScummVM - Scumm Interpreter
|
|
|
|
* Copyright (C) 2001 Ludvig Strigeus
|
2004-01-06 12:45:34 +00:00
|
|
|
* Copyright (C) 2001-2004 The ScummVM project
|
2003-04-30 21:08:44 +00:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
*
|
|
|
|
* $Header$
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2004-05-25 13:33:31 +00:00
|
|
|
#ifndef __STDIO_H__
|
|
|
|
#define __STDIO_H__
|
|
|
|
|
2003-04-30 11:37:10 +00:00
|
|
|
#include <PalmOS.h>
|
|
|
|
#include <VFSMgr.h>
|
|
|
|
#include <stdarg.h>
|
|
|
|
|
2004-05-25 13:33:31 +00:00
|
|
|
typedef void (*LedProc)(Boolean show);
|
|
|
|
|
|
|
|
extern FileRef gStdioOutput;
|
2003-04-30 11:37:10 +00:00
|
|
|
|
|
|
|
typedef FileRef FILE;
|
2004-05-25 13:33:31 +00:00
|
|
|
typedef UInt32 size_t;
|
2003-04-30 11:37:10 +00:00
|
|
|
|
|
|
|
#define stdin 0
|
2004-05-25 13:33:31 +00:00
|
|
|
#define stdout (&gStdioOutput)
|
|
|
|
#define stderr (&gStdioOutput)
|
2003-04-30 11:37:10 +00:00
|
|
|
|
|
|
|
#define clearerr(a)
|
|
|
|
#define fflush(a)
|
|
|
|
#define vsnprintf(a,b,c,d) vsprintf(a,c,d)
|
2004-10-20 09:17:46 +00:00
|
|
|
#define getc(a) fgetc(a)
|
2003-04-30 11:37:10 +00:00
|
|
|
|
|
|
|
#define SEEK_SET vfsOriginBeginning
|
|
|
|
#define SEEK_CUR vfsOriginCurrent
|
|
|
|
#define SEEK_END vfsOriginEnd
|
|
|
|
|
2004-05-25 13:33:31 +00:00
|
|
|
UInt16 fclose (FileRef *stream);
|
|
|
|
UInt16 feof (FileRef *stream);
|
|
|
|
Char * fgets (Char *s, UInt32 n, FileRef *stream);
|
2004-10-20 09:17:46 +00:00
|
|
|
Int16 fgetc (FileRef *stream);
|
2004-05-25 13:33:31 +00:00
|
|
|
FileRef * fopen (const Char *filename, const Char *type);
|
|
|
|
UInt32 fread (void *ptr, UInt32 size, UInt32 nitems, FileRef *stream);
|
|
|
|
UInt32 fwrite (const void *ptr, UInt32 size, UInt32 nitems, FileRef *stream);
|
|
|
|
Int32 fseek (FileRef *stream, Int32 offset, Int32 whence);
|
|
|
|
UInt32 ftell (FileRef *stream);
|
|
|
|
|
|
|
|
Int32 fprintf (FileRef *stream, const Char *formatStr, ...);
|
|
|
|
Int32 printf (const Char* formatStr, ...);
|
|
|
|
Int32 sprintf (Char* s, const Char* formatStr, ...);
|
|
|
|
Int32 snprintf(Char* s, UInt32 len, const Char* formatStr, ...);
|
|
|
|
Int32 vsprintf(Char* s, const Char* formatStr, _Palm_va_list argParam);
|
|
|
|
|
|
|
|
void StdioInit (UInt16 volRefNum, const Char *output, LedProc ledProc);
|
|
|
|
void StdioRelease();
|
|
|
|
|
2004-10-20 09:17:46 +00:00
|
|
|
#endif
|