home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / cpm / bbsing / pbbs / pbbs5fix.lbr / PBBS50.FZX / PBBS50.FIX
Text File  |  1990-12-09  |  12KB  |  298 lines

  1.                          Fixes for PBBS
  2.                            Version 5.0
  3.                          December 10/90
  4.  
  5.      When  PBBS  version  5.0 was released on  October  9/90,  it
  6. unfortunately contained a number of bugs.  This file will provide
  7. patches  which  will fix all known bugs (as of  December  10/90).
  8. The internal date for each fixed module (at label VERDAT:) should
  9. be changed to reflect the release date of this fix file (December
  10. 10/90).  Please ensure that you do change the dates, so that  you
  11. (and I!) will know that the patches have been installed.
  12.  
  13.  
  14. PBBS50.MAC
  15.  
  16.      Within  the  PBBS  main  module,  there  have  been  several
  17. problems  reported. The following seven patches should  eliminate
  18. all of the known bugs within PBBS 5.0.
  19.  
  20.      The  first  problem  involves the incorrect  paging  of  the
  21. initial welcome screen.  Near the label WELC:, insert the 2 lines
  22. as shown below:
  23.  
  24. WELC:
  25.          IF     WELON
  26.         LD      A,24            ; Set screen to <===== INSERT
  27.         LD      (TLIN),A        ;  24 lines     <===== THESE LINES
  28.         LD      HL,WELCOM
  29.         CALL    TYPE            ; Display the text file
  30.          ENDIF                  ; WELON
  31.  
  32.  
  33.      There  are 2 small problems which occur only if you  attempt
  34. to  compile  the system with the EQUate ONEMNU set  to  NO.   One
  35. involves  a missing label and the other is a relative jump  which
  36. is out of range.  The following changes will fix these  problems.
  37. Below the label PCMD:, add the label PMENU1: as shown below:
  38.  
  39. PCMD:   CALL    PCRLF
  40.  
  41.          IF     NOT SET25
  42.         LD      HL,UNAME
  43.         CALL    PRLC
  44.          ENDIF                  ; NOT SET25
  45.  
  46.         LD      C,RMTOS         ; BYE's 'Time on system...' function
  47.         CALL    SPBDOS
  48.         LD      HL,UNAME        ; Make him feel at home
  49.         LD      B,30
  50.         CALL    PRINTS
  51.         CALL    PRINT
  52.         DB      ', the PBBS commands are:  '
  53.         DB      'B,C,D,G,I,J,L,M,N,T,U,W,X,Y or ?:  ',0
  54. PMENU1: CALL    GTCHAR          ; Get a character from the console<==ADD LABEL
  55.         CP      CR              ; Carriage return?
  56.         JR      Z,PMENU1        ; Yes, get another one
  57.  
  58. And, below label SYSRED: make the changes shown in the next  code
  59. fragement:
  60.  
  61. SYSRED: LD      A,(ACESS)       ; Better be a Sysop..
  62.         CP      COSYS
  63.  
  64.          IF     NOT ONEMNU
  65. ;;      JR      C,MMENU2        ; Send him back empty <=== DELETE
  66.         JP      C,MMENU2        ; Send him back empty <=== INSERT
  67.          ELSE
  68.         JP      C,OMENU2        ; Send him back empty
  69.          ENDIF                  ; NOT ONEMNU
  70.  
  71.      The next problem occurs if you are using Wayne Masters FOR-8
  72. software and have compiled PBBS with the FOR8 EQUate set to  YES.
  73. In  this case, the system fails to page properly when  it  shifts
  74. from  the initial (small) FOR file to the secondary  (large)  FOR
  75. file.   Two  places have to be patched to correct  this  problem.
  76. First, below lable WFOR1:, insert the 3 lines shown below:
  77.  
  78. WFOR1:  LD      HL,WHATSFOR     ; Point to FOR file
  79.         CALL    TYPE            ;  and display it
  80.  
  81.          IF     FOR8
  82.         JR      Z,WFOR2         ; If aborted, skip next
  83.         LD      A,1             ; Else, fake 'last line' for <==INSERT
  84.         LD      (TLINES),A      ;  TWAIT subroutine          <==INSERT
  85.         CALL    TWAIT0          ; Force a pause between the 2 files<==INS
  86.         LD      HL,WHATSF8      ; Point to second FOR file
  87.         CALL    TYPE            ;  and display it
  88.          ENDIF                  ; FOR8
  89.  
  90. Then, below label TWAIT: add the label TWAIT0: as shown:
  91.  
  92. TWAIT:  LD      A,(CNTN)        ; Doing continuous read?
  93.         OR      A
  94.         JR      NZ,ABORT        ; Yes, so skip screen full test
  95. TWAIT0: LD      A,(FBYTE)       ; Get user's flag byte <==ADD LABEL
  96.         BIT     MORBIT,A        ; Are [more] pauses on?
  97.         JR      NZ,ABORT        ; If no, go check for abort
  98.         LD      A,(TLINES)      ; Else, get number of lines to go
  99.  
  100.      Some  sysops  are encountering problems with  the  ZMD  file
  101. transfer  program.   It  appears that certain  versions  of  this
  102. program  will  insert unwanted nulls (0's) into the  ZMD.LOG  (or
  103. KMD.LOG) file.  When a user attempts to read this log via the [N]
  104. command, the resulting screen can be rather messy.  The following
  105. patch  should  eliminate  this  screen  problem.  Near  the label
  106. ONEMOR:, insert the following line as shown:
  107.  
  108. ONEMOR: LD      A,(HL)          ; Get character
  109.         AND     7FH             ; Strip any high bits
  110.         JR      Z,NXTONE        ; If null, dump it  <== INSERT
  111.         CP      LF              ; Else, check for eol - LF is the marker
  112.         JR      Z,CHCK          ;  that we will use to determine each line
  113.         CP      7FH
  114.         JR      Z,NXTONE
  115.  
  116.      The  next patch solves a compile problem that occurs if  you
  117. attempt  to  compile PBBS 5.0 with the NMFLDRS EQUate set  to  1.
  118. Make the following changes at label TDNTD0:
  119.  
  120.  
  121. TDNTD0:                         ;  <== INSERT LABEL
  122.          IF     NMFLDRS GT 1
  123. ;;TDNTD0:LD     A,(MFLDR)       ; Else, see if user is <== DELETE LABEL
  124.         LD      A,(MFLDR)       ; Else, see if user is
  125.         OR      A               ;  reading the 'GLOBAL' folder
  126.  
  127.      When  a  user has set his profile so that  hotkeys  are  not
  128. used,  some of the yes/no responses are printed incorrectly.   To
  129. correct this, make the following changes near label PRYES:
  130.  
  131. PRYES:  LD      HL,YESMSG       ; Point to 'Yes'
  132.         JP      M,PRYES1        ; If coming from default <==INSERT
  133.         LD      A,(FBYTE)       ; Else, get the user's flag byte
  134.         BIT     HOTBIT,A        ;  and test the hotkey flag
  135.         JR      Z,PRYES1        ; If hotkeys on, must print 'Y'
  136.         INC     HL              ; Else, 'Y' already printed
  137.  
  138. PRYES1: CALL    PRINTM
  139.         XOR     A               ; Clear zero
  140.         INC     A               ; Set plus
  141.         RET
  142.  
  143. PRNO:   LD      HL,NOMSG
  144.         JP      M,PRNO1         ; If coming from default <==INSERT
  145.         LD      A,(FBYTE)       ; Else get the user's flag byte
  146.         BIT     HOTBIT,A        ;  and test the hotkey flag
  147.         JR      Z,PRNO1         ; If hotkeys on, must print 'N'
  148.         INC     HL              ; Else, 'N' already printed
  149.  
  150. NOTE:   The  above two changes should also be made  at  the  same
  151. labels in PMSG50.MAC.
  152.  
  153.  
  154.      The  last patch involves two problems with  threading.   The
  155. release  version of PBBS 5.0 would allow the system to go into an
  156. endless  loop searching for threads under  certain  circumstances
  157. and  also  would  hang  the system completely  if  a  thread  was
  158. attempted while reading your 'new PRIVATE mail' from the question
  159. asked  during  login!  This patch fixes both of  these  problems.
  160. Since  this patch is rather more complex than the previous  ones,
  161. it is recommended that all code between labels RTHD: and  CORTHD:
  162. be deleted and that the following code fragment be extracted from
  163. this document and inserted into the PBBS50.MAC file.
  164.  
  165.          IF     MSGTHD
  166. RTHD:   LD      HL,MRLNK        ; Set up for reverse link
  167.         LD      (TNEW1+1),HL    ; Insert it into code
  168.         LD      HL,(MRLNK)      ; Get reverse link
  169.         JR      THD
  170.  
  171. FTHD:   LD      HL,MFLNK        ; Set up for forward link
  172.         LD      (TNEW1+1),HL    ; Insert it into code
  173.         LD      HL,(MFLNK)      ; Get reverse link
  174.  
  175. THD:    PUSH    HL              ; Save message number on stack
  176.         CALL    MIOPEN          ; Open message index file
  177.         POP     HL              ; Restore message number
  178.  
  179. NTHD:   LD      A,L             ; Is the link=0?
  180.         OR      H
  181.         JR      NZ,TNEW         ; If not, go display the header
  182.         LD      HL,(LSTMSG)     ; Else, restore last message displayed number
  183.  
  184. TNEW:   CALL    GETRC           ; Convert msg # to message index rec #
  185.         JR      C,CORTHD        ; If exact match not found, tell us
  186.         LD      HL,(RRNO1)      ; Else, get message index rec #
  187.         CALL    GET             ; Get message index record
  188.         LD      A,(ACESS)       ; Get user's access level
  189.         CP      COSYS           ; Is user a SYSOP?
  190.         JP      NC,RDMS3        ; If yes, they can read anything
  191.         LD      A,(PFLAG)       ; Else, threading is just like reading
  192.         LD      (TMPFLG),A      ;  public, so save the 'public read'
  193.         LD      A,1             ;   flag and set it
  194.         LD      (PFLAG),A       ;    for this test
  195.         CALL    TDONTD          ; Go see if user can read this one
  196.         PUSH    AF              ; Save flags
  197.         LD      A,(TMPFLG)      ; Restore the 'public read' flag
  198.         LD      (PFLAG),A       ;  to its original state
  199.         POP     AF              ;   and restore flags
  200.         JP      Z,RDMS3         ; If user may see this one, go read it
  201. TNEW1:  LD      HL,(MFLNK)      ; Else, get next link
  202.         JR      NTHD            ;  and go check it out
  203.  
  204. CORTHD: CALL    CORMSG          ; Print corrupt thread message
  205.  
  206.  
  207.     This completes the changes for PBBS50.MAC.
  208.  
  209.  
  210. PMNT50.MAC
  211.  
  212.      There is a small problem with the 'G)oto' command in PMNT50.
  213. The  following patches will correct this problem.  Near the label
  214. MGOTO:, make the following changes:
  215.  
  216. MGOTO:  CALL    PRINT
  217. ;;      DB      'oto',LF        ;    <=== DELETE THIS LINE
  218.         DB      'oto',LF,0      ;    <=== INSERT THIS LINE
  219. MGOTO1: CALL    PRINT           ;    <=== INSERT THIS LINE
  220.         DB      CR,LF,'Message number to go to (1-',0
  221.         LD      HL,(IMNXT)      ; Next message number
  222.         DEC     HL
  223.         CALL    PB2ASC
  224.         CALL    PRINT
  225.         DB      '):  ',0
  226.         LD      B,5
  227.         XOR     A               ; Set echo
  228.         LD      C,A
  229.         LD      D,A
  230.         CALL    INPUT           ; Returns 0 if nothing entered
  231. ;;      JP      Z,ENDNUM        ; Nothing entered so quit  <== DELETE
  232.         JP      Z,MLOP1         ; Nothing entered so quit  <== ADD
  233.  
  234. Then, below label GN1:, make the following changes:
  235.  
  236. GN1:    CALL    PRINT           ; Else, tell him about it
  237.         DB      CR,LF,'Enter message number only.',CR,LF,0
  238. ;;      JR      MGOTO           ;  <=== DELETE THIS LINE
  239.         JR      MGOTO1          ;  <=== INSERT THIS LINE
  240.  
  241. Finally, near label ENDNUM:, make the changes shown below:
  242.  
  243. ;;ENDNUM:JP     MGOTO           ;  <=== DELETE THIS LINE
  244.  
  245. NANY:   CALL    PRINT
  246.         DB      CR,LF,'Not a valid message number',0
  247. ;;      JP      MGOTO           ;  <=== DELETE THIS LINE
  248.         JP      MGOTO1          ;  <=== INSERT THIS LINE
  249.  
  250.      There  is also a problem with the private/public  toggle  in
  251. the message maintenance routines.  Near the label TPP:, make  the
  252. following changes:
  253.  
  254. TPP:    CALL    PRINT
  255.         DB      'oggle',0
  256.         LD      A,(MPUBF)
  257. ;;      XOR     0FFH            ; <== DELETE THIS LINE
  258.         AND     01              ; <== INSERT THIS LINE
  259.         XOR     01              ; <== INSERT THIS LINE
  260.         LD      (MPUBF),A
  261.         LD      HL,(RRNO1)
  262.         CALL    PUT
  263.         JP      MLOP1
  264.  
  265.      This completes the changes for PMNT50.MAC.
  266.  
  267.  
  268. PMSG50.MAC
  269.  
  270.      This  is a minor problem when trying to abort a  message  in
  271. PMSG  5.0.   This  can  be corrected  as  follows.   Below  label
  272. EXITCR:, make the following changes:
  273.  
  274. EXITCR: PUSH    BC              ; Save buffer length for later handling
  275.         PUSH    IX              ; Save address for later handling
  276.         LD      IX,(MSG)
  277.         INC     IX
  278.         LD      A,(IX)
  279.         OR      A
  280. ;;      JP      Z,ABXIT         ;  <=== DELETE THIS LINE
  281.         JP      Z,ABXIT0        ;  <=== INSERT THIS LINE
  282.  
  283. Then, near label ABXIT, as follows:
  284.  
  285. ABXIT:  CALL    PRINT
  286.         DB      'bort',0
  287. ;;      LD      A,(MODE)        ;  <=== DELETE THIS LINE
  288. ABXIT0: LD      A,(MODE)        ;  <=== INSERT THIS LINE
  289.         OR      A
  290.         JR      Z,PMSGEX
  291.         CALL    PRINT
  292.  
  293.      This completes the changes to PMSG50.MAC.
  294.  
  295.  
  296.                                         Ian Cottrell
  297.                                         December 10/90
  298.