key[l]=val[l];// NOWADAYS, no need to strdup the key.
}
if (verbose) printf("in multitree %p.\n",head);
- TRYFAIL(gras_multidict_insert(&head,MULTICACHE_DEPTH,key,
- strdup(val[0]),&free));
+ TRYFAIL(gras_multidict_set(&head,MULTICACHE_DEPTH,key,
+ strdup(val[0]),&free));
- TRYFAIL(gras_multidict_retrieve(head,
- MULTICACHE_DEPTH,(const char **)val,
- &data));
+ TRYFAIL(gras_multidict_get(head,
+ MULTICACHE_DEPTH,(const char **)val,
+ &data));
if (!data || strcmp((char*)data,val[0])) {
fprintf(stderr,"Retrieved value (%s) does not match the entrered one (%s)\n",
(char*)data,val[0]);
return no_error;
}
-int main() {
+int main(int argc, char *argv[]) {
gras_error_t errcode;
- TRY(gras_log_control_set("root.thresh=debug"));
- /*
- //DirectDiagnostics(DIAGDEBUG, stdout);
- DirectDiagnostics(DIAGINFO, stdout);
- // DirectDiagnostics(DIAGLOG, stdout);
- DirectDiagnostics(DIAGWARN, stderr);
- DirectDiagnostics(DIAGERROR, stderr);
- DirectDiagnostics(DIAGFATAL, stderr);
- */
+ gras_init(argc,argv,"root.thresh=debug"));
TRYFAIL(test1());
+
+ gras_exit();
return 0;
}