home *** CD-ROM | disk | FTP | other *** search
/ ftp.wwiv.com / ftp.wwiv.com.zip / ftp.wwiv.com / pub / MISC / PBAPI10.ZIP / APIDOCS.ZIP / SYSDAT2.DOC < prev    next >
Text File  |  1998-02-21  |  5KB  |  116 lines

  1. Author....... : Gary Price
  2. Copyrighted by: Freejack's Software 1997-98
  3.  
  4. SYSDAT2_DAT API Unit for TriBBS v10.x/11.x written in PowerBasic v3.5
  5. ---------------------------------------------------------------------------
  6.  
  7. The SYSDAT2_DAT functions are used to manipulate data in the SYSDAT2.DAT
  8. data file found in node's MAIN directory. The SYSDAT2.PBU Unit is declared
  9. in PBAPI10.INC as follows:
  10.  
  11. File Name: "SYSDAT2.DAT"
  12.  TYPE SYSDAT2
  13.     Node1sMainDirectory AS STRING * 81
  14.     ReservedDataArea    AS STRING * 175
  15.  END TYPE
  16.  
  17. DIM SYSDAT2    AS SHARED SYSDAT2
  18. DIM sys2       AS SHARED SYSDAT2 PTR
  19.  
  20. sys2 = VARPTR32(SYSDAT2)
  21. LSET SYSDAT2 = SYSDAT2
  22.  
  23. ---------------------------------------------------------------------------
  24.  
  25. FUNCTION's below are from the SYSDAT2.PBU Unit and DECLAREd in the
  26. PBAPI10.INC.
  27.  
  28. FUNCTION SYSDAT2_DAT_Open()
  29. FUNCTION SYSDAT2_DAT_Close()
  30. FUNCTION SYSDAT2_DAT_Read()
  31. FUNCTION SYSDAT2_DAT_Write()
  32. FUNCTION SYSDAT2_DAT_OpenRead()
  33. FUNCTION SYSDAT2_DAT_WriteClose()
  34. FUNCTION SYSDAT2_DAT_OpenReadClose()
  35. FUNCTION SYSDAT2_DAT_OpenWriteClose()
  36. FUNCTION SYSDAT2_DAT_ClearIt()
  37. FUNCTION SYSDAT2_DAT_Initialize()
  38.  
  39. FUNCTION SYSDAT2_DAT_GetN1MD() AS STRING
  40. FUNCTION SYSDAT2_DAT_PutN1MD(s AS STRING)
  41.  
  42. ---------------------------------------------------------------------------
  43.  MPORTANT: TBNode1sMainDirectory must be set to node's main directory
  44.  before calling any function with the "Open" word.
  45. ---------------------------------------------------------------------------
  46.  
  47. SYSDAT2_DAT_Open()
  48.  The SYSDAT2_DAT_Open function opens the SYSDAT2.DAT data file in node's
  49.  main directory.
  50.  
  51. SYSDAT2_DAT_Close()
  52.  The SYSDAT2_DAT_Close function closes the SYSDAT2.DAT data file in node's
  53.  main directory.
  54.  
  55. SYSDAT2_DAT_Read()
  56.  The SYSDAT2_DAT_Read function reads the contents of the SYSDAT2.DAT data
  57.  file into memory.
  58.  
  59. SYSDAT2_DAT_Write()
  60.  The SYSDAT2_DAT_Write function updates the contents of SYSDAT2.DAT from
  61.  memory.
  62.  
  63. SYSDAT2_DAT_OpenRead()
  64.  The SYSDAT2_DAT_OpenRead function provides the functionality of the
  65.  SYSDAT2_DAT_Open and SYSDAT2_DAT_Read functions in a single function call.
  66.  
  67. SYSDAT2_DAT_WriteClose()
  68.  The SYSDAT2_DAT_WriteClose function provides the functionality of the
  69.  SYSDAT2_DAT_Write and SYSDAT2_DAT_Close functions in a single function call.
  70.  
  71. SYSDAT2_DAT_OpenReadClose()
  72.  The SYSDAT2_DAT_OpenReadClose function provides the functionality of the
  73.  SYSDAT2_DAT_Open, SYSDAT2_DAT_Read, and SYSDAT2_DAT_Close functions in a
  74.  single function call.
  75.  
  76. SYSDAT2_DAT_OpenWriteClose()
  77.  The SYSDAT2_DAT_OpenWriteClose function provides the functionality of the
  78.  SYSDAT2_DAT_Open, SYSDAT2_DAT_Write, and SYSDAT2_DAT_Close functions in a
  79.  single function call.
  80.  
  81. SYSDAT2_DAT_ClearIt()
  82.  The SYSDAT2_DAT_ClearIt function sets the entire SYSDAT2_DAT data record
  83.  to all zeros.
  84.  
  85. SYSDAT2_DAT_Initialize()
  86.  The SYSDAT2_DAT_Initialize function is used to create a SYSDAT2.DAT data
  87.  file if one doesn't exist. IMPORTANT: TBNode1sMainDirectory must be set
  88.  before calling this function.
  89.  
  90. -----------------------------------------------------------------------------
  91. POINTERS Uses a hidden variable I use called "@sys2". Any reference to this
  92. is only for your information for discussion in this doc file. You will not
  93. need to concern yourself trying to use this.. All calls are handled in the
  94. main SYSDAT2.PBU Unit by my routines automatically. In other words, I am
  95. trying to keep Pointers as easy as possible for your use. :)
  96.  
  97. Also, all calls to any Functions which gets data with the string routines
  98. will auto-trim each string's extra spaces and the null terminator, CHR$(0),
  99. off so printing will be easier for you to manipulate. When calling the string
  100. routines to put data back into the string space, all string data will be
  101. resized to fit the SYSDAT2.DAT type structure and will add the null terminator
  102. back to the end of the string. Just remember, when working the data in memory
  103. with the pointer calls, you still have to write the data back to the
  104. SYSDAT2.DAT in order for the changes to become permanent.
  105.  
  106. -----------------------------------------------------------------------------
  107. SYSDAT2_DAT_GetN1MD() AS STRING
  108.  This form of the SYSDAT2_DAT_GetN1MD function returns a pointer to the sysop's
  109.  registration code string.
  110.  
  111. SYSDAT2_DAT_PutN1MD(s AS STRING)
  112.  This form of the SYSDAT2_DAT_PutN1MD function sets the sysop's registration
  113.  code string to the string pointed to by "s". Note that the string pointed to
  114.  by "s" can be no more than 80 characters in length.
  115.  
  116.