Handle and generate names and IDs. More...
#include "../lickdir.h"
Go to the source code of this file.
Functions | |
int | is_valid_id (const char *id, lickdir_t *lick, const char *install_path) |
determine if the given ID is valid More... | |
char * | gen_id (const char *iso, lickdir_t *lick, const char *install_path) |
generate a valid ID from an ISO path More... | |
char * | gen_name (const char *iso) |
generate a human-readable name from an ISO path More... | |
Handle and generate names and IDs.
char* gen_id | ( | const char * | iso, |
lickdir_t * | lick, | ||
const char * | install_path | ||
) |
generate a valid ID from an ISO path
Given an ISO path name, takes the base name of the ISO without the .iso extension, then converts any invalid characters to dashes. If this ID is used, appends a number, from 2 to 100. If a valid ID has still not been found, returns NULL.
iso | the ISO path |
lick | the lick directory |
install_path | the drive or path to install under |
char* gen_name | ( | const char * | iso | ) |
generate a human-readable name from an ISO path
Given an ISO path name, takes the base name of the ISO without the .iso extension, then converts any dashes and underscores to spaces.
iso | the ISO path |
int is_valid_id | ( | const char * | id, |
lickdir_t * | lick, | ||
const char * | install_path | ||
) |
determine if the given ID is valid
id | the ID to check |
lick | the lick directory |
install_path | the drive or path to install under |