Commit Graph

6 Commits

Author SHA1 Message Date
Érico Nogueira 69efce1d95 Add print_prompt funtion. 2022-08-13 00:11:32 -03:00
Érico Nogueira cbb98853d1 Fix bug in entry reading.
- deal with empty lines correctly: single letter options that don't get
  a newline were being missed
- entirely empty lines (empty line without a newline) weren't being used
  correctly
- fix UB from not setting line=NULL
- use the delim parameter instead of hardcoding for newlines
2022-08-12 23:48:50 -03:00
Érico Nogueira b734660c96 Use poll(3) and self pipe for signal handling.
Actually safe to perform the terminal cleanup here. We keep using
exit(3) and quick_exit(3) so that only one of them actually prints the
results to the screen.
2022-08-12 23:48:36 -03:00
Érico Rolim 70a8aba601 Various small fixes.
- make nrows size_t to avoid casting so much
- add fast exit cases for 0 and 1 input values
- don't print anything if entries.ms==0 and RETURN is pressed
- don't match an empty line when reading values from stdin
2021-01-08 01:46:42 -03:00
Érico Rolim dba748f593 Add xmalloc and xrealloc wrappers. 2021-01-07 18:23:36 -03:00
Érico Rolim 4ae24894e7 Split implementation into multiple files.
Also add comments for improvements.
2021-01-07 16:07:16 -03:00