TABLE OF CONTENTS

reccoon.library/AddAppInfo
reccoon.library/AddFile
reccoon.library/AddHistory
reccoon.library/Brodcast
reccoon.library/CapitalChars
reccoon.library/CloseFArea
reccoon.library/CloseMenuSet
reccoon.library/CloseMsg
reccoon.library/CloseRCtrl
reccoon.library/CloseRScreen
reccoon.library/CmpDate
reccoon.library/CmpTime
reccoon.library/CmpTimeDate
reccoon.library/CookString
reccoon.library/CreateMsg
reccoon.library/CtrlCommand
reccoon.library/FGetFileInfo
reccoon.library/FindFile
reccoon.library/FlushHistory
reccoon.library/FreeAppInfo
reccoon.library/FreeFileInfo
reccoon.library/FreeUser
reccoon.library/GetAppInfo
reccoon.library/GetFileArea
reccoon.library/GetFileInfo
reccoon.library/GetMsgArea
reccoon.library/GetUser
reccoon.library/GlobalFindFile
reccoon.library/IndexUser
reccoon.library/LockControl
reccoon.library/Logg
reccoon.library/MixedCase
reccoon.library/OpenFArea
reccoon.library/OpenMenuSet
reccoon.library/OpenMsg
reccoon.library/OpenRCtrl
reccoon.library/OpenRScreen
reccoon.library/RAddHead
reccoon.library/RAddTail
reccoon.library/RAllocMem
reccoon.library/ReloadMenuSets
reccoon.library/REnqueue
reccoon.library/RFreeAllMem
reccoon.library/RFreeList
reccoon.library/RFreeMem
reccoon.library/RInsert
reccoon.library/RNop
reccoon.library/RRemHead
reccoon.library/RRemove
reccoon.library/RRemTail
reccoon.library/RUpdate
reccoon.library/SaveAppInfo
reccoon.library/SaveFArea
reccoon.library/SaveFig
reccoon.library/SaveUser
reccoon.library/SearchUser
reccoon.library/SetNodeStatus
reccoon.library/SortIndex
reccoon.library/Time2TimeDate
reccoon.library/Transpose
reccoon.library/UpdateData
reccoon.library/UpdateNodeData
reccoon.library/AddAppInfo                         reccoon.library/AddAppInfo

   NAME   
       AddAppInfo -- Adds a userdefined field to User.DAT

   SYNOPSIS
       BOOL AddAppInfo(key, data, size, ctrlmsg, ctrlport )
                       D0    A0    D1      A1       A2

       BOOL AddAppInfo(ULONG, void *, ULONG, struct CtrlMessage *, struct Msg
Port *)

   FUNCTION
       Adds a userdefined field/structure to User.DAT.

   INPUTS
       key      - A unique key for each field. Should be in 0x000000 format.
       data     - A pointer to a field/structure/whatever to add.
       size     - The size of what data is pointing at.
       ctrlmsg  - pointer to a initialized CtrlMessage structure.
       ctrlport - pointer to to ReccControls message-port.

   RESULT
       TRUE if success.

   EXAMPLE
       See TimeBank.c

   NOTES

   BUGS

   SEE ALSO
       SaveAppInfo(), FreeAppInfo(), GetAppInfo()

reccoon.library/AddFile                               reccoon.library/AddFile

   NAME
   AddFile -- Adds a file to the fileareas

   SYNOPSIS
   filenr = AddFile(file, area, ctrl)
   D0               A0    D0    A1

   UWORD AddFile(struct fil *, ULONG, struct control *)

   FUNCTION
   Adds a file to the fileareas. First it searches for an empty slot
   in the FileBaseX.DAT, but if no free space could be found it puts the
   file at the end.

   To add a file you must first initialize the most important fields
   in the fil-structure: fil->name and fil->desc. If no date is set,
   this function takes todays date. The same goes for the filesize, if
   no size is set, it'll try to find out the size by itself.

   The description will be set as a comment to the real file on
   the disk if that feature is enabled in Config/FileBase.

   INPUTS
   fil -- An initialized fil structure that will be added.
   area -- Filearea number that the file will be added to
   ctrl -- Pointer to the control-structure obtained by OpenRCtrl()

   RESULT
   Structure number in FileBaseX.INX, or zero for failure.

   EXAMPLE
   {
   struct fil fil;

       memset(&fil,0,sizeof(struct fil));
       strcpy(fil.filename,"Whatever.LHA");
       strcpy(fil.desc1,"Everything you live for");

       if(!AddFile(&fil, 42, ctrl)) puts("Failed!");
   }

   SEE ALSO
   OpenRCtrl(), Reccoon/Filebase.h

reccoon.library/AddHistory                         reccoon.library/AddHistory

   NAME   
       AddHistory -- Adds a line to the history buffer

   SYNOPSIS
       BOOL AddHistory(line, string, ctrlmsg, ctrlport )
                        D0     A0       A1       A2

       BOOL AddHistory(UWORD, UBYTE *, struct CtrlMessage *, struct MsgPort *
 )

   FUNCTION
       This function allows you to add lines to the historybuffer of each lin
e.

   INPUTS
       line     - The line which to add the text to.
       string   - Text to add to the history buffer.
       ctrlmsg  - pointer to a initialized CtrlMessage structure.
       ctrlport - pointer to to ReccControls message-port.

   RESULT
       TRUE if success.

   EXAMPLE

   NOTES

   BUGS

   SEE ALSO
       FlushHistory()

