1a9b3ff1aSjsg /*- 2a9b3ff1aSjsg * Copyright (c) 2010 The NetBSD Foundation, Inc. 3a9b3ff1aSjsg * All rights reserved. 4a9b3ff1aSjsg * 5a9b3ff1aSjsg * This code is derived from software contributed to The NetBSD Foundation 6a9b3ff1aSjsg * by David A. Holland. 7a9b3ff1aSjsg * 8a9b3ff1aSjsg * Redistribution and use in source and binary forms, with or without 9a9b3ff1aSjsg * modification, are permitted provided that the following conditions 10a9b3ff1aSjsg * are met: 11a9b3ff1aSjsg * 1. Redistributions of source code must retain the above copyright 12a9b3ff1aSjsg * notice, this list of conditions and the following disclaimer. 13a9b3ff1aSjsg * 2. Redistributions in binary form must reproduce the above copyright 14a9b3ff1aSjsg * notice, this list of conditions and the following disclaimer in the 15a9b3ff1aSjsg * documentation and/or other materials provided with the distribution. 16a9b3ff1aSjsg * 17a9b3ff1aSjsg * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 18a9b3ff1aSjsg * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19a9b3ff1aSjsg * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 20a9b3ff1aSjsg * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 21a9b3ff1aSjsg * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22a9b3ff1aSjsg * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23a9b3ff1aSjsg * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24a9b3ff1aSjsg * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25a9b3ff1aSjsg * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26a9b3ff1aSjsg * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27a9b3ff1aSjsg * POSSIBILITY OF SUCH DAMAGE. 28a9b3ff1aSjsg */ 29a9b3ff1aSjsg 30*f9343feaSjsg #include "bool.h" 31a9b3ff1aSjsg 32a9b3ff1aSjsg struct mode { 33a9b3ff1aSjsg bool werror; 34a9b3ff1aSjsg bool input_allow_dollars; 35a9b3ff1aSjsg unsigned input_tabstop; 36a9b3ff1aSjsg bool do_stdinc; 37a9b3ff1aSjsg bool do_stddef; 38a9b3ff1aSjsg bool do_output; 39a9b3ff1aSjsg bool output_linenumbers; 40*f9343feaSjsg bool output_cheaplinenumbers; 41a9b3ff1aSjsg bool output_retain_comments; 42a9b3ff1aSjsg const char *output_file; 43a9b3ff1aSjsg bool do_depend; 44a9b3ff1aSjsg bool depend_report_system; 45a9b3ff1aSjsg bool depend_assume_generated; 46a9b3ff1aSjsg bool depend_issue_fakerules; 47a9b3ff1aSjsg bool depend_quote_target; 48a9b3ff1aSjsg const char *depend_target; 49a9b3ff1aSjsg const char *depend_file; 50a9b3ff1aSjsg bool do_macrolist; 51a9b3ff1aSjsg bool macrolist_include_stddef; 52a9b3ff1aSjsg bool macrolist_include_expansions; 53a9b3ff1aSjsg bool do_trace; 54a9b3ff1aSjsg bool trace_namesonly; 55a9b3ff1aSjsg bool trace_indented; 56a9b3ff1aSjsg }; 57a9b3ff1aSjsg 58a9b3ff1aSjsg struct warns { 59a9b3ff1aSjsg bool endiflabels; 60a9b3ff1aSjsg bool nestcomment; 61a9b3ff1aSjsg bool undef; 62a9b3ff1aSjsg bool unused; 63a9b3ff1aSjsg }; 64a9b3ff1aSjsg 65a9b3ff1aSjsg extern struct mode mode; 66a9b3ff1aSjsg extern struct warns warns; 67