epoc32/include/stdapis/glib-2.0/glib/gstdio.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
     1.1 --- a/epoc32/include/stdapis/glib-2.0/glib/gstdio.h	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/stdapis/glib-2.0/glib/gstdio.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,116 @@
     1.4 -gstdio.h
     1.5 +/* gstdio.h - GFilename wrappers for C library functions
     1.6 + *
     1.7 + * Copyright 2004 Tor Lillqvist
     1.8 + * Portions copyright (c) 2006 Nokia Corporation.  All rights reserved.
     1.9 + *
    1.10 + * GLib is free software; you can redistribute it and/or modify it
    1.11 + * under the terms of the GNU Lesser General Public License as
    1.12 + * published by the Free Software Foundation; either version 2 of the
    1.13 + * License, or (at your option) any later version.
    1.14 + *
    1.15 + * GLib is distributed in the hope that it will be useful,
    1.16 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
    1.17 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    1.18 + * Lesser General Public License for more details.
    1.19 + *
    1.20 + * You should have received a copy of the GNU Lesser General Public
    1.21 + * License along with GLib; see the file COPYING.LIB.  If not,
    1.22 + * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    1.23 + * Boston, MA 02111-1307, USA.
    1.24 + */
    1.25 +
    1.26 +#ifndef __G_STDIO_H__
    1.27 +#define __G_STDIO_H__
    1.28 +
    1.29 +#include <_ansi.h>
    1.30 +#include <glib/gprintf.h>
    1.31 +
    1.32 +#include <sys/stat.h>
    1.33 +
    1.34 +G_BEGIN_DECLS
    1.35 +
    1.36 +#if defined(G_OS_UNIX) && !defined(G_STDIO_NO_WRAP_ON_UNIX) && !defined(__SYMBIAN32__)
    1.37 +
    1.38 +/* Just pass on to the system functions, so there's no potential for data
    1.39 + * format mismatches, especially with large file interfaces. 
    1.40 + * A few functions can't be handled in this way, since they are not defined
    1.41 + * in a portable system header that we could include here.
    1.42 + */
    1.43 +
    1.44 +#define g_chmod   chmod
    1.45 +#define g_open    open
    1.46 +#define g_creat   creat
    1.47 +#define g_rename  rename
    1.48 +#define g_mkdir   mkdir
    1.49 +#define g_stat    stat
    1.50 +#define g_lstat   lstat
    1.51 +#define g_remove  remove
    1.52 +#define g_fopen   fopen
    1.53 +#define g_freopen freopen
    1.54 +
    1.55 +IMPORT_C int g_access (const gchar *filename,
    1.56 +	      int          mode);
    1.57 +
    1.58 +IMPORT_C int g_chdir  (const gchar *path);
    1.59 +
    1.60 +IMPORT_C int g_unlink (const gchar *filename);
    1.61 +
    1.62 +IMPORT_C int g_rmdir  (const gchar *filename);
    1.63 +
    1.64 +#else /* ! G_OS_UNIX */
    1.65 +
    1.66 +/* Wrappers for C library functions that take pathname arguments. On
    1.67 + * Unix, the pathname is a file name as it literally is in the file
    1.68 + * system. On well-maintained systems with consistent users who know
    1.69 + * what they are doing and no exchange of files with others this would
    1.70 + * be a well-defined encoding, preferrably UTF-8. On Windows, the
    1.71 + * pathname is always in UTF-8, even if that is not the on-disk
    1.72 + * encoding, and not the encoding accepted by the C library or Win32
    1.73 + * API.
    1.74 + */
    1.75 +
    1.76 +IMPORT_C int g_access    (const gchar *filename,
    1.77 +		 int          mode);
    1.78 +
    1.79 +IMPORT_C int g_chmod     (const gchar *filename,
    1.80 +		 int          mode);
    1.81 +
    1.82 +IMPORT_C int g_open      (const gchar *filename,
    1.83 +                 int          flags,
    1.84 +                 int          mode);
    1.85 +
    1.86 +IMPORT_C int g_creat     (const gchar *filename,
    1.87 +                 int          mode);
    1.88 +
    1.89 +IMPORT_C int g_rename    (const gchar *oldfilename,
    1.90 +                 const gchar *newfilename);
    1.91 +
    1.92 +IMPORT_C int g_mkdir     (const gchar *filename,
    1.93 +                 int          mode);
    1.94 +
    1.95 +IMPORT_C int g_chdir     (const gchar *path);
    1.96 +
    1.97 +IMPORT_C int g_stat      (const gchar *filename,
    1.98 +                 struct stat *buf);
    1.99 +
   1.100 +IMPORT_C int g_lstat     (const gchar *filename,
   1.101 +                 struct stat *buf);
   1.102 +
   1.103 +IMPORT_C int g_unlink    (const gchar *filename);
   1.104 +
   1.105 +IMPORT_C int g_remove    (const gchar *filename);
   1.106 +
   1.107 +IMPORT_C int g_rmdir (const gchar *filename);
   1.108 +
   1.109 +IMPORT_C FILE *g_fopen   (const gchar *filename,
   1.110 +                 const gchar *mode);
   1.111 +
   1.112 +IMPORT_C FILE *g_freopen (const gchar *filename,
   1.113 +                 const gchar *mode,
   1.114 +                 FILE        *stream);
   1.115 +
   1.116 +#endif /* G_OS_UNIX */
   1.117 +
   1.118 +G_END_DECLS
   1.119 +
   1.120 +#endif /* __G_STDIO_H__ */