4 * This source code is part of
8 * GROningen MAchine for Chemical Simulations
12 * Copyright (c) 1991-1999
13 * BIOSON Research Institute, Dept. of Biophysical Chemistry
14 * University of Groningen, The Netherlands
17 * GROMACS: A message-passing parallel molecular dynamics implementation
18 * H.J.C. Berendsen, D. van der Spoel and R. van Drunen
19 * Comp. Phys. Comm. 91, 43-56 (1995)
21 * Also check out our WWW page:
22 * http://md.chem.rug.nl/~gmx
27 * Green Red Orange Magenta Azure Cyan Skyblue
33 static char *SRCID_strdb_h
= "$Id$";
36 #ident "@(#) strdb.h 1.9 2/2/97"
37 #endif /* HAVE_IDENT */
41 extern bool get_a_line(FILE *fp
,char line
[],int n
);
42 /* Read a line of at most n characters form *fp to line.
43 * Comment ';...' and leading spaces are removed, empty lines are skipped.
44 * Return FALSE when eof.
47 extern bool get_header(char line
[],char header
[]);
48 /* Read a header between '[' and ']' from line to header.
49 * Returns FALSE no header is found.
52 extern int fget_lines(FILE *in
,char ***strings
);
53 /* Read an array of lines from file in. strings should be
54 * the address of an array of strings (to be malloced by this routine)
55 * return the number of strings.
57 extern int get_lines(char *db
,char ***strings
);
58 /* Open file db, or if non-existant file $GMXLIB/db and read strings
59 * return the number of strings.
62 extern int search_str(int nstr
,char **str
,char *key
);
63 /* Search an array of strings for key, return the index if found
67 extern int get_strings(char *db
,char ***strings
);
68 /* Read an array of strings from file db or $GMXLIB/db. strings should be
69 * the address of an array of strings (to be malloced by this routine)
70 * return the number of strings.
72 extern int get_file(char *db
,char ***strings
);
73 /* Read an array of strings from file db or $GMXLIB/db. strings should be
74 * the address of an array of strings (to be malloced by this routine)
75 * Does not need number of lines as first line in the file.
76 * return the number of strings.