home *** CD-ROM | disk | FTP | other *** search
/ Jason Aller Floppy Collection / 176.img / SLBBS76M.ZIP / STRINGS.ZIP / STRINGS.DOC
Text File  |  1989-06-27  |  12KB  |  239 lines

  1.  
  2.            -----------------------------------------------
  3.                   Searchlight BBS Extended Versions
  4.                  STRINGS.SYS File Format and Editing
  5.            -----------------------------------------------
  6.  
  7.  
  8. INTRODUCTION ........................................................
  9.  
  10.     Searchlight BBS Extended Versions beginning with 1.70 use and 
  11. external file called STRINGS.SYS to contain most of the text strings 
  12. and messages used by the system.  Besides saving RAM space, this 
  13. allows the system's text messages to be edited without the need to 
  14. change the EXE program files and allows your customizations to be 
  15. ported to future releases of the software.  Possible uses for the 
  16. STRINGS.SYS file include the translation of the software into other 
  17. languages.
  18.  
  19.     The following discusses the format and use of the STRINGS.SYS 
  20. file and provides two simple programs for unpacking and repacking 
  21. the system strings.  Please read this entire file before attempting 
  22. to make any changes to your STRINGS.SYS file.
  23.  
  24.  
  25. A WORD TO THE WISE ..................................................
  26.  
  27.     Before you make any changes to your STRINGS.SYS file, be sure 
  28. you have a safe, back-up copy of the original.  In the event that 
  29. you make any mistakes, you will need your original STRINGS.SYS file 
  30. to restore your system to normal operation.  Also, you will need 
  31. your original STRINGS.SYS file if you wish to port your changes to 
  32. future releases of SLBBS.
  33.  
  34.     Any changes you make to the strings in the STRINGS.SYS file must 
  35. be done with regard to the context in which the string appears in 
  36. the program.  While the STRINGS.SYS file allows you to change string 
  37. lengths, many strings used by Searchlight contain leading or 
  38. trailing spaces and must be maintained at a certain fixed string 
  39. length.  For example, strings which form headings should not be 
  40. shortened or lengthened.  Many strings, such as menu description 
  41. strings, have a maximum length that allows them to be displayed in a 
  42. particular format on the screen.  When changing any string, examine 
  43. its context in the program and related strings to make sure that you 
  44. do not exceed the maximum allowable width.
  45.  
  46.     All STRINGS.SYS file editing is done AT YOUR OWN RISK.  We 
  47. cannot guarantee that Searchlight will operate correctly with any 
  48. STRINGS.SYS file other than the original, nor can we guarantee that 
  49. your changes will be compatible with future versions of SLBBS 
  50. (although we will do our best to see that they are).
  51.  
  52.  
  53. UNPACKING THE STRINGS.SYS FILE: XSYS.EXE ............................
  54.  
  55.     The program XSYS.EXE 'unpacks' the STRINGS.SYS data file into a 
  56. plain-text file that can be edited by your word processor or text 
  57. editor.  To use it, type 'XSYS.EXE strings.sys <filename>' where the 
  58. <filename> is the name of a plain text file to receive the text.  
  59. For example:
  60.  
  61.     C> XSYS STRINGS.SYS STRINGS.TXT
  62.  
  63. This command will write a text file called STRINGS.TXT that contains 
  64. the Searchlight strings as plain text.  By examining STRINGS.TXT 
  65. with your word processor, you will discover a series of lines which 
  66. look like this:
  67.  
  68.     10 'Searchlight BBS DOS Shell -- Type EXIT to return to SLBBS'
  69.     11 'Enter Filename:'
  70.     12 'Can't open file $'
  71.     13 '--- Log Open at '
  72.     14 '    Online: $'
  73.     15 'Message from $ on line $'
  74.  
  75. The format consists of a line number, followed by a space and a line 
  76. of text contained within single quote marks.  The single quotes are 
  77. not absolutely neccesary, but they are provided so that lines with 
  78. trailing spaces (such as line #13 above) will be clearly shown and 
  79. will not be truncated (many word processors truncate trailing 
  80. spaces).
  81.  
  82.     Line numbers are not continuous.  This is done deliberately to 
  83. facilitate expansion of the STRINGS.SYS file.  Messages are 
  84. generally grouped in the order that they appear in the program, 
  85. although this is not always the case.  Finally, replaceable 
  86. parameters are implemented in some strings via the '$' character.
  87. Upon printing these strings, Searchlight replaces the '$' with 
  88. an actual name, number or other value.  For example, in string #15,
  89. the username and node number of the station sending a message is 
  90. substituted into the string before it is printed.
  91.  
  92.     To change messages, edit your 'plain text' file with any ASCII 
  93. word processor.  If using a Wordstar-type editor, be sure to select 
  94. 'non-document' mode.  In general, simple word processers or program 
  95. editors are best used as these will not introduce any unwanted 
  96. characters into the data.
  97.  
  98.     When making changes, DO NOT change or add line numbers and do 
  99. not add or remove '$' characters from strings.  While you can change 
  100. the position of '$' characters if you wish, you cannot change the 
  101. order in which parameters will appear in strings containing more 
  102. than one '$'.  As mentioned above, many strings are formatted to a 
  103. particular length and it is best to leave these the same length.  In 
  104. some cases you may change an entire group of strings to a different 
  105. length.  However, you cannot change the format with which 
  106. Searchlight displays actual listings and data, so I suggest that you 
  107. do not try to change list headings, etc.  The maximum length of 
  108. strings should not normally exceed 80 characters (a few strings 
  109. contain color codes and are longer than 80 characters).
  110.  
  111.     It's worth noting that you can insert any additional, non-
  112. numbered lines into the source text as comments.  The MSYS program 
  113. reads only numbered lines, and will ignore anything else.
  114.  
  115.  
  116. REPACKING THE STRINGS.SYS FILE: MSYS.EXE ............................
  117.  
  118.     Once you have made the desired changes to the 'plain text' copy 
  119. of the strings, you'll will need to convert the source text back 
  120. into a STRINGS.SYS file for Searchlight to use.  To do that, use the 
  121. MSYS program provided by typing 'MSYS <filename> STRINGS.SYS', where 
  122. <filename> is of course the name of your plain-text file.  For 
  123. example, type
  124.  
  125.     C> MSYS STRINGS.TXT STRINGS.SYS
  126.  
  127. to regenerate STRINGS.SYS from the STRINGS.TXT file used in the 
  128. above example.  Remember to make sure you have a back-up copy of the 
  129. original STRINGS.SYS before you begin, as MSYS will overwrite it 
  130. with the changed data.  Run SLBBS and check that your string changes 
  131. have been installed.
  132.  
  133.     MSYS.EXE requires the input file to be in numerical order, and 
  134. will abort if it finds unordered lines in the input.  If you end up 
  135. with an out of order file, you can sort it with the system SORT 
  136. command before repacking it with MSYS.
  137.  
  138.     To create more changes in the future, simply edit your plain 
  139. text file again and run MSYS as required to regenerate the new
  140. STRINGS.SYS file.
  141.  
  142.  
  143. UPGRADING TO NEW VERSIONS OF SLBBS ..................................
  144.  
  145.     Each new version of Searchlight will likely contain a newly 
  146. revised STRINGS.SYS file.  In order to maintain your customizations
  147. across versions, we recommend the following procedure:
  148.  
  149.     - Unpack the ORIGINAL, unmodified STRINGS.SYS files from the old 
  150. and new versions of SLBBS to separate files.  Use a file compare 
  151. utility to pinpoint the differences between the two files.
  152.  
  153.     - Take any NEW strings that appear in the newer copy of 
  154. STRINGS.SYS and merge them into your modified plain-text strings 
  155. file.  Examine any CHANGED strings between the versions and replace 
  156. the old version of the string with the new.  Finally, delete any 
  157. strings which no longer appear in the new STRINGS file.
  158.  
  159.     - Use MSYS to repack your STRINGS.SYS file.  Never attempt to 
  160. run any new version of Searchlight with an old STRINGS.SYS file 
  161. until you update the old file.
  162.  
  163.  
  164. NOTES AND TIPS ......................................................
  165.  
  166.     - You cannot add your own colors to the internal Searchlight 
  167. strings, nor can you change the default colors with which strings 
  168. and parameters are shown (except of course by changing your color 
  169. settings in the CONFIG program).
  170.  
  171.     - Actual menu commands are not contained in STRINGS.SYS and thus 
  172. cannot be edited at this time (command descriptions can be edited, 
  173. but try to keep their lengths unchanged).
  174.  
  175.     - Strings used as choices on Options menus are expressed as 
  176. 'Choice1/Choice2/Choice3' etc.  These may be editied if desired, but 
  177. do not change the NUMBER of choices in the string.
  178.  
  179.     - Some strings, in particular 'Yes/No' option strings and other 
  180. short, common messages, are used in many different places in the 
  181. program.  By changing these strings, you affect every part of the 
  182. program in which they appear.
  183.  
  184.     - As of this writing (version 1.73), some strings remain 
  185. internal to the SYSOP program module.  These will be added to the 
  186. STRINGS.SYS file at a later date.  Also as of this writing, some 
  187. strings requiring parameters are expressed as two or more strings.
  188. These will likely be converted to a single string in the future.
  189.  
  190.  
  191. LANGUAGE TRANSLATIONS AND ADDITIONAL HELP ...........................
  192.  
  193.     Please contact me on Searchlight or Wise Byte BBS if you have 
  194. any questions about the STRINGS.SYS file.  In particular, I would 
  195. like to hear from anyone who would like to attempt a translation of 
  196. Searchlight into another language as I will be happy to provide any 
  197. additional documentation or help that you need.
  198.  
  199.  
  200. STRINGS.SYS FILE FORMAT .............................................
  201.  
  202.     You do not need to know or use the internal file format of the 
  203. STRINGS.SYS file to modify it with the XSYS and MSYS utilities.  
  204. However, we discuss the STRINGS file format here for those who wish 
  205. to write their own procedures.
  206.  
  207.     Searchlight's STRINGS.SYS file implements a logical array of up 
  208. to 2048 variable-length strings.  Each string has a fixed position 
  209. in the array; many array positions are unoccupied and thus reserved 
  210. for future expansion.  Within the SLBBS software, strings are 
  211. referenced by number only.  The STRINGS.SYS file contains an index 
  212. which allows fast, random access to the string data.
  213.  
  214.     The STRINGS.SYS file format is extremely simple.  At the 
  215. beginning of the file there is a 2048-byte record consisting of one 
  216. byte binary string lengths for all 2048 possible strings.  The 
  217. string lengths are followed immediately by the string texts, in 
  218. ascending numerical order, without delimiters.  Unused strings are 
  219. represented by zeros in the string length table and NO text appears 
  220. for these strings within the textual portion of the file.
  221.  
  222.     Searchlight uses the STRINGS.SYS file by reading the string 
  223. length table at start-up, then computing a larger table containing 
  224. the lengths and starting address of each string.  The starting 
  225. address is computed by consecutively adding string lengths together.
  226. At this point, any string in the file is quickly accessed by 
  227. performing a seek to its starting address, followed by a read of the 
  228. requisite number of bytes into a string buffer.  Where parameters 
  229. are concerned, subsequent processing replaces '$' characters with 
  230. the actual values from an internal stack.
  231.  
  232.     The STRINGS.SYS format is not difficult to use and you may wish 
  233. to develop your own procedures for processing and maintaining it, 
  234. especially if you are attempting a large scale translation.
  235.  
  236. --------------------------------------------------------------------
  237.                                                Frank LaRosa 6/27/89
  238.  
  239.