From: cristy Date: Tue, 3 Nov 2009 01:01:07 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~10426 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ad1c7166441bb2f382cc61b55dbdb0456cf99e76;p=imagemagick --- diff --git a/magick/client.c b/magick/client.c index 50b47cd5d..a7295aeef 100644 --- a/magick/client.c +++ b/magick/client.c @@ -43,13 +43,6 @@ #include "magick/client.h" #include "magick/string_.h" -/* - Static declaractions. -*/ -static char - client_name[MaxTextExtent] = "ImageMagick", - client_path[MaxTextExtent] = ""; - /* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % @@ -70,7 +63,7 @@ static char */ MagickExport const char *GetClientName(void) { - return(client_name); + return(SetClientName((const char *) NULL)); } /* @@ -93,7 +86,7 @@ MagickExport const char *GetClientName(void) */ MagickExport const char *GetClientPath(void) { - return(client_path); + return(SetClientPath((const char *) NULL)); } /* @@ -115,13 +108,14 @@ MagickExport const char *GetClientPath(void) % % A description of each parameter follows: % -% o client_name: SetClientName() returns the current client name. -% % o name: Specifies the new client name. % */ MagickExport const char *SetClientName(const char *name) { + static char + client_name[MaxTextExtent] = "Magick"; + if ((name != (char *) NULL) && (*name != '\0')) (void) CopyMagickString(client_name,name,MaxTextExtent); return(client_name); @@ -148,14 +142,14 @@ MagickExport const char *SetClientName(const char *name) % % A description of each parameter follows: % -% o client_path: Method SetClientPath returns the current client path. -% % o path: Specifies the new client path. % -% */ MagickExport const char *SetClientPath(const char *path) { + static char + client_path[MaxTextExtent] = ""; + if ((path != (char *) NULL) && (*path != '\0')) (void) CopyMagickString(client_path,path,MaxTextExtent); return(client_path);