[421b7d2] | 1 | /* commands.h |
---|
[d1b1380] | 2 | * Header file for code for directives |
---|
[d624d86] | 3 | * Copyright (C) 1994-2024 Olly Betts |
---|
[846746e] | 4 | * |
---|
[89231c4] | 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. |
---|
[846746e] | 9 | * |
---|
| 10 | * This program is distributed in the hope that it will be useful, |
---|
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
[89231c4] | 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 13 | * GNU General Public License for more details. |
---|
[846746e] | 14 | * |
---|
[89231c4] | 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 |
---|
[ecbc6c18] | 17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
---|
[d1b1380] | 18 | */ |
---|
| 19 | |
---|
[0532954] | 20 | #include "str.h" |
---|
| 21 | |
---|
[85c0078] | 22 | int get_length_units(int quantity); |
---|
| 23 | int get_angle_units(int quantity); |
---|
| 24 | |
---|
| 25 | extern const real factor_tab[]; |
---|
| 26 | extern const int units_to_msgno[]; |
---|
| 27 | |
---|
| 28 | #define get_units_factor(U) (factor_tab[(U)]) |
---|
| 29 | #define get_units_string(U) (msg(units_to_msgno[(U)])) |
---|
| 30 | |
---|
[a9f5117] | 31 | void handle_command(void); |
---|
| 32 | void default_all(settings *s); |
---|
[d1b1380] | 33 | |
---|
[be97baf] | 34 | void default_units(settings *s); |
---|
| 35 | void default_calib(settings *s); |
---|
| 36 | |
---|
[da9163b] | 37 | void pop_settings(void); |
---|
[d624d86] | 38 | void invalidate_pj_cached(void); |
---|
[37d6b84] | 39 | void report_declination(settings *p); |
---|
[69a9e01] | 40 | void set_declination_location(real x, real y, real z, const char *proj_str); |
---|
[647407d] | 41 | |
---|
[b5a3219] | 42 | void copy_on_write_meta(settings *s); |
---|
| 43 | |
---|
[0532954] | 44 | extern string token; |
---|
[87d7f7c] | 45 | extern string uctoken; |
---|
[a9f5117] | 46 | void get_token(void); |
---|
[f6bdb01] | 47 | void get_token_no_blanks(void); |
---|
[08610e6] | 48 | // Read a token as defined in Walls format. |
---|
| 49 | void get_token_walls(void); |
---|
[d1b1380] | 50 | |
---|
[4dc7afd] | 51 | void get_word(void); |
---|
| 52 | |
---|
[63c6b49] | 53 | typedef struct { const char *sz; int tok; } sztok; |
---|
[a9f5117] | 54 | int match_tok(const sztok *tab, int tab_size); |
---|
[d1b1380] | 55 | |
---|
[63c6b49] | 56 | #define TABSIZE(T) ((sizeof(T) / sizeof(sztok)) - 1) |
---|
[5d59477] | 57 | |
---|
| 58 | void scan_compass_station_name(prefix *stn); |
---|
| 59 | void update_output_separator(void); |
---|