dtdtsfil.sgm 54 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091
  1. <!-- $XConsortium: dtdtsfil.sgm /main/11 1996/09/08 20:17:47 rws $ -->
  2. <!-- (c) Copyright 1995 Digital Equipment Corporation. -->
  3. <!-- (c) Copyright 1995 Hewlett-Packard Company. -->
  4. <!-- (c) Copyright 1995 International Business Machines Corp. -->
  5. <!-- (c) Copyright 1995 Sun Microsystems, Inc. -->
  6. <!-- (c) Copyright 1995 Novell, Inc. -->
  7. <!-- (c) Copyright 1995 FUJITSU LIMITED. -->
  8. <!-- (c) Copyright 1995 Hitachi. -->
  9. <refentry id="CDEMX.MAN94.rsml.1">
  10. <refmeta><refentrytitle>dtdtsfile</refentrytitle><manvolnum>special file</manvolnum>
  11. </refmeta>
  12. <refnamediv><refname><filename>dtdtsfile</filename></refname><refpurpose>
  13. format and location of desktop data type and action files</refpurpose></refnamediv>
  14. <!-- CDE Common Source Format, Version 1.0.0-->
  15. <!-- (c) Copyright 1993, 1994, 1995 Hewlett-Packard Company-->
  16. <!-- (c) Copyright 1993, 1994, 1995 International Business Machines Corp.-->
  17. <!-- (c) Copyright 1993, 1994, 1995 Sun Microsystems, Inc.-->
  18. <!-- (c) Copyright 1993, 1994, 1995 Novell, Inc.-->
  19. <refsynopsisdiv>
  20. <synopsis>set DtDbVersion=<emphasis>version_number</emphasis>
  21. set <emphasis>VariableName</emphasis>=<emphasis>variable_value</emphasis>
  22. <emphasis>RecordType record_name</emphasis>
  23. {
  24. # <emphasis>Comment</emphasis>
  25. <emphasis>FieldName field_value</emphasis>
  26. <emphasis>FieldName field_value</emphasis>
  27. ...
  28. }</synopsis>
  29. </refsynopsisdiv>
  30. <refsect1>
  31. <title>DESCRIPTION</title>
  32. <para>The &str-XZ; data types database provides definitions for the data types
  33. and actions recognized by &str-XZ; clients.</para>
  34. <para>The general syntax of the data types files is as described above in
  35. the SYNOPSIS section of this man page. The set of general constructs composing
  36. the database entries is as follows:</para>
  37. <refsect2>
  38. <title>Comments</title>
  39. <para>Any line whose first non-space character is # is treated as a comment
  40. line, and is ignored during the reading of the database file.</para>
  41. </refsect2>
  42. <refsect2>
  43. <title>Database Version</title>
  44. <para>The database loader supports a version number, which indicates the version
  45. of the database syntax used by a particular database file. If a database version
  46. number is not specified, then the database loader assumes that the file uses
  47. the version 1.0 syntax, described here. If a database file specifies a version
  48. number, then it must be the first non-blank, non-comment line in the database
  49. file; if the version is specified anywhere else in the file, then an error
  50. message is generated, and the remainder of that database file is ignored.
  51. The database version number is specified using the following syntax:</para>
  52. <informalexample remap="indent">
  53. <programlisting>set DtDbVersion=<emphasis>version_number</emphasis></programlisting>
  54. </informalexample>
  55. </refsect2>
  56. <refsect2>
  57. <title>String Variables</title>
  58. <para>Database records can reference string variables that are set within
  59. the database file. The scope of a string variable is restricted to only those
  60. record definitions within the database file defining the string variable.
  61. A string variable is defined using the following syntax:</para>
  62. <informalexample remap="indent">
  63. <programlisting>set <emphasis>VariableName</emphasis>=<emphasis>variable_value</emphasis></programlisting>
  64. </informalexample>
  65. <para>String variables are referenced using either of the standard shell variable
  66. referencing syntaxes: $<emphasis>variable_name</emphasis> or ${ <emphasis>variable_name</emphasis>}. A variable name can be made up of any of the alphanumeric
  67. characters and the underscore.</para>
  68. </refsect2>
  69. <refsect2>
  70. <title>Environment Variables</title>
  71. <para>Database records may refer to environment variables, using either of
  72. the standard shell variable referencing syntaxes: $<emphasis>environment_variable</emphasis> or ${<emphasis>environment_variable</emphasis>}. If the environment
  73. variable name conflicts with a string variable name, the string variable takes
  74. precedence.</para>
  75. </refsect2>
  76. <refsect2>
  77. <title>Line Continuation</title>
  78. <para>Any field within a record can be continued onto another line by ending
  79. the line with a \ character. The \ and any <keysym>blank</keysym>s following
  80. the \ and preceding the newline are discarded; leading <keysym>blank</keysym>s
  81. on the following line are preserved in the continued field.</para>
  82. </refsect2>
  83. <refsect2>
  84. <title>Record Name</title>
  85. <para>The first line of a record is made up of the record type, <emphasis>RecordType</emphasis> (one of: <systemitem class="Constant">DATA_ATTRIBUTES</systemitem>, <systemitem class="Constant">DATA_CRITERIA</systemitem> or <systemitem class="Constant">ACTION</systemitem>), followed by the record name, <emphasis>record_name</emphasis>, which is henceforth used to identify this record.
  86. The <emphasis>record_name</emphasis> string must be coded in ASCII and must
  87. be uniquely named across the data attributes, data criteria and actions tables.
  88. </para>
  89. </refsect2>
  90. <refsect2>
  91. <title>Record Delimiters</title>
  92. <para>After the record name has been located, the set of corresponding fields
  93. is delimited by the { and } characters. Each of these characters must appear
  94. on a line by itself.</para>
  95. </refsect2>
  96. <refsect2>
  97. <title>Fields</title>
  98. <para>The fields are all of the non-comment lines found between the record
  99. delimiters. They are composed of keyword/value pairs. The <emphasis>FieldName</emphasis> string must be coded in ASCII. The <emphasis>field_value</emphasis>
  100. may be coded in additional, implementation-dependent, code sets, except that
  101. any literal string values shown in Data Criteria Format, below, string must
  102. be coded in ASCII.</para>
  103. </refsect2>
  104. <refsect2>
  105. <title>Record Types</title>
  106. <para>There are three recognized record types in database files used for data
  107. types (and actions):</para>
  108. <itemizedlist>
  109. <!-- merged from xo+cde-->
  110. <listitem><para><systemitem class="Constant">DATA_CRITERIA</systemitem></para>
  111. </listitem><listitem><para><systemitem class="Constant">DATA_ATTRIBUTES</systemitem>
  112. </para>
  113. </listitem><listitem><para><systemitem class="Constant">ACTION</systemitem>
  114. </para>
  115. </listitem></itemizedlist>
  116. <para>These three kinds of database record can appear together in the same
  117. file or they can be segregated into separate files. See &cdeman.dtaction; for the file format of <systemitem class="Constant">ACTION</systemitem>
  118. records.</para>
  119. </refsect2>
  120. </refsect1>
  121. <refsect1>
  122. <title>DATA_CRITERIA RECORDS</title>
  123. <para>The first seven subsections of this section describe the <emphasis>FieldName</emphasis> <symbol role="Variable">s</symbol> supported for data
  124. criteria records. The remaining subsections describe formatting and sorting
  125. information for data criteria records.</para>
  126. <refsect2>
  127. <title>NAME_PATTERN Field</title>
  128. <para>A shell pattern-matching expression describing the file names that could
  129. match this data. See Pattern Matching Notation. The default is an empty string,
  130. which means to ignore file patterns in matching.</para>
  131. <para>If the data to be matched is in a buffer, rather than a file, the <systemitem class="Constant">NAME_PATTERN</systemitem> expression is evaluated against
  132. the <emphasis>opt_name</emphasis> value given to &cdeman.DtDtsBufferToDataType; and related functions.</para>
  133. </refsect2>
  134. <refsect2>
  135. <title>PATH_PATTERN Field</title>
  136. <para>A shell pattern-matching expression describing the absolute pathnames
  137. that could match this data. See Pattern Matching Notation. The default is
  138. an empty string, which means to ignore path patterns in matching.</para>
  139. <para>The <systemitem class="Constant">PATH_PATTERN</systemitem> expression
  140. is used only for matching data in files; it does not affect matching of data
  141. in buffers.</para>
  142. </refsect2>
  143. <refsect2>
  144. <title>CONTENT Field</title>
  145. <para>Strings that match on the contents of a file, buffer or directory:</para>
  146. <informalexample remap="indent">
  147. <programlisting><emphasis>offset type value(s)</emphasis></programlisting>
  148. </informalexample>
  149. <para>The <symbol role="Variable">offset</symbol> string is a positive decimal
  150. integer number of octets from the beginning of the file or buffer, where the
  151. first <symbol role="Variable">value</symbol> is tested. The <symbol role="Variable">offset</symbol> value is ignored for the <literal>filename</literal> <symbol role="Variable">type</symbol>.</para>
  152. <para>The <symbol role="Variable">type</symbol> string is one of the following:
  153. </para>
  154. <variablelist>
  155. <varlistentry><term><literal>string</literal></term>
  156. <listitem>
  157. <para>The <symbol role="Variable">value</symbol> is a single string that is
  158. compared against the data starting at the <symbol role="Variable">offset</symbol>
  159. location.</para>
  160. </listitem>
  161. </varlistentry>
  162. <varlistentry><term><literal>byte</literal></term>
  163. <listitem>
  164. <para></para>
  165. </listitem>
  166. </varlistentry>
  167. <varlistentry><term><StructName Role="typedef">short</StructName></term>
  168. <listitem>
  169. <para></para>
  170. </listitem>
  171. </varlistentry>
  172. <varlistentry><term><StructName Role="typedef">long</StructName></term>
  173. <listitem>
  174. <para>Each <keysym>blank</keysym>-separated <symbol role="Variable">value</symbol>
  175. is an unsigned integer: decimal, octal (leading <literal>0</literal>)
  176. or hexadecimal (leading <literal>0x</literal> or <literal>0X</literal>). Multiple
  177. values are matched against multiple byte (octet), short (two octets) or long
  178. (four octets) locations starting at <symbol role="Variable">offset</symbol>
  179. octets from the beginning of the file or data.</para>
  180. </listitem>
  181. </varlistentry>
  182. <varlistentry><term><literal>filename</literal></term>
  183. <listitem>
  184. <para>The <symbol role="Variable">value</symbol> is a string that is compared
  185. against the filenames located anywhere in a directory. The use of <literal>filename</literal> on non-directory data produces undefined results.</para>
  186. </listitem>
  187. </varlistentry>
  188. </variablelist>
  189. <para>The default <systemitem class="Constant">CONTENT</systemitem> is an
  190. empty field, which means to ignore contents in matching.</para>
  191. <para>The <systemitem class="Constant">CONTENT</systemitem> field applies
  192. to data in both files and buffers.</para>
  193. <para>Examples of two data criteria records with <systemitem class="Constant">CONTENT</systemitem> fields are:</para>
  194. <informalexample remap="indent">
  195. <programlisting>DATA_CRITERIA PCL1
  196. {
  197. DATA_ATTRIBUTES_NAME PCL
  198. CONTENT 0 byte 033 0105
  199. MODE f&amp;!x
  200. }
  201. DATA_CRITERIA POSTSCRIPT3
  202. {
  203. DATA_ATTRIBUTES_NAME POSTSCRIPT
  204. CONTENT 0 string %!
  205. MODE f&amp;!x
  206. }</programlisting>
  207. </informalexample>
  208. </refsect2>
  209. <refsect2>
  210. <title>MODE Field</title>
  211. <para>A string of zero to four characters that match the mode field of a <emphasis>stat</emphasis> structure (see <function>stat</function>(2)). The first character
  212. indicates:</para>
  213. <variablelist>
  214. <varlistentry><term><literal>d</literal></term>
  215. <listitem>
  216. <para>match a directory</para>
  217. </listitem>
  218. </varlistentry>
  219. <varlistentry><term><literal>s</literal></term>
  220. <listitem>
  221. <para>match a socket</para>
  222. </listitem>
  223. </varlistentry>
  224. <varlistentry><term><literal>l</literal></term>
  225. <listitem>
  226. <para>match a symbolic link</para>
  227. </listitem>
  228. </varlistentry>
  229. <varlistentry><term><literal>f</literal></term>
  230. <listitem>
  231. <para>match a regular file</para>
  232. </listitem>
  233. </varlistentry>
  234. <varlistentry><term><literal>b</literal></term>
  235. <listitem>
  236. <para>match a block file</para>
  237. </listitem>
  238. </varlistentry>
  239. <varlistentry><term><literal>c</literal></term>
  240. <listitem>
  241. <para>match a character special file</para>
  242. </listitem>
  243. </varlistentry>
  244. </variablelist>
  245. <para>The first, or subsequent characters, can also be:</para>
  246. <variablelist>
  247. <varlistentry><term><literal>r</literal></term>
  248. <listitem>
  249. <para>match any file with any of its user, group, or other read permission
  250. bits set</para>
  251. </listitem>
  252. </varlistentry>
  253. <varlistentry><term><literal>w</literal></term>
  254. <listitem>
  255. <para>match any file with any of its user, group, or other write permission
  256. bits set</para>
  257. </listitem>
  258. </varlistentry>
  259. <varlistentry><term><literal>x</literal></term>
  260. <listitem>
  261. <para>match any file with any of its user, group, or other execute or directory-search
  262. permission bits set</para>
  263. </listitem>
  264. </varlistentry>
  265. </variablelist>
  266. <para>For example, the <systemitem class="Constant">MODE</systemitem> field
  267. of <literal>frw</literal> matches any regular file that is readable or writable; <literal>x</literal> matches any file with any of its executable or search bits set.
  268. </para>
  269. <para>The default is an empty field, which means to ignore the mode in matching.
  270. </para>
  271. <para>If the data to be matched is in a buffer, rather than a file, the buffer
  272. is processed as if it had a mode of <literal>fr</literal>.</para>
  273. </refsect2>
  274. <refsect2>
  275. <title>LINK_NAME Field</title>
  276. <para>A shell pattern-matching expression describing the filename component
  277. (basename) of the filename the symbolic link points to that could match this
  278. data. See Pattern Matching Notation. The default is an empty expression, which
  279. means to ignore symbolic link names in matching. <systemitem class="Constant">LINK_NAME</systemitem> points to the file itself, not to the name of the file.
  280. </para>
  281. <para>The <systemitem class="Constant">LINK_NAME</systemitem> expression is
  282. used only for matching data in files; it does not affect matching of data
  283. in buffers.</para>
  284. </refsect2>
  285. <refsect2>
  286. <title>LINK_PATH Field</title>
  287. <para>A shell pattern-matching expression describing the absolute pathname
  288. of the file pointed to by the symbolic link that could match this data. See
  289. Pattern Matching Notation. The default is an empty expression, which means
  290. to ignore symbolic link name in matching.</para>
  291. <para>The <systemitem class="Constant">LINK_PATH</systemitem> expression is
  292. used only for matching data in files; it does not affect matching of data
  293. in buffers.</para>
  294. </refsect2>
  295. <refsect2>
  296. <title>DATA_ATTRIBUTES_NAME Field</title>
  297. <para>The name of this type of data. This value is a <emphasis>record_name</emphasis> in the data attributes table.</para>
  298. </refsect2>
  299. <refsect2>
  300. <title>Pattern Matching Notation</title>
  301. <para>The pattern-matching text field permits use of the shell pattern-matching
  302. characters *, ?, and [&thinsp;]. The asterisk (*) matches any set of characters,
  303. the question mark (?) matches a single character, and the square brackets
  304. ([&thinsp;]) match any one of a set of characters enclosed in the square brackets.
  305. The full definition of shell pattern matching is in the X/Open <literal>CAE
  306. Specification, Commands and Utilities, Issue 4</literal>.</para>
  307. </refsect2>
  308. <refsect2>
  309. <title>Logical Expressions</title>
  310. <para>The logical operators AND (&amp;), OR (&thinsp;|&thinsp;) and NOT (!)
  311. can be used in any of the data criteria fields, except for <systemitem class="Constant">DATA_ATTRIBUTES_NAME</systemitem>, as shown in Data Criteria Format, below.
  312. The resultant expressions are evaluated from left to right.</para>
  313. </refsect2>
  314. <refsect2>
  315. <title>White Space</title>
  316. <para>White space is used to delimit tokens, as shown by the <emphasis>blanks</emphasis> and <symbol role="Variable">newline</symbol> terminals in Data
  317. Criteria Format, below. Within the <symbol role="Variable">pattern</symbol>
  318. terminal, however, leading and trailing white space not explicitly shown in
  319. the grammar is significant to the expression. For example,</para>
  320. <informalexample remap="indent">
  321. <programlisting>NAME_PATTERN abc | def</programlisting>
  322. </informalexample>
  323. <para>is matched by either `` <literal>abc&numsp;</literal>'' (with a trailing <keysym>space</keysym>) or ``&numsp; <literal>def</literal>'' (with a leading <keysym>space</keysym>).</para>
  324. </refsect2>
  325. <refsect2>
  326. <title>Escape Character</title>
  327. <para>Shell pattern-matching and logical expression characters can be escaped
  328. and used as literal characters by preceding the character with a backslash
  329. (\). For example, \* is interpreted as an asterisk, \? as a question mark
  330. and \[\] as square brackets. Backslash itself can be escaped by preceding
  331. it with a backslash (\\).</para>
  332. </refsect2>
  333. <refsect2>
  334. <title>Data Criteria Format</title>
  335. <para>The following pseudo-BNF describes the data criteria variable definition:
  336. </para>
  337. <informaltable remap="center" orient="port">
  338. <tgroup cols="3" colsep="0" rowsep="0">
  339. <?PubTbl tgroup dispwid="6.04in">
  340. <colspec align="left" colwidth="179*">
  341. <colspec align="left" colwidth="64*">
  342. <colspec align="left" colwidth="255*">
  343. <tbody>
  344. <row>
  345. <entry align="left" valign="top"><computeroutput>DataCriteriaDefn</computeroutput></entry>
  346. <entry align="left" valign="top"><computeroutput>::=</computeroutput></entry>
  347. <entry align="left" valign="top"><computeroutput>`DATA_CRITERIA'</computeroutput> <computeroutput>blanks record_name</computeroutput></entry></row>
  348. <row>
  349. <entry align="left" valign="top"><computeroutput>{</computeroutput></entry>
  350. </row>
  351. <row>
  352. <entry align="left" valign="top"></entry>
  353. <entry align="left" valign="top"></entry>
  354. <entry align="left" valign="top"><computeroutput>data_criteria_defn</computeroutput></entry></row>
  355. <row>
  356. <entry align="left" valign="top"><computeroutput>}</computeroutput></entry>
  357. </row>
  358. <row>
  359. <entry align="left" valign="top"><computeroutput>data_criteria_defn</computeroutput></entry>
  360. <entry align="left" valign="top"><computeroutput>::=</computeroutput></entry>
  361. <entry align="left" valign="top"><computeroutput>(</computeroutput></entry>
  362. </row>
  363. <row>
  364. <entry align="left" valign="top"></entry>
  365. <entry align="left" valign="top"></entry>
  366. <entry align="left" valign="top"><computeroutput>`PATH_PATTERN'</computeroutput> <computeroutput>blanks pattern_datas newline</computeroutput></entry></row>
  367. <row>
  368. <entry align="left" valign="top"></entry>
  369. <entry align="left" valign="top"><computeroutput>|</computeroutput></entry>
  370. <entry align="left" valign="top"><computeroutput>`NAME_PATTERN'</computeroutput> <computeroutput>blanks pattern_datas newline</computeroutput></entry></row>
  371. <row>
  372. <entry align="left" valign="top"></entry>
  373. <entry align="left" valign="top"><computeroutput>|</computeroutput></entry>
  374. <entry align="left" valign="top"><computeroutput>`LINK_PATH'</computeroutput> <computeroutput>blanks pattern_datas newline</computeroutput></entry></row>
  375. <row>
  376. <entry align="left" valign="top"></entry>
  377. <entry align="left" valign="top"><computeroutput>|</computeroutput></entry>
  378. <entry align="left" valign="top"><computeroutput>`LINK_NAME'</computeroutput> <computeroutput>blanks pattern_datas newline</computeroutput></entry></row>
  379. <row>
  380. <entry align="left" valign="top"></entry>
  381. <entry align="left" valign="top"><computeroutput>|</computeroutput></entry>
  382. <entry align="left" valign="top"><computeroutput>`CONTENT'</computeroutput> <computeroutput>blanks content_fields newline</computeroutput></entry></row>
  383. <row>
  384. <entry align="left" valign="top"></entry>
  385. <entry align="left" valign="top"><computeroutput>|</computeroutput></entry>
  386. <entry align="left" valign="top"><computeroutput>`MODE'</computeroutput> <computeroutput>blanks mode_specs newline</computeroutput></entry></row>
  387. <row>
  388. <entry align="left" valign="top"></entry>
  389. <entry align="left" valign="top"><computeroutput>|</computeroutput></entry>
  390. <entry align="left" valign="top"><computeroutput>`DATA_ATTRIBUTES_NAME'</computeroutput> <computeroutput>blanks name newline</computeroutput></entry></row>
  391. <row>
  392. <entry align="left" valign="top"></entry>
  393. <entry align="left" valign="top"></entry>
  394. <entry align="left" valign="top"><computeroutput>)</computeroutput></entry>
  395. </row>
  396. <row>
  397. <entry align="left" valign="top"><computeroutput>pattern_datas</computeroutput></entry>
  398. <entry align="left" valign="top"><computeroutput>::=</computeroutput></entry>
  399. <entry align="left" valign="top"><computeroutput>pattern_data</computeroutput> [(`&amp;' | `|') <computeroutput>pattern_datas</computeroutput> ]</entry></row>
  400. <row>
  401. <entry align="left" valign="top"><computeroutput>pattern_data</computeroutput></entry>
  402. <entry align="left" valign="top"><computeroutput>::=</computeroutput></entry>
  403. <entry align="left" valign="top"><computeroutput>[`!']</computeroutput> <computeroutput>pattern</computeroutput></entry></row>
  404. <row>
  405. <entry align="left" valign="top"><computeroutput>pattern</computeroutput></entry>
  406. <entry align="left" valign="top"><computeroutput>::=</computeroutput></entry>
  407. <entry align="left" valign="top">a shell
  408. pattern matching expression, as defined in <command>sh</command>(1)</entry>
  409. </row>
  410. <row>
  411. <entry align="left" valign="top"><computeroutput>mode_specs</computeroutput></entry>
  412. <entry align="left" valign="top"><computeroutput>::=</computeroutput></entry>
  413. <entry align="left" valign="top"><computeroutput>mode_spec</computeroutput> [(`&amp;' | `|') <computeroutput>mode_specs</computeroutput>]</entry></row>
  414. <row>
  415. <entry align="left" valign="top"><computeroutput>mode_spec</computeroutput></entry>
  416. <entry align="left" valign="top"><computeroutput>::=</computeroutput></entry>
  417. <entry align="left" valign="top"><computeroutput>(</computeroutput></entry>
  418. </row>
  419. <row>
  420. <entry align="left" valign="top"></entry>
  421. <entry align="left" valign="top"></entry>
  422. <entry align="left" valign="top"><computeroutput>type_spec</computeroutput> [<computeroutput>permission_spec</computeroutput>]</entry></row>
  423. <row>
  424. <entry align="left" valign="top"></entry>
  425. <entry align="left" valign="top"><computeroutput>|</computeroutput></entry>
  426. <entry align="left" valign="top"><computeroutput>type_spec</computeroutput> (`&amp;' | `|') <computeroutput>permission_spec</computeroutput></entry></row>
  427. <row>
  428. <entry align="left" valign="top"></entry>
  429. <entry align="left" valign="top"></entry>
  430. <entry align="left" valign="top"><computeroutput>)</computeroutput></entry>
  431. </row>
  432. <row>
  433. <entry align="left" valign="top"><computeroutput>type_spec</computeroutput></entry>
  434. <entry align="left" valign="top"><computeroutput>::=</computeroutput></entry>
  435. <entry align="left" valign="top"><computeroutput>[`!']</computeroutput> <computeroutput>type_char</computeroutput> {<computeroutput>type_char</computeroutput>}</entry>
  436. </row>
  437. <row>
  438. <entry align="left" valign="top"><computeroutput>type_char</computeroutput></entry>
  439. <entry align="left" valign="top"><computeroutput>::=</computeroutput></entry>
  440. <entry align="left" valign="top"><computeroutput>(`d' | `l' | `f' | `s' |
  441. `b' | `c' )</computeroutput></entry></row>
  442. <row>
  443. <entry align="left" valign="top"><computeroutput>permission_spec</computeroutput></entry>
  444. <entry align="left" valign="top"><computeroutput>::=</computeroutput></entry>
  445. <entry align="left" valign="top"><computeroutput>[`!']</computeroutput> <computeroutput>permission_char</computeroutput> {<computeroutput>permission_char</computeroutput>}</entry></row>
  446. <row>
  447. <entry align="left" valign="top"><computeroutput>permission_char</computeroutput></entry>
  448. <entry align="left" valign="top"><computeroutput>::=</computeroutput></entry>
  449. <entry align="left" valign="top"><computeroutput>(`r' | `w' | `x')</computeroutput></entry>
  450. </row>
  451. <row>
  452. <entry align="left" valign="top"><computeroutput>content_fields</computeroutput></entry>
  453. <entry align="left" valign="top"><computeroutput>::=</computeroutput></entry>
  454. <entry align="left" valign="top"><computeroutput>content_field</computeroutput> [(`&amp;' | `|') <computeroutput>content_fields</computeroutput> ]</entry></row>
  455. <row>
  456. <entry align="left" valign="top"><computeroutput>content_field</computeroutput></entry>
  457. <entry align="left" valign="top"><computeroutput>::=</computeroutput></entry>
  458. <entry align="left" valign="top"><computeroutput>(</computeroutput></entry>
  459. </row>
  460. <row>
  461. <entry align="left" valign="top"></entry>
  462. <entry align="left" valign="top"></entry>
  463. <entry align="left" valign="top"><computeroutput>[`!']</computeroutput> <computeroutput>offset blanks</computeroutput> `string' <computeroutput>blanks string</computeroutput></entry>
  464. </row>
  465. <row>
  466. <entry align="left" valign="top"></entry>
  467. <entry align="left" valign="top"><computeroutput>|</computeroutput></entry>
  468. <entry align="left" valign="top"><computeroutput>[`!']</computeroutput> <computeroutput>offset blanks</computeroutput> `byte' <computeroutput>blanks data_values</computeroutput></entry></row>
  469. <row>
  470. <entry align="left" valign="top"></entry>
  471. <entry align="left" valign="top"><computeroutput>|</computeroutput></entry>
  472. <entry align="left" valign="top"><computeroutput>[`!']</computeroutput> <computeroutput>offset blanks</computeroutput> `short' <computeroutput>blanks data_values</computeroutput></entry></row>
  473. <row>
  474. <entry align="left" valign="top"></entry>
  475. <entry align="left" valign="top"><computeroutput>|</computeroutput></entry>
  476. <entry align="left" valign="top"><computeroutput>[`!']</computeroutput> <computeroutput>offset blanks</computeroutput> `long' <computeroutput>blanks data_values</computeroutput></entry></row>
  477. <row>
  478. <entry align="left" valign="top"></entry>
  479. <entry align="left" valign="top"><computeroutput>|</computeroutput></entry>
  480. <entry align="left" valign="top"><computeroutput>[`!']</computeroutput> <computeroutput>offset blanks</computeroutput> `filename' <computeroutput>blanks string</computeroutput></entry>
  481. </row>
  482. <row>
  483. <entry align="left" valign="top"></entry>
  484. <entry align="left" valign="top"></entry>
  485. <entry align="left" valign="top"><computeroutput>)</computeroutput></entry>
  486. </row>
  487. <row>
  488. <entry align="left" valign="top"><computeroutput>offset</computeroutput></entry>
  489. <entry align="left" valign="top"><computeroutput>::=</computeroutput></entry>
  490. <entry align="left" valign="top">an unsigned
  491. decimal integer</entry></row>
  492. <row>
  493. <entry align="left" valign="top"><computeroutput>data_values</computeroutput></entry>
  494. <entry align="left" valign="top"><computeroutput>::=</computeroutput></entry>
  495. <entry align="left" valign="top"><computeroutput>data_value</computeroutput> [<computeroutput>blanks data_values</computeroutput>]</entry></row>
  496. <row>
  497. <entry align="left" valign="top"><computeroutput>data_value</computeroutput></entry>
  498. <entry align="left" valign="top"><computeroutput>::=</computeroutput></entry>
  499. <entry align="left" valign="top">an unsigned
  500. integer: decimal, octal (leading <literal>0</literal>) or hexadecimal (leading <literal>0x</literal> or <literal>0X</literal>)</entry></row>
  501. <row>
  502. <entry align="left" valign="top"><computeroutput>name</computeroutput></entry>
  503. <entry align="left" valign="top"><computeroutput>::=</computeroutput></entry>
  504. <entry align="left" valign="top"><computeroutput>( "A-Z" | "a-z") [</computeroutput> <computeroutput>name_char</computeroutput>]</entry></row>
  505. <row>
  506. <entry align="left" valign="top"><computeroutput>name_char</computeroutput></entry>
  507. <entry align="left" valign="top"><computeroutput>::=</computeroutput></entry>
  508. <entry align="left" valign="top"><computeroutput>{ "A-Z" | "a-z" | "0-9" |
  509. "-" }</computeroutput></entry></row>
  510. <row>
  511. <entry align="left" valign="top"><computeroutput>string</computeroutput></entry>
  512. <entry align="left" valign="top"><computeroutput>::=</computeroutput></entry>
  513. <entry align="left" valign="top">a character
  514. string, not including <keysym>newline</keysym></entry></row>
  515. <row>
  516. <entry align="left" valign="top"><computeroutput>newline</computeroutput></entry>
  517. <entry align="left" valign="top"><computeroutput>::=</computeroutput></entry>
  518. <entry align="left" valign="top"><computeroutput>`\n'</computeroutput></entry>
  519. </row>
  520. <row>
  521. <entry align="left" valign="top"><computeroutput>blanks</computeroutput></entry>
  522. <entry align="left" valign="top"><computeroutput>::=</computeroutput></entry>
  523. <entry align="left" valign="top">one or more <keysym>blank</keysym>s (spaces and/or tabs)</entry></row></tbody></tgroup></informaltable>
  524. </refsect2>
  525. <refsect2>
  526. <title>Data Criteria Sorting</title>
  527. <para>There may be multiple data criteria records that could match a file
  528. or data. This subsection describes the sorting process used by the &str-Zx;
  529. data typing services. The more specific criteria are sorted toward the top
  530. of the list and the more general criteria toward the bottom. The data criteria
  531. record selected is the first match found on the resulting sorted list.</para>
  532. <para>The following sorting rules are applied in sequence to each possible
  533. pair of data criteria records. If a rule determines that one data criteria
  534. record is more specific than another, the two records are positioned in the
  535. list so that the more specific comes before the less specific; otherwise,
  536. the next rule in sequence is applied.</para>
  537. <orderedlist>
  538. <listitem>
  539. <para>Records are ordered by the fields specified within them:</para>
  540. <orderedlist numeration="loweralpha">
  541. <listitem>
  542. <para>Records with both content and pattern fields (most specific)</para>
  543. </listitem>
  544. <listitem>
  545. <para>Records with only pattern fields</para>
  546. </listitem>
  547. <listitem>
  548. <para>Records with only content fields</para>
  549. </listitem>
  550. <listitem>
  551. <para>Records with neither content nor pattern fields (least specific)</para>
  552. </listitem>
  553. </orderedlist>
  554. </listitem>
  555. <listitem>
  556. <para>Records are ordered based on the presence of any shell pattern-matching
  557. characters in their file name patterns (NAME_PATTERN or PATH_PATTERN):</para>
  558. <orderedlist numeration="loweralpha">
  559. <listitem>
  560. <para>File names with no shell pattern-matching characters (most specific)
  561. </para>
  562. </listitem>
  563. <listitem>
  564. <para>File names with no shell pattern-matching characters in the final suffix
  565. (such as <literal>*.c</literal>)</para>
  566. </listitem>
  567. <listitem>
  568. <para>Others (least specific)</para>
  569. </listitem>
  570. </orderedlist>
  571. </listitem>
  572. <listitem>
  573. <para>Records with a path pattern are more specific than records with a name
  574. pattern.</para>
  575. </listitem>
  576. <listitem>
  577. <para>Records with a name pattern of <literal>*</literal> are treated as if
  578. they have no name pattern.</para>
  579. </listitem>
  580. <listitem>
  581. <para>Records are ordered based on the types of shell pattern-matching characters
  582. in their patterns:</para>
  583. <orderedlist numeration="loweralpha">
  584. <listitem>
  585. <para>Patterns with any <literal>?</literal> (most specific)</para>
  586. </listitem>
  587. <listitem>
  588. <para>Patterns with any <literal>[&thinsp;]</literal></para>
  589. </listitem>
  590. <listitem>
  591. <para>Patterns with any <literal>*</literal> (least specific)</para>
  592. </listitem>
  593. </orderedlist>
  594. </listitem>
  595. <listitem>
  596. <para>Records with path patterns that share leading pathname components are
  597. ordered as follows:</para>
  598. <orderedlist numeration="loweralpha">
  599. <listitem>
  600. <para>The leading pathname components without shell pattern-matching characters
  601. are selected for comparison. (For example, <filename>/foo/bar/bam/baz.?</filename>
  602. and <filename>/foo/bar/*/baz</filename> are evaluated as <Filename>/foo/bar/bam</Filename> and <Filename>/foo/bar</Filename> for this rule.)</para>
  603. </listitem>
  604. <listitem>
  605. <para>The selected paths are ordered so that the longest is more specific.
  606. </para>
  607. </listitem>
  608. <listitem>
  609. <para>If the selected paths are equal, the full path patterns are ordered
  610. based on the number and types of shell pattern-matching characters in their
  611. patterns, in the following sequence:</para>
  612. <orderedlist numeration="lowerroman">
  613. <listitem>
  614. <para>Path patterns with fewer <literal>*</literal> characters are more specific.
  615. </para>
  616. </listitem>
  617. <listitem>
  618. <para>Path patterns with fewer <literal>[&thinsp;]</literal> characters are
  619. more specific.</para>
  620. </listitem>
  621. <listitem>
  622. <para>Path patterns with fewer <literal>?</literal> characters are more specific.
  623. </para>
  624. </listitem>
  625. </orderedlist>
  626. </listitem>
  627. <listitem>
  628. <para>If the path patterns are still of equal specificity, the one with the
  629. larger number of literal characters (those not used as shell pattern-matching
  630. special characters) in its pattern after the first non-literal character is
  631. more specific.</para>
  632. </listitem>
  633. </orderedlist>
  634. </listitem>
  635. <listitem>
  636. <para>Records are ordered based on a character sorting of the path patterns,
  637. with the lowest value in collation sequence being more specific.</para>
  638. </listitem>
  639. <listitem>
  640. <para>Records are ordered so that the one with more criteria is more specific.
  641. (For example, a record with a <systemitem class="Constant">PATH_PATTERN</systemitem>, <systemitem class="Constant">CONTENT</systemitem> and <systemitem class="Constant">MODE</systemitem> is more specific than one with only a <systemitem class="Constant">PATH_PATTERN</systemitem>.)</para>
  642. </listitem>
  643. </orderedlist>
  644. <para>Two records still equal after executing the preceding rules are ordered
  645. in an unspecified sequence.</para>
  646. </refsect2>
  647. </refsect1>
  648. <refsect1>
  649. <title>DATA_ATTRIBUTES RECORDS</title>
  650. <para>The following <emphasis>FieldName</emphasis>s are supported for data
  651. attribute records. Each of the <emphasis>FieldName</emphasis>s is identical
  652. to the corresponding <symbol role="Variable">name</symbol> member string of
  653. a <structname role="typedef">DtDtsAttribute</structname> structure; see <filename role="Header">Dt/Dts.h</filename>.</para>
  654. <refsect2>
  655. <title>DESCRIPTION Field</title>
  656. <para>A textual description of the data that is suitable for presentation
  657. to a user requesting information about the data. The description should contain
  658. no formatting information such as tab or newline characters. The application
  659. that presents the information to the user formats the information. If this
  660. field is <systemitem class="Constant">NULL</systemitem> or is not included
  661. in the data attribute record, the name of the data attribute should be used.
  662. </para>
  663. </refsect2>
  664. <refsect2>
  665. <title>ICON Field</title>
  666. <para>The name of the icon to use for this data. If this field is <systemitem class="Constant">NULL</systemitem> or is not included in the data attribute
  667. record, a default value ( <literal>Dtactn</literal> for an executable file
  668. or <literal>Dtdata</literal> for other data) should be used.</para>
  669. <para>Icons are found by using the standard &str-XZ; icon search path, so
  670. the value can be either an absolute pathname (for example, <Filename>/foo/icons/myicon.bm</Filename>), a relative pathname (for example, <literal>icons/myicon.bm</literal>)
  671. or a partial filename (for example, <literal>myicon</literal>). Partial filenames
  672. are preferred because they allow the &str-XZ; icon search path to find the
  673. icon with the optimum size and depth for the current environment.</para>
  674. </refsect2>
  675. <refsect2>
  676. <title>INSTANCE_ICON Field</title>
  677. <para>The name of the icon to use for this instance of data. The contents
  678. of this field are as described in ICON Field, above. If <systemitem class="Constant">INSTANCE_ICON</systemitem> is set, the application should use it instead of <systemitem class="Constant">ICON</systemitem>. If this field is <systemitem class="Constant">NULL</systemitem> or is not included in the data attribute record, the <systemitem class="Constant">ICON</systemitem> field should be used.</para>
  679. <para>An example value of <systemitem class="Constant">INSTANCE_ICON</systemitem>
  680. is <literal>%name%.icon</literal>, which would select an icon based on a specific
  681. filename, rather than on a generic data type.</para>
  682. </refsect2>
  683. <refsect2>
  684. <title>PROPERTIES Field</title>
  685. <para>Keywords to indicate properties for this data. Valid values are <literal>visible</literal> and <literal>invisible</literal>. These provide guidance
  686. to an application such as a file manager about whether a file should be visibly
  687. displayed to the user.</para>
  688. <para>If this field is <systemitem class="Constant">NULL</systemitem> or is
  689. not included in the data attribute record, the visible property should be
  690. assumed.</para>
  691. </refsect2>
  692. <refsect2>
  693. <title>ACTIONS Field</title>
  694. <para>A comma-separated list of actions that can be performed on this data.
  695. This list refers to names in the action table for actions that can be performed
  696. on this data. If this field is <systemitem class="Constant">NULL</systemitem>
  697. or is not included in the data attribute record, no action is available.</para>
  698. </refsect2>
  699. <refsect2>
  700. <title>NAME_TEMPLATE Field</title>
  701. <para>A string used to create a new file for data of this type. The string
  702. is intended to be passed to <function>sprintf</function>(3) with the file name
  703. as the single argument. For example: <literal>%s.mif</literal>. The default
  704. is empty. (This field is contrasted with the NAME_PATTERN field of the data
  705. criteria table in that the template is used to create a specific file, such
  706. as <literal>%s.c</literal>, whereas the pattern is used to find files, such
  707. as <literal>*.c</literal>).</para>
  708. </refsect2>
  709. <refsect2>
  710. <title>IS_EXECUTABLE Field</title>
  711. <para>A string-Boolean value that tells users of this data type that it can
  712. be executed as an application. If <systemitem class="Constant">IS_EXECUTABLE</systemitem> is a true value (as determined by the <function>DtDtsIsTrue</function> function), the data is executable; if this field is <systemitem class="Constant">NULL</systemitem>, is not included in the data attribute
  713. record or is not true, then the data is considered not executable.</para>
  714. </refsect2>
  715. <refsect2>
  716. <title>MOVE_TO_ACTION Field</title>
  717. <para>The name of an action to be invoked when an object is moved to the current
  718. object using a drag and drop operation.</para>
  719. <para>The <systemitem class="Constant">MOVE_TO_ACTION</systemitem>, <systemitem class="Constant">COPY_TO_ACTION</systemitem> and <systemitem class="Constant">LINK_TO_ACTION</systemitem> fields cause an action to be invoked with the
  720. drop target as the first of the <structname role="typedef">DtActionArg</structname>
  721. arguments to the <function>DtActionInvoke</function> function, and the drag
  722. sources as the remaining <structname role="typedef">DtActionArg</structname>
  723. arguments. However, if the drop target is an action itself, it is omitted
  724. from the <structname role="typedef">DtActionArg</structname> list. For example,
  725. using the syntax of the <command>dtaction</command> utility, if objects A
  726. and B are dropped onto non-action object C:</para>
  727. <informalexample remap="indent">
  728. <programlisting>dtaction <emphasis>action-name</emphasis> C A B</programlisting>
  729. </informalexample>
  730. <para>If C is an action:</para>
  731. <informalexample remap="indent">
  732. <programlisting>dtaction <emphasis>action-name</emphasis> A B</programlisting>
  733. </informalexample>
  734. </refsect2>
  735. <refsect2>
  736. <title>COPY_TO_ACTION Field</title>
  737. <para>The name of an action to be invoked when an object is copied to the
  738. current object using a drag and drop operation.</para>
  739. </refsect2>
  740. <refsect2>
  741. <title>LINK_TO_ACTION Field</title>
  742. <para>The name of an action to be invoked when an object is linked to the
  743. current object using a drag and drop operation.</para>
  744. </refsect2>
  745. <refsect2>
  746. <title>IS_TEXT Field</title>
  747. <para>A string-Boolean value that tells users of this data type that it is
  748. suitable for manipulation (viewing or editing) in a text editor or text widget.
  749. The <systemitem class="Constant">IS_TEXT</systemitem> field should be set
  750. to a true value (as determined by the <function>DtDtsIsTrue</function> function)
  751. if the data is textual in nature and if it should be presented to the user
  752. in textual form. Criteria for making this determination include whether the
  753. data:</para>
  754. <itemizedlist>
  755. <!-- merged from xo+cde-->
  756. <listitem><para>consists of human language, or</para>
  757. </listitem><listitem><para>is generated and maintained manually, or</para>
  758. </listitem><listitem><para>is usefully viewable and editable in a text editor,
  759. or</para>
  760. </listitem><listitem><para>contains no (or only minimal) structuring and formatting
  761. information.</para>
  762. </listitem></itemizedlist>
  763. <para>If the <systemitem class="Constant">IS_TEXT</systemitem> field is a
  764. true value, this indicates that the data is eligible to be displayed directly
  765. by an application. That is, the application can load the data directly into
  766. a text editing widget (for example, XmText) instead of invoking an action
  767. on the data. An example of this occurs in the &str-XZ; mail services: if the
  768. first part of a multipart message has <systemitem class="Constant">IS_TEXT</systemitem> true, then it is displayed in the text area of the message view
  769. window. Otherwise, the text area will contain only message headers and the
  770. first part of the message will be displayed as an icon in the attachment pane.
  771. It is immaterial whether the data <emphasis>can</emphasis> be loaded into
  772. an XmText widget&mdash;even binary data can be&mdash;but rather whether the
  773. data <emphasis>should</emphasis> be loaded into an XmText widget.</para>
  774. <para>Note that the <systemitem class="Constant">IS_TEXT</systemitem> field
  775. differs from the <literal>text</literal> attribute of the <systemitem class="Constant">MIME_TYPE</systemitem> field, which is the MIME content-type, as described
  776. in RFC 1341. The MIME content-type determines whether the data consists of
  777. textual characters or byte values. If the data consists of textual characters
  778. and is labelled as <literal>text/*</literal>, the <systemitem class="Constant">IS_TEXT</systemitem> field determines whether it is appropriate for the data
  779. to be presented to users in textual form.</para>
  780. <para>Examples of common data types include recommendations of the appropriate
  781. value of <systemitem class="Constant">IS_TEXT</systemitem>:</para>
  782. <itemizedlist><listitem><para>Human language encoded in ASCII:</para>
  783. <informalexample remap="indent">
  784. <programlisting>MIME_TYPE text/plain
  785. IS_TEXT true</programlisting>
  786. </informalexample>
  787. <para>Note, however, that not everything that is ASCII should be presented
  788. directly to the user.</para>
  789. </listitem><listitem><para>Human language encoded in EUC, JIS, Unicode, or
  790. an ISO Latin charset:</para>
  791. <informalexample remap="indent">
  792. <programlisting>MIME_TYPE text/plain; charset=XXX
  793. IS_TEXT true</programlisting>
  794. </informalexample>
  795. </listitem><listitem><para>CalendarAppointmentAttrs:</para>
  796. <informalexample remap="indent">
  797. <programlisting>MIME_TYPE text/plain
  798. IS_TEXT false</programlisting>
  799. </informalexample>
  800. <para>Calendar appointments should be treated as opaque objects (editable
  801. only by the appointment editor) and not shown to the user as text.</para>
  802. </listitem><listitem><para>HTML (HyperText Markup Language):</para>
  803. <informalexample remap="indent">
  804. <programlisting>MIME_TYPE text/html
  805. IS_TEXT true</programlisting>
  806. </informalexample>
  807. </listitem><listitem><para>PostScript:</para>
  808. <informalexample remap="indent">
  809. <programlisting>MIME_TYPE application/postscript
  810. IS_TEXT false</programlisting>
  811. </informalexample>
  812. </listitem><listitem><para>C program source (C_SRC):</para>
  813. <informalexample remap="indent">
  814. <programlisting>MIME_TYPE text/plain
  815. IS_TEXT true</programlisting>
  816. </informalexample>
  817. </listitem><listitem><para>Bitmaps and pixmaps (XBM and XPM):</para>
  818. <informalexample remap="indent">
  819. <programlisting>MIME_TYPE text/plain
  820. IS_TEXT false</programlisting>
  821. </informalexample>
  822. </listitem><listitem><para>Project or module files for the &str-XZ; application
  823. building services:</para>
  824. <informalexample remap="indent">
  825. <programlisting>MIME_TYPE text/plain
  826. IS_TEXT false</programlisting>
  827. </informalexample>
  828. </listitem><listitem><para>Shell scripts:</para>
  829. <informalexample remap="indent">
  830. <programlisting>MIME_TYPE text/plain
  831. IS_TEXT false</programlisting>
  832. </informalexample>
  833. </listitem><listitem><para>Encoded text produced by <command>uuencode</command>1:
  834. </para>
  835. <informalexample remap="indent">
  836. <programlisting>MIME_TYPE text/plain
  837. IS_TEXT false</programlisting>
  838. </informalexample>
  839. </listitem><listitem><para>Manual pages:</para>
  840. <informalexample remap="indent">
  841. <programlisting>MIME_TYPE text/plain
  842. IS_TEXT false</programlisting>
  843. </informalexample>
  844. </listitem></itemizedlist>
  845. </refsect2>
  846. <refsect2>
  847. <title>MEDIA Field</title>
  848. <para>The names in the <systemitem class="Constant">MEDIA</systemitem> name
  849. space describe the form of the data itself. <systemitem class="Constant">MEDIA</systemitem> names are used as ICCCM selection targets; they are named
  850. in the <systemitem class="Constant">MEDIA</systemitem> field of data type
  851. records; and they are used in the <symbol role="Variable">type</symbol> parameter
  852. of ToolTalk Media Exchange messages.</para>
  853. <para>The <systemitem class="Constant">MEDIA</systemitem> name space is a
  854. subset of the name space of selection target atoms as defined by the ICCCM.
  855. All selection targets that specify a data format are valid <systemitem class="Constant">MEDIA</systemitem> names, and all valid <systemitem class="Constant">MEDIA</systemitem> names can be used directly as selection targets. Some selection
  856. targets specify an attribute of the selection (for example, LIST_LENGTH) or
  857. a side effect to occur (for example, DELETE), rather than a data format. These
  858. attribute selection targets are not part of the <systemitem class="Constant">MEDIA</systemitem> name space.</para>
  859. </refsect2>
  860. <refsect2>
  861. <title>MIME_TYPE Field</title>
  862. <para><systemitem class="Constant">MEDIA</systemitem> is the &str-XZ; internal,
  863. unique name for data types. However, other external naming authorities have
  864. also established name spaces. <systemitem class="Constant">MIME</systemitem>
  865. (Multipurpose Internet Message Extensions), as described in the referenced
  866. MIME RFCs, is one of those external registries, and is the standard type name
  867. space for the &str-XZ; mail system.</para>
  868. </refsect2>
  869. <refsect2>
  870. <title>X400_TYPE Field</title>
  871. <para>X.400 types are similar in structure to the <systemitem class="Constant">MEDIA</systemitem> type, but are formatted using different rules and have
  872. different naming authorities.</para>
  873. </refsect2>
  874. <refsect2>
  875. <title>DATA_HOST Attribute</title>
  876. <para>The <systemitem class="Constant">DATA_HOST</systemitem> attribute is
  877. not a field that can be added to the data attributes table when it is in a
  878. file, but it may be returned to an application reading attributes from the
  879. table. The data typing service adds this attribute automatically to indicate
  880. the host system from which the data type was loaded. If this field is <systemitem class="Constant">NULL</systemitem> or is not included in the data attribute
  881. record, the data type was loaded from the local system.</para>
  882. </refsect2>
  883. <refsect2>
  884. <title>Modifiers</title>
  885. <para>The following modifiers can be used in the values of the data attributes
  886. to modify the runtime values:</para>
  887. <variablelist>
  888. <varlistentry><term><literal>%file%</literal></term>
  889. <listitem>
  890. <para>The full pathname of the file.</para>
  891. </listitem>
  892. </varlistentry>
  893. <varlistentry><term><literal>%dir%</literal></term>
  894. <listitem>
  895. <para>The directory component of the pathname. For example, for <Filename>/usr/src/file.c</Filename>, <systemitem class="Constant">%dir%</systemitem>
  896. is <Filename>/usr/src</Filename>.</para>
  897. </listitem>
  898. </varlistentry>
  899. <varlistentry><term><literal>%name%</literal></term>
  900. <listitem>
  901. <para>The filename of the file. For example, for <Filename>/usr/src/file.c</Filename>, <systemitem class="Constant">%name%</systemitem> is <Filename>file.c</Filename>.</para>
  902. </listitem>
  903. </varlistentry>
  904. <varlistentry><term><literal>%suffix%</literal></term>
  905. <listitem>
  906. <para>The suffix of the file. For example, for <Filename>/usr/src/file.c</Filename>, <systemitem class="Constant">%suffix%</systemitem> is <literal>c</literal>.</para>
  907. </listitem>
  908. </varlistentry>
  909. <varlistentry><term><literal>%base%</literal></term>
  910. <listitem>
  911. <para>The basename of the file. For example, for <Filename>/usr/src/file.c</Filename>, <systemitem class="Constant">%base%</systemitem> is <literal>file</literal>.</para>
  912. </listitem>
  913. </varlistentry>
  914. </variablelist>
  915. <para>Strings enclosed in backquotes (`) are processed with the <function>popen</function> function and the output replaces the backquotes and string.
  916. </para>
  917. </refsect2>
  918. <refsect2>
  919. <title>Data Attributes Format</title>
  920. <para>The following pseudo-BNF describes the data attributes variable definition:
  921. </para>
  922. <informaltable remap="center" orient="port">
  923. <tgroup cols="3" colsep="0" rowsep="0">
  924. <?PubTbl tgroup dispwid="6.07in">
  925. <colspec align="left" colwidth="188*">
  926. <colspec align="left" colwidth="58*">
  927. <colspec align="left" colwidth="254*">
  928. <tbody>
  929. <row>
  930. <entry align="left" valign="top"><computeroutput>DataAttributesDefn</computeroutput></entry>
  931. <entry align="left" valign="top"><computeroutput>::=</computeroutput></entry>
  932. <entry align="left" valign="top"><computeroutput>`DATA_ATTRIBUTES'</computeroutput> <computeroutput>blanks record_name</computeroutput></entry></row>
  933. <row>
  934. <entry align="left" valign="top"><computeroutput>{</computeroutput></entry>
  935. </row>
  936. <row>
  937. <entry align="left" valign="top"></entry>
  938. <entry align="left" valign="top"></entry>
  939. <entry align="left" valign="top"><computeroutput>data_attributes_defn</computeroutput></entry></row>
  940. <row>
  941. <entry align="left" valign="top"><computeroutput>}</computeroutput></entry>
  942. </row>
  943. <row>
  944. <entry align="left" valign="top"><computeroutput>data_attributes_defn</computeroutput></entry>
  945. <entry align="left" valign="top"><computeroutput>::=</computeroutput></entry>
  946. <entry align="left" valign="top"><computeroutput>(</computeroutput></entry>
  947. </row>
  948. <row>
  949. <entry align="left" valign="top"></entry>
  950. <entry align="left" valign="top"></entry>
  951. <entry align="left" valign="top"><computeroutput>`DESCRIPTION'</computeroutput> <computeroutput>blanks string newline</computeroutput></entry></row>
  952. <row>
  953. <entry align="left" valign="top"></entry>
  954. <entry align="left" valign="top"><computeroutput>|</computeroutput></entry>
  955. <entry align="left" valign="top"><computeroutput>`ICON'</computeroutput> <computeroutput>blanks string newline</computeroutput></entry></row>
  956. <row>
  957. <entry align="left" valign="top"></entry>
  958. <entry align="left" valign="top"><computeroutput>|</computeroutput></entry>
  959. <entry align="left" valign="top"><computeroutput>`INSTANCE_ICON'</computeroutput> <computeroutput>blanks string newline</computeroutput></entry></row>
  960. <row>
  961. <entry align="left" valign="top"></entry>
  962. <entry align="left" valign="top"><computeroutput>|</computeroutput></entry>
  963. <entry align="left" valign="top"><computeroutput>`PROPERTIES'</computeroutput> <computeroutput>blanks string</computeroutput> {`,' <computeroutput>string</computeroutput>} <computeroutput>newline</computeroutput></entry></row>
  964. <row>
  965. <entry align="left" valign="top"></entry>
  966. <entry align="left" valign="top"><computeroutput>|</computeroutput></entry>
  967. <entry align="left" valign="top"><computeroutput>`ACTIONS'</computeroutput> <computeroutput>blanks name</computeroutput> {`,' <computeroutput>name</computeroutput>} <computeroutput>newline</computeroutput></entry></row>
  968. <row>
  969. <entry align="left" valign="top"></entry>
  970. <entry align="left" valign="top"><computeroutput>|</computeroutput></entry>
  971. <entry align="left" valign="top"><computeroutput>`NAME_TEMPLATE'</computeroutput> <computeroutput>blanks string newline</computeroutput></entry></row>
  972. <row>
  973. <entry align="left" valign="top"></entry>
  974. <entry align="left" valign="top"><computeroutput>|</computeroutput></entry>
  975. <entry align="left" valign="top"><computeroutput>`IS_EXECUTABLE'</computeroutput> <computeroutput>blanks string newline</computeroutput></entry></row>
  976. <row>
  977. <entry align="left" valign="top"></entry>
  978. <entry align="left" valign="top"><computeroutput>|</computeroutput></entry>
  979. <entry align="left" valign="top"><computeroutput>`MOVE_TO_ACTION'</computeroutput> <computeroutput>blanks string newline</computeroutput></entry></row>
  980. <row>
  981. <entry align="left" valign="top"></entry>
  982. <entry align="left" valign="top"><computeroutput>|</computeroutput></entry>
  983. <entry align="left" valign="top"><computeroutput>`COPY_TO_ACTION'</computeroutput> <computeroutput>blanks string newline</computeroutput></entry></row>
  984. <row>
  985. <entry align="left" valign="top"></entry>
  986. <entry align="left" valign="top"><computeroutput>|</computeroutput></entry>
  987. <entry align="left" valign="top"><computeroutput>`LINK_TO_ACTION'</computeroutput> <computeroutput>blanks string newline</computeroutput></entry></row>
  988. <row>
  989. <entry align="left" valign="top"></entry>
  990. <entry align="left" valign="top"><computeroutput>|</computeroutput></entry>
  991. <entry align="left" valign="top"><computeroutput>`IS_TEXT'</computeroutput> <computeroutput>blanks string newline</computeroutput></entry></row>
  992. <row>
  993. <entry align="left" valign="top"></entry>
  994. <entry align="left" valign="top"><computeroutput>|</computeroutput></entry>
  995. <entry align="left" valign="top"><computeroutput>`MEDIA'</computeroutput> <computeroutput>blanks string newline</computeroutput></entry></row>
  996. <row>
  997. <entry align="left" valign="top"></entry>
  998. <entry align="left" valign="top"><computeroutput>|</computeroutput></entry>
  999. <entry align="left" valign="top"><computeroutput>`MIME_TYPE'</computeroutput> <computeroutput>blanks string newline</computeroutput></entry></row>
  1000. <row>
  1001. <entry align="left" valign="top"></entry>
  1002. <entry align="left" valign="top"><computeroutput>|</computeroutput></entry>
  1003. <entry align="left" valign="top"><computeroutput>`X400_TYPE'</computeroutput> <computeroutput>blanks string newline</computeroutput></entry></row>
  1004. <row>
  1005. <entry align="left" valign="top"></entry>
  1006. <entry align="left" valign="top"><computeroutput>|</computeroutput></entry>
  1007. <entry align="left" valign="top"><computeroutput>unique_string blanks string newline</computeroutput></entry></row>
  1008. <row>
  1009. <entry align="left" valign="top"></entry>
  1010. <entry align="left" valign="top"><computeroutput>|</computeroutput></entry>
  1011. <entry align="left" valign="top"><computeroutput>`#'</computeroutput> <computeroutput>string newline</computeroutput></entry></row>
  1012. <row>
  1013. <entry align="left" valign="top"></entry>
  1014. <entry align="left" valign="top"></entry>
  1015. <entry align="left" valign="top"><computeroutput>)</computeroutput></entry>
  1016. </row>
  1017. <row>
  1018. <entry align="left" valign="top"><computeroutput>string</computeroutput></entry>
  1019. <entry align="left" valign="top"><computeroutput>::=</computeroutput></entry>
  1020. <entry align="left" valign="top">a character
  1021. string, not including <keysym>newline</keysym></entry></row>
  1022. <row>
  1023. <entry align="left" valign="top"><computeroutput>newline</computeroutput></entry>
  1024. <entry align="left" valign="top"><computeroutput>::=</computeroutput></entry>
  1025. <entry align="left" valign="top"><computeroutput>`\n'</computeroutput></entry>
  1026. </row>
  1027. <row>
  1028. <entry align="left" valign="top"><computeroutput>unique_string</computeroutput></entry>
  1029. <entry align="left" valign="top"><computeroutput>::=</computeroutput></entry>
  1030. <entry align="left" valign="top">a uniquely
  1031. named string for implementation extensions</entry></row>
  1032. <row>
  1033. <entry align="left" valign="top"><computeroutput>blanks</computeroutput></entry>
  1034. <entry align="left" valign="top"><computeroutput>::=</computeroutput></entry>
  1035. <entry align="left" valign="top">one or more <keysym>blank</keysym>s (spaces and/or tabs)</entry></row></tbody></tgroup></informaltable>
  1036. </refsect2>
  1037. <refsect2>
  1038. <title>EXAMPLES</title>
  1039. <para>The following are examples of data attribute and data criteria entries
  1040. in the data typing database:</para>
  1041. <informalexample remap="indent">
  1042. <programlisting>DATA_ATTRIBUTES C_SRC
  1043. {
  1044. ACTIONS Open,Make,Print
  1045. ICON DtdotC
  1046. IS_TEXT true
  1047. NAME_TEMPLATE %s.c
  1048. DESCRIPTION A C_SRC file is a source file in the C \
  1049. programming language.
  1050. }</programlisting>
  1051. </informalexample>
  1052. <informalexample remap="indent">
  1053. <programlisting>DATA_CRITERIA C_SRC1
  1054. {
  1055. DATA_ATTRIBUTES_NAME C_SRC
  1056. MODE f
  1057. NAME_PATTERN *.c
  1058. }</programlisting>
  1059. </informalexample>
  1060. <informalexample remap="indent">
  1061. <programlisting>DATA_ATTRIBUTES POSTSCRIPT
  1062. {
  1063. ACTIONS Open,Print
  1064. ICON Dtps
  1065. NAME_TEMPLATE %s.ps
  1066. MEDIA POSTSCRIPT
  1067. MIME_TYPE application/postscript
  1068. }</programlisting>
  1069. </informalexample>
  1070. <informalexample remap="indent">
  1071. <programlisting>DATA_CRITERIA POSTSCRIPT1
  1072. {
  1073. DATA_ATTRIBUTES_NAME POSTSCRIPT
  1074. MODE fr
  1075. <?Pub Caret> NAME_PATTERN *.ps
  1076. }</programlisting>
  1077. </informalexample>
  1078. </refsect2>
  1079. </refsect1>
  1080. <refsect1>
  1081. <title>ERRORS</title>
  1082. <para>Errors encountered when loading database files are written to the CDE
  1083. errorlog file. Records containing errors are rejected.</para>
  1084. </refsect1>
  1085. <refsect1>
  1086. <title>SEE ALSO</title>
  1087. <para>&cdeman.dttypes;, &cdeman.DtDtsIsTrue;, &cdeman.dtdtfile;, &cdeman.dtactionfile;.</para>
  1088. </refsect1>
  1089. </refentry>
  1090. <!--fickle 1.12 mancsf-to-docbook 1.2 08/07/95 01:31:55-->
  1091. <?Pub *0000087876>