X-Git-Url: http://git.scottworley.com/uniqt/blobdiff_plain/63eb64b5b01920499f9ea1a1d16a59eda6f716e3..ccaad0202dab92b015ead706ba551b0143fc7d78:/uniqt.c?ds=inline diff --git a/uniqt.c b/uniqt.c index 2b7d229..b755f4e 100644 --- a/uniqt.c +++ b/uniqt.c @@ -1,4 +1,4 @@ -#define _POSIX_C_SOURCE 199309L +#define _POSIX_C_SOURCE 200809L #include #include @@ -44,6 +44,8 @@ static char *read_line() { int newline = getchar(); if (newline != EOF && newline != (int)'\n') die("Expected newline"); + if (scanf_ret == 0 && newline == (int)'\n') + return strdup("\n"); return line; }