}
void cleanInitNewHistoryState(int offset, int flags, int num){
- printf("Initializing: %d, %d, %d\n", offset, flags, num);
if(history_state != NULL){
free(history_state);
}
history_state->length = num;
history_state->size = num;
history_state->flags = 0;
- printf("Initialization done\n");
}
void cleanSetNewHistoryEntry(int i, CleanString line, CleanString timestamp){
char *cs_line = cleanStringToCString(line);
char *cs_timestamp = cleanStringToCString(timestamp);
- printf("adding: %d, %s, %s\n", i, cs_line, cs_timestamp);
history_state->entries[i]->line = cs_line;
history_state->entries[i]->timestamp = cs_timestamp;
- printf("done adding: %d, %s, %s\n", i, cs_line, cs_timestamp);
}
void cleanCommitSetHistory(void){
- printf("commit\n");
history_set_history_state(history_state);
- printf("committed\n");
}
void cleanAddHistory(CleanString entry){