Drive functions

The drives are defined in the "seal.ini" file in the [drives] section. The first argument is the name of the drive and the second one is path to this drive. This may also be a path to a directory.


drv_findfirst ()
     Description:
       Gets the name of the first drive in the list in the "seal.ini" file.

     Syntax:
       l_text  drv_findfirst ( p_drives *drv );

     Parameters:
       drv         Pointer to a t_drive structure that will contain
                   information about the drive.

     Returns:
       Name of the drive.



drv_findnext ()
     Description:
       Gets the name of the next drive in the list in the "seal.ini" file,
       and inserts the new t_drive structure into "drv->next".

     Syntax:
       l_text  drv_findnext ( p_drives *drv );

     Parameters:
       drv         Pointer to a t_drive structure that will contain
                   information about the drive.

     Returns:
       Name of the drive.


     Example:

           t_drives d;

           drv_findfirst(&d);

           while ( drv_findnext(&d) ) ;

        /* Now "d" contains information about all the drives  
           defined in the "seal.ini" file, and these drives are
           contained in the p_drives "drives" GLOBAL variable.  */



drv_set ()
     Description:
       Adds a new drive to the system.

     Syntax:
       void  drv_set ( l_text namedrive, l_text path, l_int id );

     Parameters:
       namedrive   Name of the drive to add.
       path        Path to the new drive.
       id          Identification of the new drive.

     Returns:
       -



drv_fixname ()
     Description:
       Gets the real path of a drive, or can be used to
       convert the drivename to a real path. OBS: Do not
       release memory of the returned text!

     Syntax:
       l_text  drv_fixname ( l_text drive );

     Parameters:
       drive       The drive whos path to get.

     Returns:
       The path.



drv_fixreal ()
     Description:
       Converts the path of a drive to a drivename.
       OBS: Do not release memory of the returned text!

     Syntax:
       l_text  drv_fixreal ( l_text path );

     Parameters:
       path        The path to convert.

     Returns:
       Name of the drive.




The t_drives structure


     Name:         l_int  id;

     Description:  Your number of the drive. For example:
                   "A:"=0, "B:"=1, "C:"=3 etc.



     Name:         l_text  name;

     Description:  Name of the drive.



     Name:         l_text  path;

     Description:  Path to the drive.



     Name:         l_char  reserved[24];

     Description:  Reserved for future versions.



     Name:         struct  t_drives *next;

     Description:  Contains the next drive in the structure.