Fix coding style
[survex.git] / src / commands.h
blob1c2ae69792416c3c45731fc6275281e3d100a935
1 /* commands.h
2 * Header file for code for directives
3 * Copyright (C) 1994-2003,2014,2015 Olly Betts
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 int get_length_units(int quantity);
21 int get_angle_units(int quantity);
23 extern const real factor_tab[];
24 extern const int units_to_msgno[];
26 #define get_units_factor(U) (factor_tab[(U)])
27 #define get_units_string(U) (msg(units_to_msgno[(U)]))
29 void handle_command(void);
30 void default_all(settings *s);
32 void default_units(settings *s);
33 void default_calib(settings *s);
35 void free_settings(settings *p);
37 void copy_on_write_meta(settings *s);
39 extern char *buffer;
40 void get_token(void);
41 void get_token_no_blanks(void);
43 typedef struct { const char *sz; int tok; } sztok;
44 int match_tok(const sztok *tab, int tab_size);
46 #define TABSIZE(T) ((sizeof(T) / sizeof(sztok)) - 1)