reccoon.library/Brodcast                             reccoon.library/Brodcast

   NAME
        Brodcast -- Send a message to an user being online

   SYNOPSIS
        success = Brodcast(ctrl, string, line, async, all)
                           A0    A1      D0    D1     D2

        BOOL Brodcast(struct control *, UBYTE *str, UWORD line, BOOL async,
        BOOL all)

   FUNCTION
        Display a textstring to user/users being online.

   INPUTS
        ctrl   -- control structure obtained by OpenRCtrl()
        string -- textstring to be sent. (displaycodes allowed)
        line   -- Rcn-line to receive string
        async  -- set to TRUE if you want the message to be sent
                  in the background (Recommended)
        all    -- set to TRUE will send this message to EVERY node
                  online at the moment. (Will override line nr)

   RESULT
        success -- TRUE for success, or FALSE for failure (if the line
                   isn't running for example)

   EXAMPLE
        UBYTE string[80];
        sprintf(string, "%s wants to play Tetris with you! Come quick!",
        username);
        Brodcast(ctrl, string, otherline, 1, 0);


   NOTES
        If the other user is downloading or something, it might take
        a while before the message is sent. Therefore, use the async-mode.

   BUGS
        Missspelled function-name.

   SEE ALSO

reccoon.library/CapitalChars                     reccoon.library/CapitalChars

   NAME
        CapitalChars -- Converts string to uppercase

   SYNOPSIS
        string = CapitalChars(string)
        D0                    A0

        UBYTE * CapitalChars(UBYTE *string);

   FUNCTION
        This function simply converts a string to uppcase. The supplied
        string is NOT copied.

   INPUTS
        string -- string to convert

   RESULT
        string -- pointer to converted string

   BUGS
        Currently does not handle international characters properly

   SEE ALSO
        MixedCase()

reccoon.library/CloseFArea                         reccoon.library/CloseFArea

   NAME
       CloseFArea - An easy way to free area info.

   SYNOPSIS

       CloseFArea(inx)
                   A0

       void CloseFArea(struct filinx *)

   FUNCTION
       An easy way to free all memory allocated by OpenFArea.

   INPUTS
       filinx  - A pointer to a filinx structure.

   RESULT

   EXAMPLE

   NOTES

   BUGS

   SEE ALSO
       OpenFArea()

reccoon.library/CloseMenuSet                     reccoon.library/CloseMenuSet

   NAME   
       CloseMenuSet -- Frees a loaded menuset

   SYNOPSIS

       void CloseMenuSet(menuset, ctrlmsg, ctrlport)
                           D0        A1       A2

       void CloseMenuSet(UWORD, struct CtrlMessage *,struct MsgPort *)

   FUNCTION
       Frees a loaded menuset.

   INPUTS
       menuset - What menuset to unload.
       ctrlmsg - pointer to a initialized CtrlMessage structure.
       ctrlport- pointer to to ReccControls message-port.

   RESULT

   EXAMPLE

   NOTES

   BUGS

   SEE ALSO
       OpenMenuSet(), ReloadMenuSets()

reccoon.library/CloseMsg                             reccoon.library/CloseMsg

   NAME
        CloseMsg -- Unloads a specific message from memory

   SYNOPSIS
        OpenMsg(ctrl, msg):
                       A0    A1

        void OpenMsg(struct control *, struct msg *);

   FUNCTION
        This function frees the memory allocated by OpenMsg()

   INPUTS
        ctrl   - control structure obtained by OpenRCtrl()
        msg    - A message structure to free.

   RESULT

   NOTES
        You may free the allocated memory yourself, but it is strongly
        recommended that you use CloseMsg().

   BUGS

   SEE ALSO
        OpenMsg(), SaveMsgHeader(), OpenMsgHeader()

reccoon.library/CloseRCtrl                         reccoon.library/CloseRCtrl

   NAME
   CloseRCtrl -- Free ReccControl

   SYNOPSIS
   CloseRCtrl(ctrlport, ctrlreplyport, ctrlmsg)
                  A0        A1             A2

   void CloseRCtrl(struct MsgPort *, struct MsgPort *,
           struct CtrlMessage *)

   FUNCTION
   Tells ReccControl that you don't need it anymore.
   ReccControl will free all datastructures if unused.

   You must do this when you're done with all ReccControl
   functions and structures, otherwise ReccControl will never
   be able to free it's memory.

   If you've changed any global data, you must use SaveFig()
   before you use CloseRCtrl(). Be aware that many recclib-
   functions modifies data, and therefore there's always a
   good idea to use SaveFig().

   INPUTS
   ctrlport -- ReccControl's message-port
   ctrlreplyport -- Your replyport
       ctrlmsg -- An initialized CtrlMessage

   EXAMPLE
   See OpenRCtrl()

   NOTES
   When you've closed ReccControl you are not allowed
   to asume that ReccControl is running or has it's structures
   left in memory. You may neither use any of it's functions.

   SEE ALSO
   OpenRCtrl(), SaveFig(), Reccoon/Shared.h

reccoon.library/CloseRScreen                     reccoon.library/CloseRScreen

   NAME   
       CloseRScreen -- Closes ReccControl's screen

   SYNOPSIS
       void CloseRScreen(ctrlmsg, ctrlport)
                           A1        A2
       void CloseRScreen(struct CtrlMessage *, struct MsgPort *)

   FUNCTION
       Closes ReccControl's screen

   INPUTS
       ctrlmsg  - pointer to a initialized CtrlMessage structure.
       ctrlport - pointer to to ReccControls message-port.

   RESULT

   EXAMPLE

   NOTES

   BUGS

   SEE ALSO
       OpenRScreen()

reccoon.library/CmpDate                               reccoon.library/CmpDate

   NAME
        CmpDate -- Compares two TimeDate structures, by date only

   SYNOPSIS
        match = CmpDate(date1, date2);
        D0              A0     A1

        BYTE CmpDate(struct TimeDate *, struct TimeDate *)

   FUNCTION
        This simple function compares two Rcn TimeDate structures by
        date.

   INPUTS
        date1 -- TimeDate structure to compare
        date2 -- TimeDate structure to compare

   RESULT
        match -- <0 if date1 is less than date2
                  0 if date1 is equal to date2
                 >0 if date1 is greater than date2

   SEE ALSO
        Reccoon/Reccoon.h, CmpTime(), CmpTimeDate(), Time2TimeDate()

reccoon.library/CmpTime                               reccoon.library/CmpTime

   NAME
        CmpTime -- Compares two TimeDate structures, by time only

   SYNOPSIS
        match = CmpTime(date1, date2);
        D0              A0     A1

        BYTE CmpTime(struct TimeDate *, struct TimeDate *)

   FUNCTION
        This simple function compares two Rcn TimeDate structures by
        time.

   INPUTS
        date1 -- TimeDate structure to compare
        date2 -- TimeDate structure to compare

   RESULT
        match -- <0 if date1 is less than date2
                  0 if date1 is equal to date2
                 >0 if date1 is greater than date2

   SEE ALSO
        Reccoon/Reccoon.h, CmpDate(), CmpTimeDate(), Time2TimeDate()

reccoon.library/CmpTimeDate                       reccoon.library/CmpTimeDate

   NAME
        CmpTimeDate -- Compares two TimeDate structures

   SYNOPSIS
        match = CmpTimeDate(date1, date2);
        D0              A0     A1

        BYTE CmpTimeDate(struct TimeDate *, struct TimeDate *)

   FUNCTION
        This simple function compares two Rcn TimeDate structures

   INPUTS
        date1 -- TimeDate structure to compare
        date2 -- TimeDate structure to compare

   RESULT
        match -- <0 if date1 is less than date2
                  0 if date1 is equal to date2
                 >0 if date1 is greater than date2

   SEE ALSO
        Reccoon/Reccoon.h, CmpDate(), CmpTime(), Time2TimeDate()

reccoon.library/CookString                         reccoon.library/CookString

   NAME   
    CookString -- Parses a buffer for ~ codes, and puts it in another buffer

   SYNOPSIS

       BOOL CookString(instring, strung, rs, userdef, cookdata)
                           A0      A1    A2     D1       A3

       BOOL CookString(UBYTE *, UBYTE *, void *, UBYTE *, struct CookData *)

   FUNCTION
       Parses a buffer for ~ codes, and replaces them with real data.

   INPUTS
       instring    - pointer to the input buffer (The one to be scanned)
       strung      - pointer to a temporary buffer
       rs          - pointer to a function to be used when displaying
                     the parsed data. (The function should have 2 args)
       userdef     - Userdefined data to be sent to the second argument
                     of rs.
       cookdata    - Pointer to a CookData structure. (See Reccoon/Door.h)

   RESULT
       TRUE if successfull.

   EXAMPLE

   {
       UBYTE tmp[50];
       if(!CookString("Hello ~ua%s~!\n", tmp, (void *)SendString, (void *)SS_
NOBRK, id->cookdata))
           SendString("Failed to parse text!\n", SS_NOBRK);
   }

   NOTES

   BUGS

   SEE ALSO

reccoon.library/CreateMsg                           reccoon.library/CreateMsg

   NAME
    CreateMsg -- Add a message to a message area

   SYNOPSIS
        msgnum = CreateMsg(ctrl, msgarea, text, msgheader, usernum,
        D0                 A0    D1       A1    A2         D2
               cludges, msghandle, inxhandle)
                           D3       A3         D4

    ULONG CreateMsg(struct control *, ULONG msgarea, UBYTE *,
            struct msg *, UWORD, BOOL, ULONG, ULONG)

   FUNCTION
        This function creates a message in a message area. It maintains
        all necessary variables in the message area, and if usernum is
        non-zero it updates usernum's waiting-mail file. If cludges is 1,
        it also adds message-cludges. For speed increase in Reccproc,
        you can pass the file-handles to the area where the message
        should be added.

   INPUTS
        ctrl -- control structure obtained by OpenRCtrl()
        msgarea -- message area where the message should be created
        text -- the message text, null-terminated
        msgheader -- a msg structure with to, from, subject and flags
                     fields filled in. If the date is invalid, todays
                     date will be used.
        usernum -- user to create waiting mail for.
        cludges -- set to 1 if you want echomail cludges added (they are
                   only added if the msgarea is a netmail or an echomail
                   area)
        msghandle -- an AmigaDOS filepointer to the MsgBaseX.MSG file
                     or zero
        inxhandle -- an AmigaDOS filepointer to the MsgBaseX.INX file
                     or zero

   RESULT
        msgnum -- The message number created, or zero for failure

   EXAMPLE
        {
          struct msg msg;
          ULONG msgnum;

          memset(&msg,0,sizeof(struct msg)); /* Remove dirt */

          strcpy(msg.to, "Niclas Emdelius");
          strcpy(msg.from, "Nobody");
          strcpy(msg.subject,"Well...");
          msg.private=1;

          msgnum=CreateMsg(ctrl, ctrl->msgareas->areanum, "Hello there...\r",
                    &msg, SearchUser(msg.to,0), 1, 0, 0);

          if(!msgnum) puts("Failed!\n");
        }

   NOTES
        If you supply file-handles, you must Seek() them to the end of the
        files.

   BUGS

   SEE ALSO
       OpenRCtrl(), SearchUser()

reccoon.library/CtrlCommand                       reccoon.library/CtrlCommand

   NAME   
       CtrlCommand -- Performs a ReccControl command.

   SYNOPSIS

       ULONG CtrlCommand(command, arga, argb, argc, argd, ctrlmsg, ctrlport)
                           D0      D1    D2    D3    D4     A0        A1

       ULONG CtrlCommand(UWORD, ULONG, ULONG, ULONG, ULONG, struct CtrlMessag
e *, struct MsgPort *)

   FUNCTION
       Performas a specific ReccControl command.
       (See Reccoon/Shared.h)

   INPUTS
       command - See Reccoon/Shared.h
       arga    - First argument
       argb    - Second argument
       argc    - Third argument
       argd    - Fourth argument
       ctrlmsg - pointer to a initialized CtrlMessage structure.
       ctrlport- pointer to to ReccControls message-port.

   RESULT
       Depending on command.

   EXAMPLE

   NOTES

   BUGS

   SEE ALSO
       OpenRCtrl(), CloseRCtrl()

reccoon.library/FGetFileInfo                     reccoon.library/FGetFileInfo

   NAME
       FGetFileInfo -- Reads fileinfo. (Alot faster)

   SYNOPSIS

       struct fil * FGetFileInfo(handle, inx)
                                   D0     A1

       struct fil * FGetFileInfo(BPTR, struct filinx *)

   FUNCTION
       Reads the info about a the specified file, and returns a
       struct fil. (See Reccoon/FileBase.h)
       There are some drawbacks to this function, see notes.

   INPUTS
       handle  - A fileptr to an open FileBase*.DAT
       inx     - A pointer to an filinx. (It will read the first filinx
                 if inx is a array)

   RESULT
       A pointer to a initialized fil structure, or NULL if
       failed.

   EXAMPLE
       {
           ULONG size,c;
           struct fileinx  *   inx = 0;
           struct fil      *   fil = 0;
           BPTR handle;

           inx = OpenFArea(ctrl, 1, &size);
           if(inx)
           {
               handle = Open("FileBase1.DAT", MODE_OLDFILE);
               if(handle)
               {
                   for(c = 0; c < size; c++)
                   {
                       Seek(handle, inx->pos, OFFSET_BEGINNING);
                       fil = FGetFileInfo(handle &inx[c]);
                       if(fil)
                       {
                           printf("File: %s\nSize: %ld\nDesc: %s\n\n", fil->f
ilename, fil->size, fil->desc);
                           FreeFileInfo(fil);
                       }
                   }
                   Close(handle);
               }
               CloseFArea(inx);
           }
       }

   NOTES
       Fast version of GetFileInfo, this means some drawbacks:
       1. It will not jump to the correct position
       2. It will not open ANY files, nor will it check for a valid pointer

       You MUST free the memory with FreeFileInfo() since the way
       this function allocates & works, might change in the future.

   BUGS

   SEE ALSO
       FreeFileInfo(), GetFileInfo()

reccoon.library/FindFile                             reccoon.library/FindFile

   NAME
       FindFile - A easy way to search for a file.

   SYNOPSIS

       fil = FindFile(ctrl, area, file)
                       A1    D0    A2

       struct fil * FindFile(struct control *, ULONG, UBYTE *)


   FUNCTION
       Searches an area for a specific file, IE, no wildcards allowed.

   INPUTS

       ctrl - A pointer to the control structure (Obtained with OpenRCtrl)
       area - Which area to scan.
       file - What file to search for. (NO WILDCARDS!)

   RESULT
       A pointer to a struct fil, or NULL if not found/failed.

   EXAMPLE

   NOTES
       A really lazy function, but quite useful (and thus, no need
       for everyone to invent a own function for this)

       NOTE! You should STILL free it with FreeFileInfo() as normal.

   BUGS

   SEE ALSO
       GetFileInfo(), FGetFileInfo()

reccoon.library/FlushHistory                     reccoon.library/FlushHistory

   NAME   
       FlushHistory - Dump the line's historybuffer

   SYNOPSIS
       void FlushHistory(line, ctrlmsg, ctrlport)
                          D0     A1        A2

       void FlushHistory(UWORD, struct CtrlMessage *, struct MsgPort *)

   FUNCTION
       Clears the historybuffer for a specific line.

   INPUTS
       line     - The line which's historybuffer should be dumped.
       ctrlmsg  - pointer to a initialized CtrlMessage structure.
       ctrlport - pointer to to ReccControls message-port.

   RESULT

   EXAMPLE

   NOTES

   BUGS

   SEE ALSO
       AddHistory()

reccoon.library/FreeAppInfo                       reccoon.library/FreeAppInfo

   NAME
       FreeAppInfo -- Saves the appinfo data for a specific user.

   SYNOPSIS
       void FreeAppInfo(usernum, key, ctrlmsg, ctrlport )
                          D0      D1     A1       A2

       void FreeAppInfo(UWORD, ULONG, struct CtrlMessage *, struct MsgPort * 
)

   FUNCTION
       Frees the appinfo data for a specified user

   INPUTS
       usernum  - The user which's appinfo data to free.
       key      - A unique key for each field. Should be in 0x000000 format.
       ctrlmsg  - pointer to a initialized CtrlMessage structure.
       ctrlport - pointer to to ReccControls message-port.

   RESULT

   EXAMPLE
       See TimeBank.c

   NOTES

   BUGS

   SEE ALSO
       AddAppInfo(), SaveAppInfo(), GetAppInfo()

reccoon.library/FreeFileInfo                     reccoon.library/FreeFileInfo

   NAME
       FreeFileInfo - An easy way to free fil memory.

   SYNOPSIS

       FreeFileInfo(fil)
                     A0

       void FreeFileInfo(struct fil *)

   FUNCTION
       An easy way to free all memory allocated by GetFileInfo.

   INPUTS
       fil     - A pointer to a fil structure.

   RESULT

   EXAMPLE

   NOTES

   BUGS

   SEE ALSO
       GetFileInfo(), FGetFileInfo()

reccoon.library/FreeUser                             reccoon.library/FreeUser

   NAME   
       FreeUser -- Frees the memory used when calling GetUser

   SYNOPSIS

       void FreeUser(usernum, ctrlmsg, ctrlport)
                       D0       A1        A2

       void FreeUser(UWORD, struct CtrlMessage *, struct MsgPort *)

   FUNCTION
       Frees thee memory allocated when calling GetUser

   INPUTS
       usernum  - The user to free.
       ctrlmsg  - pointer to a initialized CtrlMessage structure.
       ctrlport - pointer to to ReccControls message-port.

   RESULT

   EXAMPLE

   NOTES

   BUGS

   SEE ALSO
       GetUser(), SaveUser(), SearchUser()

reccoon.library/GetAppInfo                         reccoon.library/GetAppInfo

   NAME
       GetAppInfo -- Saves the appinfo data for a specific user.

   SYNOPSIS
       struct GetAppInfo(usernum, key, ctrlmsg, ctrlport )
                          D0      D1     A1       A2

       struct AppInfo * GetAppInfo(UWORD, ULONG, struct CtrlMessage *, struct
 MsgPort * )

   FUNCTION
       Reads the appinfo data for a specified user

   INPUTS
       usernum  - The user which's appinfo data to read.
       key      - A unique key for each field. Should be in 0x000000 format.
       ctrlmsg  - pointer to a initialized CtrlMessage structure.
       ctrlport - pointer to to ReccControls message-port.

   RESULT
       A AppInfo structure containing all info you need. =)

   EXAMPLE
       See TimeBank.c

   NOTES

   BUGS

   SEE ALSO
       AddAppInfo(), SaveAppInfo(), FreeAppInfo()

