FACT++  1.0
char* unescape ( char *  buffer)

Definition at line 202 of file webServer.c.

References buffer, conv_buffer, Memory::free(), Memory::malloc(), and sprintf().

203 {
204  int buffer_size;
205  char *ptr, *ptr1;
206  int code;
207 
208  buffer_size = (int)strlen(buffer) + 1;
209  if(buffer_size > conv_buffer_size )
210  {
211  if(conv_buffer_size)
212  free(conv_buffer);
213  conv_buffer = malloc((size_t)buffer_size);
214  conv_buffer_size = buffer_size;
215  }
216  ptr = buffer;
217  ptr1 = conv_buffer;
218  while(*ptr)
219  {
220  if(*ptr != '%')
221  {
222  *ptr1 = *ptr;
223  ptr++;
224  ptr1++;
225  }
226  else
227  {
228  ptr++;
229  sscanf(ptr,"%2X",&code);
230  sprintf(ptr1,"%c",code);
231  ptr += 2;
232  ptr1++;
233  *ptr1 = '\0';
234  }
235  }
236  *ptr1 = '\0';
237  return conv_buffer;
238 }
static int conv_buffer_size
Definition: webServer.c:200
void * malloc()
Definition: EventBuilder.cc:99
int buffer[BUFFSIZE]
Definition: db_dim_client.c:14
static char * conv_buffer
Definition: webServer.c:199
void free(void *mem)
sprintf(name1,"NewService%d", i)

+ Here is the call graph for this function: