home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / cpm / bbsing / bbs / qbbs4-a.lbr / QCONVERT.BAS < prev    next >
BASIC Source File  |  1987-04-26  |  2KB  |  37 lines

  1. 0       'QCONVERT - QBBS File Conversion Program - Lawrence Davis - 1/16/87
  2. 1       '
  3. 2       '***************************************************************
  4. 3       'Q-CONVERT will convert pre version 4 message files to the
  5. 4       'version 4 format.  The only change is to change the end-of-file
  6. 5       'marker from '9999' to '32000'.  This will allow message numbers
  7. 6       'up to 32000 before renumbering the message base.
  8. 7       'Use this program by placing it and MBASIC.COM in the drive/user
  9. 8       'with the rest of the QBBS data files and entering MBASIC QCONVERT.
  10. 9       '
  11. 10      DEFINT A-Z:NEOF$="32000"
  12. 12      OPTION BASE 1:DIM MFILE$(6):MFILE$(1)="General"
  13. 15      USN=0:GOSUB 700
  14. 20      OPEN "I",1,"A:MFILE"
  15. 30      INPUT #1,MFILE$(2),MFILE$(3),MFILE$(4),MFILE$(5),MFILE$(6):CLOSE
  16. 40      OPEN "I",1,"A:PWDS"
  17. 50      INPUT #1,DRIVE$,USER$:CLOSE
  18. 51      USN=VAL(USER$):GOSUB 700:PRINT:M=1
  19. 52      IF MFILE$(M)=" " THEN 130
  20. 55      M$=MID$(STR$(M),2)
  21. 60      OPEN "I",1,DRIVE$+"MF"+M$+"-REC"
  22. 70      INPUT #1,MZ,MX:CLOSE
  23. 90      OPEN "R",1,DRIVE$+"MESSAGE"+M$,65:FIELD #1,65 AS RR$
  24. 100     GET #1,MX+1
  25. 110     PRINT "Converting "+MFILE$(M)+" message file.
  26. 120     MID$(RR$,1)=NEOF$:PUT#1,MX+1:CLOSE
  27. 130     M=M+1:IF M=7 THEN 200 ELSE 52
  28. 200     PRINT:PRINT "Conversion complete."
  29. 201     PRINT "Now use QUTIL to build message indexes.":SYSTEM
  30. 700     YY$=CHR$(&HC5)+CHR$(&HD5)+CHR$(&HE5)+CHR$(&HE)+CHR$(&H20)+CHR$(&H1E)+
  31.         CHR$(USN)+CHR$(&HCD)+CHR$(&H5)+CHR$(&H0)+CHR$(&HE1)+CHR$(&HD1)+
  32.         CHR$(&HC1)+CHR$(&HC9)+CHR$(0)
  33. 710     DEF USR0=PEEK(VARPTR(YY$)+1)+256*PEEK(VARPTR(YY$)+2):YY=USR0 (0)
  34. 720     RETURN
  35.       CHR$(&HC1)+CHR$(&HC9)+CHR$(0)
  36. 710     DEF USR0=PEEK(VARPTR(YY$)+1)+256*PEEK(VARPTR(YY$)+2):YY=USR0 (0)
  37. 720