reccoon.library/GetFileArea                       reccoon.library/GetFileArea

   NAME
   GetFileArea -- Searches in memory for an specific filearea

   SYNOPSIS
   areastructure = GetFileArea(areanumber, ctrl)
                  D0          A0

   struct FileList * GetFileArea(ULONG, struct control *)

   FUNCTION
   This is a simple function that searches ctrl->fileareas
   for a specific file area.

   INPUTS
   areanumber -- Areanumber to search for
   ctrl -- Pointer to the control structure obtained by OpenRCtrl()

   RESULT
   areastructure -- Filearea structure for that area, or
            zero if area couldn't be found.

   EXAMPLE
   {
   struct FileList *fl;

       fl=GetFileArea(42,ctrl);
       if(fl){
           printf("Area 42 is named %s!\n",
               fl->filearea.filname);
       }else puts("Area 42 not found!");
   }

   NOTES
   In the future I might implemend a semaphore-system to get
   access to fileareas, therefore, use this functions instead of
   your own. (if possible)

   SEE ALSO
   OpenRCtrl(), GetMsgArea(), Reccoon/Shared.h, Reccoon/FileBase.h

reccoon.library/GetFileInfo                       reccoon.library/GetFileInfo

   NAME
       GetFileInfo -- Reads fileinfo.

   SYNOPSIS

       struct fil * GetFileInfo(ctrl, area, inx)
                                 A1    D0    A2

       struct fil * GetFileInfo(struct control *, ULONG, struct filinx *)

   FUNCTION
       Reads the info about a the specified file, and returns a
       struct fil. (See Reccoon/FileBase.h)

   INPUTS
       ctrl    - A pointer to the control structure.
       area    - Filearea to open.
       inx     - A pointer to an filinx. (It will read the first filinx
                 if inx is a array)

   RESULT
       A pointer to a initialized fil structure, or NULL if
       failed.

   EXAMPLE
       {
           ULONG size,c;
           struct fileinx  *   inx = 0;
           struct fil      *   fil = 0;

           inx = OpenFArea(ctrl, 1, &size);
           if(inx)
           {
               for(c = 0; c < size; c++)
               {
                   fil = GetFileInfo(ctrl, 1, &inx[c]);
                   if(fil)
                   {
                       printf("File: %s\nSize: %ld\nDesc: %s\n\n", fil->filen
ame, fil->size, fil->desc);
                       FreeFileInfo(fil);
                   }
               }
               CloseFArea(inx);
           }
       }

   NOTES
       You MUST free the memory with FreeFileInfo() since the way
       this function allocates & works, might change in the future.

   BUGS

   SEE ALSO
       FreeFileInfo(), FGetFileInfo()

