|
|
|
|
@ -1,14 +1,16 @@
|
|
|
|
|
#include "ubl-utils.h"
|
|
|
|
|
#ifndef UBL_UTILS
|
|
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
|
typedef enum
|
|
|
|
|
{
|
|
|
|
|
DICTIONARY_ACTION_WIDGETS_TYPE,
|
|
|
|
|
DICTIONARY_IVGRAPHICALS_TYPE,
|
|
|
|
|
DICTIONARY_OTHER_TYPE
|
|
|
|
|
|
|
|
|
|
} DICT_TYPE;
|
|
|
|
|
|
|
|
|
|
typedef struct dictionary {
|
|
|
|
|
typedef struct dictionary
|
|
|
|
|
{
|
|
|
|
|
char *key;
|
|
|
|
|
void *data;
|
|
|
|
|
struct dictionary *next;
|
|
|
|
|
@ -17,7 +19,8 @@ typedef struct dictionary {
|
|
|
|
|
DICT_TYPE data_type;
|
|
|
|
|
} dictionary;
|
|
|
|
|
|
|
|
|
|
typedef struct apps{
|
|
|
|
|
typedef struct apps
|
|
|
|
|
{
|
|
|
|
|
char *Name;
|
|
|
|
|
int Type;
|
|
|
|
|
char *Categories;
|
|
|
|
|
@ -27,13 +30,15 @@ typedef struct apps{
|
|
|
|
|
int DualPluggable;
|
|
|
|
|
} apps;
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
|
typedef struct
|
|
|
|
|
{
|
|
|
|
|
char *command;
|
|
|
|
|
int *exitcode;
|
|
|
|
|
} thread_output;
|
|
|
|
|
|
|
|
|
|
#ifdef __GTK_H__
|
|
|
|
|
typedef struct IVGrapgicals{
|
|
|
|
|
typedef struct IVGrapgicals
|
|
|
|
|
{
|
|
|
|
|
char *sectionName;
|
|
|
|
|
char *categories;
|
|
|
|
|
GtkListStore *LV;
|
|
|
|
|
@ -46,14 +51,14 @@ typedef struct IVGrapgicals{
|
|
|
|
|
#endif
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// dictionary functions
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* yon_dictionary_create_empty:
|
|
|
|
|
/**[EN]
|
|
|
|
|
* yon_dictionary_create_empty():
|
|
|
|
|
* Creates and returns empty dictionary
|
|
|
|
|
*/
|
|
|
|
|
dictionary *yon_dictionary_create_empty(){
|
|
|
|
|
dictionary *yon_dictionary_create_empty()
|
|
|
|
|
{
|
|
|
|
|
dictionary *dict = malloc(sizeof(dictionary));
|
|
|
|
|
dict->data = NULL;
|
|
|
|
|
dict->key = NULL;
|
|
|
|
|
@ -64,12 +69,16 @@ dictionary *yon_dictionary_create_empty(){
|
|
|
|
|
return dict;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void yon_dictionary_switch_to_last(dictionary **dict){
|
|
|
|
|
void yon_dictionary_switch_to_last(dictionary **dict)
|
|
|
|
|
{
|
|
|
|
|
if ((*dict)->next != NULL)
|
|
|
|
|
for ((*dict)=(*dict)->first;(*dict)->next!=NULL;(*dict)=(*dict)->next){}
|
|
|
|
|
for ((*dict) = (*dict)->first; (*dict)->next != NULL; (*dict) = (*dict)->next)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
dictionary * yon_dictionary_create_conneced(dictionary *targetdict){
|
|
|
|
|
dictionary *yon_dictionary_create_conneced(dictionary *targetdict)
|
|
|
|
|
{
|
|
|
|
|
targetdict = yon_dictionary_get_last(targetdict);
|
|
|
|
|
targetdict->next = yon_dictionary_create_empty();
|
|
|
|
|
targetdict->next->prev = targetdict;
|
|
|
|
|
@ -78,25 +87,35 @@ dictionary * yon_dictionary_create_conneced(dictionary *targetdict){
|
|
|
|
|
return targetdict->next;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
dictionary *yon_dictionary_get_last(dictionary *dict){
|
|
|
|
|
dictionary *yon_dictionary_get_last(dictionary *dict)
|
|
|
|
|
{
|
|
|
|
|
dictionary *dct = NULL;
|
|
|
|
|
for (dct=dict->first;dct->next!=NULL;dct=dct->next){}
|
|
|
|
|
for (dct = dict->first; dct->next != NULL; dct = dct->next)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
return dct;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
dictionary *yon_dictionary_switch_places(dictionary *dict,int aim){
|
|
|
|
|
if (aim<0){
|
|
|
|
|
if (dict->prev){
|
|
|
|
|
if (dict->prev->prev){
|
|
|
|
|
dictionary *yon_dictionary_switch_places(dictionary *dict, int aim)
|
|
|
|
|
{
|
|
|
|
|
if (aim < 0)
|
|
|
|
|
{
|
|
|
|
|
if (dict->prev)
|
|
|
|
|
{
|
|
|
|
|
if (dict->prev->prev)
|
|
|
|
|
{
|
|
|
|
|
dictionary *next = dict->next, *prev = dict->prev, *preprev = prev->prev;
|
|
|
|
|
if (next){
|
|
|
|
|
if (next)
|
|
|
|
|
{
|
|
|
|
|
preprev->next = dict;
|
|
|
|
|
dict->prev = preprev;
|
|
|
|
|
dict->next = prev;
|
|
|
|
|
prev->prev = dict;
|
|
|
|
|
prev->next = next;
|
|
|
|
|
next->prev = prev;
|
|
|
|
|
} else {
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
preprev->next = dict;
|
|
|
|
|
dict->prev = preprev;
|
|
|
|
|
dict->next = prev;
|
|
|
|
|
@ -104,16 +123,21 @@ dictionary *yon_dictionary_switch_places(dictionary *dict,int aim){
|
|
|
|
|
prev->next = NULL;
|
|
|
|
|
}
|
|
|
|
|
return prev;
|
|
|
|
|
} else {
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
dictionary *next = dict->next, *prev = dict->prev;
|
|
|
|
|
if (next){
|
|
|
|
|
if (next)
|
|
|
|
|
{
|
|
|
|
|
yon_dictionary_make_first(dict);
|
|
|
|
|
dict->prev = NULL;
|
|
|
|
|
dict->next = prev;
|
|
|
|
|
prev->prev = dict;
|
|
|
|
|
prev->next = next;
|
|
|
|
|
next->prev = prev;
|
|
|
|
|
} else {
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
dict->prev = NULL;
|
|
|
|
|
dict->next = prev;
|
|
|
|
|
prev->prev = dict;
|
|
|
|
|
@ -122,18 +146,25 @@ dictionary *yon_dictionary_switch_places(dictionary *dict,int aim){
|
|
|
|
|
return prev;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else if (aim>0){
|
|
|
|
|
if (dict->next){
|
|
|
|
|
if (dict->next->next){
|
|
|
|
|
}
|
|
|
|
|
else if (aim > 0)
|
|
|
|
|
{
|
|
|
|
|
if (dict->next)
|
|
|
|
|
{
|
|
|
|
|
if (dict->next->next)
|
|
|
|
|
{
|
|
|
|
|
dictionary *next = dict->next, *prev = dict->prev, *afnext = next->next;
|
|
|
|
|
if (prev){
|
|
|
|
|
if (prev)
|
|
|
|
|
{
|
|
|
|
|
prev->next = next;
|
|
|
|
|
next->prev = prev;
|
|
|
|
|
next->next = dict;
|
|
|
|
|
dict->prev = next;
|
|
|
|
|
dict->next = afnext;
|
|
|
|
|
afnext->prev = dict;
|
|
|
|
|
} else {
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
yon_dictionary_make_first(next);
|
|
|
|
|
next->prev = NULL;
|
|
|
|
|
next->next = dict;
|
|
|
|
|
@ -142,15 +173,20 @@ dictionary *yon_dictionary_switch_places(dictionary *dict,int aim){
|
|
|
|
|
afnext->prev = dict;
|
|
|
|
|
}
|
|
|
|
|
return next;
|
|
|
|
|
} else {
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
dictionary *next = dict->next, *prev = dict->prev;
|
|
|
|
|
if (prev){
|
|
|
|
|
if (prev)
|
|
|
|
|
{
|
|
|
|
|
prev->next = next;
|
|
|
|
|
next->prev = prev;
|
|
|
|
|
next->next = dict;
|
|
|
|
|
dict->prev = next;
|
|
|
|
|
dict->next = NULL;
|
|
|
|
|
} else {
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
next->prev = NULL;
|
|
|
|
|
next->next = dict;
|
|
|
|
|
dict->prev = next;
|
|
|
|
|
@ -161,15 +197,24 @@ dictionary *yon_dictionary_switch_places(dictionary *dict,int aim){
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void yon_dictionary_make_first(dictionary *dict){
|
|
|
|
|
for (dictionary *dct=dict->first;dct!=NULL;dct=dct->next){
|
|
|
|
|
void yon_dictionary_make_first(dictionary *dict)
|
|
|
|
|
{
|
|
|
|
|
for (dictionary *dct = dict->first; dct != NULL; dct = dct->next)
|
|
|
|
|
{
|
|
|
|
|
dct->first = dict;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void yon_dictionary_make_nth(dictionary *dict, int nth){
|
|
|
|
|
void yon_dictionary_make_nth(dictionary *dict, int nth)
|
|
|
|
|
{
|
|
|
|
|
dictionary *dct = dict->first;
|
|
|
|
|
for (int i=0;i<nth;i++){if (dct==NULL) return; else dct=dct->next;}
|
|
|
|
|
for (int i = 0; i < nth; i++)
|
|
|
|
|
{
|
|
|
|
|
if (dct == NULL)
|
|
|
|
|
return;
|
|
|
|
|
else
|
|
|
|
|
dct = dct->next;
|
|
|
|
|
}
|
|
|
|
|
yon_dictionary_rip(dict);
|
|
|
|
|
dictionary *prev = dct->prev;
|
|
|
|
|
prev->next = dict;
|
|
|
|
|
@ -178,7 +223,8 @@ void yon_dictionary_make_nth(dictionary *dict, int nth){
|
|
|
|
|
dct->prev = dict;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
dictionary *yon_dictionary_create_with_data(char *key, void *data){
|
|
|
|
|
dictionary *yon_dictionary_create_with_data(char *key, void *data)
|
|
|
|
|
{
|
|
|
|
|
dictionary *dct = yon_dictionary_create_empty();
|
|
|
|
|
dct->key = yon_char_new(key);
|
|
|
|
|
dct->data = data;
|
|
|
|
|
@ -186,7 +232,8 @@ dictionary *yon_dictionary_create_with_data(char *key, void *data){
|
|
|
|
|
return dct;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
dictionary *yon_dictionary_create_with_data_connected(dictionary *dict, char *key, void *data){
|
|
|
|
|
dictionary *yon_dictionary_create_with_data_connected(dictionary *dict, char *key, void *data)
|
|
|
|
|
{
|
|
|
|
|
dictionary *dct = yon_dictionary_create_conneced(dict);
|
|
|
|
|
dct->key = yon_char_new(key);
|
|
|
|
|
dct->data = data;
|
|
|
|
|
@ -194,7 +241,8 @@ dictionary *yon_dictionary_create_with_data_connected(dictionary *dict, char *ke
|
|
|
|
|
return dct;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
dictionary *yon_dictionary_connect(dictionary *old, dictionary *toconnect){
|
|
|
|
|
dictionary *yon_dictionary_connect(dictionary *old, dictionary *toconnect)
|
|
|
|
|
{
|
|
|
|
|
dictionary *dict = yon_dictionary_get_last(old);
|
|
|
|
|
dict->next = toconnect;
|
|
|
|
|
toconnect->prev = dict;
|
|
|
|
|
@ -202,10 +250,13 @@ dictionary *yon_dictionary_connect(dictionary *old, dictionary *toconnect){
|
|
|
|
|
return toconnect;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
dictionary *yon_dictionary_find(dictionary **dict, char *key){
|
|
|
|
|
dictionary *yon_dictionary_find(dictionary **dict, char *key)
|
|
|
|
|
{
|
|
|
|
|
dictionary *dct = *dict;
|
|
|
|
|
for (dictionary *pointer=dct->first;pointer!=NULL;pointer=pointer->next){
|
|
|
|
|
if (strcmp(pointer->key,key)==0){
|
|
|
|
|
for (dictionary *pointer = dct->first; pointer != NULL; pointer = pointer->next)
|
|
|
|
|
{
|
|
|
|
|
if (strcmp(pointer->key, key) == 0)
|
|
|
|
|
{
|
|
|
|
|
*dict = pointer;
|
|
|
|
|
return pointer;
|
|
|
|
|
}
|
|
|
|
|
@ -213,25 +264,33 @@ dictionary *yon_dictionary_find(dictionary **dict, char *key){
|
|
|
|
|
return NULL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dictionary *yon_dictionary_rip(dictionary *dict){
|
|
|
|
|
if (!dict->next){
|
|
|
|
|
dictionary *yon_dictionary_rip(dictionary *dict)
|
|
|
|
|
{
|
|
|
|
|
if (!dict->next)
|
|
|
|
|
{
|
|
|
|
|
dictionary *prev = dict->prev;
|
|
|
|
|
if (prev){
|
|
|
|
|
if (prev)
|
|
|
|
|
{
|
|
|
|
|
prev->next = NULL;
|
|
|
|
|
return prev;
|
|
|
|
|
} else return dict;
|
|
|
|
|
}
|
|
|
|
|
else if (!dict->prev){
|
|
|
|
|
else
|
|
|
|
|
return dict;
|
|
|
|
|
}
|
|
|
|
|
else if (!dict->prev)
|
|
|
|
|
{
|
|
|
|
|
dictionary *next = dict->next;
|
|
|
|
|
if (next){
|
|
|
|
|
if (next)
|
|
|
|
|
{
|
|
|
|
|
yon_dictionary_make_first(next);
|
|
|
|
|
next->prev = NULL;
|
|
|
|
|
return next;
|
|
|
|
|
}
|
|
|
|
|
else return dict;
|
|
|
|
|
else
|
|
|
|
|
return dict;
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
dictionary *next = dict->next, *prev = dict->prev;
|
|
|
|
|
next->prev = prev;
|
|
|
|
|
prev->next = next;
|
|
|
|
|
@ -239,24 +298,33 @@ dictionary *yon_dictionary_rip(dictionary *dict){
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
dictionary *yon_dictionary_get_nth(dictionary *dict, int place){
|
|
|
|
|
dictionary *yon_dictionary_get_nth(dictionary *dict, int place)
|
|
|
|
|
{
|
|
|
|
|
if (dict){
|
|
|
|
|
dict = dict->first;
|
|
|
|
|
int i = 0;
|
|
|
|
|
for (i = 0; i < place; i++)
|
|
|
|
|
if (dict->next)
|
|
|
|
|
dict = dict->next;
|
|
|
|
|
else break;
|
|
|
|
|
if (i==place) return dict;
|
|
|
|
|
else return NULL;
|
|
|
|
|
else
|
|
|
|
|
break;
|
|
|
|
|
if (i == place)
|
|
|
|
|
return dict;
|
|
|
|
|
else
|
|
|
|
|
return NULL;
|
|
|
|
|
} else return NULL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// char functions
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
/**[EN]
|
|
|
|
|
*
|
|
|
|
|
* creates new char string by combining two char strings.
|
|
|
|
|
*/
|
|
|
|
|
char *yon_char_get_augumented(char *source, char *append){
|
|
|
|
|
if (source&&append){
|
|
|
|
|
char *yon_char_get_augumented(char *source, char *append)
|
|
|
|
|
{
|
|
|
|
|
if (source && append)
|
|
|
|
|
{
|
|
|
|
|
int size = strlen(source) + strlen(append) + 1;
|
|
|
|
|
char *final = malloc(size);
|
|
|
|
|
memset(final, 0, size);
|
|
|
|
|
@ -265,36 +333,63 @@ char *yon_char_get_augumented(char *source, char *append){
|
|
|
|
|
else
|
|
|
|
|
sprintf(final, "%s%s", source, append);
|
|
|
|
|
return final;
|
|
|
|
|
} else
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
return NULL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
/**[EN]
|
|
|
|
|
*
|
|
|
|
|
* creates new char string by copying another char.
|
|
|
|
|
*/
|
|
|
|
|
char *yon_char_new(char *chr){
|
|
|
|
|
char *yon_char_new(char *chr)
|
|
|
|
|
{
|
|
|
|
|
if (chr){
|
|
|
|
|
char *newchar = malloc(strlen(chr) + 1);
|
|
|
|
|
memset(newchar, 0, strlen(chr) + 1);
|
|
|
|
|
memcpy(newchar, chr, strlen(chr));
|
|
|
|
|
return newchar;
|
|
|
|
|
} else
|
|
|
|
|
return NULL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
// char *yon_char_unite(char *source, ...)
|
|
|
|
|
|
|
|
|
|
char *yon_char_unite(char *source, ...){
|
|
|
|
|
va_list arglist;
|
|
|
|
|
char *new_char=NULL;
|
|
|
|
|
char *unite_char=NULL;
|
|
|
|
|
new_char=yon_char_new(source);
|
|
|
|
|
va_start(arglist,source);
|
|
|
|
|
unite_char = va_arg(arglist,char*);
|
|
|
|
|
while(unite_char){
|
|
|
|
|
new_char = yon_char_get_augumented(new_char,unite_char);
|
|
|
|
|
unite_char = va_arg(arglist,char*);
|
|
|
|
|
}
|
|
|
|
|
va_end(arglist);
|
|
|
|
|
return new_char;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**[EN]
|
|
|
|
|
*
|
|
|
|
|
* cuts source string by size length from startpos position.
|
|
|
|
|
*/
|
|
|
|
|
char *yon_cut(char *source, int size, int startpos){
|
|
|
|
|
char *yon_cut(char *source, int size, int startpos)
|
|
|
|
|
{
|
|
|
|
|
char *cut = NULL;
|
|
|
|
|
cut = malloc(size + 1);
|
|
|
|
|
memset(cut, 0, size + 1);
|
|
|
|
|
memcpy(cut, source + startpos, size);
|
|
|
|
|
return cut;
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
/**[EN]
|
|
|
|
|
*
|
|
|
|
|
* divides source string in dividepos position,
|
|
|
|
|
* returning left part of divided string and
|
|
|
|
|
* inserting right part to source string.
|
|
|
|
|
*/
|
|
|
|
|
char *yon_char_divide(char *source, int dividepos){
|
|
|
|
|
char *yon_char_divide(char *source, int dividepos)
|
|
|
|
|
{
|
|
|
|
|
char *cut = malloc(dividepos + 1);
|
|
|
|
|
memset(cut, 0, dividepos + 1);
|
|
|
|
|
memcpy(cut, source, dividepos);
|
|
|
|
|
@ -306,26 +401,51 @@ char *yon_char_divide(char *source, int dividepos){
|
|
|
|
|
return cut;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* searches string dividepos in source string and divides it,
|
|
|
|
|
/**[EN]
|
|
|
|
|
* char *yon_char_divide_search(char *source, char *dividepos, int delete_divider)
|
|
|
|
|
* searches string [dividepos] in [source] string and divides it,
|
|
|
|
|
* returning left part of divided string and
|
|
|
|
|
* inserting right part to source string.
|
|
|
|
|
* if delete_divider is 0, left part will contain delete_divider substring, else
|
|
|
|
|
* it will stay in right part.
|
|
|
|
|
* inserting right part to [source] string.
|
|
|
|
|
* if [delete_divider] is 0, left part will contain [delete_divider] substring, else
|
|
|
|
|
* if [delete_divider] is 1 it will stay in right part, else
|
|
|
|
|
* if [delete_divider] is -1 it will be deleted from string.
|
|
|
|
|
*
|
|
|
|
|
* [RU]
|
|
|
|
|
* char *yon_char_divide_search(char *source, char *dividepos, int delete_divider)
|
|
|
|
|
* Ищет строку [dividepos] в строке [source] и делит её в этом месте,
|
|
|
|
|
* возвращая левую часть разделённой строки и устанавливает в [source] правую часть.
|
|
|
|
|
* Если [delete_divider] равен 0, [dividepos] останется в левой строке, иначе
|
|
|
|
|
* если [delete_divider] равен 1, [dividepos] останется в правой строке, иначе
|
|
|
|
|
* если [delete_divider] равен -1, [dividepos] удаляется из строки.
|
|
|
|
|
*/
|
|
|
|
|
char *yon_char_divide_search(char *source, char* dividepos, int delete_divider){
|
|
|
|
|
char *yon_char_divide_search(char *source, char *dividepos, int delete_divider)
|
|
|
|
|
{
|
|
|
|
|
if (source&÷pos){
|
|
|
|
|
char *cut = strstr(source, dividepos);
|
|
|
|
|
if (cut)
|
|
|
|
|
{
|
|
|
|
|
int leng = strlen(source) - strlen(cut);
|
|
|
|
|
cut = yon_char_divide(source, leng);
|
|
|
|
|
return cut;
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* converts int to char.
|
|
|
|
|
else
|
|
|
|
|
return source;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/**[EN]
|
|
|
|
|
* char *yon_char_from_int(int int_to_convert)
|
|
|
|
|
* converts int to char*.
|
|
|
|
|
*
|
|
|
|
|
* [RU]
|
|
|
|
|
* char *yon_char_from_int(int int_to_convert)
|
|
|
|
|
* Конвертирует int в char*
|
|
|
|
|
*/
|
|
|
|
|
char *yon_char_from_int(int int_to_convert){
|
|
|
|
|
char *yon_char_from_int(int int_to_convert)
|
|
|
|
|
{
|
|
|
|
|
int i = 1;
|
|
|
|
|
float convert_check = (float)int_to_convert;
|
|
|
|
|
for (i=1;convert_check>10;i++){
|
|
|
|
|
for (i = 1; convert_check > 10; i++)
|
|
|
|
|
{
|
|
|
|
|
convert_check = convert_check / 10;
|
|
|
|
|
}
|
|
|
|
|
char *ch = malloc(i * sizeof(char) + 1);
|
|
|
|
|
@ -333,10 +453,69 @@ char *yon_char_from_int(int int_to_convert){
|
|
|
|
|
return ch;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**[EN]
|
|
|
|
|
* char **yon_char_parse(char *parameters, int *size, char *divider)
|
|
|
|
|
* Parses string [parameters], divided by [divider],
|
|
|
|
|
* then returns parsed string array and sets [size] to
|
|
|
|
|
* size of returned array
|
|
|
|
|
*/
|
|
|
|
|
char **yon_char_parse(char *parameters, int *size, char *divider){
|
|
|
|
|
char **string=NULL;
|
|
|
|
|
int i=1;
|
|
|
|
|
string=malloc(sizeof(char*));
|
|
|
|
|
char *paramline=yon_char_new(parameters);
|
|
|
|
|
char *param;
|
|
|
|
|
while ((param=yon_char_divide_search(paramline,divider,1))){
|
|
|
|
|
string=realloc(string,sizeof(char*)*i);
|
|
|
|
|
string[i-1]=yon_char_new(param);
|
|
|
|
|
i++;
|
|
|
|
|
if (strcmp(param,paramline)==0) break;
|
|
|
|
|
}
|
|
|
|
|
string=realloc(string,sizeof(char*)*i);
|
|
|
|
|
string[i-1]=yon_char_new(paramline);
|
|
|
|
|
i++;
|
|
|
|
|
printf("%d\n",i);
|
|
|
|
|
*size=i-1;
|
|
|
|
|
return string;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
char **yon_char_parsed_shrink(char **char_string, int *size, int item_to_delete){
|
|
|
|
|
char **new_char_parsed=NULL;
|
|
|
|
|
new_char_parsed=malloc(sizeof(char*)*(*size)-2);
|
|
|
|
|
int sz=0;
|
|
|
|
|
for (int i=0;i<*size-2;i++){
|
|
|
|
|
if (i!=item_to_delete){
|
|
|
|
|
new_char_parsed[i]=yon_char_new(char_string[i]);
|
|
|
|
|
sz++;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
*size=sz;
|
|
|
|
|
return new_char_parsed;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**[EN]
|
|
|
|
|
*
|
|
|
|
|
* Checks if [parameters] string array of length [size]
|
|
|
|
|
* has [param] element;
|
|
|
|
|
*/
|
|
|
|
|
int yon_char_parsed_check_exist(char **parameters, int size, char *param){
|
|
|
|
|
|
|
|
|
|
for (int i=0;i<size;i++){
|
|
|
|
|
if (parameters[i]){
|
|
|
|
|
if (strcmp(parameters[i],param)==0)
|
|
|
|
|
return i;
|
|
|
|
|
} else return -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// parsing functions
|
|
|
|
|
|
|
|
|
|
apps *yon_apps_scan_and_parse_desktops(int *sizef){
|
|
|
|
|
apps *yon_apps_scan_and_parse_desktops(int *sizef)
|
|
|
|
|
{
|
|
|
|
|
int size = 0;
|
|
|
|
|
struct apps *applist;
|
|
|
|
|
{
|
|
|
|
|
@ -359,23 +538,36 @@ apps *yon_apps_scan_and_parse_desktops(int *sizef){
|
|
|
|
|
GError *err = NULL;
|
|
|
|
|
g_key_file_load_from_file(gfile, path, G_KEY_FILE_KEEP_TRANSLATIONS, NULL);
|
|
|
|
|
char *Type = g_key_file_get_string(gfile, "Desktop Entry", "Type", &err);
|
|
|
|
|
if (err){
|
|
|
|
|
if (err)
|
|
|
|
|
{
|
|
|
|
|
printf("%s\n", err->message);
|
|
|
|
|
}
|
|
|
|
|
if (strcmp(Type,"Application")==0) tempapp.Type=1; else if (strcmp(Type,"pyApplication")==0) tempapp.Type=2; else continue;
|
|
|
|
|
if (strcmp(Type, "Application") == 0)
|
|
|
|
|
tempapp.Type = 1;
|
|
|
|
|
else if (strcmp(Type, "pyApplication") == 0)
|
|
|
|
|
tempapp.Type = 2;
|
|
|
|
|
else
|
|
|
|
|
continue;
|
|
|
|
|
tempapp.Name = g_key_file_get_locale_string(gfile, "Desktop Entry", "Name", setlocale(LC_ALL, NULL), NULL);
|
|
|
|
|
if (tempapp.Name==NULL) continue;
|
|
|
|
|
if (tempapp.Name == NULL)
|
|
|
|
|
continue;
|
|
|
|
|
tempapp.Categories = g_key_file_get_string(gfile, "Desktop Entry", "Categories", NULL);
|
|
|
|
|
if (tempapp.Categories==NULL) continue;
|
|
|
|
|
if (tempapp.Categories == NULL)
|
|
|
|
|
continue;
|
|
|
|
|
tempapp.Exec = g_key_file_get_string(gfile, "Desktop Entry", "Exec", NULL);
|
|
|
|
|
if (tempapp.Exec==NULL) continue;
|
|
|
|
|
if (tempapp.Exec == NULL)
|
|
|
|
|
continue;
|
|
|
|
|
tempapp.Icon = g_key_file_get_string(gfile, "Desktop Entry", "Icon", NULL);
|
|
|
|
|
if (tempapp.Icon==NULL) continue;
|
|
|
|
|
if (tempapp.Icon == NULL)
|
|
|
|
|
continue;
|
|
|
|
|
tempapp.Pluggable = g_key_file_get_boolean(gfile, "Desktop Entry", "Pluggable", NULL);
|
|
|
|
|
if (!tempapp.Pluggable) tempapp.Pluggable=g_key_file_get_boolean(gfile,"Desktop Entry", "X-XfcePluggable",NULL);
|
|
|
|
|
if (tempapp.Pluggable) tempapp.DualPluggable=g_key_file_get_boolean(gfile,"Desktop Entry", "X-UBLPluggable",NULL);
|
|
|
|
|
if (!tempapp.Pluggable)
|
|
|
|
|
tempapp.Pluggable = g_key_file_get_boolean(gfile, "Desktop Entry", "X-XfcePluggable", NULL);
|
|
|
|
|
if (tempapp.Pluggable)
|
|
|
|
|
tempapp.DualPluggable = g_key_file_get_boolean(gfile, "Desktop Entry", "X-UBLPluggable", NULL);
|
|
|
|
|
if (g_key_file_get_boolean(gfile, "Desktop Entry", "X-UBL-SettingsManager-Hidden", NULL) == 0)
|
|
|
|
|
if (size==0){
|
|
|
|
|
if (size == 0)
|
|
|
|
|
{
|
|
|
|
|
applist = (apps *)malloc(size + 1 * sizeof(apps));
|
|
|
|
|
applist[0].Name = yon_char_new(tempapp.Name);
|
|
|
|
|
applist[0].Categories = yon_char_new(tempapp.Categories);
|
|
|
|
|
@ -385,7 +577,9 @@ apps *yon_apps_scan_and_parse_desktops(int *sizef){
|
|
|
|
|
applist[0].Pluggable = tempapp.Pluggable;
|
|
|
|
|
applist[0].DualPluggable = tempapp.DualPluggable;
|
|
|
|
|
size++;
|
|
|
|
|
} else {
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
applist = (apps *)realloc(applist, (size + 1) * sizeof(apps));
|
|
|
|
|
applist[size].Name = yon_char_new(tempapp.Name);
|
|
|
|
|
applist[size].Categories = yon_char_new(tempapp.Categories);
|
|
|
|
|
@ -405,8 +599,8 @@ apps *yon_apps_scan_and_parse_desktops(int *sizef){
|
|
|
|
|
return applist;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void yon_apps_sort(apps *applist,int size){
|
|
|
|
|
void yon_apps_sort(apps *applist, int size)
|
|
|
|
|
{
|
|
|
|
|
apps tmp;
|
|
|
|
|
if (size > 2)
|
|
|
|
|
{
|
|
|
|
|
@ -414,7 +608,8 @@ void yon_apps_sort(apps *applist,int size){
|
|
|
|
|
{
|
|
|
|
|
for (int j = 1; j < size; j++)
|
|
|
|
|
{
|
|
|
|
|
if (strcmp(applist[j].Name,applist[j-1].Name)<0){
|
|
|
|
|
if (strcmp(applist[j].Name, applist[j - 1].Name) < 0)
|
|
|
|
|
{
|
|
|
|
|
tmp = applist[j];
|
|
|
|
|
applist[j] = applist[j - 1];
|
|
|
|
|
applist[j - 1] = tmp;
|
|
|
|
|
@ -424,39 +619,120 @@ void yon_apps_sort(apps *applist,int size){
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
apps *yon_apps_get_by_name(apps *applist,char *name, int size){
|
|
|
|
|
for (int i=0;i<size;i++){
|
|
|
|
|
if (strcmp(applist[i].Name,name)==0) return &applist[i];
|
|
|
|
|
apps *yon_apps_get_by_name(apps *applist, char *name, int size)
|
|
|
|
|
{
|
|
|
|
|
for (int i = 0; i < size; i++)
|
|
|
|
|
{
|
|
|
|
|
if (strcmp(applist[i].Name, name) == 0)
|
|
|
|
|
return &applist[i];
|
|
|
|
|
}
|
|
|
|
|
return NULL;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
char *yon_config_load(char *command){
|
|
|
|
|
config_str yon_config_load(char *command, int *str_len)
|
|
|
|
|
{
|
|
|
|
|
FILE *output = popen(command, "r");
|
|
|
|
|
char **output_strings = NULL;
|
|
|
|
|
output_strings = malloc(sizeof(char));
|
|
|
|
|
int i = 0;
|
|
|
|
|
char str[1000];
|
|
|
|
|
memset(str, 0, 1000);
|
|
|
|
|
while (fgets(str,1000,output)){
|
|
|
|
|
while (fgets(str, 1000, output))
|
|
|
|
|
{
|
|
|
|
|
if (strcmp(str, "") != 0)
|
|
|
|
|
{
|
|
|
|
|
output_strings = realloc(output_strings, sizeof(char *) * (i + 1));
|
|
|
|
|
printf("%s\n", str);
|
|
|
|
|
output_strings[i] = NULL;
|
|
|
|
|
output_strings[i] = yon_char_new(str);
|
|
|
|
|
memset(str, 0, 1000);
|
|
|
|
|
i++;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (i>0){
|
|
|
|
|
*str_len = i;
|
|
|
|
|
return output_strings;
|
|
|
|
|
} else{
|
|
|
|
|
*str_len=-1;
|
|
|
|
|
return NULL;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int yon_config_save(char *command){
|
|
|
|
|
|
|
|
|
|
/**[EN]
|
|
|
|
|
* int yon_config_save(char *command)
|
|
|
|
|
* Saves config with [command]
|
|
|
|
|
* [RU]
|
|
|
|
|
*/
|
|
|
|
|
int yon_config_save(char *command)
|
|
|
|
|
{
|
|
|
|
|
FILE *output = popen(command, "r");
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//terminal-using functions
|
|
|
|
|
/**[EN]
|
|
|
|
|
* char *yon_config_get_parameter(config parameters, int size, char *param)
|
|
|
|
|
* Gets parameter from parameter list;
|
|
|
|
|
*
|
|
|
|
|
* [RU]
|
|
|
|
|
*/
|
|
|
|
|
char *yon_config_get_parameter(config_str parameters, int size, char *param)
|
|
|
|
|
{
|
|
|
|
|
if (param[0]==' ')
|
|
|
|
|
yon_char_divide_search(param," ",-1);
|
|
|
|
|
param=yon_char_divide_search(yon_char_new(param)," ",-1);
|
|
|
|
|
|
|
|
|
|
char *str = NULL;
|
|
|
|
|
for (int j = 0; j < size; j++)
|
|
|
|
|
{
|
|
|
|
|
char *name = yon_char_divide_search(yon_char_new(parameters[j]), "=", 1);
|
|
|
|
|
if (name)
|
|
|
|
|
{
|
|
|
|
|
if (strcmp(name, param) == 0)
|
|
|
|
|
{
|
|
|
|
|
str = yon_char_divide_search(yon_char_new(parameters[j]), "\n", 1);
|
|
|
|
|
if (strcmp(str, "") != 0 && strcmp(str, "(null)") != 0)
|
|
|
|
|
return str;
|
|
|
|
|
else
|
|
|
|
|
return NULL;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return NULL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**[EN]
|
|
|
|
|
* Parses, modifies and connects string to use it as one of arguments,
|
|
|
|
|
* sended to ubconfig.
|
|
|
|
|
*
|
|
|
|
|
* [RU]
|
|
|
|
|
*/
|
|
|
|
|
char *yon_config_make_save_parameter_with_multiple_arguments(char *parameter_string, char *config_parameter, char *divider){
|
|
|
|
|
char *final="";
|
|
|
|
|
int done=0;
|
|
|
|
|
char *cur=yon_char_new(parameter_string);
|
|
|
|
|
yon_char_divide_search(cur,"=",1);
|
|
|
|
|
char *cur_param=NULL;
|
|
|
|
|
while (cur_param=yon_char_divide_search(cur,",",1)){
|
|
|
|
|
if (done==0){
|
|
|
|
|
final=yon_char_get_augumented(final,yon_char_get_augumented(yon_char_get_augumented(config_parameter,"="), yon_char_get_augumented(cur_param,", ")));
|
|
|
|
|
done=1;
|
|
|
|
|
} else {
|
|
|
|
|
final=yon_char_get_augumented(final,yon_char_get_augumented(yon_char_get_augumented(config_parameter,"+="), yon_char_get_augumented(cur_param,", ")));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (cur&&strcmp(cur,"")!=0)
|
|
|
|
|
if (done==0)
|
|
|
|
|
final=yon_char_get_augumented(final,yon_char_get_augumented(yon_char_get_augumented(config_parameter,"="), yon_char_get_augumented(cur,", ")));
|
|
|
|
|
else
|
|
|
|
|
final=yon_char_get_augumented(final,yon_char_get_augumented(yon_char_get_augumented(config_parameter,"+="), yon_char_get_augumented(cur,", ")));
|
|
|
|
|
return final;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// terminal-using functions
|
|
|
|
|
|
|
|
|
|
int yon_launch_app(char *name){
|
|
|
|
|
int yon_launch_app(char *name)
|
|
|
|
|
{
|
|
|
|
|
char *path = name;
|
|
|
|
|
thread_output *thread = malloc(sizeof(thread_output));
|
|
|
|
|
thread->command = path;
|
|
|
|
|
@ -466,8 +742,8 @@ int yon_launch_app(char *name){
|
|
|
|
|
return *thread->exitcode;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int yon_launch_app_with_arguments(char *name, char *args){
|
|
|
|
|
int yon_launch_app_with_arguments(char *name, char *args)
|
|
|
|
|
{
|
|
|
|
|
char *path = yon_char_get_augumented("/usr/bin/", name);
|
|
|
|
|
path = yon_char_get_augumented(path, " ");
|
|
|
|
|
path = yon_char_get_augumented(path, args);
|
|
|
|
|
@ -479,15 +755,14 @@ int yon_launch_app_with_arguments(char *name, char *args){
|
|
|
|
|
return *thread->exitcode;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int yon_launch(thread_output *thread){
|
|
|
|
|
int yon_launch(thread_output *thread)
|
|
|
|
|
{
|
|
|
|
|
int a = 0;
|
|
|
|
|
a = system(thread->command);
|
|
|
|
|
*thread->exitcode = a;
|
|
|
|
|
return *thread->exitcode;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Gtk functions
|
|
|
|
|
|
|
|
|
|
#ifdef __GTK_H__
|
|
|
|
|
@ -583,38 +858,76 @@ int yon_launch(thread_output *thread){
|
|
|
|
|
// return socket;
|
|
|
|
|
// };
|
|
|
|
|
|
|
|
|
|
int yon_dictionary_gtk_pack_start_multiple_widgets(dictionary *dict, GtkWidget *destination, gboolean expand, gboolean fill, int padding){
|
|
|
|
|
for (dictionary *dct=dict->first; dct!=NULL;dct=dct->next){
|
|
|
|
|
int yon_gtk_combo_box_fill(GtkWidget *combo, config_str parameters,int size){
|
|
|
|
|
if (combo&¶meters){
|
|
|
|
|
for (int i=0;i<size;i++){
|
|
|
|
|
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo),parameters[i]);
|
|
|
|
|
}
|
|
|
|
|
return 1;
|
|
|
|
|
} else
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int yon_gtk_combo_box_text_find(GtkWidget *combo_box, char *text_to_find){
|
|
|
|
|
if (combo_box&&text_to_find){
|
|
|
|
|
int active=gtk_combo_box_get_active(GTK_COMBO_BOX(combo_box));
|
|
|
|
|
char *str="-1";
|
|
|
|
|
for (int i=0;strcmp(str,"")!=0;i++){
|
|
|
|
|
gtk_combo_box_set_active(GTK_COMBO_BOX(combo_box),i);
|
|
|
|
|
str=gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(combo_box));
|
|
|
|
|
if (!str) return -1;
|
|
|
|
|
if (strcmp(text_to_find,str)==0) return i;
|
|
|
|
|
}
|
|
|
|
|
} return -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int yon_dictionary_gtk_pack_start_multiple_widgets(dictionary *dict, GtkWidget *destination, gboolean expand, gboolean fill, int padding)
|
|
|
|
|
{
|
|
|
|
|
if (dict){
|
|
|
|
|
for (dictionary *dct = dict->first; dct != NULL; dct = dct->next)
|
|
|
|
|
{
|
|
|
|
|
gtk_box_pack_start(GTK_BOX(destination), (GtkWidget *)dct->data, expand, fill, padding);
|
|
|
|
|
}
|
|
|
|
|
return 1;
|
|
|
|
|
}else return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int yon_dictionary_gtk_pack_end_multiple_widgets(dictionary *dict, GtkWidget *destination, gboolean expand, gboolean fill, int padding){
|
|
|
|
|
for (dictionary *dct=dict->first; dct!=NULL;dct=dct->next){
|
|
|
|
|
int yon_dictionary_gtk_pack_end_multiple_widgets(dictionary *dict, GtkWidget *destination, gboolean expand, gboolean fill, int padding)
|
|
|
|
|
{
|
|
|
|
|
for (dictionary *dct = dict->first; dct != NULL; dct = dct->next)
|
|
|
|
|
{
|
|
|
|
|
gtk_box_pack_end(GTK_BOX(destination), (GtkWidget *)dct->data, expand, fill, padding);
|
|
|
|
|
}
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void _yon_ubl_header_setup(GtkWidget *Overlay, GtkWidget *Head, GtkWidget *Image, char *image_path){
|
|
|
|
|
void _yon_ubl_header_setup(GtkWidget *Overlay, GtkWidget *Head, GtkWidget *Image, char *image_path)
|
|
|
|
|
{
|
|
|
|
|
gtk_overlay_add_overlay(GTK_OVERLAY(Overlay), Head);
|
|
|
|
|
gtk_image_set_from_file(GTK_IMAGE(Image), image_path);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void _yon_ubl_status_box_render(GtkWidget *StatusBox, GtkWidget *StatusIcon, GtkWidget *StatusLabel, char *IconName, char* StatusText, BACKGROUND_IMAGE_TYPE BackgroundClass){
|
|
|
|
|
void _yon_ubl_status_box_render(GtkWidget *StatusBox, GtkWidget *StatusIcon, GtkWidget *StatusLabel, char *StatusText, BACKGROUND_IMAGE_TYPE BackgroundClass)
|
|
|
|
|
{
|
|
|
|
|
GtkIconTheme *ictheme = gtk_icon_theme_get_default();
|
|
|
|
|
GError *err = NULL;
|
|
|
|
|
gtk_image_set_from_pixbuf(GTK_IMAGE(StatusIcon),gtk_icon_theme_load_icon_for_scale(ictheme,IconName,25,1,GTK_ICON_LOOKUP_FORCE_SIZE,&err));
|
|
|
|
|
if (err){
|
|
|
|
|
if (err)
|
|
|
|
|
{
|
|
|
|
|
printf("%s\n", err->message);
|
|
|
|
|
g_error_free(err);
|
|
|
|
|
}
|
|
|
|
|
gtk_label_set_text(GTK_LABEL(StatusLabel), StatusText);
|
|
|
|
|
if (BackgroundClass==BACKGROUND_IMAGE_SUCCESS_TYPE){
|
|
|
|
|
if (BackgroundClass == BACKGROUND_IMAGE_SUCCESS_TYPE)
|
|
|
|
|
{
|
|
|
|
|
gtk_style_context_remove_class(gtk_widget_get_style_context(StatusBox), "boxInfoMessError");
|
|
|
|
|
gtk_style_context_add_class(gtk_widget_get_style_context(StatusBox), "boxInfoMessOK");
|
|
|
|
|
} else if (BackgroundClass==BACKGROUND_IMAGE_FAIL_TYPE){
|
|
|
|
|
gtk_image_set_from_pixbuf(GTK_IMAGE(StatusIcon), gtk_icon_theme_load_icon_for_scale(ictheme, "com.ublinux.ubl-settings-video.checked", 25, 1, GTK_ICON_LOOKUP_FORCE_SIZE, &err));
|
|
|
|
|
}
|
|
|
|
|
else if (BackgroundClass == BACKGROUND_IMAGE_FAIL_TYPE)
|
|
|
|
|
{
|
|
|
|
|
gtk_style_context_remove_class(gtk_widget_get_style_context(StatusBox), "boxInfoMessOK");
|
|
|
|
|
gtk_style_context_add_class(gtk_widget_get_style_context(StatusBox), "boxInfoMessError");
|
|
|
|
|
gtk_image_set_from_pixbuf(GTK_IMAGE(StatusIcon), gtk_icon_theme_load_icon_for_scale(ictheme, "com.ublinux.ubl-settings-video.warning", 25, 1, GTK_ICON_LOOKUP_FORCE_SIZE, &err));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
#endif
|