FACT++  1.0
int getParameters ( char *  buffer,
char(*)  pars[],
char *  ptrs[] 
)

Definition at line 85 of file webServer.c.

References i, and sprintf().

Referenced by getNodeParameters(), getServerParameters(), and getServiceParameters().

86 {
87  char *ptr, *parptr;
88  int i, j, n = 0, found = 0;
89  int code;
90 
91  if(!strchr(buffer,'?'))
92  return 0;
93  parptr = (char *)pars;
94  for(i = 0; *parptr; i++)
95  {
96  n++;
97  ptrs[i] = 0;
98  if((ptr = strstr(buffer, parptr)))
99  {
100  ptrs[i] = ptr+(int)strlen(parptr);
101  found++;
102  }
103  parptr += 32;
104  }
105  ptrs[i] = 0;
106  for(i = 0; ptrs[i]; i++)
107  {
108  if((ptr = strchr(ptrs[i],'&')))
109  *ptr = '\0';
110  while((ptr = strchr(ptrs[i],'%')))
111  {
112  sscanf((ptr + 1),"%2X",&code);
113  sprintf(ptr,"%c",(char)code);
114  ptr++;
115  for(j = 0; *(ptr + 2); j++)
116  {
117  *ptr = *(ptr+2);
118  ptr++;
119  }
120  *ptr = '\0';
121  }
122  }
123  if(found == n)
124  return 1;
125  else
126  return 0;
127 }
int i
Definition: db_dim_client.c:21
int buffer[BUFFSIZE]
Definition: db_dim_client.c:14
sprintf(name1,"NewService%d", i)

+ Here is the call graph for this function:

+ Here is the caller graph for this function: