Woolz Image Processing Version 1.4.0
bibFile.h
Go to the documentation of this file.
00001 #ifndef BIBFILE_H
00002 #define BIBFILE_H
00003 #if defined(__GNUC__)
00004 #ident "University of Edinburgh $Id: dfb46d3cb9fb45092c0c9e68fa015d1db3fc1e0c $"
00005 #else
00006 static char _bibFile_h[] = "University of Edinburgh $Id: dfb46d3cb9fb45092c0c9e68fa015d1db3fc1e0c $";
00007 #endif
00008 /*!
00009 * \file         libbibfile/bibFile.h
00010 * \author       Bill Hill
00011 * \date         March 1999
00012 * \version      $Id: dfb46d3cb9fb45092c0c9e68fa015d1db3fc1e0c $
00013 * \par
00014 * Address:
00015 *               MRC Human Genetics Unit,
00016 *               MRC Institute of Genetics and Molecular Medicine,
00017 *               University of Edinburgh,
00018 *               Western General Hospital,
00019 *               Edinburgh, EH4 2XU, UK.
00020 * \par
00021 * Copyright (C), [2012],
00022 * The University Court of the University of Edinburgh,
00023 * Old College, Edinburgh, UK.
00024 * 
00025 * This program is free software; you can redistribute it and/or
00026 * modify it under the terms of the GNU General Public License
00027 * as published by the Free Software Foundation; either version 2
00028 * of the License, or (at your option) any later version.
00029 *
00030 * This program is distributed in the hope that it will be
00031 * useful but WITHOUT ANY WARRANTY; without even the implied
00032 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00033 * PURPOSE.  See the GNU General Public License for more
00034 * details.
00035 *
00036 * You should have received a copy of the GNU General Public
00037 * License along with this program; if not, write to the Free
00038 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00039 * Boston, MA  02110-1301, USA.
00040 * \brief        Types and constants for the bibtex based file syntax
00041 *               used for serial section data, ....
00042 * \ingroup      bibfile
00043 */
00044 
00045 #ifndef WLZ_EXT_BIND
00046 #ifdef  __cplusplus
00047 extern "C" {
00048 #endif /* __cplusplus */
00049 #endif /* WLZ_EXT_BIND */
00050 
00051 #include <stdio.h>
00052 #include <Alc.h>
00053 
00054 typedef enum
00055 {
00056   BIBFILE_ER_NONE               = 0,
00057   BIBFILE_ER_MALLOC,
00058   BIBFILE_ER_SYNTAX,
00059   BIBFILE_ER_WRITE,
00060   BIBFILE_ER_READ,
00061   BIBFILE_ER_EOF
00062 } BibFileError;
00063 
00064 
00065 typedef struct _BibFileField
00066 {
00067   char          *name;
00068   char          *value;
00069   struct _BibFileField *next;
00070 } BibFileField;
00071 
00072 typedef struct
00073 {
00074   char          *name;
00075   char          *id;
00076   BibFileField  *field;
00077 } BibFileRecord;
00078 
00079 /* From bibFileAlloc.c */
00080 extern BibFileRecord            *BibFileRecordMake(
00081                                   char *name,
00082                                   char *id,
00083                                   BibFileField *field);
00084 extern BibFileField             *BibFileFieldMake(
00085                                   char *name,
00086                                   char *value,
00087                                   BibFileField *next);
00088 extern BibFileField             *BibFileFieldMakeVa(
00089                                   char *name,
00090                                   char *value,
00091                                   ...);
00092 extern BibFileField             *BibFileFieldJoin(
00093                                   BibFileField *field0,
00094                                   BibFileField *field1,
00095                                   ...);
00096 extern void                     BibFileRecordFree(
00097                                   BibFileRecord **record);
00098 extern void                     BibFileFieldFree(
00099                                   BibFileField **field);
00100 extern char                     *BibFileStrDup(
00101                                   const char *s1);              
00102 
00103 /* From bibFileIO.c */
00104 extern BibFileError             BibFileRecordRead(
00105                                   BibFileRecord **record,
00106                                   char **eMsg,
00107                                   FILE *fP);
00108 extern BibFileError             BibFileRecordWrite(
00109                                   FILE *fP,
00110                                   char **eMsg,
00111                                   BibFileRecord *record);
00112 extern BibFileError             BibFileFieldRead(
00113                                   BibFileField **field,
00114                                   char **eMsg,
00115                                   int *endFlag,
00116                                   FILE *fP);
00117 extern BibFileError             BibFileFieldWrite(
00118                                   FILE *fP,
00119                                   char **eMsg,
00120                                   BibFileField *field);
00121 extern BibFileError             BibFileEscapeRestrictedChar(
00122                                   char *pString,
00123                                   char **outString);
00124 extern BibFileError             BibFileUnEscapeRestrictedChar(
00125                                   char *pString,
00126                                   char **outString);
00127 /* From bibFileParse.c */
00128 int                             BibFileFieldParseFmt(
00129                                   BibFileField *topField,
00130                                   void *value,
00131                                   char *fmt,
00132                                   char *name,
00133                                   ...);
00134 
00135 
00136 #ifndef WLZ_EXT_BIND
00137 #ifdef  __cplusplus
00138 }
00139 #endif /* __cplusplus */
00140 #endif /* WLZ_EXT_BIND */
00141 
00142 #endif /* BIBFILE_H */