| 217 | } |
| 218 | |
| 219 | static int append_values (var_str * q,const char * name, const db_val_t* v, |
| 220 | int n, int * started ) |
| 221 | { |
| 222 | int i; |
| 223 | |
| 224 | if( v != NULL) |
| 225 | { |
| 226 | if( *started ) |
| 227 | CHECK(append_const(q,"&"),0,error); |
| 228 | |
| 229 | CHECK(append_const(q,(char*)name),0,error); |
| 230 | CHECK(append_const(q,"="),0,error); |
| 231 | |
| 232 | for(i=0;i<n;i++) |
| 233 | { |
| 234 | CHECK(append_str(q,url_encode(value_to_string(&v[i]))),0,error); |
| 235 | if( i < n-1) |
| 236 | CHECK(append_const(q,val_delim_s),0,error); |
| 237 | } |
| 238 | |
| 239 | *started = 1; |
| 240 | |
| 241 | } |
| 242 | return 0; |
| 243 | |
| 244 | error: |
| 245 | return -1; |
| 246 | |
| 247 | } |
| 248 | |
| 249 | static int append_ops(var_str * q,const char * name, const db_op_t* op, |
| 250 | int n, int * started ) |
no test coverage detected