Main Page | Data Structures | File List | Data Fields | Globals

clflags.h

Go to the documentation of this file.
00001 #ifndef _TOKE_CLFLAGS_H
00002 #define _TOKE_CLFLAGS_H
00003 
00004 /*
00005  *                     OpenBIOS - free your system!
00006  *                         ( FCode tokenizer )
00007  *
00008  *  This program is part of a free implementation of the IEEE 1275-1994
00009  *  Standard for Boot (Initialization Configuration) Firmware.
00010  *
00011  *  Copyright (C) 2001-2005 Stefan Reinauer, <stepan@openbios.org>
00012  *
00013  *  This program is free software; you can redistribute it and/or modify
00014  *  it under the terms of the GNU General Public License as published by
00015  *  the Free Software Foundation; version 2 of the License.
00016  *
00017  *  This program is distributed in the hope that it will be useful,
00018  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00019  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00020  *  GNU General Public License for more details.
00021  *
00022  *  You should have received a copy of the GNU General Public License
00023  *  along with this program; if not, write to the Free Software
00024  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA, 02110-1301 USA
00025  *
00026  */
00027 
00028 /* **************************************************************************
00029  *
00030  *      Function Prototypes and External declarations
00031  *          for Command-Line Flags Support
00032  *
00033  *      (C) Copyright 2005 IBM Corporation.  All Rights Reserved.
00034  *      Module Author:  David L. Paktor    dlpaktor@us.ibm.com
00035  *
00036  **************************************************************************** */
00037 
00038 /* **************************************************************************
00039  *
00040  *      Structure-Types:
00041  *          cl_flag_t            Data for recognizing and setting Command-Line
00042  *                                   Flags, and for displaying the help message
00043  *
00044  *      Function Prototypes / Functions Exported:
00045  *          set_cl_flag
00046  *          list_cl_flag_settings
00047  *          list_cl_flag_names          Display just the names of the CL Flags
00048  *          cl_flags_help
00049  *
00050  *      Global Variables Exported
00051  *                (These flags, which are set by the set_cl_flag() routine,
00052  *                     are used throughout the Tokenizer to control certain
00053  *                     non-Standard variant behaviors.)
00054  *          ibm_locals
00055  *          ibm_locals_legacy_separator
00056  *          ibm_legacy_separator_message
00057  *          enable_abort_quote
00058  *          sun_style_abort_quote
00059  *          string_remark_escape
00060  *          hex_remark_escape
00061  *          c_style_string_escape
00062  *          always_headers
00063  *          always_external
00064  *          verbose_dup_warning
00065  *          obso_fcode_warning
00066  *          trace_conditionals
00067  *          force_tokens_case
00068  *          force_lower_case_tokens
00069  *          big_end_pci_image_rev
00070  *          clflag_help
00071  *
00072  **************************************************************************** */
00073 
00074 /* **************************************************************************
00075  *          Structure-Type Name:    cl_flag_t
00076  *               Data for recognizing and setting Command-Line Flags,
00077  *                   and for displaying the help message
00078  *
00079  *   Fields:
00080  *       clflag_name     *char          CL Flag name, as entered by the user
00081  *       flag_var        *bool          Address of boolean ("flag") variable
00082  *       clflag_tabs     *char          Tabs to align the explanations, in
00083  *                                          the help message display
00084  *       clflag_expln    *char          Explanation, used in help message
00085  *
00086  *   Since this structure will be initialized by the program, and will not
00087  *       be added-to, we can structure it as purely an array, and have no
00088  *       need to treat it as a linked list, hence no link-field.
00089  *
00090  **************************************************************************** */
00091 
00092 #include "types.h"
00093 
00094 typedef struct cl_flag
00095     {
00096         char             *clflag_name;
00097         bool             *flag_var;
00098         char             *clflag_tabs;
00099         char             *clflag_expln;
00100     }  cl_flag_t ;
00101 
00102 
00103 /* **************************************************************************
00104  *
00105  *          Exported Global Variables
00106  *
00107  **************************************************************************** */
00108 
00109 extern bool ibm_locals;
00110 extern bool ibm_locals_legacy_separator;
00111 extern bool ibm_legacy_separator_message;
00112 extern bool enable_abort_quote;
00113 extern bool sun_style_abort_quote;
00114 extern bool abort_quote_throw;
00115 extern bool string_remark_escape;
00116 extern bool hex_remark_escape;
00117 extern bool c_style_string_escape;
00118 extern bool always_headers;
00119 extern bool always_external;
00120 extern bool verbose_dup_warning;
00121 extern bool obso_fcode_warning;
00122 extern bool trace_conditionals;
00123 extern bool big_end_pci_image_rev;
00124 
00125 extern bool force_tokens_case;
00126 extern bool force_lower_case_tokens;
00127 
00128 extern bool clflag_help;
00129 
00130 /* **************************************************************************
00131  *
00132  *          Exported Functions
00133  *
00134  **************************************************************************** */
00135 
00136 bool set_cl_flag(char *flag_name, bool print_message);
00137 void cl_flags_help(void);
00138 void list_cl_flag_names(void);
00139 void show_all_cl_flag_settings(bool from_src);
00140 void list_cl_flag_settings(void);
00141 void save_cl_flags(void);
00142 void reset_cl_flags(void);
00143 
00144 #endif   /*  _TOKE_CLFLAGS_H    */

Generated on Fri Aug 18 14:03:38 2006 for Toke1.0 by  doxygen 1.4.4