Main GraphicsMagick source repository
Révision | 039108a89de43c8243d46387612c6412175ebe9f (tree) |
---|---|
l'heure | 2002-07-04 09:47:01 |
Auteur | John Cristy <duc.sequere.aut.de.via.decede@gmai...> |
Commiter | John Cristy |
*** empty log message ***
@@ -246,7 +246,7 @@ | ||
246 | 246 | return(path); |
247 | 247 | search_path=AllocateString(path); |
248 | 248 | FormatString(path,"%.1024s%s%.1024s",SetClientPath((char *) NULL), |
249 | - DirectorySeparator,filename); | |
249 | + DirectorySeparator,filename); | |
250 | 250 | if (IsAccessible(path)) |
251 | 251 | { |
252 | 252 | LiberateMemory((void **) &search_path); |
@@ -257,7 +257,7 @@ | ||
257 | 257 | if (getenv("MAGICK_HOME") != (char *) NULL) |
258 | 258 | { |
259 | 259 | FormatString(path,"%.1024s%s%.1024s",getenv("MAGICK_HOME"), |
260 | - DirectorySeparator,filename); | |
260 | + DirectorySeparator,filename); | |
261 | 261 | if (IsAccessible(path)) |
262 | 262 | { |
263 | 263 | LiberateMemory((void **) &search_path); |
@@ -269,8 +269,8 @@ | ||
269 | 269 | if (getenv("HOME") != (char *) NULL) |
270 | 270 | { |
271 | 271 | FormatString(path,"%.1024s%s%s%s%.1024s",getenv("HOME"), |
272 | - *getenv("HOME") == '/' ? "/.magick" : "",DirectorySeparator, | |
273 | - DirectorySeparator,filename); | |
272 | + *getenv("HOME") == '/' ? "/.magick" : "",DirectorySeparator, | |
273 | + DirectorySeparator,filename); | |
274 | 274 | if (IsAccessible(path)) |
275 | 275 | { |
276 | 276 | LiberateMemory((void **) &search_path); |
@@ -282,7 +282,7 @@ | ||
282 | 282 | if (getenv("MAGICK_FONT_PATH") != (char *) NULL) |
283 | 283 | { |
284 | 284 | FormatString(path,"%.1024s%s%.1024s",getenv("MAGICK_FONT_PATH"), |
285 | - DirectorySeparator,filename); | |
285 | + DirectorySeparator,filename); | |
286 | 286 | if (IsAccessible(path)) |
287 | 287 | { |
288 | 288 | LiberateMemory((void **) &search_path); |
@@ -293,37 +293,36 @@ | ||
293 | 293 | } |
294 | 294 | #if defined(WIN32) |
295 | 295 | { |
296 | + char | |
297 | + *key_value; | |
298 | + | |
299 | + long | |
300 | + i; | |
301 | + | |
296 | 302 | static char |
297 | - *registry_path_keys[] = { | |
303 | + *registry_path_keys[] = | |
304 | + { | |
298 | 305 | "LibPath", |
299 | 306 | "ModulesPath", |
300 | 307 | "SharePath", |
301 | 308 | NULL |
302 | 309 | }; |
303 | 310 | |
304 | - char | |
305 | - *key_value; | |
306 | - | |
307 | - int | |
308 | - i; | |
309 | - | |
310 | - for( i=0; registry_path_keys[i] != NULL; i++ ) | |
311 | - { | |
312 | - if( (key_value = NTRegistryKeyLookup(registry_path_keys[i])) != (char *) NULL) | |
313 | - { | |
314 | - FormatString(path,"%.1024s%s%.1024s",key_value,DirectorySeparator, | |
315 | - filename); | |
316 | - LiberateMemory((void**) &key_value); | |
317 | - | |
318 | - if (IsAccessible(path)) | |
319 | - { | |
320 | - return(path); | |
321 | - } | |
322 | - ConcatenateString(&search_path,"; Registry["); | |
323 | - ConcatenateString(&search_path, registry_path_keys[i]); | |
324 | - ConcatenateString(&search_path,"]:"); | |
325 | - ConcatenateString(&search_path,path); | |
326 | - } | |
311 | + for (i=0; registry_path_keys[i] != NULL; i++) | |
312 | + { | |
313 | + key_value=NTRegistryKeyLookup(registry_path_keys[i]); | |
314 | + if (key_value != (char *) NULL) | |
315 | + { | |
316 | + FormatString(path,"%.1024s%s%.1024s",key_value,DirectorySeparator, | |
317 | + filename); | |
318 | + LiberateMemory((void**) &key_value); | |
319 | + if (IsAccessible(path)) | |
320 | + return(path); | |
321 | + ConcatenateString(&search_path,"; Registry["); | |
322 | + ConcatenateString(&search_path, registry_path_keys[i]); | |
323 | + ConcatenateString(&search_path,"]:"); | |
324 | + ConcatenateString(&search_path,path); | |
325 | + } | |
327 | 326 | } |
328 | 327 | } |
329 | 328 | #endif |
@@ -369,7 +368,7 @@ | ||
369 | 368 | } |
370 | 369 | #endif |
371 | 370 | ThrowException(exception,ConfigurationError, |
372 | - "Unable to open configuration file",search_path); | |
371 | + "Unable to open configuration file",search_path); | |
373 | 372 | LiberateMemory((void **) &search_path); |
374 | 373 | LiberateMemory((void **) &path); |
375 | 374 | return((char *) NULL); |