reccoon.library/GetMsgArea                         reccoon.library/GetMsgArea

   NAME
   GetMsgArea -- Searches in memory for an specific messagearea

   SYNOPSIS
   areastructure = GetMsgArea(areanumber, ctrl)
                  D0          A0

   struct MsgList * GetMsgArea(ULONG, struct control *)

   FUNCTION
   This is a simple function that searches ctrl->msgareas
   for a specific message area.

   INPUTS
   areanumber -- Areanumber to search for
   ctrl -- Pointer to the control structure obtained by OpenRCtrl()

   RESULT
   areastructure -- Messagearea structure for that area, or
            zero if area couldn't be found.

   EXAMPLE
   {
   struct MsgList *ml;

       ml=GetMsgArea(42,ctrl);
       if(ml){
           printf("Area 42 is named %s!\n",
               ml->msgarea.msgareaname);
       }else puts("Area 42 not found!");
   }

   NOTES
   In the future I might implemend a semaphore-system to get
   access to messageareas, therefore, use this functions instead of
   your own. (if possible)

   SEE ALSO
   OpenRCtrl(), GetFileArea(), Reccoon/Shared.h, Reccoon/MsgBase.h

reccoon.library/GetUser                               reccoon.library/GetUser

   NAME   
       GetUser -- Loads a user into memory.

   SYNOPSIS

       struct UsrList * GetUser(usernum, ctrlmsg, ctrlport)
                                  D0        A1       A2

       struct UsrList * GetUser(UWORD, struct CtrlMessage *, struct MsgPort *
)

   FUNCTION
       Loads a user into memory.

   INPUTS
       usernum  - User to load into memory.
       ctrlmsg  - pointer to a initialized CtrlMessage structure.
       ctrlport - pointer to to ReccControls message-port.

   RESULT
       Returns a pointer to a userlist structure.

   EXAMPLE

   NOTES

   BUGS

   SEE ALSO
       FreeUser(), SaveUser(), SearchUser()

