source: git/src/datain.h @ 53496ab3

RELEASE/1.2debug-cidebug-ci-sanitisersstereowalls-data
Last change on this file since 53496ab3 was da96015, checked in by Olly Betts <olly@…>, 11 years ago

src/,tests/: Report column numbers as well as line numbers for some
cavern errors and warnings, and update aven's cavern log parser to
handle these. Simplify handling of quantity lists to only recognise
'DEFAULT' as the first item. Add more testcases, expand some
existing testcases, and expected output for more.

  • Property mode set to 100644
File size: 1.6 KB
Line 
1/* datain.h
2 * Header file for code that...
3 * Reads in survey files, dealing with special characters, keywords & data
4 * Copyright (C) 1994-2002,2005,2010,2012 Olly Betts
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19 */
20
21#ifdef HAVE_SETJMP_H
22# include <setjmp.h>
23#endif
24
25#include <stdio.h> /* for FILE */
26
27typedef struct parse {
28   FILE *fh;
29   const char *filename;
30   unsigned int line;
31   long lpos;
32   bool reported_where;
33   struct parse *parent;
34#ifdef HAVE_SETJMP_H
35   jmp_buf jbSkipLine;
36#endif
37} parse;
38
39extern int ch;
40extern parse file;
41extern bool f_export_ok;
42
43#define nextch() (ch = GETC(file.fh))
44
45typedef struct {
46   long offset;
47   int ch;
48} filepos;
49
50void get_pos(filepos *fp);
51void set_pos(const filepos *fp);
52
53void skipblanks(void);
54
55/* reads complete data file */
56void data_file(const char *pth, const char *fnm);
57
58void skipline(void);
59
60void compile_warning(int en, ...);
61void compile_error(int en, ...);
62void compile_error_skip(int en, ...);
63
64void compile_error_token(int en);
Note: See TracBrowser for help on using the repository browser.