changed reading hint
[gromacs/adressmacs.git] / include / strdb.h
blobc083261bd34ebf4731debf5b7d250df701400da3
1 /*
2 * $Id$
3 *
4 * This source code is part of
5 *
6 * G R O M A C S
7 *
8 * GROningen MAchine for Chemical Simulations
9 *
10 * VERSION 2.0
12 * Copyright (c) 1991-1999
13 * BIOSON Research Institute, Dept. of Biophysical Chemistry
14 * University of Groningen, The Netherlands
16 * Please refer to:
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
23 * or e-mail to:
24 * gromacs@chem.rug.nl
26 * And Hey:
27 * Green Red Orange Magenta Azure Cyan Skyblue
30 #ifndef _strdb_h
31 #define _strdb_h
33 static char *SRCID_strdb_h = "$Id$";
35 #ifdef HAVE_IDENT
36 #ident "@(#) strdb.h 1.9 2/2/97"
37 #endif /* HAVE_IDENT */
39 #include "typedefs.h"
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
64 * -1 if not 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.
79 #endif /* _strdb_h */