home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / X / mit / doc / Xt / appA next >
Encoding:
Text File  |  1991-07-31  |  3.3 KB  |  82 lines

  1. .\" $XConsortium: appA,v 1.5 91/07/31 20:24:51 swick Exp $
  2. .\"
  3. .\" Copyright 1985, 1986, 1987, 1988, 1991
  4. .\" Massachusetts Institute of Technology, Cambridge, Massachusetts,
  5. .\" and Digital Equipment Corporation, Maynard, Massachusetts.
  6. .\"
  7. .\" Permission to use, copy, modify and distribute this documentation for any
  8. .\" purpose and without fee is hereby granted, provided that the above copyright
  9. .\" notice appears in all copies and that both that copyright notice and this
  10. .\" permission notice appear in supporting documentation, and that the name of
  11. .\" M.I.T. or Digital not be used in in advertising or publicity pertaining
  12. .\" to distribution of the software without specific, written prior permission.
  13. .\" M.I.T and Digital makes no representations about the suitability of the
  14. .\" software described herein for any purpose.
  15. .\" It is provided ``as is'' without express or implied warranty.
  16. .bp
  17. \&
  18. .sp 1
  19. .ce 3
  20. \s+1\fBAppendix A\fP\s-1
  21.  
  22. \s+1\fBResource File Format\fP\s-1
  23. .sp 2
  24. .LP
  25. .XS
  26. \fBAppendix A \- Resource File Format\fP
  27. .XE
  28. A resource file contains text representing the default resource values for an
  29. application or set of applications.
  30. .LP
  31. The format of resource files is defined by \fI\*(xL\fP and is reproduced here
  32. for convenience only. 
  33. .LP
  34. The format of a resource specification is
  35. .TS
  36. l l .
  37. ResourceLine    = Comment | IncludeFile | ResourceSpec | <empty line>
  38. Comment    = ``!'' {<any character except null or newline>}
  39. IncludeFile    = ``#'' WhiteSpace ``include'' WhiteSpace FileName WhiteSpace
  40. FileName    = <valid filename for operating system>
  41. ResourceSpec    = WhiteSpace ResourceName WhiteSpace ``:'' WhiteSpace Value
  42. ResourceName    = [Binding] {Component Binding} ComponentName
  43. Binding    = ``.'' | ``*''
  44. WhiteSpace    = {<space> | <horizontal tab>}
  45. Component    = ``?'' | ComponentName
  46. ComponentName    = NameChar {NameChar}
  47. NameChar    = ``a''-``z'' | ``A''-``Z'' | ``0''-``9'' | ``_'' | ``-''
  48. Value    = {<any character except null or unescaped newline>}
  49. .TE
  50. .LP
  51. Elements separated by vertical bar (|) are alternatives.
  52. Curly braces ({\&.\&.\&.}) indicate zero or more repetitions
  53. of the enclosed elements.
  54. Square brackets ([\&.\&.\&.]) indicate that the enclosed element is optional.
  55. Quotes (``\&.\&.\&.'') are used around literal characters.
  56. .LP
  57. If the last character on a line is a backslash (\\),
  58. that line is assumed to continue on the next line.
  59. .LP
  60. To allow a Value to begin with whitespace,
  61. the two-character sequence ``\\\^\fIspace\fP'' (backslash followed by space)
  62. is recognized and replaced by a space character,
  63. and the two-character sequence ``\\\^\fItab\fP''
  64. (backslash followed by horizontal tab)
  65. is recognized and replaced by a horizontal tab character.
  66.  
  67. To allow a Value to contain embedded newline characters,
  68. the two-character sequence ``\\\^n'' is recognized and replaced by a
  69. newline character.
  70. To allow a Value to be broken across multiple lines in a text file,
  71. the two-character sequence ``\\\^\fInewline\fP''
  72. (backslash followed by newline) is
  73. recognized and removed from the value.
  74.  
  75. To allow a Value to contain arbitrary character codes,
  76. the four-character sequence ``\\\^\fInnn\fP'',
  77. where each \fIn\fP is a digit character in the range of ``0''\-``7'',
  78. is recognized and replaced with a single byte that contains
  79. the octal value specified by the sequence.
  80. Finally, the two-character sequence ``\\\\'' is recognized
  81. and replaced with a single backslash.
  82.