epoc32/include/stdapis/stdio.h
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
     1.1 --- a/epoc32/include/stdapis/stdio.h	Wed Mar 31 12:27:01 2010 +0100
     1.2 +++ b/epoc32/include/stdapis/stdio.h	Wed Mar 31 12:33:34 2010 +0100
     1.3 @@ -1,6 +1,5 @@
     1.4  /*-
     1.5  
     1.6 - * © Portions copyright (c) 2006 Symbian Software Ltd. All rights reserved.
     1.7   * Copyright (c) 1990, 1993
     1.8   *	The Regents of the University of California.  All rights reserved.
     1.9   *
    1.10 @@ -33,8 +32,7 @@
    1.11   *
    1.12   *	@(#)stdio.h	8.5 (Berkeley) 4/29/95
    1.13   * $FreeBSD: src/include/stdio.h,v 1.56 2004/06/20 10:01:30 tjr Exp $
    1.14 - *  © Portions copyright (c) 2005-2006  Nokia Corporation.  All rights reserved.
    1.15 - * © Portions copyright (c) 2007-2008 Symbian Software Ltd. All rights reserved.
    1.16 + *  Portions Copyright (c) 2005-2008 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
    1.17   */
    1.18  
    1.19  #ifndef	_STDIO_H_
    1.20 @@ -58,6 +56,10 @@
    1.21  
    1.22  typedef	__off_t		fpos_t;
    1.23  
    1.24 +#if defined(SYMBIAN_OE_LARGE_FILE_SUPPORT) && !defined(SYMBIAN_OE_NO_LFS)
    1.25 +typedef	__off_t		fpos64_t;
    1.26 +#endif /* SYMBIAN_OE_LARGE_FILE_SUPPORT && !SYMBIAN_OE_NO_LFS */
    1.27 +
    1.28  #ifndef _SIZE_T_DECLARED
    1.29  typedef	__size_t	size_t;
    1.30  #define	_SIZE_T_DECLARED
    1.31 @@ -132,7 +134,7 @@
    1.32  	unsigned char *_p;	/* current position in (some) buffer */
    1.33  	int	_r;		/* read space left for getc() */
    1.34  	int	_w;		/* write space left for putc() */
    1.35 -	short	_flags;		/* flags, below; this FILE is free if 0 */
    1.36 +	short _flags;		/* flags, below; this FILE is free if 0 */
    1.37  	short	_file;		/* fileno, if Unix descriptor, else -1 */
    1.38  	struct	__sbuf _bf;	/* the buffer (at least 1 byte, if !NULL) */
    1.39  	int	_lbfsize;	/* 0 or -_bf._size, for inline putc */
    1.40 @@ -318,6 +320,12 @@
    1.41  IMPORT_C void	 rewind(FILE *);
    1.42  IMPORT_C int	 scanf(const char * __restrict, ...);
    1.43  IMPORT_C void	 setbuf(FILE * __restrict, char * __restrict);
    1.44 +
    1.45 +#ifdef __SYMBIAN32__
    1.46 +IMPORT_C int     set_fmode(char mode);
    1.47 +IMPORT_C char     get_fmode(void);
    1.48 +#endif
    1.49 +
    1.50  IMPORT_C int	 setvbuf(FILE * __restrict, char * __restrict, int, size_t);
    1.51  IMPORT_C int	 sprintf(char * __restrict, const char * __restrict, ...);
    1.52  IMPORT_C int	 sscanf(const char * __restrict, const char * __restrict, ...);
    1.53 @@ -330,6 +338,16 @@
    1.54  IMPORT_C int	 vsprintf(char * __restrict, const char * __restrict,
    1.55  	    va_list);
    1.56  
    1.57 +
    1.58 +#if defined(SYMBIAN_OE_LARGE_FILE_SUPPORT) && !defined(SYMBIAN_OE_NO_LFS)
    1.59 +#define fgetpos64	fgetpos
    1.60 +#define fopen64		fopen
    1.61 +#define freopen64	freopen
    1.62 +#define fsetpos64	fsetpos
    1.63 +#define tmpfile64	tmpfile
    1.64 +#endif /* SYMBIAN_OE_LARGE_FILE_SUPPORT && !SYMBIAN_OE_NO_LFS */
    1.65 +
    1.66 +
    1.67  #if __ISO_C_VISIBLE >= 1999
    1.68  IMPORT_C int	 snprintf(char * __restrict, size_t, const char * __restrict,
    1.69  	    ...) __printflike(3, 4);
    1.70 @@ -386,8 +404,14 @@
    1.71  #endif
    1.72  
    1.73  #if __POSIX_VISIBLE >= 200112
    1.74 -int	 fseeko(FILE *, __off_t, int);
    1.75 -__off_t	 ftello(FILE *);
    1.76 +IMPORT_C int	 fseeko(FILE *, __off_t, int);
    1.77 +IMPORT_C __off_t	 ftello(FILE *);
    1.78 +
    1.79 +#if defined(SYMBIAN_OE_LARGE_FILE_SUPPORT) && !defined(SYMBIAN_OE_NO_LFS)
    1.80 +#define fseeko64	fseeko
    1.81 +#define ftello64	ftello
    1.82 +#endif /* SYMBIAN_OE_LARGE_FILE_SUPPORT && !SYMBIAN_OE_NO_LFS */
    1.83 +
    1.84  #endif
    1.85  
    1.86  #if __BSD_VISIBLE || __XSI_VISIBLE > 0 && __XSI_VISIBLE < 600