home *** CD-ROM | disk | FTP | other *** search
/ ftp.wwiv.com / ftp.wwiv.com.zip / ftp.wwiv.com / pub / MISC / DESIRE15.ZIP / INSTALL.DAT / INFO.ZIP / XRD-DEV1.ZIP / XRD-DEV1.TXT < prev    next >
Text File  |  1997-03-29  |  41KB  |  972 lines

  1.  
  2.   ██████ █████ █████▀███▄▄  ▄████▀███▄  ▄▄█████▄▄  █████▀██▄    ▄▄███▀███▄▄
  3.   ██████ █████ █████ ██████ █████ ████ █████ █████ █████ ████  ██████ ██████
  4.   ██████ █████ █████ ███▓██ ███▓█ ████ █████ █████ █████ ████▌ ██████ ███▓██
  5.   ██████ █████ █▓███ ██████ ███▓█ ████ █▓███ █████ ███▓█ █████ ██▓███ ██████
  6.   ▐█▓███ ████▌ █▓███ ██████ █████ ████ █▓███ █████ ███▓█ █████ ██▓███ ▀▀▀███ ▌
  7.  ▌ █████ ████  █▓█████████▀ █████ ████ █▓███ █████ ███▓█ █████ ██▓███████▄▄
  8.     ▀███▄██▀   █████▀███▄   █████ ████ █████ █████ █████ █████ ▀▀▀▀▀▀▀██████
  9.    ▄▓███ ███▄  █████ █████ ▄█████ ████▄▄▄▄▄▄▄█████ ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ██████ ▌
  10.   ▐█▓███ ████▌ █████ █████▌ ███▓█ ████ ▄▄▄▄▄ █████ ▄▄▄▄▄ ▄▄▄▄▄ ██████ ██████ ▌
  11.  ▌██▓███ █████ █▓███ ███▓██ ███▓█ ████ █████ █████ █████ █████ ██▓███ ███▓██ ▌
  12.  ▌██████ █████ █▓███ ███▓██ ███▓█ ████ █▓███ █████ ███▓█ █████ ██▓███ ███▓██ ▌
  13.   ██████ █████ █████ ██████ █████ ████ █▓███ █████ ███▓█ █████ ██████ ██████ ▌
  14.  ▌██████ █████ █████ ██████ █████ ████ █▓███ █████ ███▓█ ████▌ ▐█████ ██████ ▌
  15.  ▌██████ █████ █████ ██████ ██████████ █████ █████ █████ ███▀ ▄ ▀██████████▀ ▌
  16.  ▌▀▀▀▀▀▀ ▀▀▀▀▀ ▀▀▀▀▀ ▀▀▀▀▀▀  ▀▀▀▀▀▀▀▀  ▀▀▀▀▀ ▀▀▀▀▀ ▀▀▀▀▀▀▀▀ ▄▀ ▀▄  ▀▀▀▀▀▀ ▄▄▀
  17.  ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀     ▀SQUiZZY▀
  18.            ┌─────────────────────────────────────────────────────┐
  19.    ╓──────[│     [   x R O A D s    1    9    9    7   !  ]      │]──────╖
  20. ┌──║───────══════════════════════════════════════════════════════────────║───┐
  21. │  ║                                                                     ║   │
  22. │  ║         The Desire Development Pack #1 by Rapido/xROADs             ║   │
  23. │  ║                                                                     ║   │
  24. └──║───────══════════════════════════════════════════════════════────────║───┘
  25.    ╙───────│                                                    │────────╜
  26.            └────────────────────────────────────────────────────┘
  27.  
  28.  Contents
  29.  
  30.  
  31.  1. How to get started
  32.  
  33.  2. The Doorkit Explained
  34.  
  35.  3. The Newuser Application Viewer 1.1 (Full Pascal Source included!)
  36.  
  37.  4. Notes
  38.  
  39.  
  40. ┌──────────══════════════════════════════════════════════════════────────────┐
  41. │  ║                                                                     ║   │
  42. │  ║                    1. How to get started                            ║   │
  43. │  ║                                                                     ║   │
  44. └──────────══════════════════════════════════════════════════════────────────┘
  45.  
  46.  What you need is: Borland Pascal 7.0 and the Desire Doorkit 1.2 (or the most
  47.  recent version). The Desire Doorkit consists of a set of UNITS for Borland 
  48.  Pascal 7.0, these are:
  49.  
  50.  Deskit.TPU   this is the 'main' unit. You always need to 'include' this one!
  51.               (uses Dos,Crt,Deskit,.....;)
  52.  
  53.  
  54.  Desstr.TPU   for operations on strings, chars, time, date.
  55.               This one you can use if you want to use the desire own 
  56.               string/date/time operations, but is not neccessary!
  57.  
  58.  Desuart.TPU  this one is only by Deskit.TPU for the UART communications.
  59.               but forget this, you don't need this.
  60.  Desfos.TPU   this one too is only used by Deskit.TPU for the FOSSIL
  61.               communications, you don't need this one either!
  62.  
  63.               Maybe you did some coding for System/X before where you
  64.               needed 2 different .TPU-files for UART and FOSSIL ?
  65.               Well Desire supports both at one time, no need to make
  66.               a FOSSIL and a seperate UART version! Desire doors are
  67.               both FOSSIL and UART!
  68.  
  69.  Dessys.TPU   Some System&Keyboard routines, only of you want to use it!
  70.  
  71. ┌──────────══════════════════════════════════════════════════════────────────┐
  72. │  ║                                                                     ║   │
  73. │  ║                    2. The Doorkit Explained                         ║   │
  74. │  ║                                                                     ║   │
  75. └──────────══════════════════════════════════════════════════════────────────┘
  76.  
  77.  
  78.  = Deskit.TPU ==============================================================
  79.  
  80.  A unit contains VARS, TYPES, PROCEDURES and FUNCTIONS you can access in 
  81.  your program called a 'DOOR'
  82.  
  83.  Const
  84.  -----
  85.  
  86.  Const Version='1.2';
  87.  Const STRLINES=200;   { number of strings in STRSx.x }
  88.  
  89.  Types 
  90.  -----
  91.  
  92.  TYPE
  93.         ConfigRec = RECORD                    (* C:\DESIRE\CONFIG.<Node>   *)
  94.         LastCall = RECORD                     (* C:\BBS\DATA\LASTCALL.DAT  *)
  95.         BBSrecord = Record                    (* C:\BBS\DATA\BBS<node>.DAT *)
  96.         ConfUserRecord = RECORD               (* C:\BBS\CONFDIR\USERS.CNF  *)
  97.         TransferRecord = RECORD               (* C:\BBS\DATA\TRANSFER.xxx  *)
  98.         MultiNodeRecord = RECORD              (* C:\BBS\DATA\NODE.xxx      *)          
  99.         DoorRecord = RECORD                   (* C:\BBS\DATA\SXDOOR.xxx    *)
  100.         MsgRecord = RECORD                    (* C:\BBS\MSGBASE\HEADERS.DAT*)
  101.         FlagRecord = RECORD                   (* C:\BBS\FILEFLAG.xx        *)     
  102.         XferLogRecord = RECORD                (* C:\BBS\LOGFILES\UPLOAD.DAT*)
  103.         StringRecord = RECORD                 (* C:\BBS\STRSx.xxx          *)
  104.         GlobalFlagRecord = Record
  105.  
  106.         { all the above RECORDS structures can be found in STRUCTS.130, in
  107.           this case STRUCT.130 because Doorkit version 1.2 supports the
  108.           structures of Desire Version 1.3 (at this point not yet released), 
  109.           and is compatible with any next version of Desire!
  110.         }
  111.  
  112.         InternalRec = RECORD  { used internal }
  113.  
  114.         StringBaseArray1 = Array[1..50]         of StringRecord;
  115.         StringBaseArray2 = Array[51..99]        of StringRecord;
  116.         StringBaseArray3 = Array[100..150]      of StringRecord;
  117.         StringBaseArray4 = Array[151..STRLINES] of StringRecord;
  118.  
  119.         { the above contain all the menuset strings!, as they appear
  120.           in STRDES.TXT or in the MENUSET.EXE editor! you can access
  121.           all these strings by the function GetString(Nr:Integer):String;
  122.         }
  123.  
  124.  TYPE   MCIRptr   = ^MCIRecord;
  125.         MCIRecord = Record
  126.  
  127.         { the above are to pass information into a @MCIx@ MCI-code!
  128.  
  129.           If you want to show you own .PCB-file which has variable 
  130.           fields in it, you can build up a list of values for all the
  131.           @MCIx@-codes that should appear on that position (up to 10 max.)
  132.  
  133.           When we show a .PCB-file with the Procedure 
  134.           TypeMCIFile(Name:String) the doorkit looks if there exists
  135.           a list Control^.MCI^ (or in other words: if Control^.MCI^<>NIL)
  136.  
  137.           (Be carefull: Control^.MCI points to the MCIRECORD which hold
  138.            a pointer to the first element Control^.MCI^^, thats why there
  139.            is an extra ^ !)
  140.  
  141.           For instance: (see NAV.PAS, included in this PACK!)
  142.           -------------------------------------------------------------------
  143.           Var AidMCI:MCIRPTR;
  144.  
  145.           Begin
  146.  
  147.            GetMem(Control^.MCI^,SizeOf(MCIRecord));
  148.               { here it creates the first element of a list } 
  149.                  
  150.            AidMCI:=Control^.MCI^;
  151.               { AidMCI now points to that first element }
  152.  
  153.            AidMCI^.Mcistr:='RAPIDO';
  154.               { now fill the 1st record with a string, in this case
  155.                 @MCI1@ will be replaced by RAPIDO! }
  156.  
  157.            AidMCI^.NExt:=NIL;
  158.               { ok, tell the doorkit this was the last element in the list!
  159.                } 
  160.  
  161.            TypeMCIFile('NAVSRCH.PCB');
  162.              { show the file, @MCI1@ in that file will now be replaced with 
  163.                'RAPIDO' }
  164.  
  165.            AidMCI:=Control^.MCI^;
  166.            FreeMem(Control^.MCI^,SizeOf(MCIRECORD));
  167.              { now free the 1st MCIRECORD, becarefull and don't forget
  168.                the ^ in Control^MCI^ <---- because it's the 1st element
  169.                we are removing and NOT the Control^.MCI }
  170.  
  171.            CloseAll;
  172.           End;
  173.  
  174.         }
  175.  
  176.  TYPE   EventRecord = RECORD 
  177.  
  178.                 Time:String[5]; {HH:MM}
  179.                 Action:Byte;
  180.  
  181.                 {  Set Bit 7 OFF-HOOK
  182.                        Bit 6 ON-HOOK
  183.                        Bit 5 ONLINE
  184.                        Bit 4 OFFLINE
  185.                        Bit 3..0 = 0..31 Actions
  186.  
  187.                 Actions:
  188.  
  189.                 0 IDLE
  190.                 1 RESET DAYSTATS
  191.                 2 EXIT            +  <Errorlevel>
  192.                 3 RUN DOOR        +  <Filename>
  193.                 4 CD PLAY         +  <Track>
  194.                 5 CD STOP
  195.                 6 TYPE            +  <Filename>     
  196.                 7 RUN UTIL        +  <Filepath>
  197.                 8 BEEP            +  <# Times>
  198.                 9 LOGOFF
  199.  
  200.                 }
  201.  
  202.  
  203.                Extern:String[30];  { DOORNAME }
  204.         End;
  205.  
  206.         { The eventrecord contains a time and a action byte. The action 
  207.           byte contains the information about which action should occure and
  208.           whether or not the modem should be turned on- or off-hook or
  209.           if the action may only occur if the bbs is off- or online. 
  210.           the 4 least significant bytes represent the action number 
  211.           as show above.
  212.  
  213.           This data is read from the EVENTS.x, for instance:
  214.           ----------------------------------
  215.           05:40 TYPE WARNING
  216.           05:45 OFFHOOK
  217.           06:00 RUN NETMAIL
  218.           06:15 ONHOOK
  219.           ----------------------------------
  220.           This could be an event-script for the NETMAIL-door. At 5.40 a door
  221.           is executed while a user might be online. At 5.45 the BBS goes
  222.           actually OFFLINE. at 6.00 a door called NETMAIL is started.
  223.           This door could actually take over the modem to communicate with
  224.           another remote NETMAIL-server/BBS. At 6.15 the board goes online again.
  225.           Commands for events:
  226.           TYPE    <filename>      for showing textfiles from the TEXT-dir online.
  227.           RUN     <filename>      for executing programs offline.
  228.           RUNDOOR <filename>      for executing programs online.
  229.           OFFHOOK                 for modem-offhook (busy.)
  230.           ONHOOK                  for modem-onhook (online.)
  231.           CDPLAY  <track>         for playing a cd-track.
  232.           CDSTOP                  for stopping the cd.
  233.           RESET                   for BBS-reset (usually at 00:00)
  234.           EXIT                    for exiting the bbs (reset)
  235.           QUIT                    for quiting the bbs (shutdown)
  236.  
  237.           While creating a EVENTS.x file make sure you put the line :   
  238.           ----------------------------------
  239.           RESET xx:xx
  240.           ----------------------------------
  241.           (Where xx:xx indicates the time of the day statistics reset)
  242.           Otherwise the statistics reset will be ignored!
  243.  
  244.         }
  245.  
  246.  TYPE   InternalRec = RECORD
  247.                PosInUserBase   :       LongInt;   { for use with msgindex }
  248.                  { the position of this user in the userbase }
  249.                CheckPause      :       Boolean;
  250.                  { check when length of screen is reached ? }
  251.                Ypos:Byte;
  252.                  { the current number of lines enter without a pause }
  253.                SysopHangup      :      Boolean;
  254.                  { ALT - H pressed ? }
  255.                UserLockOut: Boolean;
  256.                  { ALT - L pressed ? }
  257.                CorrectLogon:Boolean;
  258.                  { Is this a correct logon ? }
  259.                Node:Byte;
  260.                  { The current node }
  261.                Commands:Array [1..MaxDosKey] of String[30];
  262.                  { The last 20 commands }
  263.                CommandPtr:Byte;
  264.                  { current command }
  265.                BaudStr:String;
  266.                  { baudstr returned by modem }
  267.                Lines:Byte;
  268.                  { howmany lines available on the screen 
  269.                    with or without the statistics bar etc. }
  270.                TimeExpiredWarning:Boolean;
  271.                  { Did we have a warning yet ? }
  272.                TimeLeft:LongInt; {original timeleft for a user}
  273.                  { Timeleft at start }
  274.                NextEvent:EventRecord; { HH:MM }
  275.                  { When is the next event ? (see above) }
  276.                LastEvent:EventRecord; { HH:MM }
  277.                  { What was the last event ? (see above) }
  278.                StatBarType:Byte; { 1..9 }
  279.                  { which statbar is on ? }
  280.                InputAvail:Byte;  { 0 none , 1 = local , 2 = remote }
  281.                MainPrompt:String;
  282.                  { what's the current mainprompt in Desire ? }
  283.                ForceLogoff:Boolean;
  284.                  { Force logoff after event ? }
  285.                StopOutput:Boolean;
  286.                  { Stop output after 'More Y/N/NS = N' }
  287.                SysopLogon:Boolean;
  288.                  { Sysoplogin ? }
  289.                DontSendInit:Boolean;
  290.                  { -L as parameter for Desire ? }
  291.                DontCheckInit:Boolean;
  292.                  { -DONTCHECK as parameter for Desire ? }
  293.                DontHangUp:Boolean;
  294.                  { -D as parameter for Desire ? }
  295.                NoDirCheck:Boolean;
  296.                  { -C as parameter for Desire ? }
  297.                CheckCarrier:Boolean;
  298.                  { Is carrier checked now ? }
  299.                CheckTime:Boolean;
  300.                  { Check for timeleft ? }
  301.                LastLocalAction:String[8]; { HH:MM:SS }
  302.                  { Last time input from keyboard locally }
  303.                SaveScreen:Boolean; { screensave active ?>! }
  304.                  { Screensaver active ? }
  305.                DontShowFiles:Boolean;
  306.                  { Is flag G (ALT-G) Up or Down ? }
  307.                CDTrackPlaying:Integer;
  308.                  { Which CD track is been played now ? }
  309.                StatBarHelpPos:Byte;
  310.                  { Which help is shown ? }
  311.                CaptureStart:Boolean;
  312.                  { Is capture on ? }
  313.         End;
  314.  
  315.  
  316.  PROCEDURES and FUNCTIONS
  317.  ------------------------
  318.  
  319.  { PUBLIC FUNCTIONS: }
  320.  Function  GetAreaName(No:Byte):String;  
  321.    { get the name of the current CONFERENCE! }
  322.  Procedure Pause;
  323.    { prints a Pause, the pause directly from the menuset of the current
  324.      user! }
  325.  Procedure More;
  326.    { prints a More prompt Yes/No/Nonstop etc.. 
  327.  
  328.      If 'N' then Control^.Int^.StopOutput  is set TRUE !
  329.      If 'NS' then Control^.Int^.CheckPause is set FALSE!
  330.  
  331.    }
  332.  Function  Default(YesIsDefault:Boolean):boolean;
  333.    { Waits for input (y/n). 
  334.  
  335.      YesIsDefault means if the key that is pressed
  336.      was NOT a 'N' (but for instance an Enter) then Default gets TRUE!
  337.      and the other way around!
  338.  
  339.      If Default is set TRUE then 'Yes' appears on the screen and 'NO' 
  340.      otherwise.
  341.  
  342.    } 
  343.  
  344.  
  345.  { OUTPUT LOCAL : }
  346.  Procedure LocalWrite(f:string);
  347.  Procedure LocalWriteln(f:string);     { local screen }
  348.    { Writes locally, including PCB-codes!}
  349.  Procedure LocalCls;
  350.    { just a ClrScr }
  351.  
  352.  Function  TypeMCIFile(filename:string):Boolean;
  353.    { to show a .PCB file with MCI-codes and ANSI-codes allowed }
  354.  Function  TypeTXTFile(filename:string):Boolean;
  355.    { to show a plain textfile with no MCI/ANSI-codes allowed }
  356.  
  357.  { INPUT LOCAL & REMOTE : }
  358.  
  359.  Function  AllReadln(Size:Integer):string;
  360.    { reads input remote&local with a max. Size }
  361.  Function  AllRead(Size:Integer):string;
  362.    { idem, now it only doesn't enter to the next line }
  363.  Function  AllReadlnFill(Size:Integer;Fill:Char):string;
  364.    { does the same as AllReadln but fills spaces with Fill-chars,
  365.      for instance '·' }
  366.  Function  AllGetCh:byte;
  367.    { Waits for input! is used by Function Getch:Byte which does not wait! }
  368.    
  369.  Function  AllKeypressed:Boolean;
  370.    { gives True if ANY input is available from remote or local keyboard }
  371.  
  372.  Function  GetCh:byte;
  373.    { gives 0 when no key is pressed and the ASCII-value otherwise }
  374.  
  375.  Function  Edit_String(f:string;size:integer;LF:Boolean):String;
  376.    { let's you Edit a string.
  377.  
  378.      It prints the string on the current position and lets you edit it
  379.      using Backspace and checks for the maximum size and finally enters
  380.      if LF is true.
  381.    }
  382.  
  383.  { OUTPUT LOCAL & REMOTE : }
  384.  Procedure AllBackSpace(L:Byte);
  385.    { Moves the cursor and Deletes the last L charachters }
  386.  Procedure Allmoveleft(i:integer);
  387.    { Moves the cursor  left i positions }
  388.  Procedure  AllmoveRight(i:integer);
  389.    { Moves the cursor  right i positions }
  390.  Procedure Allmoveup(i:integer);
  391.    { Moves the cursor  up i positions }
  392.  Procedure Allmovedown(i:integer);
  393.    { Moves the cursor  down i positions }
  394.  Procedure AllCursorXY(x,y:integer);
  395.    { Moves the cursor to (X,Y) from the top left position }
  396.  Procedure AllWrite(f:string);       { both local & com }
  397.    { Prints a string f, MCI and ANSI-codes allowed }
  398.  Procedure AllWriteln(f:string);       { both local & com }
  399.    { Prints a string f with a line-feed, MCI and ANSI-codes allowed  }
  400.  Procedure AllWriteNonMCI(f:string);       { both local & com }
  401.    { Prints a string f, but no MCI/ANSI-codes allowed }
  402.  Procedure AllWritelnNonMCI(f:string);       { both local & com }
  403.    { Prints a string f with a line-feed, but no MCI/ANSI-codes allowed }
  404.  
  405.  Procedure CWriteMCI(f:string);       { both local & com }
  406.    { same as AllWrite, for System/X compatibility }
  407.  Procedure CWriteMCIln(f:string);       { both local & com }
  408.    { same as AllWriteln, for System/X compatibility }
  409.  Procedure CWrite(f:string);       { both local & com }
  410.    { same as AllWriteNonMCI, for System/X compatibility }
  411.  Procedure CWriteln(f:string);       { both local & com }
  412.    { same as AllWritelnNONMCI, for System/X compatibility }
  413.  
  414.  { OUTPUT REMOTE }
  415.  Procedure Com_string(f:string);
  416.    { sends string f to the modem }
  417.  Function  Com_stringcheck(f:string):boolean;
  418.    { sends string f to the modem, and checks if the modem is receiving 
  419.      it, in case of Com_string the system would hang until the modem
  420.      receives the string }
  421.  Procedure Com_stringcrlf(f:string);
  422.    { same a Com_string but gives an enter after it }
  423.  
  424.  { INPUT REMOTE }
  425.  Function  Com_receive:Char;
  426.    { wait's for remote input }
  427.  Function  Com_inputavail:boolean;
  428.    { is set TRUE if the remote user has pressed a key }
  429.  
  430.  { COMFUNCTIONS }
  431.  Procedure Allinit;
  432.    { Do not use this! it's called once at the start of the doorkit
  433.      by Deskit.TPU itself to init the comport }
  434.  Procedure Com_flush;
  435.    { Flush the comport }
  436.  Procedure Com_hangup;
  437.    { Drop the carrier }
  438.  Procedure Com_Atcmd(f:string);
  439.    { Send an AT-command to the modem }
  440.  Procedure CloseAll;           (* Always use this as last command !! *)
  441.    { Close the comport, Always call this last! in your doors!! }
  442.  
  443.  { DATAFILES }
  444.  
  445.  Procedure WriteDropFile;
  446.    { Write the current DOOR-record (in memory) to disk 
  447.  
  448.      If you change values in this DOOR-record and you write it back to
  449.      disk with WriteDropFile then Desire will notice that it's data
  450.      has been changed and will read the DOOR-record and will take
  451.      over it's values! 
  452.  
  453.    }
  454.  
  455.  Procedure ReadDropFile;
  456.    { read the DOOR-record (user data), this is already read in by
  457.      Deskit.TPU, so there is no need to execute this procedure unless you
  458.      intend to
  459.    }
  460.  
  461.  Procedure WriteNodeFile(Status:Byte;ExtStatus:String);
  462.    { Write's the NODE-file, to tell other nodes what this node is doing.
  463.      
  464.      for instance if you made a WHO-door you could call this at the
  465.      beginning of the door:
  466.  
  467.      WriteNodeFile(18,'');
  468.  
  469.                 0 - Node Inactive         ExtStatus: -
  470.                 1 - Waiting for Call      ExtStatus: -
  471.                 2 - Ring Detected         ExtStatus: -
  472.                 3 - Receiving Call        ExtStatus: -
  473.                 4 - Logging on            ExtStatus: -
  474.                 5 - Scanning Mail         ExtStatus: -
  475.                 6 - Normal BBS Use/IDLE   ExtStatus: -
  476.                 7 - Account Sequence      ExtStatus: -
  477.                 8 - MultiNode Chat        ExtStatus: -
  478.                 9 - Newuser               ExtStatus: NewUserName
  479.                10 - Uploading             ExtStatus: FileName <Number>
  480.                11 - Downloading           ExtStatus: FileName <Number>
  481.                12 - Beginning Upload      ExtStatus: -
  482.                13 - Beginning Download    ExtStatus: -
  483.                14 - FileCheck             ExtStatus: FileName
  484.                15 - FileID                ExtStatus: FileName
  485.                16 - Logging Off           ExtStatus: -
  486.                17 - Chatting with Sysop   ExtStatus: -
  487.                18 - WHO                   ExtStatus: -
  488.                19 - Joining Conference    ExtStatus: -
  489.                20 - Viewing Bulletins     ExtStatus: -
  490.                21 - Viewing TextFile      ExtStatus: -
  491.                22 - Sysop Viewing File    ExtStatus: -
  492.                23 - Viewing Userlist      ExtStatus: -
  493.                24 - Editing User Setups   ExtStatus: -
  494.                25 - Posting Message       ExtStatus: <ToWho>
  495.                26 - Reading Messages      ExtStatus: -
  496.                27 - Viewing Filelist      ExtStatus: -
  497.                28 - Scanning New Files    ExtStatus: -
  498.                29 - Paging Sysop          ExtStatus: -
  499.                30 - Requested Relogon     ExtStatus: -
  500.                31 - ZipScan               ExtStatus: -
  501.                32 - Flagging Files        ExtStatus: -
  502.    }
  503.  Procedure LogAction(Comment:String);
  504.    { LogAction logs a comment into the LOGFILE of the current node,
  505.     
  506.      LogAction('xROADs' NEWUSERAPPLICATIONVIEWER 1.1 executed.');
  507.  
  508.      results in a line like this:
  509.      --------------------------------------------------------
  510.      14:00:22  xROADs' NEWUSERAPPLICATIONVIEWER 1.1 executed.
  511.      --------------------------------------------------------
  512.  
  513.      LogAction('')  { with an empty string }
  514.  
  515.      results in a line like this:
  516.  
  517.      -------------------------03-29-97 14:00:10-----------------------------
  518.  
  519.  Function  GetString(Nr:Integer):String;
  520.    { Gives a MENUSET string 
  521.  
  522.      When the normal Desire menuset(s) are used, GetString(73) would
  523.      return the string:
  524.      '@X07Sysop Jumped to DOS, please wait...'
  525.  
  526.      and GetString(74) would be: '@X07thanx for waiting...'
  527.  
  528.      Now, AllWrite(Getstring(73)) would print:
  529.      @X07Sysop Jumped to DOS, please wait...
  530.  
  531.      See the STRDES.TXT or MENUSET.EXE for the corresponding numbers! 
  532.  
  533.    } 
  534.  
  535.  Function GetConferencePath(ConfNumber:Integer):String;
  536.    { returns the current FULL path to the conference like this:
  537.      'C:\DESIRE\CONF1'
  538.    }
  539.  
  540.  = Desstr.TPU ==============================================================
  541.  
  542.  Function ShortTIME:string;
  543.    { prints the time like this: 10:00 }
  544.  Function DATE:string;
  545.    { print the date like this: MM-DD-YY }
  546.  Function TIME:string;
  547.    { prints the time like this: 10:00:00 }
  548.  Function StrToInt(Str:string):integer;
  549.    { converts a string to an integer } 
  550.  Function CutSpacesOff(str:string):string;
  551.    { cuts the last spaces from a string }
  552.  Function ToLowcase(Str:String):string;
  553.    { converts al chars in a string to lowercase }
  554.  Function LongToStr(i:longint;Width:Integer):String;
  555.    { converts a LongInt i to a string with a particular Width }
  556.  Function intToStr(i:integer;Width:Integer):String;
  557.    { converts a Integer i to a string with a particular Width }
  558.  Function DoubleToStr(i:double;Width:Integer):String;
  559.    { converts a Double i to a string with a particular Width and no
  560.      fraction }
  561.  Function ToUpcase(Str:String):string;
  562.    { converts the string Str tp uppercase }
  563.  Function chobstring(source:string;from_length, to_length:integer;fill:boolean):string;
  564.    { chobs a part of a string source which had a length of from_length and
  565.      needs to be resized (either bigger or smaller) to to_length and
  566.      if it needs to be bigger add it with characters of fill }
  567.  Function Parameter(f:string;N:byte):String;
  568.    { returns the f-th parameter in a string, that is the f-th word 
  569.      surrounded by spaces }
  570.  Function swildcard(name:string):string;
  571.    { converts a string (filename or username) to a string with length 30
  572.      where 'FILE*' would result in 'FILE??????????????????????????' 
  573.      to see if two strings are the same if they are wildcarded
  574.      (with equal)
  575.    }
  576.  Function swildcardsused(f:string):boolean;
  577.    { return TRUE if f contains a '*' or a '?' }
  578.  Function equal(name1,name2:string):boolean;
  579.    { checks if two wildcarded strings are equal to each other
  580.  
  581.      Equal(Swildcard('FI*'),Swildcard('*')) = true
  582.    }
  583.  Function fwildcard(name:string):string;
  584.    { same as before, now for files 
  585.  
  586.      fwildcard ('FIL*.TXT') = 'FIL?????.TXT' 
  587.    }
  588.  Function fwildcardsused(f:string):boolean;
  589.  Function FExpandFile(name1:String):String;
  590.    { shapes a filename 'BLA*.*' into 8.3 ('BLA*    .*  ') }
  591.  Function Fequal(name1,name2:string):boolean;
  592.    { return TRUE if two wildcardeds filenames are the same:
  593.  
  594.      Fequal(FWildcard('FIL*'),FWildcard('F*')) = True;
  595.  
  596.    }
  597.  Function LeadingSpace(w : Longint;Width:Byte) : String;
  598.    { converts a LongInt to a string with a Width an aligns it to the 
  599.      right }
  600.  Function TimeUsed(LcLogonTime,LastTime:String):
  601.           LongInt;
  602.    { returns the amount of seconds between two time-strings :
  603.  
  604.      TimeUsed('09:00:00','10:00:00') = 3600
  605.  
  606.    }
  607.  Function LeadingZerof(w : LongInt) : String;
  608.    { converts a LongInt to a string and puts zeros in front }
  609.  
  610.      LeadingZerof(8) = '00000008'
  611.    }
  612.  Function Stripmcicode(var str:string):string;
  613.    { removes @X00-codes from a string }
  614.  Function CompileTab(Var f:string):String;
  615.    { converts #9 into 8 spaces }
  616.  Function RemoveUnderScore(f:string):String;
  617.    { removes _ and replaces them by a space ' ' }
  618.  Function DateToDays(DateSt:String):LongInt;
  619.    { converts a date to a number of days from 00-00-00 }
  620.  Function KillEndSlash(f:string):string;
  621.    { removes the last \ that occurs in filepaths }
  622.  Function CharInString(St:String;Ch:Char):Boolean;
  623.    { returns true if character Ch occurs in string St }
  624.  
  625.  = Dessys.TPU ==============================================================
  626.  
  627.  Procedure Pageon;
  628.    { turns the screen on from PageOff }
  629.  Procedure Pageoff;
  630.    { turns the screen output of and the screen appears black }
  631.  Function CapsOn: Boolean;
  632.    { return TRUE when Capslock is on }
  633.  Function NumOn: Boolean;
  634.    { return TRUE when Numlock is on }
  635.  Function ScrollOn: Boolean;
  636.    { return TRUE when Scrolllock is on }
  637.  Procedure Set_Caps(On : boolean);
  638.    { sets Capslock (and the led) on/off }
  639.  Procedure Set_Num(On : boolean);
  640.    { sets Numlock (and the led) on/off }
  641.  Procedure Set_Scroll(On : boolean);
  642.    { sets Scrolllock (and the led) on/off }
  643.  
  644. ┌──────────══════════════════════════════════════════════════════────────────┐
  645. │  ║                                                                     ║   │
  646. │  ║ Example: 3. The xROADS Newuser Application Viewer 1.1 (FULL SOURCE) ║   │
  647. │  ║                                                                     ║   │
  648. └──────────══════════════════════════════════════════════════════────────────┘
  649.  
  650.       This code is not Optimized and still contains bugs! Find them :)  
  651.  
  652. -----------------------------------------------------------------------------
  653. Program NewuserAppViewer;
  654.  
  655. Uses Deskit,Files,DesStr;
  656.  
  657. Var Username,Input,Temp_Str:String;
  658.                           { input strings Temp_Str and Input 
  659.                           { output string Username as @MCI1@ in NAVFND.PCB }
  660.  
  661.     EndSubLoop,EndLoop:Boolean;
  662.                           { variables to end loops lile WHILE/DO and
  663.                             REPEAT/UNTIL }
  664.  
  665.     SearchNode:Byte;      { which ANSWERx.TXT file are we reading ? }
  666.     Found:Boolean;        { we just found a user }
  667.     F:Text;               { for textfiles }
  668.     i:integer;            { aid counter }
  669.     C:Byte;               { to read a byte from the user }
  670.  
  671.     AidMCI:MCIRPTR;       { for the @MCIx@-codes }
  672.  
  673.     ShowCont:Boolean;
  674.     EverFound,            { did we ever find a user ? }
  675.     JustShown:Boolean;    { did we just have a user on the screen or
  676.                             were we looking for one ? 
  677.                             to estimate the amount of enters at 
  678.                             the end 
  679.                           }
  680.  
  681. Begin
  682. EverFound:=false;
  683. If ParamStr(2)<>'' then
  684.  If Door.SecLvl<StrToInt(ParamStr(2)) then 
  685.   Begin
  686.    AllWriteln('No rights to execute this door.');
  687.    AllWriteln('');
  688.    CloseAll;
  689.    Exit;
  690.   End;
  691.  
  692.  
  693. TypeMCIFile('NAVTOP.PCB');
  694. Input:=Allreadln(30);
  695.  
  696.  
  697.     If Input='' then 
  698.      Begin;
  699.      EndSubLoop:=True;
  700.      Endloop:=True;
  701.      TypeMCIFile('NAVBORT.PCB');
  702.      End else
  703.       Begin;
  704.         GetMem(Control^.MCI^,SizeOf(MCIRecord));
  705.         AidMCI:=Control^.MCI^;
  706.         AidMCI^.mcistr:=ToUpcase(Input);
  707.         AidMCI^.NExt:=NIL;
  708.         TypeMCIFile('NAVSRCH.PCB');
  709.         AidMCI:=Control^.MCI^;
  710.  
  711.         AidMCI:=Control^.MCI^;
  712.         FreeMem(Control^.MCI^,SizeOf(MCIRECORD));
  713.       End;
  714.       
  715. EndLoop:=False;SearchNode:=1;Found:=False;
  716. ShowCont:=True;
  717. JustShown:=False;
  718.  
  719.  
  720. While not EndLoop do
  721.  Begin
  722.   If Exists(Config.Scripts+'\ANSWER'+IntToStr(SearchNode,0)+'.TXT') then
  723.    Begin;
  724.     { ok, list exists }
  725.     Assign(f,Config.Scripts+'\ANSWER'+IntToStr(SearchNode,0)+'.TXT');
  726.     Reset(f);
  727.  
  728.     Readln(f,Temp_str);
  729.     EndSubLoop:=False;
  730.  
  731.     While not EndSubLoop do
  732.      Begin
  733.       If Eof(f) then EndSubLoop:=True else
  734.  
  735.       If (Chobstring(Temp_str,5,5,false)='\----') then
  736.        Begin { this is a string, the next line gives the username }
  737.         Readln(f,Temp_str);
  738.  
  739.         Username:='';
  740.         i:=11;
  741.         While (i<=Length(Temp_Str)) and (Temp_str[i]<>',') do
  742.          Begin
  743.           Username:=Username+Temp_str[i];
  744.           Inc(i);
  745.          End;
  746.  
  747.         For i:=1 to (Length(Username)-Length(Input))+1 do
  748.          If ToUpcase(Copy(Username,i,Length(Input)))=
  749.             ToUpcase(Input) then
  750.              Begin { found! }
  751.                 { show it! }
  752.               EverFound:=True;
  753.               GetMem(Control^.MCI^,SizeOf(MCIRecord));
  754.               AidMCI:=Control^.MCI^;
  755.               AidMCI^.mcistr:=Username;
  756.               AidMCI^.NExt:=NIL;
  757.               TypeMCIFile('NAVFND.PCB');
  758.               AidMCI:=Control^.MCI^;
  759.               
  760.               AidMCI:=Control^.MCI^;
  761.               FreeMem(Control^.MCI^,SizeOf(MCIRECORD));
  762.  
  763.               C:=AllGetch;
  764.               If Upcase(Chr(C))='Q' then
  765.                Begin;
  766.                 EndLoop:=True;
  767.                 EndSubLoop:=True;
  768.                 AllWriteln('Quit');
  769.                 AllWriteln('');
  770.                 AllWriteln('');
  771.                End else
  772.               If Upcase(Chr(C))<>'N' then
  773.                Begin
  774.                 JustShown:=True;
  775.                 AllWriteln('Yes');
  776.                 AllWriteln('');
  777.                 AllWriteln('');
  778.               TypeMCIFile('NAVHDR.PCB'); { header }
  779.                 
  780.                 Found:=True;
  781.                  While (Chobstring(Temp_str,5,5,false)<>'\----') and (not Eof(F)) do
  782.                   Begin
  783.                    AllWriteln(Temp_Str);
  784.                    Readln(f,Temp_Str);
  785.                   End;
  786.                {Show;}
  787.  
  788.               TypeMCIFile('NAVCONT.PCB'); { continue searching ? }
  789.               C:=AllGetch;
  790.               If (ToUpcase(Chr(C))<>'N') and (ToUpcase(Chr(C))<>'Q') then
  791.                Begin
  792.                 Allwrite('Yes');
  793.                 AllWriteln('');
  794.                 AllWriteln('');
  795.                 Found:=False;
  796.         GetMem(Control^.MCI^,SizeOf(MCIRecord));
  797.         AidMCI:=Control^.MCI^;
  798.         AidMCI^.mcistr:=ToUpcase(Input);
  799.         AidMCI^.NExt:=NIL;
  800.         TypeMCIFile('NAVSRCH.PCB');
  801.         AidMCI:=Control^.MCI^;
  802.  
  803.         AidMCI:=Control^.MCI^;
  804.         FreeMem(Control^.MCI^,SizeOf(MCIRECORD));
  805.                End else
  806.                 Begin
  807.                  Allwrite('No');
  808.                 AllWriteln('');
  809.                 AllWriteln('');
  810.                  EndSubloop:=True;
  811.                  EndLoop:=True;
  812.                 End;
  813.  
  814.                End else
  815.                 Begin;
  816.                 ShowCont:=False;
  817.                 Found:=False;
  818.                 AllWriteln('No');
  819.                 AllMoveUp(3);
  820.                 JustShown:=False;
  821.                 End;
  822.  
  823.  
  824.  
  825.              End
  826.        End else Readln(f,Temp_str);
  827.      End; { sub }
  828.  
  829.     Close(f);
  830.    End; { exist }
  831.  
  832.   Inc(SearchNode);
  833.   If SearchNode>Config.Howmanynodes then EndLoop:=True;
  834.  end; {endloop }
  835.  
  836.  If not Found then 
  837.   Begin
  838.   If (not JustShown) and (Input<>'') and EverFound then
  839.    Begin
  840.     AllWriteln('');
  841.     AllWriteln('');
  842.     AllWriteln('');
  843.     AllWriteln('');
  844.    End;
  845.  
  846.   TypeMCIFile('NAVNOT.PCB');
  847.   End;
  848.  
  849. CloseAll;
  850. End.
  851. -----------------------------------------------------------------------------
  852. ┌──────────══════════════════════════════════════════════════════────────────┐
  853. │  ║                                                                     ║   │
  854. │  ║                          4. Notes                                   ║   │
  855. │  ║                                                                     ║   │
  856. └──────────══════════════════════════════════════════════════════────────────┘
  857.  
  858.   If you have any valuable information that you want to share with other
  859.   developers, send it to xroads@stack.nl and we'll publish it in the next
  860.   issue!
  861.  
  862.   Thankz, Rapido
  863.  
  864. -----------------------------------------------------------------------------
  865.  
  866.                  ┌────────────────────────────────────────┐
  867.    ╓────────────[│        [*]  LEADING FORCE  [*]         │]─────────────╖
  868. ┌──║───────══════════════════════════════════════════════════════────────║───┐
  869. │  ║                    Rapido             Alibabba                      ║   │
  870. └──║───────══════════════════════════════════════════════════════────────║───┘
  871.    ╙─────────────└────────────────────────────────────────┘──────────────╜
  872.  
  873.                  ┌────────────────────────────────────────┐
  874.    ╓────────────[│        [*]  ACTIVE MEMBERS  [*]        │]─────────────╖
  875. ┌──║───────══════════════════════════════════════════════════════────────║───┐
  876. │  ║     Alibabba, Ampsul, Breakdown, Gannon, Grim, Highl/\nder, Inm     ║   │
  877. │  ║      Ken8, The Killer, Mexx, Mr Bungle, Mushroom, Nighty, Omen,     ║   │
  878. │  ║    Ooze, Pascal, Phreak Klass, Phasia, Predator, Rapido, Ripper,    ║   │
  879. │  ║                Sludge, Squizzy, Star, Thc, Voyage, Wasted           ║   │
  880. └──║───────══════════════════════════════════════════════════════────────║───┘
  881.    ╙─────────────└────────────────────────────────────────┘──────────────╜
  882.  
  883.                  ┌────────────────────────────────────────┐
  884.    ╓────────────[│        [*] CODING DIVISION [*]         │]─────────────╖
  885. ┌──║───────══════════════════════════════════════════════════════────────║───┐
  886. │  ║           Rapido, Alibabba, Ampsul, Pascal ,Gannon, Inm             ║   │
  887. └──║───────══════════════════════════════════════════════════════────────║───┘
  888.    ╙─────────────└────────────────────────────────────────┘──────────────╜
  889.  
  890.                  ┌────────────────────────────────────────┐
  891.    ╓────────────[│  x R O A D s  H E A D Q U A R T E R S  │]─────────────╖
  892. ┌──║───────══════════════════════════════════════════════════════────────║───┐
  893. │  ║ Eternal Damnation .......1 Node......+31...Davadian........WORLD HQ ║   │
  894. │  ║ Mystical Places .........6 Nodes.....+31...Thc............. EURO HQ ║   │
  895. │  ║ Rest In Peace ...........1 Node......+54...Sludge..........  ARG HQ ║   │
  896. │  ║ Central Park ............3 Nodes.....+61...Mr. Bungle........ OZ HQ ║   │
  897. │  ║ Point Break .............7 Nodes.....+49...Voyage........ GERMAN HQ ║   │
  898. │  ║ Magic Affair ............4 Nodes.....+7....Omen......... RUSSIAN HQ ║   │
  899. │  ║ Dead On Time ............2 Nodes.....+47...Nighty..... NORWEGIAN HQ ║   │
  900. │  ║ High Resolution .........1 Node......+44...Pascal............ UK HQ ║   │
  901. │  ║ Dark Forces .............3 Nodes.....+46...Gannon/Phasia SWEDISH HQ ║   │
  902. │  ║ Killertown ..............7 Nodes.....+32...The Killer... BELGIUM HQ ║   │
  903. │  ║ Unknown Area ............1 Node .....+48...Vibr8......... POLISH HQ ║   │
  904. │  ║─────────────────────────────────────────────────────────────────────║   │
  905. │  ║                 x R O A D s  M E M B E R S I T E S                  ║   │
  906. │  ║─────────────────────────────────────────────────────────────────────║   │
  907. │  ║ Sector Seven ............2 Nodes.....+46...Inm/Rawlock. SWEDISH MBR ║   │
  908. │  ║ Tresor ..................1 Node......+46...Ken8........ SWEDISH MBR ║   │
  909. │  ║ Fireball ................2 Nodes.....+49...Star......... GERMAN MBR ║   │
  910. └──║───────══════════════════════════════════════════════════════────────║───┘
  911.    ╙─────────────└────────────────────────────────────────┘──────────────╜
  912.  
  913.                  ┌────────────────────────────────────────┐
  914.    ╓────────────[│ T H A N K S   G R E E T S    N O T E S │]─────────────╖
  915. ┌──║───────══════════════════════════════════════════════════════────────║───┐
  916. │  ║       xROADs thanks & greets the following groups/persons:          ║   │
  917. │  ║                                                                     ║   │
  918. │  ║          Food, Goodspeed, Motiv8, Stf and many others               ║   │
  919. │  ║                                                                     ║   │
  920. │  ║───────══════════════════════════════════════════════════════────────║   │
  921. │  ║         xROADs thanks & greets the following individuals :          ║   │
  922. │  ║                                                                     ║   │
  923. │  ║     Davadian, Darktrooper, Inm, Nighty, Mtl, Cyberkid, The Best     ║   │
  924. │  ║                  and all others in #FOOD and #STF                   ║   │
  925. │  ║                                                                     ║   │
  926. │  ║───────══════════════════════════════════════════════════════────────║   │
  927. │  ║                             N O T E S                               ║   │
  928. │  ║─────────────────────────────────────────────────────────────────────║   │
  929. │  ║                                                                     ║   │
  930. │  ║   xROADs is looking for talented people like you for coding doors,  ║   │
  931. │  ║     managing the xROADs doors coding division and for art work.     ║   │
  932. │  ║     if you're interested in getting xROADs back up again email      ║   │
  933. │  ║      to: xroads@stack.nl or join #xroads on Efnet and contact       ║   │
  934. │  ║                       one of the leaders!                           ║   │
  935. │  ║                                                                     ║   │
  936. │  ║      xROADs changed WHQ! Our new world headquarters will be         ║   │
  937. │  ║                Eternal Damnation +31-765-600721                     ║   │
  938. │  ║                                                                     ║   │
  939. │  ║                 Visit us on the Efnet on #XROADS                    ║   │
  940. │  ║              and contact one of the council members                 ║   │
  941. │  ║                                                                     ║   │
  942. │  ║         You can contact us via E-mail :   xroads@stack.nl           ║   │
  943. │  ║                     or call the xROADs WHQ at                       ║   │
  944. │  ║                        +31-765-600721 (28K8)                        ║   │
  945. │  ║                                                                     ║   │
  946. │  ║      All new releases can be downloaded from our www-page at        ║   │
  947. │  ║                      www.stack.nl/~xroads                           ║   │
  948. │  ║                                                                     ║   │
  949. │  ║─────────────────────────────────────────────────────────────────────║   │
  950. │  ║  Nfo & Xrd Logo By SQUiZZY. Nfo Last Updated By RaPiDo on 03/23/97  ║   │
  951. └──║───────══════════════════════════════════════════════════════────────║───┘
  952.    ╙─────────────│                                        │──────────────╜
  953.                  │ Please report bugs! By reporting bugs  │
  954.                  │   you help us to improve our work!     │
  955.                  │                                        │
  956.                  └────────────────────────────────────────┘
  957. @BEGIN_FILE_ID.DIZ
  958.      ███     ░       ░             ░
  959.  ─  ─█▓█─--─[Desire Development Mag #1]─--
  960.    ░ █▓█ ░ ░ ▒ ░   ░ ▒ ░     ░ ░ ░ ▒ ░ ░
  961.  ▒▄▄▄▄▄▄ ▄▄▄▄▄▄▄  ▄▄▄▄▄▄ ▄▄▄ ▄▄▄▄▄▄  ▄▄▄▄▄▄▄
  962.  ███▀▀▀▀ ███▀▀▀▀ ██▓████ ▀▀▀ ███▀███ ███▀▀▀▀
  963.  █▓█ █▓█ █▓█▀▀▀  █▓▒█▄▄▄ ███ █▓█▄██▀ █▓█▀▀▀░
  964.  █▓█ █▓█ █▓█ █▓█ ▄▄▄ █▓█ █▓█ █▓█ █▓█ █▓█ █▓█
  965.  █▓█ █▓█ █▓█ █▓█ █▓█ █▓█ █▓█ █▓█ █▓█ █▓█ █▓█
  966.  ▒▀▀▀▀▀▀ ▒▀▀▀▀▀▀░ ▀▀▀▀▀▀░▀▀▀░ ▀▀░▀▀▀▒ ▀▀▀▀▀▀
  967.  ░.-------------------------------------.sQZ
  968.   |    Desire Development Magazine #1   |▓ ▒
  969.   |     Download XRD-DEV1.ZIP too!      |▒
  970.   `-------------------------------------'
  971. @END_FILE_ID.DIZ
  972.