2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6 % CCCC L IIIII EEEEE N N TTTTT %
10 % CCCC LLLLL IIIII EEEEE N N T %
13 % MagickCore Client Methods %
20 % Copyright 1999-2010 ImageMagick Studio LLC, a non-profit organization %
21 % dedicated to making software imaging solutions freely available. %
23 % You may not use this file except in compliance with the License. You may %
24 % obtain a copy of the License at %
26 % http://www.imagemagick.org/script/license.php %
28 % Unless required by applicable law or agreed to in writing, software %
29 % distributed under the License is distributed on an "AS IS" BASIS, %
30 % WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. %
31 % See the License for the specific language governing permissions and %
32 % limitations under the License. %
34 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
42 #include "magick/studio.h"
43 #include "magick/client.h"
44 #include "magick/string_.h"
47 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
51 % G e t C l i e n t N a m e %
55 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
57 % GetClientName returns the current client name.
59 % The format of the GetClientName method is:
61 % const char *GetClientName(void)
64 MagickExport const char *GetClientName(void)
66 return(SetClientName((const char *) NULL));
70 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
74 % G e t C l i e n t P a t h %
78 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
80 % GetClientPath returns the current client name.
82 % The format of the GetClientPath method is:
84 % const char *GetClientPath(void)
87 MagickExport const char *GetClientPath(void)
89 return(SetClientPath((const char *) NULL));
93 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
97 % S e t C l i e n t N a m e %
101 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
103 % SetClientName sets the client name and returns it.
105 % The format of the SetClientName method is:
107 % const char *SetClientName(const char *name)
109 % A description of each parameter follows:
111 % o name: Specifies the new client name.
114 MagickExport const char *SetClientName(const char *name)
117 client_name[MaxTextExtent] = "Magick";
119 if ((name != (char *) NULL) && (*name != '\0'))
120 (void) CopyMagickString(client_name,name,MaxTextExtent);
125 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
129 % S e t C l i e n t P a t h %
133 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
135 % SetClientPath() sets the client path if the name is specified. Otherwise
136 % the current client path is returned. A zero-length string is returned if
137 % the client path has never been set.
139 % The format of the SetClientPath method is:
141 % const char *SetClientPath(const char *path)
143 % A description of each parameter follows:
145 % o path: Specifies the new client path.
148 MagickExport const char *SetClientPath(const char *path)
151 client_path[MaxTextExtent] = "";
153 if ((path != (char *) NULL) && (*path != '\0'))
154 (void) CopyMagickString(client_path,path,MaxTextExtent);