EDK2 doxygen online documents - Firmware Encoding Index 1
EDK2 doxygen online documents - Firmware Encoding Index

StdLib/LibC/Stdio/local.h

Go to the documentation of this file.
00001 
00048 #include "wcio.h"
00049 #include "fileext.h"
00050 
00051 extern int      __sflush(FILE *);
00052 extern FILE    *__sfp(void);
00053 extern int      __srefill(FILE *);
00054 extern int      __sread(void *, char *, int);
00055 extern int      __swrite(void *, char const *, int);
00056 extern fpos_t   __sseek(void *, fpos_t, int);
00057 extern int      __sclose(void *);
00058 extern void     __sinit(void);
00059 extern void     _cleanup(void);
00060 //extern void   (*__cleanup)(void);   // Now in MainData.h.  Ref. as gMD->cleanup
00061 extern void     __smakebuf(FILE *);
00062 extern int      __swhatbuf(FILE *, size_t *, int *);
00063 extern int      _fwalk(int (*)(FILE *));
00064 extern char    *_mktemp(char *);
00065 extern int      __swsetup(FILE *);
00066 extern int      __sflags(const char *, int *);
00067 extern int      __svfscanf(FILE * __restrict, const char * __restrict, va_list)
00068                             __attribute__((__format__(__scanf__, 2, 0)));
00069 extern int      __svfscanf_unlocked(FILE * __restrict, const char * __restrict, va_list)
00070                             __attribute__((__format__(__scanf__, 2, 0)));
00071 extern int      __vfprintf_unlocked(FILE * __restrict, const char * __restrict, va_list);
00072 
00073 
00074 extern int      __sdidinit;
00075 
00076 extern int      __gettemp(char *, int *, int);
00077 
00078 extern wint_t   __fgetwc_unlock(FILE *);
00079 extern wint_t   __fputwc_unlock(wchar_t, FILE *);
00080 
00081 extern char    *__fgetstr(FILE * __restrict, size_t * __restrict, int);
00082 extern int      __slbexpand(FILE *, size_t);
00083 extern int      __vfwprintf_unlocked(FILE *, const wchar_t *, va_list);
00084 extern int      __vfwscanf_unlocked(FILE * __restrict, const wchar_t * __restrict, va_list);
00085 
00086 /*
00087  * Return true iff the given FILE cannot be written now.
00088  */
00089 #define cantwrite(fp) \
00090   ((((fp)->_flags & __SWR) == 0 || (fp)->_bf._base == NULL) && __swsetup(fp))
00091 
00092 /*
00093  * Test whether the given stdio file has an active ungetc buffer;
00094  * release such a buffer, without restoring ordinary unread data.
00095  */
00096 #define HASUB(fp) (_UB(fp)._base != NULL)
00097 #define FREEUB(fp) { \
00098     if (_UB(fp)._base != (fp)->_ubuf) \
00099       free((char *)_UB(fp)._base); \
00100     _UB(fp)._base = NULL; \
00101   }
00102 
00103 /*
00104  * test for an fgetln() buffer.
00105  */
00106 #define HASLB(fp) ((fp)->_lb._base != NULL)
00107 #define FREELB(fp) { \
00108     free((char *)(fp)->_lb._base); \
00109     (fp)->_lb._base = NULL; \
00110   }
00111 
00112 extern void __flockfile_internal  (FILE *, int);
00113 extern void __funlockfile_internal(FILE *, int);
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Defines