{
printf("criteria: id = %s\n", $<string>3);
/* TODO: correctly parse number */
- current_match.con_id = atoi($<string>3);
- printf("id as int = %d\n", current_match.con_id);
+ current_match.con_id = (Con*)atoi($<string>3);
+ printf("id as int = %p\n", current_match.con_id);
}
| TOK_ID '=' STR
{
printf("should focus\n");
if (match_is_empty(¤t_match)) {
/* TODO: better error message */
- LOG("Error: The foucs command requires you to use some criteria.\n");
- return;
+ LOG("Error: The focus command requires you to use some criteria.\n");
+ break;
}
/* TODO: warning if the match contains more than one entry. does not
{
printf("opening new container\n");
Con *con = tree_open_con(NULL);
- asprintf(&json_output, "{\"success\":true, \"id\":%d}", (long int)con);
+ asprintf(&json_output, "{\"success\":true, \"id\":%ld}", (long int)con);
}
;
stat != yajl_status_insufficient_data)
{
unsigned char * str = yajl_get_error(hand, 1, (const unsigned char*)buf, n);
- fprintf(stderr, (const char *) str);
+ fprintf(stderr, "%s\n", (const char *) str);
yajl_free_error(hand, str);
}