Code cleanup
This commit is contained in:
parent
2048ae8337
commit
08f1841bb4
@ -177,15 +177,15 @@ static void _configure_detect(Configure * configure);
|
||||
static HostKernel _detect_kernel(HostOS os, char const * release);
|
||||
static void _configure_detect_extensions(Configure * configure);
|
||||
static void _configure_detect_programs(Configure * configure);
|
||||
static int _configure_load(Prefs * prefs, char const * directory,
|
||||
static int _configure_load(ConfigurePrefs * prefs, char const * directory,
|
||||
configArray * ca);
|
||||
static int _load_subdirs(Prefs * prefs, char const * directory,
|
||||
static int _load_subdirs(ConfigurePrefs * prefs, char const * directory,
|
||||
configArray * ca, String const * subdirs);
|
||||
static int _load_subdirs_subdir(Prefs * prefs, char const * directory,
|
||||
static int _load_subdirs_subdir(ConfigurePrefs * prefs, char const * directory,
|
||||
configArray * ca, char const * subdir);
|
||||
static int _configure_do(Configure * configure, configArray * ca);
|
||||
|
||||
int configure(Prefs * prefs, char const * directory)
|
||||
int configure(ConfigurePrefs * prefs, String const * directory)
|
||||
{
|
||||
int ret;
|
||||
Configure cfgr;
|
||||
@ -329,7 +329,7 @@ static void _configure_detect_programs(Configure * configure)
|
||||
}
|
||||
}
|
||||
|
||||
static int _configure_load(Prefs * prefs, String const * directory,
|
||||
static int _configure_load(ConfigurePrefs * prefs, String const * directory,
|
||||
configArray * ca)
|
||||
{
|
||||
int ret = 0;
|
||||
@ -362,7 +362,7 @@ static int _configure_load(Prefs * prefs, String const * directory,
|
||||
return _load_subdirs(prefs, directory, ca, subdirs);
|
||||
}
|
||||
|
||||
static int _load_subdirs(Prefs * prefs, char const * directory,
|
||||
static int _load_subdirs(ConfigurePrefs * prefs, char const * directory,
|
||||
configArray * ca, String const * subdirs)
|
||||
{
|
||||
int ret = 0;
|
||||
@ -390,7 +390,7 @@ static int _load_subdirs(Prefs * prefs, char const * directory,
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int _load_subdirs_subdir(Prefs * prefs, char const * directory,
|
||||
static int _load_subdirs_subdir(ConfigurePrefs * prefs, char const * directory,
|
||||
configArray * ca, char const * subdir)
|
||||
/* FIXME error checking */
|
||||
{
|
||||
|
@ -127,7 +127,7 @@ extern const struct ExtensionType * sExtensionType;
|
||||
|
||||
/* configure */
|
||||
/* types */
|
||||
typedef struct _Prefs
|
||||
typedef struct _ConfigurePrefs
|
||||
{
|
||||
int flags;
|
||||
char * bindir;
|
||||
@ -137,13 +137,13 @@ typedef struct _Prefs
|
||||
char * prefix;
|
||||
char * os;
|
||||
char * sbindir;
|
||||
} Prefs;
|
||||
} ConfigurePrefs;
|
||||
# define PREFS_n 0x1
|
||||
# define PREFS_S 0x2
|
||||
# define PREFS_v 0x4
|
||||
typedef struct _Configure
|
||||
{
|
||||
Prefs * prefs;
|
||||
ConfigurePrefs * prefs;
|
||||
Config * config;
|
||||
HostArch arch;
|
||||
HostOS os;
|
||||
@ -172,7 +172,7 @@ typedef struct _Configure
|
||||
|
||||
|
||||
/* functions */
|
||||
int configure(Prefs * prefs, char const * directory);
|
||||
int configure(ConfigurePrefs * prefs, String const * directory);
|
||||
|
||||
/* accessors */
|
||||
int configure_can_library_static(Configure * configure);
|
||||
|
@ -43,14 +43,14 @@
|
||||
/* configure */
|
||||
/* private */
|
||||
/* prototypes */
|
||||
static void _prefs_init(Prefs * prefs);
|
||||
static void _prefs_init(ConfigurePrefs * prefs);
|
||||
|
||||
static int _usage(void);
|
||||
|
||||
|
||||
/* functions */
|
||||
/* prefs_init */
|
||||
static void _prefs_init(Prefs * prefs)
|
||||
static void _prefs_init(ConfigurePrefs * prefs)
|
||||
{
|
||||
struct stat st;
|
||||
|
||||
@ -79,7 +79,7 @@ static void _prefs_init(Prefs * prefs)
|
||||
/* usage */
|
||||
static int _usage(void)
|
||||
{
|
||||
Prefs prefs;
|
||||
ConfigurePrefs prefs;
|
||||
|
||||
_prefs_init(&prefs);
|
||||
fprintf(stderr, "%s%s%s%s%s%s%s%s%s%s%s",
|
||||
@ -106,7 +106,7 @@ static int _usage(void)
|
||||
int main(int argc, char * argv[])
|
||||
{
|
||||
int ret = 0;
|
||||
Prefs prefs;
|
||||
ConfigurePrefs prefs;
|
||||
int o;
|
||||
|
||||
_prefs_init(&prefs);
|
||||
|
@ -50,11 +50,11 @@ String * sSettingsType[ST_LAST+1] =
|
||||
|
||||
/* functions */
|
||||
/* settings */
|
||||
static int _settings_do(Prefs * prefs, Config * config,
|
||||
static int _settings_do(ConfigurePrefs * prefs, Config * config,
|
||||
String const * directory, String const * package,
|
||||
String const * version, String const * extension);
|
||||
|
||||
int settings(Prefs * prefs, Config * config, String const * directory,
|
||||
int settings(ConfigurePrefs * prefs, Config * config, String const * directory,
|
||||
String const * package, String const * version)
|
||||
{
|
||||
int ret = 0;
|
||||
@ -86,11 +86,11 @@ int settings(Prefs * prefs, Config * config, String const * directory,
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int _do_h(Prefs * prefs, Config * config, FILE * fp,
|
||||
static int _do_h(ConfigurePrefs * prefs, Config * config, FILE * fp,
|
||||
String const * package, String const * version);
|
||||
static int _do_sh(Prefs * prefs, Config * config, FILE * fp,
|
||||
static int _do_sh(ConfigurePrefs * prefs, Config * config, FILE * fp,
|
||||
String const * package, String const * version);
|
||||
static int _settings_do(Prefs * prefs, Config * config,
|
||||
static int _settings_do(ConfigurePrefs * prefs, Config * config,
|
||||
String const * directory, String const * package,
|
||||
String const * version, String const * extension)
|
||||
{
|
||||
@ -139,7 +139,7 @@ static int _settings_do(Prefs * prefs, Config * config,
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int _do_h(Prefs * prefs, Config * config, FILE * fp,
|
||||
static int _do_h(ConfigurePrefs * prefs, Config * config, FILE * fp,
|
||||
String const * package, String const * version)
|
||||
{
|
||||
char const * p;
|
||||
@ -160,7 +160,7 @@ static int _do_h(Prefs * prefs, Config * config, FILE * fp,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int _do_sh(Prefs * prefs, Config * config, FILE * fp,
|
||||
static int _do_sh(ConfigurePrefs * prefs, Config * config, FILE * fp,
|
||||
String const * package, String const * version)
|
||||
{
|
||||
char const * p;
|
||||
|
@ -36,7 +36,7 @@
|
||||
|
||||
|
||||
/* functions */
|
||||
int settings(Prefs * prefs, Config * config, String const * directory,
|
||||
int settings(ConfigurePrefs * prefs, Config * config, String const * directory,
|
||||
String const * package, String const * version);
|
||||
|
||||
#endif /* !CONFIGURE_SETTINGS_H */
|
||||
|
Loading…
Reference in New Issue
Block a user