2004-03-27 06:57:23 -08:00
|
|
|
#include "Ecore_Config.h"
|
|
|
|
|
|
|
|
#include <string.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
2004-05-07 20:10:45 -07:00
|
|
|
char *__ecore_config_app_description;
|
|
|
|
|
|
|
|
extern int ecore_config_bound(Ecore_Config_Prop * e);
|
2004-05-04 02:17:04 -07:00
|
|
|
|
2004-05-04 15:58:06 -07:00
|
|
|
/* shorthand prop setup code to make client apps a little smaller ;) */
|
|
|
|
|
2004-05-12 07:40:08 -07:00
|
|
|
/**
|
|
|
|
* Creates a new property, if it does not already exist, and sets its
|
|
|
|
* attributes to those given.
|
|
|
|
*
|
|
|
|
* The type of the property is guessed from the key and the value
|
|
|
|
* given.
|
|
|
|
*
|
|
|
|
* @param key The property key.
|
|
|
|
* @param val Pointer to default value of key.
|
|
|
|
* @param short_opt Short option used to set the property from command
|
|
|
|
* line.
|
|
|
|
* @param long_opt Long option used to set the property from command line.
|
|
|
|
* @param desc String description of property.
|
|
|
|
* @return @c ECORE_CONFIG_ERR_SUCC on success.
|
|
|
|
* @ingroup Ecore_Config_Create_Group
|
|
|
|
*/
|
2004-05-07 20:10:45 -07:00
|
|
|
int
|
|
|
|
ecore_config_create(const char *key, void *val, char short_opt, char *long_opt,
|
|
|
|
char *desc)
|
|
|
|
{
|
2004-05-08 07:51:05 -07:00
|
|
|
int type = ecore_config_type_guess(key, val);
|
2004-05-07 20:10:45 -07:00
|
|
|
|
2004-05-08 07:51:05 -07:00
|
|
|
return ecore_config_typed_create(key, val, type, short_opt, long_opt, desc);
|
2004-05-07 20:10:45 -07:00
|
|
|
}
|
|
|
|
|
2004-05-12 07:40:08 -07:00
|
|
|
/**
|
|
|
|
* Creates a new property, if it does not already exist, and sets its
|
|
|
|
* attributes to those given.
|
|
|
|
* @param key The property key.
|
|
|
|
* @param val Pointer to default value of key.
|
|
|
|
* @param type Type of the property.
|
|
|
|
* @param short_opt Short option used to set the property from
|
|
|
|
* command line.
|
|
|
|
* @param long_opt Long option used to set the property from command line.
|
|
|
|
* @param desc String description of property.
|
|
|
|
* @return @c ECORE_CONFIG_ERR_SUCC on success.
|
|
|
|
* @ingroup Ecore_Config_Create_Group
|
|
|
|
*/
|
2004-05-07 20:10:45 -07:00
|
|
|
int
|
2004-05-08 07:51:05 -07:00
|
|
|
ecore_config_typed_create(const char *key, void *val, int type, char short_opt,
|
2004-05-07 20:10:45 -07:00
|
|
|
char *long_opt, char *desc)
|
|
|
|
{
|
|
|
|
int ret;
|
|
|
|
|
|
|
|
if ((ret =
|
2004-05-08 07:51:05 -07:00
|
|
|
ecore_config_typed_default(key, val, type)) != ECORE_CONFIG_ERR_SUCC)
|
2004-05-07 20:10:45 -07:00
|
|
|
return ret;
|
|
|
|
if ((ret =
|
2004-05-08 07:51:05 -07:00
|
|
|
ecore_config_short_opt_set(key, short_opt)) != ECORE_CONFIG_ERR_SUCC)
|
2004-05-07 20:10:45 -07:00
|
|
|
return ret;
|
|
|
|
if ((ret =
|
2004-05-08 07:51:05 -07:00
|
|
|
ecore_config_long_opt_set(key, long_opt)) != ECORE_CONFIG_ERR_SUCC)
|
2004-05-07 20:10:45 -07:00
|
|
|
return ret;
|
|
|
|
ret = ecore_config_describe(key, desc);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2004-05-12 07:40:08 -07:00
|
|
|
/**
|
|
|
|
* Creates a new integer property, if it does not already exist, and sets its
|
|
|
|
* attributes to those given.
|
|
|
|
* @param key The property key.
|
|
|
|
* @param val Default integer value of key.
|
|
|
|
* @param short_opt Short option used to set the property from command
|
|
|
|
* line.
|
|
|
|
* @param long_opt Long option used to set the property from command line.
|
|
|
|
* @param desc String description of property.
|
|
|
|
* @return @c ECORE_CONFIG_ERR_SUCC on success.
|
|
|
|
* @ingroup Ecore_Config_Create_Group
|
|
|
|
*/
|
2004-05-07 20:10:45 -07:00
|
|
|
int
|
2004-05-08 07:51:05 -07:00
|
|
|
ecore_config_int_create(const char *key, int val, char short_opt,
|
2004-05-07 20:10:45 -07:00
|
|
|
char *long_opt, char *desc)
|
|
|
|
{
|
|
|
|
return
|
2004-05-08 07:51:05 -07:00
|
|
|
ecore_config_typed_create(key, (void *)&val, PT_INT, short_opt, long_opt,
|
2004-05-07 20:10:45 -07:00
|
|
|
desc);
|
|
|
|
}
|
|
|
|
|
2004-05-12 07:40:08 -07:00
|
|
|
/**
|
|
|
|
* Creates a new integer property, if it does not already exist, and sets its
|
|
|
|
* attributes to those given.
|
|
|
|
* @param key The property key.
|
|
|
|
* @param val Default integer value of key.
|
|
|
|
* @param low Lowest valid integer value for the property.
|
|
|
|
* @param high Highest valid integer value for the property.
|
|
|
|
* @param step Increment value for the property.
|
|
|
|
* @param short_opt Short option used to set the property from command
|
|
|
|
* line.
|
|
|
|
* @param long_opt Long option used to set the property from command line.
|
|
|
|
* @param desc String description of property.
|
|
|
|
* @return @c ECORE_CONFIG_ERR_SUCC on success.
|
|
|
|
* @ingroup Ecore_Config_Create_Group
|
|
|
|
*/
|
2004-05-07 20:10:45 -07:00
|
|
|
int
|
2004-05-08 07:51:05 -07:00
|
|
|
ecore_config_int_create_bound(const char *key, int val, int low, int high,
|
2004-05-07 20:10:45 -07:00
|
|
|
int step, char short_opt, char *long_opt,
|
|
|
|
char *desc)
|
|
|
|
{
|
|
|
|
Ecore_Config_Prop *e;
|
|
|
|
int ret;
|
|
|
|
|
|
|
|
ret =
|
2004-05-08 07:51:05 -07:00
|
|
|
ecore_config_typed_create(key, (void *)&val, PT_INT, short_opt, long_opt,
|
2004-05-07 20:10:45 -07:00
|
|
|
desc);
|
|
|
|
if (ret != ECORE_CONFIG_ERR_SUCC)
|
|
|
|
return ret;
|
|
|
|
e = ecore_config_get(key);
|
|
|
|
if (e)
|
|
|
|
{
|
|
|
|
e->step = step;
|
|
|
|
e->flags |= PF_BOUNDS;
|
|
|
|
e->lo = low;
|
|
|
|
e->hi = high;
|
|
|
|
ecore_config_bound(e);
|
|
|
|
}
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2004-05-12 07:40:08 -07:00
|
|
|
/**
|
|
|
|
* Creates a new string property, if it does not already exist, and sets its
|
|
|
|
* attributes to those given.
|
|
|
|
* @param key The property key.
|
|
|
|
* @param val Default value of key.
|
|
|
|
* @param short_opt Short option used to set the property from command
|
|
|
|
* line.
|
|
|
|
* @param long_opt Long option used to set the property from command line.
|
|
|
|
* @param desc String description of property.
|
|
|
|
* @return @c ECORE_CONFIG_ERR_SUCC on success.
|
|
|
|
* @ingroup Ecore_Config_Create_Group
|
|
|
|
*/
|
2004-05-07 20:10:45 -07:00
|
|
|
int
|
2004-05-08 07:51:05 -07:00
|
|
|
ecore_config_string_create(const char *key, char *val, char short_opt,
|
2004-05-07 20:10:45 -07:00
|
|
|
char *long_opt, char *desc)
|
|
|
|
{
|
|
|
|
return
|
2004-05-08 07:51:05 -07:00
|
|
|
ecore_config_typed_create(key, (void *)val, PT_STR, short_opt, long_opt,
|
2004-05-07 20:10:45 -07:00
|
|
|
desc);
|
|
|
|
}
|
|
|
|
|
2004-05-12 07:40:08 -07:00
|
|
|
/**
|
|
|
|
* Creates a new float property, if it does not already exist, and sets its
|
|
|
|
* attributes to those given.
|
|
|
|
* @param key The property key.
|
|
|
|
* @param val Default float value of key.
|
|
|
|
* @param short_opt Short option used to set the property from command
|
|
|
|
* line.
|
|
|
|
* @param long_opt Long option used to set the property from command line.
|
|
|
|
* @param desc String description of property.
|
|
|
|
* @return @c ECORE_CONFIG_ERR_SUCC on success.
|
|
|
|
* @ingroup Ecore_Config_Create_Group
|
|
|
|
*/
|
2004-05-07 20:10:45 -07:00
|
|
|
int
|
2004-05-08 07:51:05 -07:00
|
|
|
ecore_config_float_create(const char *key, float val, char short_opt,
|
2004-05-07 20:10:45 -07:00
|
|
|
char *long_opt, char *desc)
|
|
|
|
{
|
|
|
|
return
|
2004-05-08 07:51:05 -07:00
|
|
|
ecore_config_typed_create(key, (void *)&val, PT_FLT, short_opt, long_opt,
|
2004-05-07 20:10:45 -07:00
|
|
|
desc);
|
|
|
|
}
|
|
|
|
|
2004-05-12 07:40:08 -07:00
|
|
|
/**
|
|
|
|
* Creates a new float property, if it does not already exist, and sets its
|
|
|
|
* attributes to those given.
|
|
|
|
* @param key The property key.
|
|
|
|
* @param val Default float value of key.
|
|
|
|
* @param low Lowest valid float value for the property.
|
|
|
|
* @param high Highest valid float value for the property.
|
|
|
|
* @param step Increment value for the property.
|
|
|
|
* @param short_opt Short option used to set the property from command
|
|
|
|
* line.
|
|
|
|
* @param long_opt Long option used to set the property from command line.
|
|
|
|
* @param desc String description of property.
|
|
|
|
* @return @c ECORE_CONFIG_ERR_SUCC on success.
|
|
|
|
* @ingroup Ecore_Config_Create_Group
|
|
|
|
*/
|
2004-05-07 20:10:45 -07:00
|
|
|
int
|
2004-05-08 07:51:05 -07:00
|
|
|
ecore_config_float_create_bound(const char *key, float val, float low,
|
2004-05-07 20:10:45 -07:00
|
|
|
float high, float step, char short_opt,
|
|
|
|
char *long_opt, char *desc)
|
|
|
|
{
|
|
|
|
Ecore_Config_Prop *e;
|
|
|
|
int ret;
|
|
|
|
|
|
|
|
ret =
|
2004-05-08 07:51:05 -07:00
|
|
|
ecore_config_typed_create(key, (void *)&val, PT_FLT, short_opt, long_opt,
|
2004-05-07 20:10:45 -07:00
|
|
|
desc);
|
|
|
|
e = ecore_config_get(key);
|
|
|
|
if (e)
|
|
|
|
{
|
|
|
|
e->step = (int)(step * ECORE_CONFIG_FLOAT_PRECISION);
|
|
|
|
e->flags |= PF_BOUNDS;
|
|
|
|
e->lo = (int)(low * ECORE_CONFIG_FLOAT_PRECISION);
|
|
|
|
e->hi = (int)(high * ECORE_CONFIG_FLOAT_PRECISION);
|
|
|
|
ecore_config_bound(e);
|
|
|
|
}
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2004-05-12 07:40:08 -07:00
|
|
|
/**
|
|
|
|
* Creates a new color property, if it does not already exist, and sets its
|
|
|
|
* attributes to those given.
|
|
|
|
* @param key The property key.
|
|
|
|
* @param val Default color value of key, as a hexadecimal string.
|
|
|
|
* @param short_opt Short option used to set the property from command
|
|
|
|
* line.
|
|
|
|
* @param long_opt Long option used to set the property from command line.
|
|
|
|
* @param desc String description of property.
|
|
|
|
* @return @c ECORE_CONFIG_ERR_SUCC on success.
|
|
|
|
* @ingroup Ecore_Config_Create_Group
|
|
|
|
*/
|
2004-05-07 20:10:45 -07:00
|
|
|
int
|
2004-05-08 07:51:05 -07:00
|
|
|
ecore_config_rgb_create(const char *key, char *val, char short_opt,
|
2004-05-07 20:10:45 -07:00
|
|
|
char *long_opt, char *desc)
|
|
|
|
{
|
|
|
|
return
|
2004-05-08 07:51:05 -07:00
|
|
|
ecore_config_typed_create(key, (void *)val, PT_RGB, short_opt, long_opt,
|
2004-05-07 20:10:45 -07:00
|
|
|
desc);
|
|
|
|
}
|
|
|
|
|
2004-05-12 07:40:08 -07:00
|
|
|
/**
|
|
|
|
* Creates a new theme property, if it does not already exist, and sets its
|
|
|
|
* attributes to those given.
|
|
|
|
* @param key The property key.
|
|
|
|
* @param val Default theme name for the property.
|
|
|
|
* @param short_opt Short option used to set the property from command
|
|
|
|
* line.
|
|
|
|
* @param long_opt Long option used to set the property from command line.
|
|
|
|
* @param desc String description of property.
|
|
|
|
* @return @c ECORE_CONFIG_ERR_SUCC on success.
|
|
|
|
* @ingroup Ecore_Config_Create_Group
|
|
|
|
*/
|
2004-05-07 20:10:45 -07:00
|
|
|
int
|
2004-05-08 07:51:05 -07:00
|
|
|
ecore_config_theme_create(const char *key, char *val, char short_opt,
|
2004-05-07 20:10:45 -07:00
|
|
|
char *long_opt, char *desc)
|
|
|
|
{
|
|
|
|
return
|
2004-05-08 07:51:05 -07:00
|
|
|
ecore_config_typed_create(key, (void *)val, PT_THM, short_opt, long_opt,
|
2004-05-07 20:10:45 -07:00
|
|
|
desc);
|
|
|
|
}
|
2004-05-04 15:58:06 -07:00
|
|
|
|
2004-03-27 06:57:23 -08:00
|
|
|
/* this should only be built if evas is present */
|
|
|
|
|
2004-05-07 20:10:45 -07:00
|
|
|
/**
|
2004-05-12 07:40:08 -07:00
|
|
|
* Calls evas_font_path_append on @p evas for each of the font names stored
|
2004-05-07 20:10:45 -07:00
|
|
|
* in the property "/e/font/path".
|
|
|
|
* @param evas Evas object to append the font names to.
|
2004-05-12 07:40:08 -07:00
|
|
|
* @return @c ECORE_CONFIG_ERR_SUCC on success. @c ECORE_CONFIG_ERR_NODATA
|
2004-05-07 20:10:45 -07:00
|
|
|
* is returned if the property has not been set.
|
|
|
|
*/
|
2004-03-27 06:57:23 -08:00
|
|
|
int
|
2004-05-07 20:10:45 -07:00
|
|
|
ecore_config_evas_font_path_apply(Evas * evas)
|
2004-03-27 06:57:23 -08:00
|
|
|
{
|
2004-05-07 20:10:45 -07:00
|
|
|
char *font_path, *font_path_tmp, *ptr, *end;
|
|
|
|
|
2004-05-08 07:51:05 -07:00
|
|
|
font_path = ecore_config_string_get("/e/font/path");
|
2004-05-07 20:10:45 -07:00
|
|
|
|
|
|
|
if (!font_path)
|
|
|
|
return ECORE_CONFIG_ERR_NODATA;
|
|
|
|
ptr = font_path;
|
|
|
|
end = font_path + strlen(font_path);
|
|
|
|
font_path_tmp = font_path;
|
|
|
|
while (ptr && ptr < end)
|
|
|
|
{
|
|
|
|
while (*ptr != '|' && ptr < end)
|
|
|
|
ptr++;
|
|
|
|
if (ptr < end)
|
|
|
|
*ptr = '\0';
|
|
|
|
|
|
|
|
evas_font_path_append(evas, font_path_tmp);
|
|
|
|
ptr++;
|
|
|
|
font_path_tmp = ptr;
|
|
|
|
}
|
|
|
|
|
|
|
|
free(font_path);
|
|
|
|
|
|
|
|
return ECORE_CONFIG_ERR_SUCC;
|
2004-03-27 06:57:23 -08:00
|
|
|
}
|
|
|
|
|
2004-05-07 20:10:45 -07:00
|
|
|
static char *_ecore_config_short_types[] =
|
|
|
|
{ "nil", "int", "flt", "str", "rgb", "str" };
|
2004-04-22 16:38:19 -07:00
|
|
|
|
2004-05-07 20:10:45 -07:00
|
|
|
/**
|
|
|
|
* Prints the property list of the local configuration bundle to output.
|
|
|
|
*/
|
2004-04-22 16:38:19 -07:00
|
|
|
void
|
2004-05-03 16:57:14 -07:00
|
|
|
ecore_config_args_display(void)
|
2004-04-22 16:38:19 -07:00
|
|
|
{
|
2004-05-07 20:10:45 -07:00
|
|
|
Ecore_Config_Prop *props;
|
|
|
|
|
|
|
|
if (__ecore_config_app_description)
|
|
|
|
printf("%s\n\n", __ecore_config_app_description);
|
|
|
|
printf("Supported Options:\n");
|
|
|
|
printf(" -h, --help\t Print this text\n");
|
|
|
|
if (!__ecore_config_bundle_local)
|
|
|
|
return;
|
|
|
|
props = __ecore_config_bundle_local->data;
|
|
|
|
while (props)
|
|
|
|
{
|
|
|
|
if (props->flags & PF_SYSTEM)
|
|
|
|
{
|
|
|
|
props = props->next;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
printf(" %c%c%c --%s\t<%s> %s\n", props->short_opt ? '-' : ' ',
|
|
|
|
props->short_opt ? props->short_opt : ' ',
|
|
|
|
props->short_opt ? ',' : ' ',
|
|
|
|
props->long_opt ? props->long_opt : props->key,
|
|
|
|
_ecore_config_short_types[props->type],
|
|
|
|
props->description ? props->
|
|
|
|
description : "(no description available)");
|
|
|
|
|
|
|
|
props = props->next;
|
|
|
|
}
|
2004-04-22 16:38:19 -07:00
|
|
|
}
|
2004-05-03 16:57:14 -07:00
|
|
|
|
2004-05-12 07:40:08 -07:00
|
|
|
static int
|
2004-05-07 20:10:45 -07:00
|
|
|
ecore_config_parse_set(Ecore_Config_Prop * prop, char *arg, char *opt,
|
|
|
|
char opt2)
|
|
|
|
{
|
|
|
|
if (!arg)
|
|
|
|
{
|
|
|
|
if (opt)
|
|
|
|
printf("Missing expected argument for option --%s\n", opt);
|
|
|
|
else
|
|
|
|
printf("Missing expected argument for option -%c\n", opt2);
|
|
|
|
return ECORE_CONFIG_PARSE_EXIT;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
ecore_config_set(prop->key, arg);
|
|
|
|
return ECORE_CONFIG_PARSE_CONTINUE;
|
2004-05-03 16:57:14 -07:00
|
|
|
}
|
|
|
|
|
2004-05-12 07:40:08 -07:00
|
|
|
/**
|
|
|
|
* Parse the arguments set by @ref ecore_app_args_set and set properties
|
|
|
|
* accordingly.
|
|
|
|
*
|
|
|
|
* @return ECORE_CONFIG_PARSE_CONTINUE if successful.
|
|
|
|
* ECORE_CONFIG_PARSE_EXIT is returned if an unrecognised option
|
|
|
|
* is found. ECORE_CONFIG_PARSE_HELP is returned if help was
|
|
|
|
* displayed.
|
|
|
|
*/
|
2004-05-03 16:57:14 -07:00
|
|
|
int
|
2004-05-10 04:05:33 -07:00
|
|
|
ecore_config_args_parse(void)
|
2004-05-03 16:57:14 -07:00
|
|
|
{
|
2004-05-10 04:05:33 -07:00
|
|
|
int argc;
|
|
|
|
char **argv;
|
2004-05-07 20:10:45 -07:00
|
|
|
int nextarg, next_short_opt, found, ret;
|
|
|
|
char *arg;
|
|
|
|
char *long_opt, short_opt;
|
|
|
|
Ecore_Config_Prop *prop;
|
|
|
|
|
2004-05-10 04:05:33 -07:00
|
|
|
ecore_app_args_get(&argc, &argv);
|
2004-05-07 20:10:45 -07:00
|
|
|
nextarg = 1;
|
|
|
|
while (nextarg < argc)
|
|
|
|
{
|
|
|
|
arg = argv[nextarg];
|
|
|
|
|
|
|
|
if (*arg != '-')
|
|
|
|
{
|
|
|
|
printf("Unexpected attribute \"%s\"\n", arg);
|
|
|
|
nextarg++;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
|
|
|
next_short_opt = 1;
|
|
|
|
short_opt = *(arg + next_short_opt);
|
|
|
|
|
|
|
|
if (short_opt == '-')
|
|
|
|
{
|
|
|
|
long_opt = arg + 2;
|
|
|
|
|
|
|
|
if (!strcmp(long_opt, "help"))
|
|
|
|
{
|
|
|
|
ecore_config_args_display();
|
|
|
|
return ECORE_CONFIG_PARSE_HELP;
|
|
|
|
}
|
|
|
|
|
|
|
|
found = 0;
|
|
|
|
prop = __ecore_config_bundle_local->data;
|
|
|
|
while (prop)
|
|
|
|
{
|
|
|
|
if ((prop->long_opt && !strcmp(long_opt, prop->long_opt))
|
|
|
|
|| !strcmp(long_opt, prop->key))
|
|
|
|
{
|
|
|
|
found = 1;
|
|
|
|
if ((ret =
|
|
|
|
ecore_config_parse_set(prop, argv[++nextarg],
|
|
|
|
long_opt,
|
|
|
|
'\0')) !=
|
|
|
|
ECORE_CONFIG_PARSE_CONTINUE);
|
|
|
|
return ret;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
prop = prop->next;
|
|
|
|
}
|
|
|
|
if (!found)
|
|
|
|
{
|
|
|
|
printf("Unrecognised option \"%s\"\n", long_opt);
|
|
|
|
printf("Try using -h or --help for more information.\n\n");
|
|
|
|
return ECORE_CONFIG_PARSE_EXIT;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
while (short_opt)
|
|
|
|
{
|
|
|
|
if (short_opt == 'h')
|
|
|
|
{
|
|
|
|
ecore_config_args_display();
|
|
|
|
return ECORE_CONFIG_PARSE_HELP;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
found = 0;
|
|
|
|
prop = __ecore_config_bundle_local->data;
|
|
|
|
while (prop)
|
|
|
|
{
|
|
|
|
if (short_opt == prop->short_opt)
|
|
|
|
{
|
|
|
|
found = 1;
|
|
|
|
if ((ret =
|
|
|
|
ecore_config_parse_set(prop,
|
|
|
|
argv[++nextarg],
|
|
|
|
NULL,
|
|
|
|
short_opt)) !=
|
|
|
|
ECORE_CONFIG_PARSE_CONTINUE)
|
|
|
|
return ret;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
prop = prop->next;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!found)
|
|
|
|
{
|
|
|
|
printf("Unrecognised option '%c'\n", short_opt);
|
|
|
|
printf
|
|
|
|
("Try using -h or --help for more information.\n\n");
|
|
|
|
return ECORE_CONFIG_PARSE_EXIT;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
short_opt = *(arg + ++next_short_opt);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
nextarg++;
|
|
|
|
}
|
|
|
|
|
|
|
|
return ECORE_CONFIG_PARSE_CONTINUE;
|
2004-05-03 16:57:14 -07:00
|
|
|
}
|
|
|
|
|
2004-05-12 07:40:08 -07:00
|
|
|
/**
|
|
|
|
* Sets the description string used by @ref ecore_config_args_display .
|
|
|
|
* @param description Description of application.
|
|
|
|
*/
|
2004-05-04 02:17:04 -07:00
|
|
|
void
|
2004-05-07 20:10:45 -07:00
|
|
|
ecore_config_app_describe(char *description)
|
|
|
|
{
|
|
|
|
if (__ecore_config_app_description)
|
|
|
|
free(__ecore_config_app_description);
|
|
|
|
__ecore_config_app_description = strdup(description);
|
2004-05-04 02:17:04 -07:00
|
|
|
}
|