summary refs log tree commit diff
path: root/notemap.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--notemap.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/notemap.c b/notemap.c
index 963cd0a..2b0fe3b 100644
--- a/notemap.c
+++ b/notemap.c
@@ -394,9 +394,13 @@ int main(int argc, char *argv[]) {
 			break; case Next: {
 				ssize_t len;
 next:
-				// FIXME: Handle EOF.
 				len = getline(&entry, &entryCap, map);
-				if (len < 0) err(EX_IOERR, "%s", path);
+				if (ferror(map)) err(EX_IOERR, "%s", path);
+				if (len < 1) {
+					fprintf(imap, "ayy LOGOUT\r\n");
+					fclose(imap);
+					return EX_OK;
+				}
 				if (entry[len - 1] == '\n') entry[len - 1] = '\0';
 
 				note = entry;
2f8cf&follow=1'>Use scrot for up -s if no screencaptureJune McEnroe Still missing putting the URL in an X selection. 2021-02-07Enable mouse acceleration in XJune McEnroe 2021-02-07Set colours for Xt and cwmJune McEnroe And increase XTerm internalBorder. 2021-02-07Set urgency on bell in xtermJune McEnroe 2021-02-07Add bindings for brightness controlJune McEnroe Weirdly the Fn key doesn't change how the F row registers... I wonder if I can do something about that. 2021-02-07Set X key repeat rateJune McEnroe 2021-02-07Bump font size to 12June McEnroe 11 is what I use on macOS, but I feel like my eyes are working harder here. 2021-02-07Fully configure and rebind cwmJune McEnroe This is sort of a mix of trying to emulate macOS somewhat for my muscle memory and just rebinding some of the cwm defaults to use 4- rather than M-. 2021-02-07Add BintiJune McEnroe 2021-02-07Finish configuring xtermJune McEnroe 2021-02-06Enable tapping, reverse scroll, set scaling in wsconsctlJune McEnroe 2021-02-06Set root window to black on purple snowJune McEnroe 2021-02-06Add xmodmap configurationJune McEnroe 2021-02-06Add initial OpenBSD X configurationJune McEnroe cwm still needs a lot more rebinding, and I need to actually look at its other options. xterm definitely still needs some configuration, but I at least managed to get it to use a decent looking font. Very happy that OpenBSD includes Luxi Mono, which is what my usual font, Go Mono, is based on anyway. Still missing is xmodmap and such. 2021-02-06Add xterm output to schemeJune McEnroeght'> 2019-05-20Add AuthorityJune McEnroe 2019-05-19Specify precedence of unary versions of operatorsJune McEnroe 2019-05-18Add compound assignment operators to orderJune McEnroe 2019-05-15Support simple assignment in orderJune McEnroe 2019-05-15Implement sizeof in orderJune McEnroe 2019-05-15Add orderJune McEnroe 2019-05-12Add T suffix in bitJune McEnroe 2019-05-10Highlight yacc and lex files as CJune McEnroe Their %-prefixed directives should probably be highlighted Macro. 2019-05-10Use val instead of suboptargJune McEnroe suboptarg doesn't exist in GNU. Hopefully BSD getsubopt also sets val on failure? 2019-05-09Add Parable of the SowerJune McEnroe 2019-05-07Add bit without buildJune McEnroe Need to do some stuff in the Makefile for lex and yacc and generating HTML pages for it. 2019-05-04Fix MANDIR typoJune McEnroe 2019-05-04Move relay to binJune McEnroe