- _syscall(close(_syscall(open(histfile, O_CREAT | O_WRONLY, 0600))));
- append_history(histlines, histfile);
+ if (append_history$ != NULL) {
+ _syscall(close(_syscall(open(histfile, O_CREAT | O_WRONLY, 0600))));
+ (*append_history$)(histlines, histfile);
+ } else {
+ write_history(histfile);
+ }