1 <!-- Copyright (C) 2003 Red Hat, Inc. -->
2 <!-- This material may be distributed only subject to the terms -->
3 <!-- and conditions set forth in the Open Publication License, v1.0 -->
4 <!-- or later (the latest version is presently available at -->
5 <!-- http://www.opencontent.org/openpub/). -->
6 <!-- Distribution of the work or derivative of the work in any -->
7 <!-- standard (paper) book form is prohibited unless prior -->
8 <!-- permission is obtained from the copyright holder. -->
13 ><meta name="MSSmartTagsPreventParsing" content="TRUE">
16 CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
19 TITLE="The eCos Component Writer's Guide"
20 HREF="cdl-guide.html"><LINK
22 TITLE="CDL Language Specification"
23 HREF="reference.html"><LINK
26 HREF="ref.define.html"><LINK
29 HREF="ref.define-header.html"></HEAD
40 SUMMARY="Header navigation table"
52 > Component Writer's Guide</TH
60 HREF="ref.define.html"
74 HREF="ref.define-header.html"
85 NAME="REF.DEFINE-FORMAT"><SPAN
99 > -- Control how an option's value will appear in the
100 configuration header file.</DIV
102 CLASS="REFSYNOPSISDIV"
114 >cdl_option <name> {
115 define_format <format string>
130 >For active options with the <TT
134 active and enabled options with the <TT
138 flavor, the configuration tools will normally generate two
142 > in the package's configuration header
143 file. These take the following forms:</P
151 CLASS="PROGRAMLISTING"
152 >#define <name> <value>
153 #define <name>_<value></PRE
161 > property can be used to control exactly what
162 appears as the value for the first of these
166 >. For example, the following can be used
167 to output some configuration data as a C string:</P
175 CLASS="PROGRAMLISTING"
176 >cdl_option <name> {
178 define -format="\\\"%s\\\"" <symbol>
184 >The implementation of <SPAN
187 > involves concatenating the Tcl
191 >, the format string, and the string
192 representation of the option's value, and evaluating this in a Tcl
193 interpreter. Therefore the format string will be processed twice by a
194 Tcl parser, and appropriate care has to be taken with quoting.</P
199 > will be generated only if is a
200 valid C preprocessor macro symbol, and is not affected by the
204 > property. Also, the property is only relevant for
212 > flavor, and cannot be used in
213 conjunction with the <SPAN
216 > property since it makes no sense to
217 specify the format if no <TT
240 >Because the Tcl interpreter's <TT
244 used, this property is subject to any problems with the implementation
245 of this in the Tcl library. Generally there should be no problems with
246 string data or with integers up to 32 bits, but there may well be
247 problems if 64-bit data is involved. This issue may be addressed in a
268 CLASS="PROGRAMLISTING"
269 >cdl_option CYGNUM_UITRON_VER_ID {
270 display "OS identification"
272 legal_values 0 to 0xFFFF
274 define_format "0x%04x"
276 This value is returned in the 'id'
277 field of the T_VER structure in
278 response to a get_ver() system call."
293 HREF="ref.define.html"
300 HREF="ref.define-header.html"
307 HREF="ref.define-proc.html"
314 HREF="ref.if-define.html"
321 HREF="ref.no-define.html"
333 SUMMARY="Footer navigation table"
344 HREF="ref.define.html"
353 HREF="cdl-guide.html"
362 HREF="ref.define-header.html"
381 HREF="reference.html"