Introduction
Introduction Statistics Contact Development Disclaimer Help
index: read until the first newline or CR or TAB - stagit-gopher - static git p…
git clone git://git.codemadness.org/stagit-gopher
Log
Files
Refs
README
LICENSE
---
commit 203a8500a5017ff2bfb77ccdbd33938c1ad4fea1
parent 45274ebb4ba07c9771c279aae51259040d94d0ab
Author: Hiltjo Posthuma <[email protected]>
Date: Sat, 25 Nov 2017 15:13:40 +0100
index: read until the first newline or CR or TAB
This makes sure the column is properly aligned also, because a newline is
ignored, but it is counted in utf8pad().
Diffstat:
M stagit-gopher-index.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/stagit-gopher-index.c b/stagit-gopher-index.c
@@ -264,7 +264,9 @@ main(int argc, char *argv[])
}
description[0] = '\0';
if (fp) {
- if (!fgets(description, sizeof(description), fp))
+ if (fgets(description, sizeof(description), fp))
+ description[strcspn(description, "\t\r\n")] = …
+ else
description[0] = '\0';
fclose(fp);
}
You are viewing proxied material from codemadness.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.