home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / mailers / squser44.zip / SQUSER44.DOC < prev    next >
Text File  |  1993-06-06  |  20KB  |  529 lines

  1.  
  2.  ╔═════════════╗
  3.  ║ ╔═════════╗ ║
  4.  ║ ║ SQUsers ║ ║
  5.  ║ ╚═════════╝ ║
  6.  ╚═════════════╝
  7.  
  8.   A Fidouser.lst generator for squish message bases amongst other things.
  9.  
  10.  ╔══════════════╗
  11.  ║ Legal Stuff: ║
  12.  ╚══════════════╝
  13.  
  14.   SQUsers is my copyright material. You can use it! You can give it to
  15. other people to use. It is not, however, guaranteed to do anything. In
  16. the event that anything goes wrong, my liability is limited to the
  17. amount that you can prove you paid me directly for it - and I don't
  18. charge for it! It should work as described below. It's not my fault if
  19. it doesn't, but if you're polite I'll try and fix it. It works on my PC,
  20. I do not guarantee it will work on yours.
  21.  
  22.   You may not distribute SQUsers without this document file. You may not
  23. sell SQUsers. You may not charge in any way for the distribution of
  24. SQUsers. This includes shareware libraries and BBSes that charge for
  25. access. SQUsers must be distributed free of all charge. If you run a
  26. software library and offer SQUsers, then if someone sends you a disk and
  27. return postage you have to give them a copy. If you run a subscription
  28. BBS, SQUsers must be in your free download area or nowhere on your
  29. system. I'm sure you get the idea.
  30.  
  31.   In other words, I didn't write this program, which I am releasing free
  32. to anyone that wants it, so that anyone else could make money out of
  33. copying it!
  34.  
  35.  ╔═════════╗
  36.  ║ Purpose ║
  37.  ╚═════════╝
  38.  
  39.   SQUsers is a program designed to generate fidouser.lst style netmail
  40. address look-up files from squish style message bases, fido *.msg style
  41. message bases, nodelists, old fidouser.lst style files and msged/squish
  42. style cc lookup files.
  43.  
  44.  ╔═════════════════╗
  45.  ║ Historical Note ║
  46.  ╚═════════════════╝
  47.  
  48.   I wrote SQUsers in TurboC 1.5 originally, and it was not bad, but it
  49. had a few problems. I have recently upgraded my compiler to BorlandC
  50. 3.00++, and this seems to have got rid of some of the problems, it also
  51. means I can compile 80286 code. The program is now up to version 4.10,
  52. and this will probably be the first public beta version.
  53.  
  54.  ╔══════════════╗
  55.  ║ Useage Notes ║
  56.  ╚══════════════╝
  57.  
  58.   The archive contains two versions of the program, squservx.exe is an
  59. 8086 compiled version, squservx.286 is the 80286 code. It also contains
  60. this doc file. "vx" are the major and minor version numbers. Released
  61. versions will always have a minor version of 0. Anything other than
  62. squserx0 is a beta version. The same applies to the docs (this file) and
  63. the distribution archive.
  64.  
  65.   SQUsers will use as much memory as it can find to hold a linked list
  66. of names and fido addresses, and if it fills the whole of available ram
  67. up will then start using temp data files. Processing the full FidoNet
  68. nodelist, 20 Mbytes of squish message files, a 1.3 MegaByte input file
  69. (from an earlier run), several smaller files etc created a total of five
  70. temp files, another 3 were created during the merger, and finally the
  71. output file was created - on my 25 MHz 80386 with 6 Mb of disk cache
  72. this took about 45 minutes - but it was a lot of data to process.
  73.  
  74.   The theoretical limit to the number of usernames is about 16 million,
  75. but I haven't proved that, and it will probably be a bit higher. Someone
  76. might reach it one day. That will be some address book!
  77.  
  78.   Note that SQUsers creates temp files of the form $SQUSER$.xxx where
  79. xxx is a 3 digit hex number. Please make sure no such files exist in
  80. the directory you run SQUsers from, it will check when it starts, and
  81. refuse to do anything if it finds any!
  82.  
  83.   SQUsers can take a config file name as its only parameter, failing
  84. that it will look for "SQUSERS.CFG" in the current directory. The config
  85. file tells SQUsers a lot about how it should work, where to find files
  86. and where to leave its output file. If SQUsers is unable to find a
  87. config file, it will create a very short sample config and exit.
  88.  
  89.  ╔════════╗
  90.  ║ Output ║
  91.  ╚════════╝
  92.  
  93.   SQUsers will let you know what it's doing as it processes the config
  94. file and the input files. It may occasionally reccomend that you run
  95. sqpack or sqfix on a squish area, and will report any problems it has
  96. internally. The output can be redirected to a log file if you start
  97. SQUsers up with a redirection for stdout on the command line, eg:
  98.  
  99. SQUSERS > squsers.log
  100.  
  101.  ╔══════════════╗
  102.  ║ Error Levels ║
  103.  ╚══════════════╝
  104.  
  105.   SQUsers will exit with an errorlevel of 0 if it ends OK, or with 1 if
  106. there's a problem - it will also print an error message and give an
  107. internal error code. If the problem isn't obvious then the best thing to
  108. do is netmail me, it may mean a problem with the program. (I hope not.)
  109. At the moment the program does a lot of error checking on file open and
  110. close, memory allocation, reads and writes etc. As I get more confident
  111. with it, I may remove some of this to speed things up.
  112.  
  113.  ╔═════════════════╗
  114.  ║ The Config File ║
  115.  ╚═════════════════╝
  116.  
  117.   This is a sample SQUsers.CFG file:
  118.  
  119. ;-------------------------------------------------------------------------
  120. ;
  121. ; Squsers.cfg file for 2:251/20
  122. ;
  123. ; Use buffers for textfile read / write
  124. ;
  125. buffers    on
  126. ;
  127. ; Output file: squsers.lis in current dir
  128. ;
  129. outfile     squsers.lis
  130. ;
  131. ; My address 2:251/20
  132. ;
  133. address     2:251/20
  134. ;
  135. ; Old fidouser.lst style list to use
  136. ;
  137. oldlist     c:\fd\squsers.lis
  138. ;
  139. ; And another old fidouser.lst file
  140. ;
  141. oldlist     c:\fd\sysops.lis
  142. ;
  143. ; Squish files c:\sqbase\fido\*.sqd
  144. ;
  145. squish      c:\sqbase\fido\*.sqd
  146. ;
  147. ; I want the adresses used in the UK sysop echo (region25) to be used in
  148. ; preference to any other addresses from nodelist or message bases.
  149. ;
  150. squish      c:\sqbase\fido\region25.sqd
  151. ;
  152. ;  **** Beta Option Only ****
  153. ;
  154. ;  Suppose it crashes on your netmail area, turn on enhanced progress
  155. ;  reporting here .....
  156. ;
  157. debug       on
  158. ;
  159. ; netmail messages c:\netmail\*.msg
  160. ;
  161. ; This is also used for echomail kept in FTS1-015 (Fido) *.msg format.
  162. ;
  163. ; The fido directory spec must end in a trailing backslash! This was not
  164. ; made clear in earlier versions!!
  165. ;
  166. fido        c:\netmail\
  167. ;
  168. ;  **** Beta Option Only ****
  169. ;
  170. ;  Turn off the enhanced progress reporting used on the netmail area
  171. ;
  172. debug       off
  173. ;
  174. ; Use nodelist c:\nodelist\nodelist.*, process the whole nodelist. You can
  175. ; process multiple nodelists. If a wildcard is used then it will look for
  176. ; file.nnn where nnn is a numeric sequence.
  177. ;
  178. nodelist    c:\nodelist\nodelist.*    0    0     0
  179. ;
  180. ; Use nodelist c:\nodelist\nodelist.*, process zone 2 region 25 to make
  181. ; sure that where a name has more than one address I get the UK one.
  182. ;
  183. nodelist    c:\nodelist\nodelist.*    2    25    0
  184. ;
  185. ; I want the adresses used in the UK sysop echo (region25) to be used in
  186. ; preference to any other addresses from nodelist or message bases, so I
  187. ; insert that next.
  188. ;
  189. squish      c:\sqbase\fido\region25.sqd
  190. ;
  191. ; This fidouser.lst style file has some addresses that I want to over-ride
  192. ; any other addresses found for that person
  193. ;
  194. oldlist     c:\fd\override.lis
  195. ;
  196. ; MsgEd/Squish Beta Team List
  197. ;
  198. pvtlist     c:\fd\betamsq.lis
  199. ;
  200. ; My echomail links
  201. ;
  202. pvtlist     c:\fd\links.lis
  203. ;
  204. ; My SQUsers beta testers
  205. ;
  206. pvtlist     c:\fd\squser.lis
  207. ;
  208. ; End of squsers.cfg file
  209. ;
  210. ;-------------------------------------------------------------------------
  211.  
  212.   Lets look at the file. The comment lines are indicated by a semi-colon
  213. in the first column - I know some people support a semi-colon on a
  214. command line with comments after it, but I haven't got that far yet.
  215. Maybe next week / month / year. Likewise all commands begin in column
  216. one. All keywords are optional, but if you don't put in a sensible
  217. selection the program may not do very much other than create a zero
  218. length list file. If there is no config file, it won't even do that. It
  219. is obviously a good idea to define at least one input file using either
  220. squish, fido, pvtlist, oldlist or nodelist if you want the program to do
  221. anything sensible.
  222.  
  223.   The file is parsed line by line, keywords can be used as many times as
  224. is needed to get the desired result. This can be seen in the above file.
  225.  
  226.   The numbers of spaces dividing commands and parameters on each line
  227. are not too important, as long as it's at least one, but each command
  228. and the associated parameter(s) must be on a single line.
  229.  
  230.  ┌──────────────────┐
  231.  │ buffers  <state> │
  232.  └──────────────────┘
  233.  
  234.   The buffers command controls whether squish uses internal 16Kb buffers
  235. when reading from and writing to text files. <state> may be "on" or
  236. "off". Text files are the output file, any input files defined as
  237. nodelist, fido, pvtlist or oldlist, and any temp files created due to
  238. insufficient memory to hold all the usernames & addresses found as a
  239. single group of lists. Buffers are allocated and deallocated on the fly,
  240. the maximum overhead during data collection is 16 Kb, although this
  241. rises to 48 Kb when merging temp files. (There is no linked list in use
  242. while merging temp files though.) It is suggested that you either omit
  243. the command (the default is off) or use "buffers off" if you have a read
  244. ahead cache of any sort and / or a write cache, however it may be
  245. worthwhile to experiment. If you have no cache at all, "buffers on" will
  246. almost allways give a noticeable improvement in processing speed.
  247.  
  248.  ┌─────────────────────┐
  249.  │ outfile  <filename> │
  250.  └─────────────────────┘
  251.  
  252.   This tells SQUsers where to put its output, the default if this is
  253. left out is to create "squsers.lst" in the current directory. If more
  254. than one outfile keyword is used, the last one in the config file will
  255. determine the output file. It does not make a lot of sense to use this
  256. entry more than once.
  257.  
  258.  ┌────────────────┐
  259.  │ debug  <state> │
  260.  └────────────────┘
  261.  
  262.   New parameter for beta versions, state can be "on" or "off", and
  263. enables / disables enhanced progress reporting, including procedure &
  264. function entry with parameters etc.
  265.  
  266.  ┌────────────────────────┐
  267.  │ address <fido address> │
  268.  └────────────────────────┘
  269.  
  270.   This is your fidonet address. No-one will be included in the list if
  271. their address matches yours, it is assumed that you don't need to use
  272. netmail for local users. If you leave this out, SQUsers will just
  273. include everyone it finds.
  274.  
  275.   Setting this to 0:0/0 disables address rejection, so you can have your
  276. Fido address rejected processing one set of input files, then you
  277. othernet address for your othernet files, and your thirdnet address for
  278. the next set etc ......., then finally turn it off while you process the
  279. local message area. This would make sure that you didn't send netmail to
  280. other systems for people who used your local netmail area.
  281.  
  282.  ┌─────────────────────┐
  283.  │ Oldlist  <filename> │
  284.  └─────────────────────┘
  285.  
  286.   Filename must be a real filename, no wildcards.
  287.  
  288.   This indicates an old fidouser.lst style file to incorporate in to the
  289. new list. Note that the only format requirements for the file are as
  290. follows:
  291.  
  292. (a) It must have one entry per line.
  293. (b) Entries must be: <lastname>, <firstnames><spaces><address>
  294. (c) Spaces must have two or more spaces.
  295.  
  296.   Multiple lists can be combined using squsers, in the order that they
  297. are included. The latest address found for an individual will be the one
  298. that ends up in the output file. Although FIDOUSER.LST files are
  299. normally sorted, and usually have the addresses right justified, SQUsers
  300. isn't too fussy about this, instead it only requires that there be at
  301. least two spaces between the username and the address. As the standard
  302. for max name length is 36 characters in the FTSC1 message and packet
  303. standards, and the Squish message base format, and as the address in a
  304. fidouser.lst file is meant to start after column 40-something, this
  305. should not be a problem.
  306.  
  307.  ┌────────────────────┐
  308.  │ squish  <filespec> │
  309.  └────────────────────┘
  310.  
  311.   This is the filespec of a squish area (or areas) to process. Again, if
  312. you have multiple directories, or wish to specify an order for
  313. processing your files instead of the order in which the directory
  314. look-up routine finds matching files, you can use the keyword as many
  315. times as you like.
  316.  
  317.   Filespec may be a full path and filename of a single *.sqd file, or a
  318. wildcard of the form [drive:][\path\]*.sqd where drive and path are
  319. optional, and * may be a partial or completely wildcarded name. The .sqd
  320. is important.
  321.  
  322.   For example, supposing you have squish areas for fidonet, worldnet and
  323. copsnet, and in addition want your fido regional sysops echo to be used
  324. if a name crops up with more than one address:
  325.  
  326. squish     c:\squish\msg\fido\*.sqd
  327. squish     c:\squish\msg\cops\*.sqd
  328. squish     c:\squish\msg\world\*.sqd
  329. squish   c:\sqbase\msg\fido\uksysop.sqd
  330.  
  331.   Note that in this example, if the same surname crops up in more than
  332. one area, the address used will be the last one processed, so if Joe
  333. Smith has entered messages in every message area on your system, the Joe
  334. Smith who left a message in uksysop is the one who ends up in the
  335. userlist.
  336.  
  337.  ┌───────────────────┐
  338.  │ Fido  <directory> │
  339.  └───────────────────┘
  340.  
  341.   The path to any fido (*.msg) areas you want to process, this is used
  342. in a similar way to the squish <filespec> keyword, but you may only
  343. specify one directory (echomail or netmail area) per line, with no
  344. wildcards. The path must terminate in a backslash '\' character.
  345.  
  346.  ┌───────────────────────────────────────────┐
  347.  │ nodelist <filespec> <zone> <region> <net> │
  348.  └───────────────────────────────────────────┘
  349.  
  350.   If the filetype is wildcarded, as in the above example config file,
  351. SQUsers will try and find a file matching filespec.nnn, otherwise it
  352. will try and match the actual file. Zone, Region and Net work as
  353. follows:
  354.  
  355. nodelist c:\nodelist\nodelist.* 0 0 0
  356.  
  357.   This will try and process the whole nodelist, it will (if this is a
  358. Fido nodelist) take a lot of time and involve temp data files and lots
  359. of disk access.
  360.  
  361. nodelist c:\nodelist\nodelist.* 2 0 0
  362.  
  363.   This will process all the nodes in zone 2. You can of course use other
  364. zones, and to process all the nodes except zone 5 (for example) you
  365. would include separate lines for zones 1, 2, 3, 4 and 6.
  366.  
  367. nodelist c:\nodelist\nodelist.* 2 25 0
  368.  
  369.   This will process only those nodes within zone 2 region 25.
  370.  
  371. nodelist c:\nodelist\nodelist.* 2 25 251
  372.  
  373.   This will process only those nodes in zone 2, region 25, net 251.
  374.  
  375. nodelist c:\nodelist\nodelist.* 2 0 0
  376. nodelist c:\nodelist\nodelist.* 1 14 141
  377.  
  378.   This will process all of zone 2 and net 141, region 14 in zone 1.
  379.  
  380.   SQUsers can produce a very selective extract from the nodelist if the
  381. config file is set up correctly. SQUsers can not process nodelists that
  382. use "boss" or "point" keywords.
  383.  
  384.  ┌────────────────────┐
  385.  │ Pvtlist <filename> │
  386.  └────────────────────┘
  387.  
  388.   This is another way to incorporate lists of people in the final
  389. fidouser.lst file, the format of a pvtlist is one entry per line, in the
  390. form:
  391.  
  392. <name>!<address>
  393.  
  394. eg:
  395.  
  396. John Doe!1:222/333
  397. Denis McMahon!2:251/20
  398.  
  399. etc ......
  400.  
  401.   Note that, if you happen to use MsgEd/Squish by John Dennis, this is
  402. the same format as the netmail cc files use. This means that you can
  403. incorporate the names and addresses in those files straight in to your
  404. userlist.
  405.  
  406.  ╔═════════════════════╗
  407.  ║ Processing Sequence ║
  408.  ╚═════════════════════╝
  409.  
  410.   Note that in the above example config, the input files are processed
  411. in the following order:
  412.  
  413. oldlist     c:\fd\squsers.lis
  414. oldlist     c:\fd\sysops.lis
  415. squish      c:\sqbase\fido\*.sqd
  416. squish      c:\sqbase\fido\region25.sqd
  417. fido        c:\netmail\*.msg
  418. nodelist    c:\nodelist\nodelist.*    0    0     0
  419. nodelist    c:\nodelist\nodelist.*    2    25    0
  420. squish      c:\sqbase\fido\region25.sqd
  421. oldlist     c:\fd\override.lis
  422. pvtlist     c:\fd\betamsq.lis
  423. pvtlist     c:\fd\links.lis
  424. pvtlist     c:\fd\squser.lis
  425.  
  426.   Remember that the last address found is the one used, so, for
  427. example, an address in the oldlist file c:\fd\override.lis would be used
  428. in preference to one found in the nodelist if the usernames were the
  429. same, and the pvtlist files take priority over the squish and fido
  430. message areas etc.
  431.  
  432.   Note that this rule may not hold true if temp files are used, as they
  433. may be merged in the wrong order.
  434.  
  435.  ╔═════════╗
  436.  ║ History ║
  437.  ╚═════════╝
  438.  
  439.   This is a precis of the revision history etc.
  440.  
  441.   Version 1.00 - First public beta - several problems, and I had a
  442. compiler problem at the same time. However, I kept tinkering and it
  443. slowly improved through Version 2.0. Version 2 would usually generate a
  444. reasonable userlist from a group of squish areas, but not much else.
  445.  
  446.   Version 3.00 - This was the first one I compiled with the Borland C++
  447. V3.00 compiler - and was a great place to start for the next stage. The
  448. enhancements from here on in are numerous, bute here goes, this list
  449. takes it up to 4.2, and is not in order of implementation:
  450.  
  451.         Improved list handling and io routines for spead.
  452.  
  453.         Implemented Nodelist, PvtList, OldList handlers.
  454.  
  455.         Got Fido handler to work.
  456.  
  457.         Detects Squish empty / bad frames instead of crashing.
  458.  
  459.         Temp File Merger now combines files in the right order.
  460.  
  461.         Comments in the config file.
  462.  
  463.         Make a sample config if not found.
  464.  
  465.         Doesn't write empty files any more. (It actually deletes them
  466.         after writing!)
  467.  
  468.         Error exit clean-up improved.
  469.  
  470. Version 4.3
  471.  
  472.   Fixed a problem with the Fido *.msg handling - I was using the wrong
  473. pointer when I filled a block of memory with 0x00 bytes - this was found
  474. after Clay reported a lock-up.
  475.  
  476.   Fixed a piece of code in the Squish area handling - it wasn't always
  477. processing the whole message base.
  478.  
  479.   Thanks to Clay Tinsley for pointing these ones out! :-)
  480.  
  481.   Added the "Buffers" config command.
  482.  
  483.   Realised that even with the modified code, SQUsers could not allways
  484. be guaranteed to combine temp files such that the "use last address
  485. found" principle was guaranteed to work all the time.
  486.  
  487.   I'm working on this, but I can't see an easy to implement and
  488. foolproof solution at the moment.
  489.  
  490. Version 4.4
  491.  
  492.   Removed some code that I left in there while debugging. Whoops.
  493.  
  494.   Implemented "User Debug" option, on beta versions enhanced progress
  495. reporting can be enabled at any point in the config file with "debug on"
  496. and disabled with "debug off". Like address and buffers, this applies
  497. while processing the input files listed after the switch.
  498.  
  499.   Compiled beta versions with Debugger info, if you have Turbo Debugger
  500. and know how to use it you may be able to give me the line numbers in
  501. the source file that cause the errors.
  502.  
  503.   A couple of cosmetic changes, reporting nets skipped while looking
  504. through the nodelist for the required zone / region / net was generating
  505. a lot of noise on the screen.
  506.  
  507.  ╔═════════════════╗
  508.  ║ And Finally ... ║
  509.  ╚═════════════════╝
  510.  
  511.   Thanks to Don Dawson and Johan Lindqvist for their help with testing
  512. version 1, and (I hope) version 4.xx. Thanks also to all the others that
  513. have been helping me with version 4.xx testing, to Scott Dudley who
  514. developed the Squish message base and John Dennis who developed Jim
  515. Nutts' MsgEd code in to a Squish compatible message editor.
  516.  
  517.   All trade marks copyrights etc are acknowledged.
  518.  
  519.   I think that explains it all. The author may be contacted at:
  520.  
  521. 2:251/20@FidoNet
  522.  
  523.   Which is a mail only node accepting netmail from listed FidoNet nodes
  524. between 00:00 and 06:00 UTC.
  525.  
  526. Denis McMahon
  527. 29th May 1993
  528.  
  529.