reccoon.library/GlobalFindFile                 reccoon.library/GlobalFindFile

   NAME
       GlobalFindFile - A easy way to search for a file.

   SYNOPSIS

       fil = GlobalFindFile(ctrl, file)
                             A1    A2

       struct fil * GlobalFindFile(struct control *, UBYTE *)


   FUNCTION
       Searches for a specific file, IE, no wildcards allowed.

   INPUTS

       ctrl - A pointer to the control structure (Obtained with OpenRCtrl)
       file - What file to search for. (NO WILDCARDS!)

   RESULT
       A pointer to a struct fil, or NULL if not found/failed.

   EXAMPLE

   NOTES
       A really lazy function, but quite useful (and thus, no need
       for everyone to invent a own function for this)

       NOTE! You should STILL free it with FreeFileInfo() as normal.

   BUGS

   SEE ALSO
       FindFile()

reccoon.library/IndexUser                           reccoon.library/IndexUser

   NAME   
       IndexUser -- Updates a special userlist.

   SYNOPSIS

       void IndexUser(ctrlmsg, ctrlport)
                        A1        A2

       void IndexUser(struct CtrlMessage *, struct MsgPort *)

   FUNCTION
       Updates a special userlist maintained by ReccControl.
       (Used during SearchUser()...)

   INPUTS
       ctrlmsg - pointer to a initialized CtrlMessage structure.
       ctrlport- pointer to to ReccControls message-port.

   RESULT

   EXAMPLE

   NOTES

   BUGS

   SEE ALSO

reccoon.library/LockControl                       reccoon.library/LockControl

   NAME   
       LockControl -- Locks control for any further use

   SYNOPSIS
       ULONG LockControl(ctrlmsg, ctrlport)
                           A1        A2

       ULONG LockControl(struct CtrlMessage *,struct MsgPort *)

   FUNCTION
       Locks ReccControl for futher use until signaled.

   INPUTS
       ctrlmsg  - pointer to a initialized CtrlMessage structure.
       ctrlport - pointer to to ReccControls message-port.

   RESULT
       A signal mask to use when unlocking ReccControl.

   EXAMPLE

   NOTES
       ReccControl is COMPLETELY locked when this function is called.
       *** SO BE SURE TO UNLOCK IT ***

   BUGS

   SEE ALSO

reccoon.library/Logg                                     reccoon.library/Logg

   NAME
   Logg -- Append a line into a logfile

   SYNOPSIS
   Logg(text, loglevel, filename)
            A0    D1     A1

   Logg(UBYTE *text, UBYTE loglevel, UBYTE *filename)

   FUNCTION
   Quite simple function that inserts a text line at the end of
   a logfile. Loglevel, today's date and time is inserted before
   the actual logtext.

   INPUTS
   text -- Textstring to be inserted
   loglevel -- A value between 0 and 4 that says how important
       the logline is. 0 is most important (= serious error)
   filename -- Path and filename to logfile

   EXAMPLE
   Logg("Processed mail",2,"Reccoon:Reccoon.Log");

   will insert this line at the end of Reccoon.Log:

   | 17-Mar-93 03:03:10  Processed mail

   BUGS
   "Logg" is miss-spelled! (Argh!)
   Before v0.56 was max 170 characters in text allowed.

   SEE ALSO

reccoon.library/MixedCase                           reccoon.library/MixedCase

   NAME
        MixedCase -- Converts string to a nice looking name-string

   SYNOPSIS
        string = MixedCase(string)
        D0                 A0

        UBYTE * MixedCase(UBYTE *string);

   FUNCTION
    This function converts a string to something like this:
               niclas emdelius   -->  Niclas Emdelius
               NICLAS EMDELIUS   -->  Niclas Emdelius
               NiClAs EmDeLiUs   -->  Niclas Emdelius

        The supplied string is NOT copied.

   INPUTS
        string -- string to convert

   RESULT
        string -- pointer to converted string

   BUGS
        Currently does not handle international characters properly

   SEE ALSO
        CapitalChars()

reccoon.library/OpenFArea                           reccoon.library/OpenFArea

   NAME
       OpenFArea -- Opens a filearea.

   SYNOPSIS

       struct filinx * OpenFArea(ctrl, area, size)
                                  A1    D0    A2

       struct filinx * OpenFArea(struct control *, ULONG, ULONG *)

   FUNCTION
       Opens & returns an index of a filearea.

   INPUTS
       ctrl    - A pointer to the control structure.
       area    - Filearea to open.
       size    - Contains the number of entries in filinx.

   RESULT
       A pointer to a initialized filinx structure, or NULL if
       failed.

   EXAMPLE

   NOTES
       You MUST free the memory with CloseFArea() since the way
       this function allocates & works, might change in the future.

   BUGS

   SEE ALSO
       CloseFArea()

reccoon.library/OpenMenuSet                       reccoon.library/OpenMenuSet

   NAME   
       OpenMenuSet -- Loads a menuset into memory

   SYNOPSIS

       UBYTE * OpenMenuSet(menuset, ctrlmsg, ctrlport)
                              D0       A1       A2

       UBYTE * OpenMenuSet(UWORD, ctrlmsg, ctrlport)

   FUNCTION
       Loads a specific menuset into the momery.

   INPUTS
       menuset - What menuset to load.
       ctrlmsg - pointer to a initialized CtrlMessage structure.
       ctrlport- pointer to to ReccControls message-port.

   RESULT
       A pointer to an array with all bbs texts. (See Reccoon/Reccoon-BText.h
)

   EXAMPLE

   NOTES

   BUGS

   SEE ALSO
       CloseMenuSet(), ReloadMenuSets()

reccoon.library/OpenMsg                               reccoon.library/OpenMsg

   NAME
        OpenMsg -- Loads a specific message into memory

   SYNOPSIS
        msg = OpenMsg(ctrl, area, msgnr):
        A0             A1    D0    D1

        struct msg * OpenMsg(struct control *, ULONG, ULONG);

   FUNCTION
        This function loads a specified message into memory.

   INPUTS
        ctrl   - control structure obtained by OpenRCtrl()
        area   - From which area the message should be loaded.
        msgnr  - Message nr (IE, real number, Current - Lowwater)

   RESULT
        msg    - A pointer to a message structure or NULL if the message
                 failed to be loaded for some reason (Low memory/No msg)
                 The txtpos points to an allocated area with the message.
                 msglength is, the length of the message.

   NOTES
        You may free the allocated memory yourself, but it is strongly
        recommended that you use CloseMsg().

   BUGS

   SEE ALSO
        CloseMsg(), SaveMsgHeader(), OpenMsgHeader()

