ccutil/scanutils.h

Go to the documentation of this file.
00001 
00032 #ifndef SCANUTILS_H
00033 #define SCANUTILS_H
00034 
00035 #ifdef EMBEDDED
00036 
00037 #include <stdint.h>
00038 #include <stddef.h>
00039 #include <stdio.h>
00040 #include <klibc/extern.h>
00041 
00042 // Attempts to parse the given file stream s as an integer of the base
00043 // 'base'. Returns the first successfully parsed integer as a uintmax_t, or
00044 // 0, if none was found.
00045 uintmax_t streamtoumax(FILE* s, int base);
00046 
00047 // Parse a file stream according to the given format. See the fscanf manpage
00048 // for more information, as this function attempts to mimic its behavior.
00049 // Note that scientific loating-point notation is not supported.
00050 int fscanf(FILE* stream, const char *format, ...);
00051 
00052 // Parse a file stream according to the given format. See the fscanf manpage
00053 // for more information, as this function attempts to mimic its behavior.
00054 // Note that scientific loating-point notation is not supported.
00055 int vfscanf(FILE* stream, const char *format, va_list ap);
00056 
00057 // Create a file at the specified path. See the creat manpage for more 
00058 // information, as this function attempts to mimic its behavior.
00059 int creat(const char *pathname, mode_t mode);
00060 
00061 // Convert the specified C-String to a float. Returns the first parsed float,
00062 // or 0.0 if no floating point value could be found. Note that scientific
00063 // floating-point notation is not supported.
00064 double strtofloat(const char* s);
00065 
00066 #endif //EMBEDDED
00067 
00068 #endif

Generated on Wed Feb 28 19:49:09 2007 for Tesseract by  doxygen 1.5.1