LICK
 All Data Structures Files Functions Variables Enumerations Enumerator
Data Structures | Functions
lickdir.h File Reference

Information about a LICK directory. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  lickdir_t
 Paths to the LICK directory and its components. More...
 

Functions

lickdir_tnew_lickdir (char drive, char *entry, char *res)
 create a new lickdir_t, with the given attributes More...
 
void free_lickdir (lickdir_t *l)
 free the memory a lickdir_t is using More...
 
lickdir_tget_lickdir ()
 returns a suitable LICK directory More...
 

Detailed Description

Information about a LICK directory.

LICK directories should be found on the root of a drive. Inside, there are a few subdirectories - to allow flexibility with the names of these folders, they are stored in a lickdir_t structure.

Function Documentation

void free_lickdir ( lickdir_t l)

free the memory a lickdir_t is using

Parameters
lthe lickdir_t to free
lickdir_t* get_lickdir ( )

returns a suitable LICK directory

Looks at the path to the binary currently being run, and determines if a res directory exists. If so, returns a lickdir_t corresponding to the directory. If not, returns NULL. This is to prevent later errors while installing the loader, and to prevent users from running an interface alone, for example directly from a zip file

Returns
a lickdir_t filled with needed info. If the current directory is an invalid LICK directory, returns NULL.
lickdir_t* new_lickdir ( char  drive,
char *  entry,
char *  res 
)

create a new lickdir_t, with the given attributes

Each parameter must be allocated on the heap. The parameters are no longer valid after the call, and must not be freed

Parameters
drivethe drive to install the boot loader to
entrythe entry subdirectory
resthe resource subdirectory
Returns
a new lickdir_t. Must be freed with free_lickdir