home *** CD-ROM | disk | FTP | other *** search
/ C!T ROM 2 / ctrom_ii_b.zip / ctrom_ii_b / PROGRAM / BASIC / QBS_0103 / QBS103-1.DOC < prev    next >
Text File  |  1993-04-30  |  46KB  |  1,621 lines

  1. ════════════════════════════════════════════════════════════════════════════════
  2.  Area:    QuickBasic
  3.   Msg:    #7787
  4.  Date:    04-02-93 23:06 (Public)
  5.  From:    VICTOR YIU
  6.  To:      ALL
  7.  Subject: VERY Important Message!
  8. ────────────────────────────────────────────────────────────────────────────────
  9. Hi, All!  ========= IMPORTANT ANNOUCEMENT =========>
  10.  
  11.     Finally, PostIt! 6.0 will be posted.  I won't repeat the new features,
  12. but they can be found in PostIt!'s header.
  13.  
  14.     It is =ESSENTIAL= that you capture the next 16 messages.  From this
  15. now on, PostIt!'s scripts will not be able to be decoded by QuickBASIC
  16. alone.  It will require PostIt! 6.0 to extract the file.
  17.  
  18.     The new format is so much more compact -- primarily due to the removal
  19. of the decoder.  It was pretty wasteful to post the decoder again and again,
  20. with every binary file.  That's why it has been incorporated into PostIt! 6.0.
  21.  
  22.     You may wonder why this release is 16 messages long.  That may sound like
  23. much, but it isn't!  The line length has been shortened to =65= and page
  24. length to =85=.  All that contribute to more line wrapping, thus increasing
  25. the number of posts.  The 'real' file size of PostIt! 6.0 is only 1K bigger
  26. than 5.1.  Why '65'?  To make sure all people will recieve PostIt! without
  27. things being truncated.
  28.  
  29.     I really hope the complete PostIt! package reaches everybody reading this
  30. echo.  I am excited to post my latest additions, so here it is.....
  31.  
  32. Victor
  33.  
  34. ... Shir I ken spel, I grahdooated puhblik hi skul!
  35. --- Blue Wave/RA v2.12 [NR]
  36.  * Origin: Hard Disc Cafe | Houston Texas | (713) 589-2690 |  (1:106/30.0)
  37.  
  38.  
  39.  
  40. ════════════════════════════════════════════════════════════════════════════════
  41.  Area:    QuickBasic
  42.   Msg:    #7788
  43.  Date:    04-02-93 22:57 (Public)
  44.  From:    VICTOR YIU
  45.  To:      ALL
  46.  Subject: PostIt! 6.0   1/16
  47. ────────────────────────────────────────────────────────────────────────────────
  48. '________O_/________________________| SNIP |______________________\_O_______
  49. '        O \                        | HERE |                      / O
  50. 'This file created by PostIt! v6.0.
  51. '>>> Start of page 1.
  52.  
  53. '     ╔═══════════════════════════════════════════════════════╗
  54. '     ║      PostIt! THE Binary <-> BASIC Script Creator      ║
  55. '     ╚═══════════════════════════════════════════════════════╝
  56. '                               * * *
  57. '     ╔═══════════════════════════════════════════════════════╗
  58. '     ║          Postit! v6.0  by Rich Geldreich 1992         ║
  59. '     ╟───────────────────────────────────────────────────────╢
  60. '     ║       Decoder further optimizied by Jim Giordano      ║
  61. '     ╟───────────────────────────────────────────────────────╢
  62. '     ║     User Interface and Graphical embellishments by    ║
  63. '     ║          Mark H Butler & Quinn Tyler Jackson          ║
  64. '     ╟───────────────────────────────────────────────────────╢
  65. '     ║    Ability to post and wrap plain code ─- as text!    ║
  66. '     ║   Based on MsgSplit by Scott Wunsch and Victor Yiu.   ║
  67. '     ╟───────────────────────────────────────────────────────╢
  68. '     ║   And now, with compression and a new script format   ║
  69. '     ║   to reduce the echo bandwidth required to post your  ║
  70. '     ║                 file, from Victor Yiu!                ║
  71. '     ╚═══════════════════════════════════════════════════════╝
  72. '
  73. 'Purpose:
  74. ' To enable the posting of compressed listings on a text only net.
  75. ' This program takes a binary input file and converts it to a series
  76. ' of small, postable files which other people can capture and run to
  77. ' get the original binary file.
  78. '
  79. 'Instructions:
  80. ' Just  follow  the prompts.  You give the input & output filenames,
  81. ' the page length and the number of lines you want reserved for your
  82. ' stuff and it does the rest. If nothing is inputted for a prompt, a
  83. ' default value will be used for it instead.
  84. '
  85. '
  86. 'Additions by Victor Yiu:
  87. '
  88. '     (26 March 1993)
  89. ' NEW!  Addition of the new high efficiency script format, saving
  90. '   800 bytes over the old format!  Still supports the old self-
  91. '   extracting model for compatibility.  New format allows you to
  92. '   run the cut script from the echo without editing!  Just paste
  93. '   all the pages together and run it through PostIt!.
  94. ' Now, all line lengths will remain constant, even with compression.
  95. '   It results in less unnecessary carriage returns and `G"' lines!
  96. ' After this update, I don't see too many improvements ahead -- it's so
  97. '   jam packed with features!  ;-)
  98. ' Some unnecessary & ancient comments are removed for space efficiency
  99. '   The source is also modified so that most lines are less than
  100. '
  101.  
  102. '     (16 March 1993)
  103. ' Victor Yiu nominated & appointed the keeper of PostIt! by Zack Jones.
  104. '
  105. '     (9 March 1993)
  106. ' Version 5.1 speeds the binary decoder up and cleans the PostIt!
  107. ' source code enormously.  Decompression routine rewritten.
  108. ' Message splitter's tab stop expansion is now user modifiable.
  109. '
  110. '     (28 February 1993)
  111. ' Now, save an average of 10% on posting object files!  This version
  112. ' includes compression of duplicate characters.  Also fixes several
  113. ' bugs and quirks (visual & operational), and adds a disk buffer for
  114. ' increased conversion speed.  The text wrapping problem with
  115. ' quotes has also been totally elimintated; now, the comments
  116. ' starting later in the line extending past the wrap will not be
  117. ' messed up during splitting, as is was before.  Twirler was
  118. ' optimized/fixed (MsgSplit).  Decoder was optimized more, but more
  119. ' code had to be added on to handle compression.
  120. '
  121. 'Additions by Scott Wunsch:
  122. '     (13 February 1993)
  123. ' PostIt! is no longer just for binary files!  It can be used to post
  124. ' BASIC code,  and will  do so in  text format.   Code will  be word-
  125. ' wrapped appropriately, and  underscores inserted to allow QB/PDS to
  126. ' put it back  together  again  for you.   Unlike past  code-wrapping
  127. ' programs, PostIt! can even handle quoted strings properly.
  128. '
  129. 'Additions by Mark Butler:
  130. '     (8-30-1992)
  131. ' Postit!  output filename now defaults to the input filename if none
  132. ' is given.   If the input filename is 8  characters  in  length  the
  133. ' default output filename will be truncated to the first 7 characters
  134. ' of  the input filename.   The default output extension is now "BAS"
  135.  
  136. '>>> Continued on page 2
  137.  
  138. --- Blue Wave/RA v2.12 [NR]
  139.  * Origin: Hard Disc Cafe | Houston Texas | (713) 589-2690 |  (1:106/30.0)
  140.  
  141.  
  142.  
  143. ════════════════════════════════════════════════════════════════════════════════
  144.  Area:    QuickBasic
  145.   Msg:    #7789
  146.  Date:    04-02-93 22:58 (Public)
  147.  From:    VICTOR YIU
  148.  To:      ALL
  149.  Subject: PostIt! 6.0   2/16
  150. ────────────────────────────────────────────────────────────────────────────────
  151. '>>> Start of page 2.
  152.  
  153. ' instead of nothing.  I also added a little bit of text mode "screen
  154. ' magic" to further augment  Quinn T. Jackson's copyright screen  and
  155. ' warning screen additions.   Fixed bug from version 2.8  that caused
  156. ' succeeding output files after the first  one to overwrite  the same
  157. ' filename due to the filename number suffix not incrementing. I also
  158. ' caused the program to skip the opening screens if an input filename
  159. ' is entered from the command line when the program is run. (I didn't
  160. ' think folks wanted to see those screens *every* time they wanted to
  161. ' use PostIt! Sometimes ya just want to get on with it right?)
  162. '      (9-1-1992)
  163. ' Hardcoded a  CHR$(32)  (a space character)  to the end of each full
  164. ' length G-sub data line in the attempt to thwart  line truncation in
  165. ' transit on the Net. Just a theory that I hope is correct! -> MHB
  166. '
  167. 'Additions and Modifications by Quinn Tyler Jackson (August 22, 1992):
  168. '
  169. ' Postit! now prints a warning screen, warning users of possible
  170. ' abuse of binary-to-text posts.  Also, instead of the old '80% DONE'
  171. ' meter, this version uses a graphical bar that looks like this:
  172. '
  173. ' ▓▓▓▒▒▒▒▒▒▒▒▒▒ (One block=2% completion.)
  174. '
  175. ' I have also added a nice starting screen, giving Rich  credit where
  176. ' it is due!   Bells and whistles, boys!
  177. ' <qtj>
  178. '
  179. 'Note to QBasic users:
  180. ' The  COMMAND$  function  is  utilized in this version so if you are
  181. ' using QBasic you should delete  the  lines marked "**** Delete this
  182. ' line for QBasic use ******".   All such lines *MUST* be deleted  or
  183. ' REMmed out for this version to work with QBasic.
  184. '
  185. 'Note:   The  decoder outputted  with  the  encoded  data   has  been
  186. ' "compressed" in order to squeeze it into 8 lines.  Each line of the
  187. ' decoder is less that 72 characters, so don't worry if it looks like
  188. ' some lines are too long when you load it into QB.   When QB expands
  189. ' the decoder to make  it  look  "nicer,"  some  lines will look like
  190. ' they're too long to put on an echo, even though they aren't.   What
  191. ' I'm trying to say is:   Only  post  the  files  outputted  by  this
  192. ' program, don't load them into QB and resave them.
  193. '
  194. 'Tech stuff:
  195. ' The output files created  by  this  program  should be "echo safe".
  196. ' The following 64 characters are used to encode the binary file:
  197. '
  198. ' abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789()
  199. '
  200. ' The script file is checked at runtime to see if all of the  encoded
  201. ' data  is  present.   Also,  a simple checksum is used to inform the
  202. ' user if the script file was  screwed or not.   (The file created is
  203. ' not deleted if this occurs, however.   If only a few characters are
  204.  
  205. ' garbled,   then  some  of the output file may be still extractable.
  206. ' But if the 6-bit output  stream  falls  out of sync, then there's a
  207. ' very good  chance  that  the  rest  of  the  archive  is  completly
  208. ' unusable.)
  209. '
  210. ' If anybody has any suggestions,  or finds any bugs in this program,
  211. ' then please drop me a message and tell me about it! -Rich Geldreich
  212.  
  213. '********************************************************************
  214. DEFINT A-Z
  215.  
  216. CONST True = -1, False = NOT True
  217. CONST frontpage = 0, backpage = 1   '<-- for popping the warning
  218.                                     '    screen in and out -> MHB
  219. DECLARE SUB CopyrightScreen ()
  220. DECLARE SUB Delay (Secs!)
  221. DECLARE SUB DrawBox (Uprow, Ltcol, Lorow, Rtcol, Solid)
  222. DECLARE SUB ExtractFile ()
  223. DECLARE SUB Initialize ()
  224. DECLARE SUB GetInformation ()
  225. DECLARE SUB JustDoIt ()
  226. DECLARE SUB Linein (LineColor%)
  227. DECLARE SUB Lineout (LineColor%)
  228. DECLARE SUB MsgSplit (SourceFile$, RealSource$, DestFile$,_
  229.  DestExten$, PageLength, LinesOut, LineLength) 'SAW
  230. DECLARE SUB PrepareFile ()
  231. DECLARE SUB PrintDecoder ()
  232. DECLARE SUB PrintLine (A$)
  233. DECLARE SUB PutByte (A)
  234. DECLARE SUB PutBytes (A)
  235.  
  236. '>>> Continued on page 3
  237.  
  238. --- Blue Wave/RA v2.12 [NR]
  239.  * Origin: Hard Disc Cafe | Houston Texas | (713) 589-2690 |  (1:106/30.0)
  240.  
  241.  
  242.  
  243. ════════════════════════════════════════════════════════════════════════════════
  244.  Area:    QuickBasic
  245.   Msg:    #7790
  246.  Date:    04-02-93 22:59 (Public)
  247.  From:    VICTOR YIU
  248.  To:      ALL
  249.  Subject: PostIt! 6.0   3/16
  250. ────────────────────────────────────────────────────────────────────────────────
  251. '>>> Start of page 3.
  252.  
  253. DECLARE SUB Shadow (Uprow, Ltcol, Lorow, Rtcol)
  254. DECLARE SUB ShortCopyright ()
  255. DECLARE SUB Twirl ()
  256. DECLARE SUB WarningScreen ()
  257. DECLARE FUNCTION Analyze (Filename$)
  258. DECLARE FUNCTION CheckForFile& ()
  259. DECLARE FUNCTION Compress$ (A$)
  260. DECLARE FUNCTION GetInput$ (Prompt$, MaxLen%)
  261. DECLARE FUNCTION Num2Str$ (A)
  262. DECLARE FUNCTION ParseFileName$ ()
  263.  
  264. DIM SHARED Lines$(1 TO 24), Shift(5), Proplr$   ' global vars.
  265. DIM SHARED LinesOut, PageLength, CurrentPage, FileLength
  266. DIM SHARED LineLength, BytesOut, TotalLinesOut, NewFileFlag
  267. DIM SHARED SourceFile$, DestFile$, DestExten$, RealSource$, ToDo$
  268. DIM SHARED Row, Col, CheckSum, CurrentByte, CurrentBit, Char
  269. DIM SHARED Work$, ComprChar$, Qt$, Prefix$, TabStops
  270. DIM SHARED WhatFmt$, SmallScript
  271.  
  272.     Initialize
  273.     Good$ = "abcdefghijklmnopqrstuvwxyz"
  274.     Good$ = Good$ + UCASE$(Good$) + "0123456789#$"
  275.  
  276.     LineLength = 65     ' please don't change this for the
  277.                         ' sake of safety
  278.  
  279.     GetInformation
  280.  
  281.     IF ToDo$ = "E" THEN ExtractFile
  282.  
  283.     IF WhatFmt$ = "N" THEN   'Launch code wrapper if wanted
  284.         MsgSplit SourceFile$, RealSource$, DestFile$,_
  285.  DestExten$, PageLength, LinesOut, LineLength
  286.     END IF
  287.  
  288.     T! = TIMER      ' start timer
  289.  
  290.     PrepareFile     ' open file, print header, etc.
  291.     JustDoIt        ' do the binary stuff
  292.     PrintDecoder    ' print decoder, close file
  293.  
  294.     T! = TIMER - T!  ' stop timer
  295.  
  296.     LOCATE Row, Col
  297.     PRINT "          "
  298.     PRINT
  299.     PRINT TotalLinesOut; "lines in"; CurrentPage;
  300.     PRINT "file(s) written."
  301.     PRINT USING "Elapsed time: ##.# secs."; T!
  302. END
  303.  
  304.  
  305. FUNCTION Analyze (Filename$)
  306.  
  307. OPEN Filename$ FOR BINARY AS #5
  308.  
  309. Tmp$ = INPUT$(20, #5)
  310. FOR A = 1 TO 20
  311.   Ch$ = MID$(Tmp$, A, 1)
  312.   IF Ch$ < " " THEN Analyze = True: EXIT FOR
  313.   IF Ch$ > "~" THEN HiASCII = HiASCII + 1
  314. NEXT
  315. IF HiASCII > 12 THEN Analyze = True
  316.  
  317. CLOSE #5
  318.  
  319. END FUNCTION
  320.  
  321. FUNCTION CheckForFile&
  322.  
  323. OPEN SourceFile$ FOR BINARY AS #1
  324. A& = LOF(1)
  325. IF A& = 0 THEN
  326.     CLOSE
  327.     KILL SourceFile$
  328.     PRINT "   File not found."
  329. END IF
  330. CheckForFile& = A&
  331.  
  332. END FUNCTION
  333.  
  334. SUB CopyrightScreen
  335.  
  336. '>>> Continued on page 4
  337.  
  338. --- Blue Wave/RA v2.12 [NR]
  339.  * Origin: Hard Disc Cafe | Houston Texas | (713) 589-2690 |  (1:106/30.0)
  340.  
  341.  
  342.  
  343. ════════════════════════════════════════════════════════════════════════════════
  344.  Area:    QuickBasic
  345.   Msg:    #7791
  346.  Date:    04-02-93 22:59 (Public)
  347.  From:    VICTOR YIU
  348.  To:      ALL
  349.  Subject: PostIt! 6.0   4/16
  350. ────────────────────────────────────────────────────────────────────────────────
  351. '>>> Start of page 4.
  352.  
  353. Linein 1
  354. COLOR 15, 1
  355. LOCATE 4, 1
  356. PRINT "        ▒▒▒▒▒▒▒▒▒▄                                       "+_
  357. "     ▒▒▄"
  358. PRINT "         ▒▒█▀▀▀▒▒█                                       "+_
  359. "     ▒▒█"
  360. PRINT "         ▒▒█   ▒▒█ ▒▒▒▒▒▒▄ ▒▒▒▒▒▒▄ ▒▒▒▒▒▒▒▒▄ ▒▒▒▒▄"+_
  361. " ▒▒▒▒▒▒▒▒▄  ▒▒█"
  362. PRINT "         ▒▒▒▒▒▒▒▒█ ▒▒█▀▒▒█ ▒▒█▀▀▀▀  ▀▀▒▒█▀▀▀  ▒▒█▀ "+_
  363. " ▀▀▒▒█▀▀▀  ▒▒█"
  364. PRINT "         ▒▒█▀▀▀▀▀▀ ▒▒█ ▒▒█ ▒▒▒▒▒▒▄    ▒▒█     ▒▒█     ▒▒█"+_
  365. "     ▒▒█"
  366. PRINT "         ▒▒█       ▒▒█ ▒▒█  ▀▀▀▒▒█    ▒▒█     ▒▒█     ▒▒█"+_
  367. "      ▀▀"
  368. PRINT "        ▒▒▒▒█      ▒▒▒▒▒▒█ ▒▒▒▒▒▒█    ▒▒█    ▒▒▒▒█    ▒▒█"+_
  369. "     ▒▒▄"
  370. PRINT "         ▀▀▀▀       ▀▀▀▀▀▀  ▀▀▀▀▀▀     ▀▀     ▀▀▀▀     ▀▀"+_
  371. "      ▀▀  v6.0"
  372. COLOR 14, 1
  373. PRINT "                ╥ ╥ ┬ ╥──┐ ─╥─ ╓─╥─┐ ╓─╥─┐ ╥──┐ ╓─╖ ┬   "+_
  374. " ╥─┐  ╥  ┬"
  375. PRINT "                ║ ║ │ ╟─┬┘  ║    ║     ║   ╟─   ║ ║ │   "+_
  376. " ╟─┴┐ ╙──┤"
  377. PRINT "                ╙─╨─┘ ╨ ┴─ ─╨─   ╨     ╨   ╨──┘ ╨ ╙─┘   "+_
  378. " ╨──┘ ╙──┘"
  379. PRINT "        ╥──┐ ─╥─ ╓──┐ ╥  ┬    ╓─── ╥──┐ ╥─   ╓─┐  ╥──┐"+_
  380. " ╥──┐ ─╥─ ╓──┐ ╥  ┬"
  381. PRINT "        ╟─┬┘  ║  ║    ╟──┤    ║ ┌┐ ╟─   ║    ║ └┐ ╟─┬┘ ╟─"+_
  382. "    ║  ║    ╟──┤"
  383. PRINT "        ╨ ┴─ ─╨─ ╙──┘ ╨  ┴    ╙──┘ ╨──┘ ╨──┘ ╙──┘ ╨ ┴─"+_
  384. " ╨──┘ ─╨─ ╙──┘ ╨  ┴"
  385. PRINT
  386. COLOR 13, 1
  387. PRINT SPC(22); "Decoder revisions by Jim Giordano."
  388. PRINT SPC(19); "Graphical & user interface revisions by"
  389. PRINT SPC(20); "Mark H Butler and Quinn Tyler Jackson."
  390. PRINT SPC(21); "Text code wrapping by Scott Wunsch."
  391. PRINT SPC(16); "Compression & new script format by Victor Yiu."
  392. COLOR 15
  393. Solid = False
  394. DrawBox 1, 1, 25, 80, Solid
  395.  
  396. COLOR 7
  397. Delay 5
  398. WarningScreen
  399.  
  400. Delay 1
  401. Lineout 1
  402.  
  403. COLOR 15, 0
  404.  
  405. CLS
  406. PRINT "PostIt! Version 6.0"
  407. PRINT
  408.  
  409. END SUB
  410.  
  411. SUB Delay (Secs!)
  412.  
  413. Begin! = TIMER
  414. DO
  415. LOOP UNTIL ((TIMER - Begin!) >= Secs!) OR (Begin! > TIMER)
  416.  
  417. END SUB
  418.  
  419. SUB DrawBox (Uprow, Ltcol, Lorow, Rtcol, Solid)
  420.  
  421. wide = Rtcol - Ltcol - 1
  422. LOCATE Uprow, Ltcol
  423. PRINT CHR$(201); STRING$(wide, CHR$(205)); CHR$(187);
  424. FOR I = Uprow + 1 TO Lorow - 1
  425.     LOCATE I, Ltcol
  426.     PRINT CHR$(186);
  427.     IF Solid THEN PRINT SPACE$(wide);
  428.     LOCATE I, Rtcol
  429.     PRINT CHR$(186);
  430. NEXT
  431. LOCATE Lorow, Ltcol
  432. PRINT CHR$(200); STRING$(wide, CHR$(205)); CHR$(188);
  433.  
  434. END SUB
  435.  
  436. '>>> Continued on page 5
  437.  
  438. --- Blue Wave/RA v2.12 [NR]
  439.  * Origin: Hard Disc Cafe | Houston Texas | (713) 589-2690 |  (1:106/30.0)
  440.  
  441.  
  442.  
  443. ════════════════════════════════════════════════════════════════════════════════
  444.  Area:    QuickBasic
  445.   Msg:    #7792
  446.  Date:    04-02-93 23:00 (Public)
  447.  From:    VICTOR YIU
  448.  To:      ALL
  449.  Subject: PostIt! 6.0   5/16
  450. ────────────────────────────────────────────────────────────────────────────────
  451. '>>> Start of page 5.
  452.  
  453. SUB ExtractFile
  454. SHARED Good$
  455.  
  456. PRINT
  457. PRINT "Examining "; SourceFile$; "..."
  458. COLOR 7
  459. CLOSE
  460. OPEN SourceFile$ FOR INPUT AS #1 LEN = 4096     ' open file
  461.  
  462. DO
  463.     IF NOT EOF(1) THEN
  464.         LINE INPUT #1, A$
  465.     ELSE
  466.         GOTO ErrorReading
  467.     END IF
  468. LOOP WHILE LEFT$(A$, 13) <> "~PostIt! 6.0~"  'search for header
  469.  
  470. NewFile$ = MID$(A$, 14)
  471. NxtTilde = INSTR(NewFile$, "~")
  472.  
  473. IF NxtTilde = 0 THEN GOTO ErrorReading
  474. NewFile$ = LEFT$(NewFile$, NxtTilde - 1)  ' get filename
  475. OPEN NewFile$ FOR BINARY AS #2                     ' open...
  476.  
  477. PRINT "Loading "; SourceFile$; "..."
  478.  
  479. DO
  480.     IF EOF(1) THEN GOTO ErrorReading    ' end of file already?
  481.  
  482.     LINE INPUT #1, A$                      ' get a line
  483.  
  484.     SELECT CASE LEFT$(A$, 1)
  485.         CASE "~"
  486.             IF NOT QuoteOn THEN
  487.                 EXIT DO                     ' end; quit loop
  488.             END IF
  489.         CASE "a" TO "z", "A" TO "Z", "#", "$", "(" TO "9"
  490.             IF NOT QuoteOn THEN
  491.                 FOR Q = 2 TO 9              ' expand the string
  492.                     Look$ = MID$(ComprChar$, Q - 1, 1)
  493.                     S = 1
  494.                     DO
  495.                         S = INSTR(S, A$, Look$)
  496.                         IF S THEN
  497.                             A$ = LEFT$(A$, S - 1) + STRING$(Q,_
  498.  97) + MID$(A$, S + 1)
  499.                         END IF
  500.                     LOOP WHILE S
  501.                 NEXT
  502.  
  503.                 Dat$ = Dat$ + RTRIM$(A$)   ' nope, collect dust
  504.  
  505.             END IF
  506.         CASE "'"
  507.             QuoteOn = NOT QuoteOn
  508.         CASE ELSE                     ' just comments or junk
  509.     END SELECT
  510. LOOP
  511.  
  512. Siz = VAL(MID$(A$, 2))                ' extract size of file
  513.  
  514. NxtNum = INSTR(2, A$, "~")            ' look 4 next ~ occurence
  515. IF NxtNum = 0 THEN GOTO ErrorReading  ' none?  Error!
  516. CheckVal = VAL(MID$(A$, NxtNum + 1))  ' get checkval
  517.  
  518. PRINT "Decoding "; SourceFile$; "..."
  519. PRINT STRING$(50, 178);     ' print initial bar
  520. LOCATE , , 0
  521.  
  522. DIM P(6)
  523. FOR P = 0 TO 6: P(P) = 2 ^ P: NEXT
  524.  
  525. n = Siz
  526. k = 255
  527.  
  528. V! = 50 / n
  529. FOR A = 1 TO n          ' decode file
  530.     IF L = 0 THEN
  531.         GOSUB G
  532.         L = 6
  533.  
  534.         LOCATE , 1
  535.  
  536. '>>> Continued on page 6
  537.  
  538. --- Blue Wave/RA v2.12 [NR]
  539.  * Origin: Hard Disc Cafe | Houston Texas | (713) 589-2690 |  (1:106/30.0)
  540.  
  541.  
  542.  
  543. ════════════════════════════════════════════════════════════════════════════════
  544.  Area:    QuickBasic
  545.   Msg:    #7793
  546.  Date:    04-02-93 23:01 (Public)
  547.  From:    VICTOR YIU
  548.  To:      ALL
  549.  Subject: PostIt! 6.0   6/16
  550. ────────────────────────────────────────────────────────────────────────────────
  551. '>>> Start of page 6.
  552.  
  553.         PRINT STRING$(V! * A, 177);
  554.     END IF
  555.  
  556.     W = T \ P(6 - L)
  557.     GOSUB G
  558.     W = W OR T * P(L)
  559.     L = L - 2
  560.     B$ = CHR$(W AND k)
  561.     PUT 2, , B$
  562. NEXT
  563.  
  564. PRINT
  565. PRINT
  566. IF (C = CheckVal) AND (LOF(2) = Siz) THEN
  567.     PRINT NewFile$; " successfully extracted."
  568. ELSE
  569.     PRINT "Bad checksum or incomplete script!"
  570. END IF
  571.  
  572. CLOSE
  573. END
  574.  
  575. G:
  576.     I = I + 1: T = INSTR(Good$, MID$(Dat$, I, 1)) - 1
  577.     C = (C + T) * 2: C = C \ 256 + (C AND 255)
  578. RETURN
  579.  
  580. ErrorReading:
  581.     CLOSE
  582.     PRINT "Error reading script."
  583.     END
  584. END SUB
  585.  
  586. SUB GetInformation
  587.  
  588. SourceFile$ = LTRIM$(RTRIM$(COMMAND$))
  589.     '**** Remark the above line for QBasic ***
  590.  
  591. IF LEN(SourceFile$) <> 0 THEN
  592.     ShortCopyright
  593.     A& = CheckForFile
  594.     IF A& = 0 THEN END
  595. ELSE
  596.     CopyrightScreen
  597.  
  598.     DO
  599.         SourceFile$ = UCASE$(GetInput$("Input filename"+_
  600. " (text/binary)? ", -1))
  601.         IF LEN(SourceFile$) THEN
  602.             A& = CheckForFile
  603.         ELSE
  604.  
  605.             END
  606.         END IF
  607.     LOOP UNTIL A&
  608.     PRINT
  609. END IF
  610.  
  611. A = 8192                        ' PostIt! 6.0 script?
  612. IF LOF(1) < A THEN A = LOF(1)
  613. A$ = INPUT$(A, 1)
  614. IF INSTR(A$, "~PostIt! 6.0~") THEN
  615.     A$ = ""
  616.     ToDo$ = "E"
  617.     EXIT SUB
  618. ELSE
  619.     A$ = ""
  620.     ToDo$ = "M"
  621. END IF
  622.  
  623. DefaultFile$ = ParseFileName$
  624.  
  625. Recommend = Analyze(SourceFile$)
  626. COLOR 15
  627. PRINT "I recommend using the ";
  628. COLOR 13
  629. IF Recommend THEN
  630.     PRINT "binary script (Y)";
  631.     R$ = "Y"
  632. ELSE
  633.     PRINT "message wrapper (N)";
  634.     R$ = "N"
  635.  
  636. '>>> Continued on page 7
  637.  
  638. --- Blue Wave/RA v2.12 [NR]
  639.  * Origin: Hard Disc Cafe | Houston Texas | (713) 589-2690 |  (1:106/30.0)
  640.  
  641.  
  642.  
  643. ════════════════════════════════════════════════════════════════════════════════
  644.  Area:    QuickBasic
  645.   Msg:    #7794
  646.  Date:    04-02-93 23:01 (Public)
  647.  From:    VICTOR YIU
  648.  To:      ALL
  649.  Subject: PostIt! 6.0   7/16
  650. ────────────────────────────────────────────────────────────────────────────────
  651. '>>> Start of page 7.
  652.  
  653. END IF
  654. COLOR 15
  655. PRINT " on this file."
  656.  
  657. WhatFmt$ = UCASE$(GetInput$("Which format [" + R$ + "]? ", 1))
  658. IF (WhatFmt$ <> "Y") AND (WhatFmt$ <> "N") THEN WhatFmt$ = R$
  659. LOCATE CSRLIN - 1, 19
  660. PRINT WhatFmt$
  661.  
  662. 'max file size is actually about 24576 bytes
  663. '(because 24576*1.33333 is >32767)
  664.  
  665. IF WhatFmt$ = "Y" THEN
  666.     IF A& > 24550 THEN
  667.         COLOR 7: PRINT
  668.         PRINT "Binary file exceeds maximum size of 24K!"
  669.         END
  670.     ELSE
  671.         FileLength = A&
  672.     END IF
  673.  
  674.   A$ = UCASE$(GetInput$("Use condensed script format [Y]? ", 1))
  675.     IF A$ <> "N" THEN
  676.         SmallScript = True
  677.         A$ = "Y"
  678.     END IF
  679.     LOCATE CSRLIN - 1, 34
  680.     PRINT A$
  681. ELSE
  682.     PRINT
  683.     A$ = "Expand tabs to how many spaces [4]? "
  684.     TabStops = VAL(GetInput$(A$, 1))
  685.     IF TabStops <= 0 THEN
  686.         TabStops = 4
  687.         LOCATE CSRLIN - 1, 36
  688.         PRINT TabStops
  689.     END IF
  690. END IF
  691. PRINT
  692.  
  693. A$ = "What is the destination prefix (max. 6 chars.) ["
  694. DestFile$ = UCASE$(GetInput$(A$ + DefaultFile$ + "]? ", 6))
  695. IF LEN(DestFile$) = 0 THEN
  696.     DestFile$ = DefaultFile$
  697.     LOCATE CSRLIN - 1, 52 + LEN(DefaultFile$)
  698.     PRINT DefaultFile$
  699. END IF
  700.  
  701. IF SmallScript THEN
  702.     DExt$ = ".PI6"
  703. ELSE
  704.  
  705.     DExt$ = ".BAS"
  706. END IF
  707. DestExten$ = UCASE$(GetInput$("What is the destination extension"+_
  708. " (max. 3 chars.) [" + DExt$ + "]? ", 3))
  709. IF LEN(DestExten$) = 0 THEN
  710.     DestExten$ = DExt$
  711.     LOCATE CSRLIN - 1, 59
  712.     PRINT DExt$
  713. ELSEIF INSTR(DestExten$, ".") = 0 THEN
  714.     DestExten$ = "." + DestExten$
  715. END IF
  716.  
  717. PageLength = VAL(GetInput$("Page length [85]? ", 3))
  718. IF PageLength < 5 THEN
  719.     PageLength = 85
  720.     LOCATE CSRLIN - 1, 19
  721.     PRINT "85 "
  722. END IF
  723.  
  724. LinesOut$ = GetInput$("Lines to reserve on first message [5]? ",_
  725.  2)
  726. LinesOut = VAL(LinesOut$)
  727. IF (LEN(LinesOut$) = 0) OR (LinesOut < 0) THEN
  728.     LinesOut = 5
  729.     LOCATE CSRLIN - 1, 40
  730.     PRINT "5 "
  731. END IF
  732.  
  733. LOCATE , , 0
  734.  
  735. '>>> Continued on page 8
  736.  
  737. --- Blue Wave/RA v2.12 [NR]
  738.  * Origin: Hard Disc Cafe | Houston Texas | (713) 589-2690 |  (1:106/30.0)
  739.  
  740.  
  741.  
  742. ════════════════════════════════════════════════════════════════════════════════
  743.  Area:    QuickBasic
  744.   Msg:    #7795
  745.  Date:    04-02-93 23:01 (Public)
  746.  From:    VICTOR YIU
  747.  To:      ALL
  748.  Subject: PostIt! 6.0   8/16
  749. ────────────────────────────────────────────────────────────────────────────────
  750. '>>> Start of page 8.
  751.  
  752. END SUB
  753.  
  754. ' Yep, the same one I released, except stripped of comments and
  755. ' some features.  -VY
  756. FUNCTION GetInput$ (Prompt$, MaxLen)
  757.  
  758. Null$ = CHR$(0): SpaceBar$ = " "
  759. Insrt$ = Null$ + "R": Delete$ = Null$ + "S"
  760. LeftK$ = Null$ + "K": RightK$ = Null$ + "M"
  761. Home$ = Null$ + "G": End$ = Null$ + "O"
  762.  
  763. IF MaxLen < 1 THEN MaxLen = 80 - LEN(Prompt$) - POS(0)
  764.  
  765. COLOR 14
  766. PRINT Prompt$;
  767. StartX = POS(0): Cursor = 1
  768. Insrt = True
  769. COLOR 7
  770.  
  771. DO
  772.     IF Updt THEN
  773.         LOCATE , StartX, 0
  774.         PRINT OutS$; SpaceBar$;
  775.         Updt = False
  776.     END IF
  777.  
  778.     LOCATE , Cursor + StartX - 1, 1, (NOT Insrt) * -7, 16
  779.     DO: I$ = INKEY$
  780.     LOOP UNTIL LEN(I$)
  781.  
  782.     IF LEN(I$) = 1 THEN
  783.         Updt = True
  784.  
  785.         SELECT CASE ASC(I$)
  786.         CASE IS >= 32
  787.             IF (NOT Insrt) OR (LEN(OutS$) < MaxLen) THEN
  788.                 IF Cursor > 0 THEN
  789.                     OutS$ = LEFT$(OutS$, Cursor - 1) + I$ +_
  790.  MID$(OutS$, Cursor - (NOT Insrt))
  791.                 ELSE
  792.                     OutS$ = I$
  793.                 END IF
  794.                 Cursor = Cursor + 1
  795.             ELSE
  796.                 Updt = False
  797.             END IF
  798.         CASE 8
  799.             IF LEN(OutS$) AND (Cursor > 1) THEN
  800.                 OutS$ = LEFT$(OutS$, Cursor - 2) + MID$(OutS$,_
  801.  Cursor)
  802.                 Cursor = Cursor - 1
  803.  
  804.             ELSE
  805.                 Updt = False
  806.             END IF
  807.         CASE 13
  808.             EXIT DO
  809.         CASE 27
  810.             IF LEN(OutS$) > 0 THEN
  811.                 LOCATE , StartX, 0
  812.                 PRINT SPACE$(LEN(OutS$) + 1);
  813.  
  814.                 OutS$ = ""
  815.                 Cursor = 1
  816.                 Updt = False
  817.             ELSE
  818.                 EXIT DO
  819.             END IF
  820.         END SELECT
  821.     ELSE    ' extended ASCII code
  822.         SELECT CASE I$
  823.         CASE LeftK$
  824.             IF Cursor > 1 THEN Cursor = Cursor - 1
  825.         CASE RightK$
  826.             IF Cursor < LEN(OutS$) + 1 THEN Cursor = Cursor + 1
  827.         CASE Delete$
  828.             IF LEN(OutS$) > 0 AND (Cursor < LEN(OutS$)) THEN
  829.                 OutS$ = LEFT$(OutS$, Cursor - 1) + MID$(OutS$,_
  830.  Cursor + 1)
  831.                 Updt = True
  832.             END IF
  833.         CASE Home$
  834.  
  835. '>>> Continued on page 9
  836.  
  837. --- Blue Wave/RA v2.12 [NR]
  838.  * Origin: Hard Disc Cafe | Houston Texas | (713) 589-2690 |  (1:106/30.0)
  839.  
  840.  
  841.  
  842. ════════════════════════════════════════════════════════════════════════════════
  843.  Area:    QuickBasic
  844.   Msg:    #7796
  845.  Date:    04-02-93 23:01 (Public)
  846.  From:    VICTOR YIU
  847.  To:      ALL
  848.  Subject: PostIt! 6.0   9/16
  849. ────────────────────────────────────────────────────────────────────────────────
  850. '>>> Start of page 9.
  851.  
  852.             Cursor = 1
  853.         CASE End$
  854.             Cursor = LEN(OutS$) + 1
  855.         CASE Insrt$
  856.             Insrt = NOT Insrt
  857.         END SELECT
  858.     END IF
  859. LOOP
  860.  
  861. LOCATE , , 1, 0, 16
  862. PRINT
  863.  
  864. GetInput$ = LTRIM$(RTRIM$(OutS$))
  865.  
  866. END FUNCTION
  867.  
  868. SUB Initialize
  869.  
  870. FOR DefShift = 0 TO 5
  871.     Shift(DefShift) = 2 ^ DefShift
  872. NEXT
  873.  
  874. ComprChar$ = "()*+,-./"
  875. Proplr$ = CHR$(179) + "/-\"
  876. Qt$ = CHR$(34)
  877. A$ = " "
  878.  
  879. CurrentPage = 1
  880. Work$ = Prefix$
  881. CurrentBit = 0
  882. Char = 0
  883.  
  884. LOCATE , , 0
  885.  
  886. END SUB
  887.  
  888. SUB JustDoIt
  889.  
  890. SEEK #1, 1
  891. LinesOut = LinesOut + 2     ' compensate for header
  892. TotalLinesOut = 3
  893. DO
  894.     CurrentByte = SEEK(1)
  895.     L& = FileLength - CurrentByte + 1 ' what's left?
  896.     SELECT CASE L&
  897.         CASE IS > 4096
  898.             Block$ = SPACE$(4096)
  899.         CASE IS <= 0
  900.             EXIT DO
  901.         CASE ELSE
  902.             Block$ = SPACE$(L&)     ' rest of it
  903.  
  904.     END SELECT
  905.     GET #1, , Block$
  906.  
  907.     FOR Pointr = 1 TO LEN(Block$)
  908.         IF (Pointr AND 15) = 0 THEN
  909.             CurrentByte = CurrentByte + 16
  910.             Twirl
  911.         END IF
  912.         PutBytes ASC(MID$(Block$, Pointr, 1))
  913.     NEXT
  914. LOOP
  915.  
  916.     'flush the input buffer if it contains any bits
  917. IF CurrentBit > 0 THEN CurrentBit = -1: PutByte Char
  918.  
  919. IF LEN(Work$) > 2 THEN
  920.     IF SmallScript THEN
  921.         PrintLine Work$
  922.     ELSE
  923. 'flush the line buffer if it contains any characters
  924. 'Add a CHR$(34) to it just in case a mail reader decides
  925. 'to add some extra spaces to the end...
  926.         PrintLine Work$ + CHR$(34)
  927.     END IF
  928. END IF
  929.  
  930. END SUB
  931.  
  932. SUB Linein (LineColor) '*** By Mark H Butler
  933.  
  934. '>>> Continued on page 10
  935.  
  936. --- Blue Wave/RA v2.12 [NR]
  937.  * Origin: Hard Disc Cafe | Houston Texas | (713) 589-2690 |  (1:106/30.0)
  938.  
  939.  
  940.  
  941. ════════════════════════════════════════════════════════════════════════════════
  942.  Area:    QuickBasic
  943.   Msg:    #7797
  944.  Date:    04-02-93 23:05 (Public)
  945.  From:    VICTOR YIU
  946.  To:      ALL
  947.  Subject: PostIt! 6.0  10/16
  948. ────────────────────────────────────────────────────────────────────────────────
  949. '>>> Start of page 10.
  950.  
  951. Lines$(2) = SPACE$(39) + "■" + SPACE$(2)
  952. Lines$(1) = SPACE$(39) + "." + SPACE$(2)
  953. Lines$(23) = STRING$(80, "─")
  954. Sp = 39
  955. Ln = 0
  956. FOR I = 2 TO 21
  957.     Lines$(I) = SPACE$(Sp) + STRING$(Ln, "─") + SPACE$(2)
  958.     Sp = Sp - 2
  959.     Ln = Ln + 4
  960. NEXT
  961.  
  962. COLOR LineColor, 0
  963. FOR I = 1 TO 23
  964.     LOCATE 13, 1
  965.     PRINT Lines$(I);
  966.     Delay .03
  967. NEXT
  968.  
  969. COLOR 15, LineColor
  970. X = 12
  971. y = 13
  972. FOR I = 1 TO 13
  973.     LOCATE y, 1
  974.     PRINT STRING$(80, " ");
  975.     LOCATE X, 1
  976.     PRINT STRING$(80, " ");
  977.     DrawBox X, 1, y, 80, -1
  978.     Delay .03
  979.     IF X > 1 THEN X = X - 1
  980.     y = y + 1
  981. NEXT
  982.  
  983. END SUB
  984.  
  985. SUB Lineout (LineColor)  '*** By Mark H Butler
  986.  
  987. Lines$(1) = STRING$(80, "─")
  988. Sp = 2
  989. Ln = 76
  990. FOR I = 2 TO 21
  991.     Lines$(I) = SPACE$(Sp) + STRING$(Ln, "─") + SPACE$(2)
  992.     Sp = Sp + 2
  993.     Ln = Ln - 4
  994. NEXT
  995. Lines$(22) = SPACE$(39) + "■" + SPACE$(2)
  996. Lines$(23) = SPACE$(39) + "." + SPACE$(2)
  997.  
  998. COLOR 0, 0
  999. X = 1
  1000. y = 25
  1001. FOR I = 1 TO 12
  1002.  
  1003.     LOCATE y, 1
  1004.     PRINT STRING$(80, CHR$(32));
  1005.     LOCATE X, 1
  1006.     PRINT STRING$(80, CHR$(32));
  1007.     Delay .03
  1008.     X = X + 1
  1009.     y = y - 1
  1010. NEXT
  1011. COLOR LineColor, 0
  1012. FOR I = 1 TO 23
  1013.     LOCATE 13, 1: PRINT Lines$(I);
  1014.     Delay .03
  1015. NEXT
  1016. COLOR 7
  1017. CLS
  1018.  
  1019. END SUB
  1020.  
  1021. SUB MsgSplit (Filename$, TheName$, OutN$, Ext$, LPP, Reserve,_
  1022.  LineLength)
  1023.  
  1024. CLOSE
  1025. OPEN Filename$ FOR INPUT AS #1
  1026.  
  1027. Tab$ = CHR$(9): TabSub$ = SPACE$(TabStops)
  1028. LinesOut = Reserve + 1
  1029. FileOutNum = 1: OnMsgNumber = 1
  1030. LPP = LPP - 4   ' lines per page
  1031.  
  1032. Base$ = LEFT$(OutN$, 6)
  1033.  
  1034. '>>> Continued on page 11
  1035.  
  1036. --- Blue Wave/RA v2.12 [NR]
  1037.  * Origin: Hard Disc Cafe | Houston Texas | (713) 589-2690 |  (1:106/30.0)
  1038.  
  1039.  
  1040.  
  1041. ════════════════════════════════════════════════════════════════════════════════
  1042.  Area:    QuickBasic
  1043.   Msg:    #7798
  1044.  Date:    04-02-93 23:01 (Public)
  1045.  From:    VICTOR YIU
  1046.  To:      ALL
  1047.  Subject: PostIt! 6.0  11/16
  1048. ────────────────────────────────────────────────────────────────────────────────
  1049. '>>> Start of page 11.
  1050.  
  1051. Ext$ = RIGHT$(Ext$, 3)
  1052.  
  1053. COLOR 7, 0
  1054. PRINT
  1055.  
  1056. DO
  1057.     OutN$ = Base$ + Num2Str$(FileOutNum)
  1058.  
  1059.     IF Row THEN LOCATE Row, Col: PRINT "         "
  1060.     PRINT "Now writing: " + OutN$ + "." + Ext$ + " ";
  1061.     Row = CSRLIN: Col = POS(0)
  1062.  
  1063.     OPEN OutN$ + "." + Ext$ FOR OUTPUT AS #2
  1064.  
  1065.     IF OnMsgNumber > 1 THEN
  1066.         PRINT #2, "'>>> Start of page"; STR$(OnMsgNumber); "."
  1067.         PRINT #2,
  1068.     ELSE
  1069.         GOSUB Snip
  1070.         PRINT #2, "'This file created by PostIt! v6.0."
  1071.         PRINT #2, "'>>> Start of page"; STR$(OnMsgNumber); "."
  1072.         PRINT #2,
  1073.     END IF
  1074.  
  1075.     TooLong = False
  1076.     FOR Trans = LinesOut TO LPP
  1077.         Percent = (100& * SEEK(1)) \ LOF(1)
  1078.         Twirler$ = MID$("|/─\", (Percent AND 3) + 1, 1)
  1079.         LOCATE Row, Col: PRINT USING "! ###%"; Twirler$; Percent;
  1080.  
  1081.         IF NOT EOF(1) THEN
  1082.             IF Trans = LinesOut THEN
  1083.                 DO: LINE INPUT #1, Buf$
  1084.                 LOOP WHILE LEN(Buf$) = 0
  1085.             ELSE
  1086.                 LINE INPUT #1, Buf$
  1087.                 Buf$ = RTRIM$(Buf$)
  1088.             END IF
  1089.  
  1090.             Tb = INSTR(Buf$, Tab$)  'remove those dang chr$(8)s
  1091. ' (tabs)
  1092.             IF Tb THEN
  1093.                 DO
  1094.                     Buf$ = LEFT$(Buf$, Tb - 1) + TabSub$ +_
  1095.  MID$(Buf$, Tb + 1)
  1096.                     Tb = INSTR(Tb, Buf$, Tab$)
  1097.                 LOOP WHILE Tb
  1098.             END IF
  1099.  
  1100. Wrapping:
  1101.             IF (LEN(Buf$) > LineLength) AND (LEFT$(Buf$, 1) <>_
  1102.  
  1103.  "'") THEN
  1104.                 Trans = Trans + 1
  1105.                 CommentOn = False
  1106.                 FOR A = LineLength TO 40 STEP -1
  1107.                     IF MID$(Buf$, A, 1) = " " THEN
  1108.                         WrapPoint = A
  1109.                         EXIT FOR
  1110.                     END IF
  1111.                 NEXT
  1112.                 IF WrapPoint = 0 THEN WrapPoint = LineLength
  1113.  
  1114.                 QuotesOn = False
  1115.                 FOR A = 1 TO WrapPoint
  1116.                     Temp$ = MID$(Buf$, A, 1)
  1117.                     IF Temp$ = Qt$ THEN
  1118.                         QuotesOn = NOT QuotesOn
  1119.                     ELSEIF NOT QuotesOn THEN
  1120.                         IF (Temp$ = "'") OR (UCASE$(MID$(Buf$,_
  1121.  A, 4)) = "REM ") THEN
  1122.                             CommentOn = True
  1123.                             EXIT FOR
  1124.                         END IF
  1125.                     END IF
  1126.                 NEXT
  1127.  
  1128.                 Long$ = Buf$
  1129.                 IF CommentOn THEN
  1130.                     Buf$ = LEFT$(Buf$, WrapPoint - 1)
  1131.                 ELSE
  1132.                     IF QuotesOn THEN
  1133.  
  1134. '>>> Continued on page 12
  1135.  
  1136. --- Blue Wave/RA v2.12 [NR]
  1137.  * Origin: Hard Disc Cafe | Houston Texas | (713) 589-2690 |  (1:106/30.0)
  1138.  
  1139.  
  1140.  
  1141. ════════════════════════════════════════════════════════════════════════════════
  1142.  Area:    QuickBasic
  1143.   Msg:    #7799
  1144.  Date:    04-02-93 23:02 (Public)
  1145.  From:    VICTOR YIU
  1146.  To:      ALL
  1147.  Subject: PostIt! 6.0  12/16
  1148. ────────────────────────────────────────────────────────────────────────────────
  1149. '>>> Start of page 12.
  1150.  
  1151.                         Buf$ = LEFT$(Buf$, WrapPoint - 1) + Qt$_
  1152.  + "+_"
  1153.                     ELSE
  1154.                         Buf$ = LEFT$(Buf$, WrapPoint - 1) + "_"
  1155.                     END IF
  1156.                 END IF
  1157.  
  1158.                 IF NOT ((Trans = LPP) AND LEN(Buf$) = 0) THEN
  1159.                     PRINT #2, Buf$
  1160.                 END IF
  1161.  
  1162.                 Buf$ = MID$(Long$, WrapPoint)
  1163.                 IF CommentOn THEN Buf$ = "'" + Buf$
  1164.                 IF QuotesOn THEN Buf$ = Qt$ + Buf$
  1165.  
  1166.                 GOTO Wrapping
  1167.             END IF
  1168.  
  1169.             IF NOT ((Trans = LPP) AND LEN(Buf$) = 0) THEN
  1170.                 PRINT #2, Buf$
  1171.             END IF
  1172.         END IF
  1173.     NEXT
  1174.     IF NOT EOF(1) THEN
  1175.         PRINT #2,
  1176.         PRINT #2, "'>>> Continued on page"; OnMsgNumber + 1
  1177.     ELSE
  1178.         PRINT #2,
  1179.         GOSUB Snip
  1180.         PRINT #2,
  1181.     END IF
  1182.  
  1183.     CLOSE #2
  1184.     IF NOT EOF(1) THEN
  1185.         OnMsgNumber = OnMsgNumber + 1
  1186.         FileOutNum = FileOutNum + 1
  1187.         LinesOut = 1
  1188.     END IF
  1189. LOOP UNTIL EOF(1)
  1190. CLOSE
  1191.  
  1192. LOCATE Row, Col
  1193. PRINT "         "
  1194. PRINT
  1195. PRINT "Complete!"
  1196. END
  1197.  
  1198. Snip:
  1199.     PRINT #2, "'________O_/________________________| SNIP"+_
  1200. " |______________________\_O_______"
  1201.     PRINT #2, "'        O \                        | HERE |     "+_
  1202.  
  1203. "                 / O"
  1204. RETURN
  1205.  
  1206. END SUB
  1207.  
  1208. 'Converts a number to a string lacking a leading space.
  1209. FUNCTION Num2Str$ (A)
  1210.  
  1211. Num2Str$ = MID$(STR$(A), 2)
  1212.  
  1213. END FUNCTION
  1214.  
  1215. FUNCTION ParseFileName$
  1216.  
  1217.     'Get the source filename without the drive & path
  1218. FOR S = LEN(SourceFile$) TO 1 STEP -1
  1219.     IF INSTR("\:", MID$(SourceFile$, S, 1)) THEN EXIT FOR
  1220. NEXT
  1221. RealSource$ = MID$(SourceFile$, S + 1)
  1222.  
  1223.     'Get destination prefix & extenstion.
  1224. Ext = INSTR(RealSource$, ".")
  1225. IF Ext <> 0 THEN
  1226.     DestTemp$ = LEFT$(RealSource$, Ext - 1)
  1227. ELSE
  1228.     DestTemp$ = RealSource$
  1229. END IF
  1230.  
  1231. ParseFileName = UCASE$(LEFT$(DestTemp$, 7))
  1232.  
  1233. '>>> Continued on page 13
  1234.  
  1235. --- Blue Wave/RA v2.12 [NR]
  1236.  * Origin: Hard Disc Cafe | Houston Texas | (713) 589-2690 |  (1:106/30.0)
  1237.  
  1238.  
  1239.  
  1240. ════════════════════════════════════════════════════════════════════════════════
  1241.  Area:    QuickBasic
  1242.   Msg:    #7800
  1243.  Date:    04-02-93 23:02 (Public)
  1244.  From:    VICTOR YIU
  1245.  To:      ALL
  1246.  Subject: PostIt! 6.0  13/16
  1247. ────────────────────────────────────────────────────────────────────────────────
  1248. '>>> Start of page 13.
  1249.  
  1250. END FUNCTION
  1251.  
  1252. SUB PrepareFile
  1253.  
  1254. F$ = UCASE$(DestFile$ + Num2Str$(CurrentPage) + DestExten$)
  1255.  
  1256. COLOR 7: PRINT
  1257. PRINT "Now writing: "; F$; " ";
  1258. Row = CSRLIN: Col = POS(0)
  1259.  
  1260.     'use 8k output buffer for a little speed
  1261. OPEN F$ FOR OUTPUT AS #2 LEN = 8192
  1262.  
  1263. IF SmallScript THEN
  1264.     PRINT #2, "~PostIt! 6.0~"; RealSource$; "~"; "Script starts"
  1265.     Prefix$ = ""
  1266. ELSE
  1267.  
  1268. 'Print the first 3 lines of the decoder.
  1269. ' Shaved several bytes... -VY
  1270.  
  1271. PRINT #2, "CLS:?STRING$(50,178):DEFINT A-Z 'Created by PostIt!"+_
  1272. " 6.0"
  1273. PRINT #2, "FOR A=0 TO 6:P(A)=2^A:NEXT:OPEN "; Qt$; "B"; Qt$;_
  1274.  ",1,"; Qt$; RealSource$
  1275. PRINT #2, "T$="; Qt$; "abcdefghijklmnopqrstuvwxyz"; Qt$;_
  1276.  ":T$=T$+UCASE$(T$)+"; Qt$; "0123456789#$"
  1277.     Prefix$ = "G" + Qt$
  1278.     Work$ = Prefix$
  1279. END IF
  1280.  
  1281. END SUB
  1282.  
  1283. SUB PrintDecoder
  1284.  
  1285. IF SmallScript THEN
  1286.     PrintLine "~" + Num2Str$(FileLength) + "~" +_
  1287.  Num2Str$(CheckSum) + "~" + "End"
  1288. ELSE
  1289.  
  1290. 'Main decoder originally reduced from 8 lines to 6 lines by Jim Giordano
  1291. 'Thanks Jim!
  1292.  
  1293. 'Slight modifications to the 6 line decoder by Rich Geldreich
  1294. 'More modifications to the decoder to implement compressed code,
  1295. '  increased to ~7.2 lines by Victor Yiu
  1296. 'Modified again to increase speed, but at the slight expense of
  1297. ' size (3/9/93)  -VY
  1298.  
  1299. PrintLine "N=" + Num2Str$(FileLength) + ":K=255:IF LEN(C$)<>" +_
  1300.  Num2Str$(BytesOut) + " THEN ?" + Qt$ + "Bad script!" + Qt$ +_
  1301.  
  1302.  ":END"
  1303. PrintLine "FOR A=1 TO N:LOCATE 1:?STRING$(50/N*A,177):IF L=0"+_
  1304. " THEN GOSUB G:L=6"
  1305. PrintLine "W=T\P(6-L):GOSUB G:W=W OR T*P(L):L=L-2:B$=CHR$(W AND"+_
  1306. " K):PUT 1,,B$:NEXT"
  1307. PrintLine "?:IF C=" + Num2Str$(CheckSum) + " THEN ?" + Qt$ +_
  1308.  "Ok" + Qt$ + ":END ELSE ?" + Qt$ + "Bad checksum!" + Qt$ +_
  1309.  ":END"
  1310. PrintLine "G:I=I+1:T=INSTR(T$,MID$(C$,I,1))-1:C=(C+T)*2:C=C"+_
  1311. "\256+(C AND 255):RETURN"
  1312. PrintLine "SUB G(A$):SHARED C$:FOR Q=2 TO"+_
  1313. " 9:DO:S=INSTR(A$,CHR$(Q+38))"
  1314. PrintLine "IF S THEN A$=LEFT$(A$,S-1)+STRING$(Q,97)+MID$(A$,S+1)"
  1315. PrintLine "LOOP WHILE S:NEXT:C$=C$+A$:END SUB"
  1316. END IF
  1317.  
  1318. CLOSE
  1319.  
  1320. END SUB
  1321.  
  1322. 'Outputs one line to the output file, and opens another output file
  1323. 'if the page length is exceeded.
  1324. SUB PrintLine (A$)
  1325.  
  1326. IF NewFileFlag THEN
  1327.     LOCATE Row, Col
  1328.     PRINT "          "
  1329.  
  1330.     NewFileFlag = False
  1331.     CurrentPage = CurrentPage + 1  '<-- switched these 2 lines
  1332.  
  1333. '>>> Continued on page 14
  1334.  
  1335. --- Blue Wave/RA v2.12 [NR]
  1336.  * Origin: Hard Disc Cafe | Houston Texas | (713) 589-2690 |  (1:106/30.0)
  1337.  
  1338.  
  1339.  
  1340. ════════════════════════════════════════════════════════════════════════════════
  1341.  Area:    QuickBasic
  1342.   Msg:    #7801
  1343.  Date:    04-02-93 23:02 (Public)
  1344.  From:    VICTOR YIU
  1345.  To:      ALL
  1346.  Subject: PostIt! 6.0  14/16
  1347. ────────────────────────────────────────────────────────────────────────────────
  1348. '>>> Start of page 14.
  1349.  
  1350.     B$ = Num2Str$(CurrentPage)     '--> MHB
  1351.     PRINT #2, "'>> Continued on pg. "; B$
  1352.     CLOSE #2
  1353.  
  1354.     F$ = UCASE$(DestFile$ + B$ + DestExten$)
  1355.  
  1356.     PRINT "Now writing: "; F$; " ";
  1357.     Row = CSRLIN: Col = POS(0)
  1358.  
  1359.     OPEN F$ FOR OUTPUT AS #2 LEN = 8192
  1360.  
  1361.     PRINT #2, "'>> Start: pg. "; B$
  1362.     LinesOut = 1
  1363. END IF
  1364.  
  1365. TotalLinesOut = TotalLinesOut + 1
  1366.  
  1367. PRINT #2, A$
  1368.  
  1369. ' Originally, Mark hardcoded a space after each line, but I
  1370. ' had to remove it to make compression work properly... -VY
  1371.  
  1372. LinesOut = LinesOut + 1
  1373. IF LinesOut >= PageLength THEN NewFileFlag = True
  1374.  
  1375. END SUB
  1376.  
  1377. 'Adds a character to the output string.
  1378. SUB PutByte (A)
  1379. SHARED Good$
  1380. STATIC ALength
  1381.  
  1382. IF CurrentBit < 0 THEN LastOne = True
  1383.  
  1384. BytesOut = BytesOut + 1
  1385.  
  1386.     'calculate a checksum on the encoded data stream
  1387. CheckSum = (CheckSum + A) * 2
  1388. CheckSum = CheckSum \ 256 + (CheckSum AND 255)
  1389.  
  1390. IF (A = 0) AND (LastOne = False) THEN
  1391.     IF ALength = 9 THEN
  1392.         ALength = 1
  1393.         Work$ = Work$ + "/"
  1394.     ELSE
  1395.         ALength = ALength + 1
  1396.     END IF
  1397. ELSE
  1398.     SELECT CASE ALength
  1399.         CASE 0
  1400.             'translate the output character into something safe
  1401.  
  1402.             Work$ = Work$ + MID$(Good$, A + 1, 1)
  1403.         CASE 1
  1404.             Work$ = Work$ + "a" + MID$(Good$, A + 1, 1)
  1405.             ALength = 0
  1406.         CASE ELSE
  1407.             Work$ = Work$ + MID$(ComprChar$, ALength - 1, 1) +_
  1408.  MID$(Good$, A + 1, 1)
  1409.             ALength = 0
  1410.    END SELECT
  1411. END IF
  1412.  
  1413. IF LEN(Work$) >= LineLength THEN
  1414.     IF LEN(Work$) = LineLength THEN
  1415.         PrintLine Work$
  1416.         Work$ = Prefix$
  1417.     ELSE
  1418.         PrintLine LEFT$(Work$, LineLength)
  1419.         Work$ = Prefix$ + MID$(Work$, LineLength + 1)
  1420.     END IF
  1421. END IF
  1422.  
  1423. END SUB
  1424.  
  1425. SUB PutBytes (A)
  1426.  
  1427.     'shift the 8 bit character into the work buffer
  1428. Char = Char + A * Shift(CurrentBit)
  1429.  
  1430.     'we've got 8 more bits now
  1431. CurrentBit = CurrentBit + 8
  1432.  
  1433. '>>> Continued on page 15 
  1434.  
  1435. --- Blue Wave/RA v2.12 [NR]
  1436.  * Origin: Hard Disc Cafe | Houston Texas | (713) 589-2690 |  (1:106/30.0)
  1437.  
  1438.  
  1439.  
  1440. ════════════════════════════════════════════════════════════════════════════════
  1441.  Area:    QuickBasic
  1442.   Msg:    #7802
  1443.  Date:    04-02-93 23:02 (Public) 
  1444.  From:    VICTOR YIU               
  1445.  To:      ALL                      
  1446.  Subject: PostIt! 6.0  15/16       
  1447. ────────────────────────────────────────────────────────────────────────────────
  1448. '>>> Start of page 15.
  1449.  
  1450.     'write the 6 bit codes now
  1451. DO WHILE CurrentBit > 5          'have at least 6 bits left?
  1452.     PutByte (Char AND 63)        'write out the first 6 bits
  1453.     Char = Char \ 64             'shift it right 6 places
  1454.     CurrentBit = CurrentBit - 6  '6 bits less now
  1455. LOOP
  1456.  
  1457. END SUB
  1458.  
  1459. SUB Shadow (Uprow, Ltcol, Lorow, Rtcol) STATIC
  1460.  
  1461.     '*** Transparent Shadow routine for use with the
  1462.     '*** "Drawbox" SUB program by Mark H Butler
  1463.  
  1464. DEF SEG = &H40
  1465. equip = PEEK(&H10)
  1466. IF (equip AND 48) = 48 THEN
  1467.     EXIT SUB    '*** no use in doing it if it's mono, right?
  1468. ELSE
  1469.     DEF SEG = &HB800
  1470. END IF
  1471.  
  1472.     '****** use the given box dimensions to POKE a ***********
  1473.     '****** "shadow" on the right side and bottom edge *******
  1474.  
  1475. attr = 8
  1476.  
  1477. FOR Row = Uprow + 1 TO Lorow + 1    '***** right edge
  1478. ' locations.***
  1479.     FOR Col = Rtcol + 1 TO Rtcol + 2'***** make it 2 chars
  1480. ' wide.***
  1481.         offset = (Row - 1) * 160 + (Col - 1) * 2 + 1
  1482.         POKE offset, attr
  1483.     NEXT
  1484. NEXT
  1485.  
  1486. Row = Lorow + 1                    '***** now POKE along the
  1487. ' *****
  1488. FOR Col = Ltcol + 2 TO Rtcol + 2   '***** bottom edge
  1489. ' ************
  1490.     offset = (Row - 1) * 160 + (Col - 1) * 2 + 1
  1491.     POKE offset, attr
  1492. NEXT
  1493. DEF SEG
  1494.  
  1495. END SUB
  1496.  
  1497. SUB ShortCopyright
  1498.  
  1499. COLOR 14, 0
  1500. CLS
  1501.  
  1502.  
  1503. PRINT " PostIt! Version 6.0"
  1504. PRINT
  1505. COLOR 11
  1506. PRINT " Freeware by Rich Geldreich, 1992-1993."
  1507. PRINT " Decoder modifications by Jim Giordano."
  1508. PRINT " User interface and graphics by "
  1509. PRINT " Mark H Butler and Quinn Tyler Jackson."
  1510. PRINT " Text code wrapping by Scott Wunsch."
  1511. PRINT " Compression & new script format by Victor Yiu."
  1512. PRINT
  1513. COLOR 7
  1514.  
  1515. END SUB
  1516.  
  1517. SUB Twirl STATIC
  1518.  
  1519. LOCATE Row, Col
  1520. PRINT MID$(Proplr$, Turn + 1, 1);
  1521. Turn = (Turn + 1) AND 3
  1522.  
  1523. IF Turn = 0 THEN
  1524.     PRINT USING " ###%"; 100& * CurrentByte \ FileLength;
  1525. END IF
  1526.  
  1527. END SUB
  1528.  
  1529. SUB WarningScreen
  1530.  
  1531. ' I felt this screen was appropriate, since some users have
  1532.  
  1533. '>>> Continued on page 16 
  1534.  
  1535. --- Blue Wave/RA v2.12 [NR]
  1536.  * Origin: Hard Disc Cafe | Houston Texas | (713) 589-2690 |  (1:106/30.0)
  1537.  
  1538.  
  1539.  
  1540. ════════════════════════════════════════════════════════════════════════════════
  1541.  Area:    QuickBasic
  1542.   Msg:    #7803
  1543.  Date:    04-02-93 23:04 (Public) 
  1544.  From:    VICTOR YIU               
  1545.  To:      ALL                      
  1546.  Subject: PostIt! 6.0  16/16       
  1547. ────────────────────────────────────────────────────────────────────────────────
  1548. '>>> Start of page 16.
  1549.  
  1550. ' abused this wonderful utility!  Shame.... <qtj>
  1551. '----
  1552. ' Unfortunately Quinn old friend I think that has proved to be
  1553. ' too true in some cases ...but... we *can* make it look as
  1554. ' friendly as possible with a little text mode window magic `eh?
  1555. ' --> MHB ;^]
  1556.  
  1557. PCOPY frontpage, backpage
  1558. COLOR 14, 6
  1559. DrawBox 3, 8, 22, 72, True
  1560. Shadow 3, 8, 22, 72
  1561.  
  1562. LOCATE 4, 11: PRINT "NOTE:"
  1563. LOCATE , 10: PRINT "Some echo participants feel that posting"+_
  1564. " binary files in text"
  1565. LOCATE , 10: PRINT "format leads to anarchy.  Postit!,  in all"+_
  1566. " of its versions is"
  1567. LOCATE , 10: PRINT "a powerful tool for exchanging information"+_
  1568. " over networks such"
  1569. LOCATE , 10: PRINT "as Fidonet.  Before you use this software to"+_
  1570. " post anything in"
  1571. LOCATE , 10: PRINT "any network's echo areas, consider these"+_
  1572. " points:"
  1573. PRINT
  1574. LOCATE , 10: PRINT "1) Only users  with Microsoft's QBASIC or "+_
  1575. " QuickBASIC will be"
  1576. LOCATE , 10: PRINT "   able to convert the files back into their"+_
  1577. " binary format."
  1578. PRINT
  1579. LOCATE , 10: PRINT "2) Binary files that are converted to text"+_
  1580. " should be ON TOPIC"
  1581. LOCATE , 10: PRINT "   in order  that users of  the particular"+_
  1582. " echo  will benefit"
  1583. LOCATE , 10: PRINT "   from the post. For example: it would not"+_
  1584. " be appropriate at"
  1585. LOCATE , 10: PRINT "   all to post an executable file  without"+_
  1586. " it's corresponding"
  1587. LOCATE , 10: PRINT "   source code in the Fidonet QUIK_BAS echo."
  1588. PRINT
  1589. LOCATE , 10: PRINT "  This of course  only applies to the binary"+_
  1590. "  posting portion"
  1591. LOCATE , 10: PRINT " of PostIt!.  The code wrapper is much less"+_
  1592. " controversial :)."
  1593.  
  1594. Delay 5
  1595. COLOR 11, 1
  1596. LOCATE 24, 20: PRINT "(Hit any key to continue with Postit!)";
  1597. DO UNTIL LEN(INKEY$): LOOP
  1598.  
  1599. PCOPY backpage, frontpage
  1600.  
  1601.  
  1602. END SUB
  1603.  
  1604.  
  1605. '________O_/________________________| SNIP |______________________\_O_______
  1606. '        O \                        | HERE |                      / O
  1607.  
  1608. 'That should be all of PostIt!  Now, just collect all 16 files, merge,
  1609. 'edit to remove junk, and run!
  1610.  
  1611. 'Any comments or suggestions are welcome!  ;-)
  1612.  
  1613. 'Victor
  1614.  
  1615. ... DESQview: Windex.
  1616. --- Blue Wave/RA v2.12 [NR]
  1617.  * Origin: Hard Disc Cafe | Houston Texas | (713) 589-2690 |  (1:106/30.0)
  1618.  
  1619.  
  1620.  
  1621.