|
|
|
@ -466,6 +466,27 @@ char *yon_cut(char *source, int size, int startpos)
|
|
|
|
return NULL;
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int yon_char_check_begins_with(char *haystack, char *needle){
|
|
|
|
|
|
|
|
if (!yon_char_is_empty(haystack)&&!yon_char_is_empty(needle)&&strlen(haystack)>=strlen(needle)){
|
|
|
|
|
|
|
|
int size = strlen(needle);
|
|
|
|
|
|
|
|
for (int i=0;i<size;i++){
|
|
|
|
|
|
|
|
if (haystack[i]!=needle[i])
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return 1;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
char *yon_char_parsed_check_exist_begins_with(char **target, int size, char *compare){
|
|
|
|
|
|
|
|
for (int i=0;i<size;i++){
|
|
|
|
|
|
|
|
if (yon_char_check_begins_with(target[i],compare)!=-1){
|
|
|
|
|
|
|
|
return yon_char_new(target[i]);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
config_str yon_char_wrap_to_lines(char *target, unsigned int line_count, unsigned int *final_size){
|
|
|
|
config_str yon_char_wrap_to_lines(char *target, unsigned int line_count, unsigned int *final_size){
|
|
|
|
if (!yon_char_is_empty(target)&&line_count){
|
|
|
|
if (!yon_char_is_empty(target)&&line_count){
|
|
|
|
(*final_size)=0;
|
|
|
|
(*final_size)=0;
|
|
|
|
@ -1433,9 +1454,6 @@ int yon_config_load_config(YON_CONFIG_TYPE config_type, ...){
|
|
|
|
char *cur_data = config(key);
|
|
|
|
char *cur_data = config(key);
|
|
|
|
int cur_ignore = yon_config_check_ignore(key);
|
|
|
|
int cur_ignore = yon_config_check_ignore(key);
|
|
|
|
if ((cur_ignore&¤t_value)||(!cur_ignore))
|
|
|
|
if ((cur_ignore&¤t_value)||(!cur_ignore))
|
|
|
|
if (config_type==YON_CONFIG_DEFAULT)
|
|
|
|
|
|
|
|
yon_config_register_default(key,current_command,current_value);
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
yon_config_register(key,current_command,current_value);
|
|
|
|
yon_config_register(key,current_command,current_value);
|
|
|
|
if (config_type==YON_CONFIG_DEFAULT){
|
|
|
|
if (config_type==YON_CONFIG_DEFAULT){
|
|
|
|
yon_config_set_ignore(key);
|
|
|
|
yon_config_set_ignore(key);
|
|
|
|
|