1 /* 2 $Id: arguments.h 2618 2021-04-25 11:11:11Z soci $ 3 4 This program is free software; you can redistribute it and/or modify 5 it under the terms of the GNU General Public License as published by 6 the Free Software Foundation; either version 2 of the License, or 7 (at your option) any later version. 8 9 This program is distributed in the hope that it will be useful, 10 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 GNU General Public License for more details. 13 14 You should have received a copy of the GNU General Public License along 15 with this program; if not, write to the Free Software Foundation, Inc., 16 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 17 18 */ 19 #ifndef ARGUMENTS_H 20 #define ARGUMENTS_H 21 #include "stdbool.h" 22 #include "inttypes.h" 23 24 typedef enum Output_types { 25 OUTPUT_CBM, OUTPUT_RAW, OUTPUT_NONLINEAR, OUTPUT_FLAT, OUTPUT_XEX, 26 OUTPUT_APPLE, OUTPUT_IHEX, OUTPUT_SREC 27 } Output_types; 28 29 typedef enum Symbollist_types { 30 LABEL_64TASS, LABEL_VICE, LABEL_VICE_NUMERIC, LABEL_DUMP, LABEL_EXPORT 31 } Symbollist_types; 32 33 typedef enum Caret_types { 34 CARET_ALWAYS, CARET_MACRO, CARET_NEVER 35 } Caret_types; 36 37 struct file_s; 38 39 struct output_s { 40 const char *name; 41 const char *section; 42 Output_types mode; 43 bool append; 44 bool longaddr; 45 }; 46 47 struct error_output_s { 48 const char *name; 49 Caret_types caret; 50 bool warning; 51 bool no_output; 52 bool append; 53 }; 54 55 struct symbol_output_s { 56 const char *name; 57 const char *space; 58 Symbollist_types mode; 59 bool append; 60 }; 61 62 struct list_output_s { 63 const char *name; 64 bool monitor; 65 bool source; 66 bool linenum; 67 bool verbose; 68 }; 69 70 struct arguments_s { 71 bool quiet; 72 bool to_ascii; 73 bool longbranch; 74 bool tasmcomp; 75 bool make_phony; 76 uint8_t caseinsensitive; 77 struct output_s *output; 78 size_t output_len; 79 const struct cpu_s *cpumode; 80 struct symbol_output_s *symbol_output; 81 size_t symbol_output_len; 82 struct list_output_s list; 83 const char *make; 84 struct error_output_s error; 85 unsigned int tab_size; 86 }; 87 88 struct diagnostics_s { 89 bool shadow; 90 bool strict_bool; 91 bool optimize; 92 bool implied_reg; 93 bool jmp_bug; 94 struct { 95 bool pc; 96 bool mem; 97 bool addr; 98 bool dpage; 99 bool bank0; 100 bool pbank; 101 } wrap; 102 bool label_left; 103 bool branch_page; 104 bool deprecated; 105 bool old_equal; 106 bool portable; 107 struct { 108 bool macro; 109 bool consts; 110 bool label; 111 bool variable; 112 } unused; 113 bool case_symbol; 114 bool immediate; 115 bool float_compare; 116 bool leading_zeros; 117 bool alias; 118 bool pitfalls; 119 bool star_assign; 120 bool ignored; 121 bool long_branch; 122 bool altmode; 123 bool page; 124 bool macro_prefix; 125 bool float_round; 126 bool size_larger; 127 }; 128 129 extern int testarg(int *, char ***, struct file_s *); 130 extern struct arguments_s arguments; 131 extern struct diagnostics_s diagnostics, diagnostic_errors; 132 133 #endif 134