62
63 cnt = get_stmt_cnt();
64 snprintf(buf, sizeof(buf), "%d", cnt);
65 sql_insert_return_states(return_id, return_ranges, STMT_CNT, -1, "", buf);
66 }
67
68 static void select_return_info(struct expression *expr, int param, char *key, char *value)
69 {
70 int cnt, add;
71
72 cnt = get_stmt_cnt();
73 add = atoi(value);
74
75 set_state(my_id, "stmts", NULL, alloc_state_num(cnt + add));
76 }
77
78 void register_statement_count(int id)
79 {
80 my_id = id;
81
82 add_hook(match_statement, STMT_HOOK);
83 add_merge_hook(my_id, &merge_states);
84
85 add_split_return_callback(&insert_return_info);
86 select_return_states_hook(STMT_CNT, &select_return_info);
87 }
88
|
62
63 cnt = get_stmt_cnt();
64 snprintf(buf, sizeof(buf), "%d", cnt);
65 sql_insert_return_states(return_id, return_ranges, STMT_CNT, -1, "", buf);
66 }
67
68 static void select_return_info(struct expression *expr, int param, char *key, char *value)
69 {
70 int cnt, add;
71
72 cnt = get_stmt_cnt();
73 add = atoi(value);
74
75 set_state(my_id, "stmts", NULL, alloc_state_num(cnt + add));
76 }
77
78 void register_statement_count(int id)
79 {
80 my_id = id;
81
82 set_dynamic_states(my_id);
83 add_hook(match_statement, STMT_HOOK);
84 add_merge_hook(my_id, &merge_states);
85
86 add_split_return_callback(&insert_return_info);
87 select_return_states_hook(STMT_CNT, &select_return_info);
88 }
89
|