reccoon.library/OpenRCtrl                           reccoon.library/OpenRCtrl

   NAME
   OpenRCtrl -- Ask for access to the global control-structures

   SYNOPSIS
   control = OpenRCtrl(name, line, ctrlmsg, ctrlport, replyport)
                           A0    D1    A1       A2        A3

       struct control * OpenRCtrl(UBYTE *name, UWORD line,
                  struct CtrlMessage *, struct MsgPort **,
                  struct MsgPort **);

   FUNCTION
   This function sends a CTRL_OPEN followed by CTRL_GETPTR to
   ReccControl. This is one of two possible ways to obtain access
   to the structures and functions of ReccControl.

   When access is granted, you'll receive a pointer to the poweful
   control-structure (look in Reccoon/Shared.h).
   Almost every function in reccoon.library needs that pointer,
   and probably you too.

   This is the only official way to get your hands on ANY system-
   data or configuration!

   When you're done with the control-structure and with ReccControl,
   you must release it by using CloseRCtrl(). You may not try to use
   any functions or structures after that. If you've changed anything
   that needs to be saved, use SaveFig() before you close ReccControl.

   INPUTS
   name -- Name of your replyport, or NULL if you allow
       serveral copies of your program running at the
       same time.
   line -- Reccoon line number or 0xffff for doors and
       utilities.
   ctrlmsg -- pointer to a CtrlMessage structure that will be
          initialized
   ctrlport -- pointer to a MsgPort pointer. This will be set
           to ReccControls message-port
   replyport -- pointer to MsgPort pointer that will be created.

   RESULT
   control -- pointer to the powerful control structure, or
          zero for failure.

   The CtrlMessage will be initialized, your replyport will
   be created, and ctrlport will be set to ReccControl's
   messageport.

   EXAMPLE
   struct CtrlMessage ctrlmsg;
   struct MsgPort *ctrlport;
   struct MsgPort *ctrlreplyport;
   struct control *ctrl;

   {
       ctrl=OpenRCtrl(NULL,~0, &ctrlmsg, &ctrlport, &ctrlreplyport);
       if(!ctrl) return;

       printf("Sysop's name: %s\n",ctrl->fig->sysopname);

       CloseRCtrl(ctrlport, ctrlreplyport, &ctrlmsg);

       ctrlport=ctrlreplyport=0;
       ctrl=0;
   }

   NOTES
   Always be careful when you change any of the global structures.
   You must protect list-modifications with Forbid()/Permit() !!

   BUGS
   None known

   SEE ALSO
   SaveFig(), CloseRCtrl(), reccoon/Shared.h

reccoon.library/OpenRScreen                       reccoon.library/OpenRScreen

   NAME   
       OpenRScreen -- Opens ReccControl's screen

   SYNOPSIS
       struct Screen * OpenRScreen(ctrlmsg, ctrlport)
                           A1        A2
       struct Screen * OpenRScreen(struct CtrlMessage *, struct MsgPort *)

   FUNCTION
       Opens ReccControl's screen

   INPUTS
       ctrlmsg  - pointer to a initialized CtrlMessage structure.
       ctrlport - pointer to to ReccControls message-port.

   RESULT
       Returns a screen pointer to ReccControl's screen

   EXAMPLE

   NOTES

   BUGS

   SEE ALSO
       OpenRScreen()

reccoon.library/RAddHead                             reccoon.library/RAddHead

   NAME   
       RAddHead -- Acts like exec's AddHead

   SYNOPSIS

       void RAddHead(list, node)
                      A0    A1

       void RAddHead(struct RList *, struct RNode *)

   FUNCTION
       Acts like exec's AddHead. IE, adds a node to the top of a list.

   INPUTS
       list - A pointer to an initialized RList structure
       node - A pointer to a node to add to the list.

   RESULT

   EXAMPLE

   NOTES

   BUGS

   SEE ALSO
       exec.library/AddHead()

reccoon.library/RAddTail                             reccoon.library/RAddTail

   NAME   
       RAddTail -- Acts like exec's AddTail

   SYNOPSIS

       void RAddTail(list, node)
                      A0    A1

       void RAddTail(struct RList *, struct RNode *)

   FUNCTION
       Acts like exec's AddTail. IE, adds a node to the end of a list.

   INPUTS
       list - A pointer to an initialized RList structure
       node - A pointer to a node to add to the list.

   RESULT

   EXAMPLE

   NOTES

   BUGS

   SEE ALSO
       exec.library/AddTail()

reccoon.library/RAllocMem                           reccoon.library/RAllocMem

   NAME
   RAllocMem -- Allocate memory and remember it

   SYNOPSIS
   memory = RAllocMem(head, size, flags)
              A0    D0    D1

   void * = RAllocMem(struct RRemember **, ULONG sz, ULONG flags)

   FUNCTION
   The same thing as exec's AllocMem(), but this function stores all
   allocated blocks in a linked list. That avoids memory losses if
   you got bugs in your programs.

   INPUTS
   head -- list head pointer
   size -- number of bytes to allocate
   flags -- flags passed to AllocMem()

   RESULT
   memory -- allocated memory block, or NULL for failure

   EXAMPLE
   #define RLIB_MACRO
   #include <reccoon/recclib.h>

   struct RRemember *remember;
   main()
   {
   UBYTE *text;
       text=RAllocMem(256,MEMF_CLEAR);
       if(!text){
           puts("Not enought memory!\n");
           exit(10);
       }
       RFreeMem(text,256);

       if(remeber){
           puts("Unfreed memory!");
           RFreeAllMem();
       }
   }

   NOTES
   There are macros in reccoon/recclib.h that makes RAllocMem(),
   RFreeMem() work just like exec's. Very useful!

   SEE ALSO
   RFreeMem(), RFreeAllMem(), exec/AllocMem()

reccoon.library/ReloadMenuSets                 reccoon.library/ReloadMenuSets

   NAME   
       ReloadMenuSets -- Reloads all menusets.

   SYNOPSIS

       void ReloadMenuSets(ctrlmsg, ctrlport)
                             A1        A2

       void ReloadMenuSets(struct CtrlMessage *, struct MsgPort *)

   FUNCTION
       It will reload all menusets, IE, if a menuset has changed, use
       this function to reload it.

   INPUTS
       ctrlmsg - pointer to a initialized CtrlMessage structure.
       ctrlport- pointer to to ReccControls message-port.

   RESULT

   EXAMPLE

   NOTES

   BUGS

   SEE ALSO
       OpenMenuSet(), CloseMenuSet()

reccoon.library/REnqueue                             reccoon.library/REnqueue

   NAME   
       REnqueue -- Acts like exec's Enqueue

   SYNOPSIS

       void REnqueue(list, node )
                      A0    A1

       void REnqueue(struct RList *, struct RNode *)

   FUNCTION
       Acts like exec's Enqueue.

   INPUTS
       list - A pointer to a list.
       node - A pointer to a node which should be added.

   RESULT

   EXAMPLE

   NOTES

   BUGS

   SEE ALSO

