52 char *omxregistryfile = NULL;
56 buffer=getenv(
"OMX_BELLAGIO_REGISTRY");
57 if(buffer!=NULL&&*buffer!=
'\0') {
58 omxregistryfile = strdup(buffer);
59 if (!check_exists||stat(omxregistryfile, &sb) == 0) {
60 return omxregistryfile;
62 if (omxregistryfile) {
63 free(omxregistryfile);
70 buffer=getenv(
"XDG_DATA_HOME");
71 if(buffer!=NULL&&*buffer!=
'\0') {
73 strcpy(omxregistryfile, buffer);
74 strcat(omxregistryfile,
"/");
76 if (!check_exists||stat(omxregistryfile, &sb) == 0) {
77 return omxregistryfile;
79 if (omxregistryfile) {
80 free(omxregistryfile);
86 buffer=getenv(
"HOME");
87 if(buffer!=NULL&&*buffer!=
'\0') {
89 strcpy(omxregistryfile, buffer);
90 strcat(omxregistryfile,
"/");
97 if (!check_exists||stat(omxregistryfile, &sb) == 0) {
98 return omxregistryfile;
100 if (omxregistryfile) {
101 free(omxregistryfile);
102 omxregistryfile=NULL;
105 omxregistryfile = malloc(strlen(
REGISTRY_DIR) + strlen(
"registry") + 2);
107 strcat(omxregistryfile,
"registry");
108 return omxregistryfile;
120 char *omxregistryfile = NULL;
123 buffer=getenv(
"XDG_DATA_HOME");
124 if(buffer!=NULL&&*buffer!=
'\0') {
125 omxregistryfile = malloc(strlen(buffer) + strlen(registry_name) + 2);
126 strcpy(omxregistryfile, buffer);
127 strcat(omxregistryfile,
"/");
128 strcat(omxregistryfile, registry_name);
129 return omxregistryfile;
132 buffer=getenv(
"HOME");
133 if(buffer!=NULL&&*buffer!=
'\0') {
134 omxregistryfile = malloc(strlen(buffer) + strlen(registry_name) + 3);
135 strcpy(omxregistryfile, buffer);
136 strcat(omxregistryfile,
"/");
137 strcat(omxregistryfile, registry_name);
141 strcat(omxregistryfile, registry_name);
143 return omxregistryfile;