Woolz Image Processing  Version 1.7.5
bibFile.h
Go to the documentation of this file.
1 #ifndef BIBFILE_H
2 #define BIBFILE_H
3 #if defined(__GNUC__)
4 #ident "University of Edinburgh $Id: dfb46d3cb9fb45092c0c9e68fa015d1db3fc1e0c $"
5 #else
6 static char _bibFile_h[] = "University of Edinburgh $Id: dfb46d3cb9fb45092c0c9e68fa015d1db3fc1e0c $";
7 #endif
8 /*!
9 * \file libbibfile/bibFile.h
10 * \author Bill Hill
11 * \date March 1999
12 * \version $Id: dfb46d3cb9fb45092c0c9e68fa015d1db3fc1e0c $
13 * \par
14 * Address:
15 * MRC Human Genetics Unit,
16 * MRC Institute of Genetics and Molecular Medicine,
17 * University of Edinburgh,
18 * Western General Hospital,
19 * Edinburgh, EH4 2XU, UK.
20 * \par
21 * Copyright (C), [2012],
22 * The University Court of the University of Edinburgh,
23 * Old College, Edinburgh, UK.
24 *
25 * This program is free software; you can redistribute it and/or
26 * modify it under the terms of the GNU General Public License
27 * as published by the Free Software Foundation; either version 2
28 * of the License, or (at your option) any later version.
29 *
30 * This program is distributed in the hope that it will be
31 * useful but WITHOUT ANY WARRANTY; without even the implied
32 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
33 * PURPOSE. See the GNU General Public License for more
34 * details.
35 *
36 * You should have received a copy of the GNU General Public
37 * License along with this program; if not, write to the Free
38 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
39 * Boston, MA 02110-1301, USA.
40 * \brief Types and constants for the bibtex based file syntax
41 * used for serial section data, ....
42 * \ingroup bibfile
43 */
44 
45 #ifndef WLZ_EXT_BIND
46 #ifdef __cplusplus
47 extern "C" {
48 #endif /* __cplusplus */
49 #endif /* WLZ_EXT_BIND */
50 
51 #include <stdio.h>
52 #include <Alc.h>
53 
54 typedef enum
55 {
62 } BibFileError;
63 
64 
65 typedef struct _BibFileField
66 {
67  char *name;
68  char *value;
70 } BibFileField;
71 
72 typedef struct
73 {
74  char *name;
75  char *id;
78 
79 /* From bibFileAlloc.c */
81  char *name,
82  char *id,
83  BibFileField *field);
85  char *name,
86  char *value,
89  char *name,
90  char *value,
91  ...);
93  BibFileField *field0,
94  BibFileField *field1,
95  ...);
96 extern void BibFileRecordFree(
97  BibFileRecord **record);
98 extern void BibFileFieldFree(
99  BibFileField **field);
100 extern char *BibFileStrDup(
101  const char *s1);
102 
103 /* From bibFileIO.c */
104 extern BibFileError BibFileRecordRead(
105  BibFileRecord **record,
106  char **eMsg,
107  FILE *fP);
108 extern BibFileError BibFileRecordWrite(
109  FILE *fP,
110  char **eMsg,
111  BibFileRecord *record);
112 extern BibFileError BibFileFieldRead(
113  BibFileField **field,
114  char **eMsg,
115  int *endFlag,
116  FILE *fP);
117 extern BibFileError BibFileFieldWrite(
118  FILE *fP,
119  char **eMsg,
120  BibFileField *field);
121 extern BibFileError BibFileEscapeRestrictedChar(
122  char *pString,
123  char **outString);
124 extern BibFileError BibFileUnEscapeRestrictedChar(
125  char *pString,
126  char **outString);
127 /* From bibFileParse.c */
129  BibFileField *topField,
130  void *value,
131  char *fmt,
132  char *name,
133  ...);
134 
135 
136 #ifndef WLZ_EXT_BIND
137 #ifdef __cplusplus
138 }
139 #endif /* __cplusplus */
140 #endif /* WLZ_EXT_BIND */
141 
142 #endif /* BIBFILE_H */
Definition: bibFile.h:57
Definition: bibFile.h:65
char * value
Definition: bibFile.h:68
Main (top-level) header file for the Woolz type allocation library.
Definition: bibFile.h:58
Definition: bibFile.h:56
char * name
Definition: bibFile.h:67
BibFileField * BibFileFieldJoin(BibFileField *field0, BibFileField *field1,...)
Given a NULL terminated varargs list of fields, these are joined by filling in the appropriate next f...
Definition: bibFileAlloc.c:257
BibFileField * BibFileFieldMakeVa(char *name, char *value,...)
Given a list of field name and value string pairs which is terminated by a NULL. A hierarchy of new f...
Definition: bibFileAlloc.c:215
Definition: bibFile.h:60
BibFileError BibFileUnEscapeRestrictedChar(char *pString, char **outString)
Replace any special caracter with ESC+spacial char.
Definition: bibFileIO.c:928
void BibFileRecordFree(BibFileRecord **record)
Free&#39;s the given record and sets it to NULL.
Definition: bibFileAlloc.c:76
BibFileError
Definition: bibFile.h:54
BibFileError BibFileRecordWrite(FILE *fP, char **eMsg, BibFileRecord *record)
Write a bibtex style record to the given stream.
Definition: bibFileIO.c:254
BibFileField * field
Definition: bibFile.h:76
BibFileError BibFileEscapeRestrictedChar(char *pString, char **outString)
Replace any special character with ESC+spacial char.
Definition: bibFileIO.c:837
BibFileField * BibFileFieldMake(char *name, char *value, BibFileField *next)
Given field name and value strings and a field pointer for the next field, a new field is created...
Definition: bibFileAlloc.c:168
char * id
Definition: bibFile.h:75
Definition: bibFile.h:59
BibFileError BibFileFieldWrite(FILE *fP, char **eMsg, BibFileField *field)
Write a bibtex style field to the given stream.
Definition: bibFileIO.c:428
int BibFileFieldParseFmt(BibFileField *topField, void *value, char *fmt, char *name,...)
Given the top most field from which to parse fields and a NULL terminated varargs list of field value...
Definition: bibFileParse.c:75
void BibFileFieldFree(BibFileField **field)
Recursively free&#39;s the given field and sets it to NULL.
Definition: bibFileAlloc.c:98
struct _BibFileField BibFileField
char * name
Definition: bibFile.h:74
BibFileError BibFileRecordRead(BibFileRecord **record, char **eMsg, FILE *fP)
Read a bibtex style record from the given stream and allocate storage as required.
Definition: bibFileIO.c:186
BibFileError BibFileFieldRead(BibFileField **field, char **eMsg, int *endFlag, FILE *fP)
Read a bibtex style field from the given stream and allocate storage as required. ...
Definition: bibFileIO.c:348
struct _BibFileField * next
Definition: bibFile.h:69
BibFileRecord * BibFileRecordMake(char *name, char *id, BibFileField *field)
Given record name and id strings and a field pointer a new record is created.
Definition: bibFileAlloc.c:124
char * BibFileStrDup(const char *s1)
Definition: bibFile.h:72
Definition: bibFile.h:61