reccoon.library/RFreeAllMem                       reccoon.library/RFreeAllMem

   NAME
   RFreeAllMem -- free all memory allocated with RAllocMem()

   SYNOPSIS
   RFreeAllMem(head)
           A0

   void RFreeAllMem(struct RRemember **)

   FUNCTION
   Searches thru the RRemember list and frees all memory allocated
   with it.

   INPUTS
   head -- list head pointer

   EXAMPLE
   See RAllocMem()

   SEE ALSO
   RAllocMem(), RFreeMem(), exec/AllocMem(), exec/FreeMem()

reccoon.library/RFreeList                           reccoon.library/RFreeList

   NAME   
       RFreeList -- Frees a list AND the nodes memory.

   SYNOPSIS

       void RFreeList(list, rem)
                       A0    A1

       void RFreeList(struct RList *, struct RRemember **)

   FUNCTION
       Free's a list and it nodes memory.

   INPUTS
       list - A list which should be freed
       rem  - A structure which knowns the size for each and
              every node in the list.
              (If not included, this function looks at list->structsize
               when freeing node memory)

   RESULT

   EXAMPLE

   NOTES

   BUGS

   SEE ALSO

reccoon.library/RFreeMem                             reccoon.library/RFreeMem

   NAME
   RFreeMem -- Free memory allocated with RAllocMem()

   SYNOPSIS
   RFreeMem(head, memory, size)
        A0    A1      D0

   void RFreeMem(struct RRemember **, void *, ULONG size)

   FUNCTION
   Free memory allocated with RAllocMem().

   INPUTS
   head -- list head pointer
   memory -- memory block to free
   size -- size of block. Ignored, just there to make it
       look like exec's FreeMem().

   RESULT
   more free memory to the system

   EXAMPLE
   See RAllocMem()

   NOTES

   This function works like exec's FreeMem().

   The list header will be set to zero when there is no allocated
   memory.

   SEE ALSO
   RAllocMem(), RFreeAllMem(), exec/FreeMem()

reccoon.library/RInsert                               reccoon.library/RInsert

   NAME   
       RInsert -- Inserts a node into a list.

   SYNOPSIS

       void RInsert(list, before, node)
                     A0     A1     A2

       void RInsert(struct RList *, struct RNode *, struct RNode *)

   FUNCTION
       Inserts a node into a list.

   INPUTS
       list   - A pointer to a list.
       before - A pointer to the node.
       node   - A pointer to the node which should
                be inserted AFTER before.

   RESULT

   EXAMPLE

   NOTES

   BUGS

   SEE ALSO

reccoon.library/RNop                                     reccoon.library/RNop

   NAME   
       RNop -- Obtain the number of programs using ReccControl

   SYNOPSIS

       UWORD RNop(ctrlmsg, ctrlport)
                    A1        A2

       UWORD RNop(struct CtrlMessage *, struct MsgPort *)

   FUNCTION
       Obtain the number of programs using ReccControl

   INPUTS
       ctrlmsg - pointer to a initialized CtrlMessage structure.
       ctrlport- pointer to to ReccControls message-port.

   RESULT
       The number of programs using ReccControl

   EXAMPLE

   NOTES

   BUGS

   SEE ALSO

reccoon.library/RRemHead                             reccoon.library/RRemHead

   NAME   
       RRemHead -- Removes the head of a list.

   SYNOPSIS

       struct RNode * RRemHead(list)
                                A0

       struct RNode * RRemHead(struct RList *)

   FUNCTION
       Removes the head of the list and returns a pointer to
       the node which has been removed.

   INPUTS
       list - A pointer to a list

   RESULT
       The node which has been removed from the list.

   EXAMPLE

   NOTES

   BUGS

   SEE ALSO

reccoon.library/RRemove                               reccoon.library/RRemove

   NAME   
       RRemove -- Removes a specific node from a list.

   SYNOPSIS

       void RRemove(list, node)
                     A0    A1

       void RRemove(struct RList *, struct RNode *)

   FUNCTION
       Removes a specific node from a list.

   INPUTS
       list - A pointer to a list.
       node - A pointer to a node which should be removed.

   RESULT

   EXAMPLE

   NOTES

   BUGS

   SEE ALSO

reccoon.library/RRemTail                             reccoon.library/RRemTail

   NAME   
       RRemTail -- Removes the last node in a list.

   SYNOPSIS

       struct RNode * RRemTail(list)
                                A0

       struct RNode * RRemTail(struct RList *)

   FUNCTION
       Removes the last node in a list.

   INPUTS
       list - A pointer to a list.

   RESULT
       The pointer to the node which has been removed.

   EXAMPLE

   NOTES

   BUGS

   SEE ALSO

reccoon.library/RUpdate                               reccoon.library/RUpdate

   NAME   
       RUpdate -- Updates ReccControl's info.

   SYNOPSIS

       void RUpdate(ctrlmsg, ctrlport)
                       A1       A2

       void RUpdate(struct CtrlMessage *, struct MsgPort *)

   FUNCTION
       Updates ReccControl's info. (Like loaded users and more)

   INPUTS
       ctrlmsg - pointer to a initialized CtrlMessage structure.
       ctrlport- pointer to to ReccControls message-port.

   RESULT

   EXAMPLE

   NOTES

   BUGS

   SEE ALSO

reccoon.library/SaveAppInfo                       reccoon.library/SaveAppInfo

   NAME   
       SaveAppInfo -- Saves the appinfo data for a specific user.

   SYNOPSIS
       void SaveAppInfo(usernum, key, ctrlmsg, ctrlport )
                          D0      D1     A1       A2

       void SaveAppInfo(UWORD, ULONG, struct CtrlMessage *, struct MsgPort * 
)

   FUNCTION
       Saves the appinfo data for a specified user

   INPUTS
       usernum  - The user which's appinfo data to save.
       key      - A unique key for each field. Should be in 0x000000 format.
       ctrlmsg  - pointer to a initialized CtrlMessage structure.
       ctrlport - pointer to to ReccControls message-port.

   RESULT

   EXAMPLE
       See TimeBank.c

   NOTES

   BUGS

   SEE ALSO
       AddAppInfo(), FreeAppInfo(), GetAppInfo()

reccoon.library/SaveFArea                           reccoon.library/SaveFArea

   NAME
       SaveFArea - Saves the inx list of an area back to disk.

   SYNOPSIS

       SaveFArea(ctrl, area, inx, nr)
                   A0   D0    A1  D1

       void SaveFArea(struct control *, ULONG, struct filinx *, ULONG)

   FUNCTION
       Saves the inx list of an area back to disk.

   INPUTS
       ctrl    - A pointer to the control structure.
       area    - Filearea to save to.
       inx     - The filinx to save.
       nr      - The number of entries from inx to save.

   RESULT

   EXAMPLE

   NOTES
       Should _NOT_ be used as an replacement to AddFile().
       ** DO NOT SEND AN EMPTY INDEX STRUCTURE, AS IT WILL ERASE ALL AREA INF
O **

   BUGS

   SEE ALSO
       OpenFArea(), CloseFArea()

