home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / updsig20.zip / UpdSig20.en < prev    next >
Text File  |  1999-11-14  |  8KB  |  169 lines

  1. Documentation for UPDSIG.EXE
  2. (c) 1999 Peter Engels
  3. translated by Michael Feldmann
  4.  
  5.  
  6. History
  7. =======
  8.  
  9. V 1.0 : primary release
  10. V 1.1 : bugfix : trap D when sig file not found bugfix 
  11.         bugfix : fixed 60h problem
  12. V 1.2 : implemented workaround for 49-days-problem
  13. V 1.3 : implemented manually adaptable day offset
  14.         freely configurable output text in respective native language
  15.         Attention : Calling parameters are now reported to the program by means of an external configuration file!
  16. V 1.4 : Position of message text now freely selectable
  17.         Added XUpdSig.EXE
  18.  
  19. V 1.5 : XUpdSig fix : the environment variable XUPDSIG had to be one of the first 32
  20.  
  21. V 1.6 : minor bugfix in XUpdSig
  22.  
  23. V 2.0 : message text completely user configurable
  24.  
  25.  
  26. What is UpdSig?
  27. ===============
  28. The little tool UpdSig adds or updates adjustable intervals in at most 10 different signature files for mailers and/or newsreaders the following line:
  29.  
  30. This OS/2 system uptime is 0d 5h 23m 45s 437ms (en).
  31.  
  32. The complete message text can now be freely chosen. The addendum »(en).«! is an internal signature which enables UpdIni to find the message text position within the signature file.
  33.  
  34. I wrote this little program so that everyone can enjoy this little gimmick hassle-free. The use of REXX scripts in conjunction with additional external tools seemed too large-scale for this purpose.
  35.  
  36.  
  37. What is XUpdSig?
  38. ================
  39.  
  40. This tool has the same effect, is, however, designed completely different.
  41.  
  42. Many news and mail clients, e.g. PMiNews and PMMail, allow editing mail right before sending by means of a Rexx script or some other EXE file. This is exactly what XUpdSig does. Just before a mail is sent, XupdSig reads the complete text and adds the uptime message at a predefined line.
  43.  
  44. Advantage: 
  45. There is no program running in the background, the process is being started only when it is needed. This allows, e.g., for powering off the harddisks, again. Besides, uptime is always exact to the very second.
  46.  
  47. Disadvantage: 
  48.  
  49. No workaround possible for the  "49-days-problem", and: the complete message must be read, I included  no extra gimmicks.
  50.  
  51. The commandline parameters
  52. ==========================
  53.  
  54. have disappeared. Instead, the program expects to find a textfile named UPDSIG.CFG in the same directory (obligatory) as the program UpdSig.EXE itself.
  55.  
  56. Example for a file UPDSIG.CFG:
  57.  
  58. ; Message text
  59.  
  60. MessageText =This OS/2 system uptime is %u days %2u:%2u hours and %2u seconds
  61.  
  62. ; Timing descriptions
  63. UpdateInterval = 600
  64. OffsetInDays = 123
  65.  
  66. ;all the signature files, paths included
  67. ;one line per file, max. 10 lines
  68. e:\internet\myreader\myreader.sig
  69. e:\internet\mynews\mynews.txt
  70.  
  71. Lines beginning with a ";" are comments.
  72.  
  73. In this example the mailer and the newsreader signature files will be updated in 10 minute (600 secs) intervals. Additionally, UpdSig believes the system to be up and running continuously for 123 days and adds this offset.
  74.  
  75. With UpdSig completely working in the background, there is no on-screen output whatsoever. In case UpdSig cannot find one of the signature files, you will only notice a short beep as a reaction to this error. The program will then terminate.
  76.  
  77.  
  78. The message text
  79. ================
  80.  
  81. The program looks through your message text and replaces predefined strings by the corresponding date and time information, the order exactly as given and unchangeable. Let us assume you defined the following message text:
  82.  
  83. This OS/2 system uptime is %ud %2uh %2um %2us %3ums
  84.  
  85. This will result in exactly the same message as generated by version 1.x. A parameter is defined by %u. The number enclosed indicates the field length for this item, with remaining spaces filled up by leading zeroes. 
  86.  
  87. The string %d results in skipping one parameter. If, e.g., you only want to show hours and minutes, the following string would be suitable:
  88.  
  89. This OS/2 system is running for %d%2u:%2u hours
  90.  
  91. The file UpdSig.Cfg contains an (almost) complete syntax diagram, coded in EBNF, where you can find more details.
  92.  
  93.  
  94. Installing UpdSig
  95. =================
  96.  
  97. Installing the program is extremely easy.
  98. Simply copy UpdSig.EXE and UpdSig.CFG in a directory of your choice on your harddisk.
  99. Next, you adjust UpdSig.CFG accordingly. Finally, you either add the line
  100.  
  101. run=drive:\path\updsig.exe
  102.  
  103. to your CONFIG.SYS, where "drive" means your harddisk and "path" means the path you copied UpdSig to.
  104.  
  105. or you create a symbol in your system startup folder. In this case, however, you will get a symbol on your desktop when running the program.
  106.  
  107. In case you want to start UpdSig on a running system, enter the following commandline in a OS/2 window:
  108.  
  109. detach drive:\path\updsig.exe
  110.  
  111. UpdSig adds the uptime message as the last line of your signature. If you want the message in a different line, just edit your signature file and move the uptime message line to the required place. UpdSig will then update the message at the place where you put it.
  112.  
  113.  
  114. Installing XupdSig
  115. ==================
  116.  
  117. Installation depends on the mail/news client used. I want to demonstrate the installation procedure in PMMail:
  118.  
  119. First, copy XUdSig.exe to any directory which is included in your CONFIG.SYS  path statement, preferably to X:\OS2\APPS;
  120. By default the messagetext is :
  121.  
  122. "This OS/2 system uptime is 3 days 04:37 hours"
  123.  
  124.  
  125. You may change this by setting an Environment variable in your CONFIG.SYS :
  126.  
  127. SET XUPDSIG=your own text (see chapter "message text")
  128.  
  129.  
  130. Now, in PMMail, in menu "account", open notebook "Account Settings", page "Rexx". Tick "MessageSendExit", and enter "XUpdSig.EXE" into the textbox. Do not activate  "Execute Script in Foreground"!
  131.  
  132. Finally open the page "Signature" and add the line "UpTimeMessage" at a place to your signature, where the uptime message should appear.
  133.  
  134. Repeat this procedure for each mail account you wish to work XUpdSig with.
  135.  
  136.  
  137. the "49-days-problem"
  138. =====================
  139.  
  140. The TopSpeed compiler used for development can only create 16-bit applications. Thus, there is only a 32-bit system counter available for counting the milliseconds elapsed since system startup. This counter will overflow after 49 days and 17 hours, approximately, restarting at zero. I implemented an internal overflow counter in UpdSig, which is incremented by 1 on every occurrence of the system counter overflow. I can use 10 bits of the former counter, resulting in approximately 50,000 days before there will again be an overflow. This means ca. 137 years and should be sufficient :-(
  141.  
  142. In case UpdSig is to be started on a machine already up since more than 49 days, you may want to use the parameter OffsetInDays. This parameter informs UpdSig about the number of days the system time is to be incremented. If not, please insert 0 here. No cheating please :-))
  143. (that was the reason why this option did not exist in earlier versions)
  144.  
  145.  
  146. Internals
  147. =========
  148.  
  149. UpdSig and XupdSig were written in TopSpeed Modula-2 and are 16-bit OS/2 programs. UpdSig is a multithreading program, thus causing almost no system load.
  150.  
  151. Registration
  152. ============
  153.  
  154. UpdSig and XUpdSig are freeware and may be used by anyone in any way, as long as the programs and their documentation are not changed.
  155. If you use one of the programs regularly I would appreciate a little email:
  156.  
  157. email : p.engels@gmx.de
  158. URL   : http://www.uni-bonn.de/~uzs0ad
  159.  
  160.  
  161. Legal Disclaimer:
  162. =================
  163. Permission is granted to any individual or institution to use, copy, or redistribute this executable as long as it is not modified and that it is not sold for profit.
  164. UpdSig and XupdSig are provided AS IS and come with no warranty of any kind, either expressed or implied. In no event will the copyright holder be liable for any damages resulting from the use of this software.
  165.  
  166. Have fun with UpdSig!
  167.  
  168. Peter Engels, November 1999
  169.