Eneboo - Documentación para desarrolladores
|
00001 /****************************************************************************** 00002 * csv.h 00003 ****************************************************************************** 00004 * dbf Reader and Converter for dBASE files 00005 * Author: Bjoern Berg <clergyman@gmx.de> 00006 * 00007 ****************************************************************************** 00008 * This includes enable dbf to write CSV files 00009 ****************************************************************************** 00010 * History: 00011 * $Log: csv.h,v $ 00012 * Revision 1.4 2003/11/11 15:07:08 rollin_hand 00013 * added cvs keyword log: 00014 * 00015 * 00016 ******************************************************************************/ 00017 00018 #ifndef _ANUBISNET_CSV_ 00019 #define _ANUBISNET_CSV_ 00020 00021 #include <stdio.h> 00022 #include <fcntl.h> 00023 #include <string.h> 00024 #include <stdlib.h> 00025 00026 #ifdef __unix__ 00027 #include <sys/stat.h> 00028 #include <unistd.h> 00029 #define NEWLINE_LENGTH 1 00030 #elif __MSDOS__ || _WIN32 00031 #include <io.h> 00032 #include <sys/stat.h> 00033 #define NEWLINE_LENGTH 2 00034 #else 00035 #define NEWLINE_LENGTH 1 00036 #endif 00037 00038 /* 00039 * Special anubisnet includes 00040 */ 00041 #include "tables.h" 00042 #include "an_string.h" 00043 #include "dbf.h" 00044 00045 int setCSVSep (FILE *fp, const struct DB_FIELD * header, 00046 int header_length, const char *input, const char *separator); 00047 int writeCSVHeader (FILE *fp, const struct DB_FIELD * header, 00048 int header_length, const char *input, const char *output); 00049 int writeCSVLine (FILE *fp, const struct DB_FIELD * header, const unsigned char *value, 00050 int header_length, const char *input, const char *output); 00051 #endif