reccoon.library/SaveFig                               reccoon.library/SaveFig

   NAME   
       SaveFig -- Saves reccoon system configuration

   SYNOPSIS

       void SaveFig(ctrlmsg, ctrlport)
                       A1       A2

       void SaveFig(struct CtrlMessage *, struct MsgPort *)

   FUNCTION

   INPUTS
       ctrlmsg - pointer to a initialized CtrlMessage structure.
       ctrlport- pointer to to ReccControls message-port.

   RESULT
       A saved reccoon config. =)

   EXAMPLE

   NOTES

   BUGS

   SEE ALSO

reccoon.library/SaveUser                             reccoon.library/SaveUser

   NAME   
       SaveUser -- Saves the user info

   SYNOPSIS

       void SaveUser(usernum, ctrlmsg, ctrlport)
                       D0        A1       A2

       void SaveUser(UWORD, struct CtrlMessage *, struct MsgPort *)

   FUNCTION
       Saves all the user data like LastRead, ul/dl etc.

   INPUTS
       usernum  - Which user to save.
       ctrlmsg  - pointer to a initialized CtrlMessage structure.
       ctrlport - pointer to to ReccControls message-port.

   RESULT

   EXAMPLE

   NOTES

   BUGS

   SEE ALSO
       FreeUser(), GetUser(), SearchUser()

reccoon.library/SearchUser                         reccoon.library/SearchUser

   NAME   
       SearchUser -- Searches for a user

   SYNOPSIS

       UWORD SearchUser(username, mode, ctrlmsg, ctrlport)
                           A0      D0      A1       A2

       UWORD SearchUser(UBYTE *, UBYTE, struct CtrlMessage *, struct MsgPort 
*)

   FUNCTION
       Searches for a user in a specific way.

   INPUTS
       username - The name of the user you want to search for.
       mode     - How reccoon should find it.
       ctrlmsg  - pointer to a initialized CtrlMessage structure.
       ctrlport - pointer to to ReccControls message-port.

   RESULT
       Returns the usernumber if found, else zero.

   EXAMPLE

   NOTES

   BUGS

   SEE ALSO
       FreeUser(), SaveUser(), GetUser()

reccoon.library/SetNodeStatus                   reccoon.library/SetNodeStatus

   NAME   
       SetNodeStatus -- Set the status for a node in ReccControl.

   SYNOPSIS
       void SetNodeStatus(line, string, ctrlmsg, ctrlport )
                           D0     A0       A1       A2

       void SetNodeStatus(UWORD, UBYTE *, struct CtrlMessage *, struct MsgPor
t *)

   FUNCTION
       Set the nodeinformation for a specific node.

   INPUTS
       line     - Which line to set the text on.
       string   - Text to set for a specific line.
       ctrlmsg  - pointer to a initialized CtrlMessage structure.
       ctrlport - pointer to to ReccControls message-port.

   RESULT

   EXAMPLE

   NOTES

   BUGS

   SEE ALSO
       UpdateNodeData()
reccoon.library/SortIndex                           reccoon.library/SortIndex

   NAME
       SortIndex - Sorts a filearea

   SYNOPSIS

       SortIndex(filinx, size, mode)
                   A1     D0    D1

       void SortIndex(struct filinx *, ULONG, UWORD)

   FUNCTION
       Sorts a filinx array a certain way, set with mode.

   INPUTS

       filinx - A filinx structure pointer (to an array, or it will
                be quite useless, ;))
       size   - the number of entries in the filinx, IE, if you have
                a array of 10 filinx structs, size will be 10.
       mode   - How SortIndex() should sort the filinx array. See
                Reccoon/Reccoon2.h for available modes.

   RESULT

   EXAMPLE

   NOTES
       Don't misstake size of the actual memory size of your
       filinx array, because SortIndex() has no way of knowing that.

   BUGS
       None known. (Could be a tad slow if an area contains alot of files)

   SEE ALSO
       OpenFArea(), CloseFArea()

reccoon.library/Time2TimeDate                   reccoon.library/Time2TimeDate

   NAME
        Time2TimeDate -- Put todays time and day into a TimeDate structure

   SYNOPSIS
        timedate = Time2TimeDate(timedate)
        D0                       A0

        struct TimeDate * Time2TimeDate(struct TimeDate *)

   FUNCTION
        Takes the systemclock and puts it into a TimeDate structure

   INPUTS
        timedate -- pointer to a TimeDate structure to fill

   RESULT
        timedate -- pointer to initialized TimeDate structure

   SEE ALSO
        Reccoon/Reccoon.h, CmpDate(), CmpTime(), CmpTimeDate()

reccoon.library/Transpose                           reccoon.library/Transpose

   NAME
   Transpose -- Update user's access-restrictions

   SYNOPSIS
   success = Transpose(user, msgaccess, fileaccess, newlevel, ctrl)
   D0          A0    A1         A2      D1    A3

   BOOL Transpose(struct usr *, struct MsgAccess *,
              struct FileAccess *fa, UWORD newlevel,
              struct control *)
   FUNCTION

   This function is used when changing an users accesslevel.
   It reads the access-configuration from the disk and applies
   it to the user.

   INPUTS
   user -- the userstructure or NULL if you don't want to change
           anything there.
   msgaccess -- The array of MsgAccess structures, or NULL if
            it shouldn't be transposed.
       fileaccess -- The array of FileAccess structures, or NULL.
       newlevel -- New accesslevel
       ctrl -- control structure obtained by OpenRCtrl()

   RESULT
   success -- TRUE for success or FALSE for failure.

   EXAMPLE

   {
   struct UsrList *ul;

       ul=GetUser(SearchUser("Niclas Emdelius",0));
       if(ul){
           Transpose(ul->usr,ul->msgaccess,
                 ul->fileaccess,65535,ctrl);

           SaveUser(ul->usernum);
           FreeUser(ul->usernum);
       }
   }

   NOTE
   Currently changes the mask-bit in the fileaccess and msgaccess
   array. This will be changed in the future.

   The Transpose() function never transposes msgaccess or
   fileaccess for areas where the user has the 'locked' bit
   set.

   SEE ALSO
   OpenRCtrl(), GetUser(), SearchUser()

reccoon.library/UpdateData                         reccoon.library/UpdateData

   NAME   
       UpdateData -- Update ReccControl datas

   SYNOPSIS
       UpdateData

   FUNCTION
       UpdateData

   INPUTS

   RESULT

   EXAMPLE

   NOTES
       Not working yet.

   BUGS

   SEE ALSO
       UpdateNodeData()

reccoon.library/UpdateNodeData                 reccoon.library/UpdateNodeData

   NAME   
       UpdateNodeData -- Update the node info for a special node.

   SYNOPSIS
       void UpdateNodeData(line, ctrlmsg, ctrlport)
                            D0      A1       A2
       void UpdateNodeData(UWORD, struct CtrlMessage *, struct MsgPort * )

   FUNCTION
       This function allows programs to update the nodeinfo field for a
       specific node.

   INPUTS
       line     - Which line to update
       ctrlmsg  - pointer to a initialized CtrlMessage structure.
       ctrlport - pointer to to ReccControls message-port.

   RESULT

   EXAMPLE

   NOTES

   BUGS

   SEE ALSO
       UpdateData()

