summary refs log tree commit diff
path: root/bin/cash
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2019-01-10 20:05:18 -0500
committerJune McEnroe <june@causal.agency>2019-01-10 20:05:18 -0500
commit64d994f34fef5d8d5b0c0e5cde1a8c2645e01953 (patch)
tree02fcedc4cd7ebfd2abd0e6fb016c9b00ba6eb50d /bin/cash
parentReplace eaccess with faccessat (diff)
downloadsrc-64d994f34fef5d8d5b0c0e5cde1a8c2645e01953.tar.gz
src-64d994f34fef5d8d5b0c0e5cde1a8c2645e01953.zip
Replace strchrnul with strchr
Diffstat (limited to '')
-rw-r--r--bin/cash/input.c6
-rw-r--r--bin/cash/mail.c3
2 files changed, 6 insertions, 3 deletions
diff --git a/bin/cash/input.c b/bin/cash/input.c
index feb782e7..24ba73b5 100644
--- a/bin/cash/input.c
+++ b/bin/cash/input.c
@@ -224,7 +224,8 @@ again:
 	p = parsefile->buf + (parsenextc - parsefile->buf);
 	end = p + parselleft;
 	*end = '\0';
-	q = strchrnul(p, '\n');
+	q = strchr(p, '\n');
+	if (!q) q = strchr(p, '\0');
 	if (q != end && *q == '\0') {
 		/* delete nul characters */
 		for (r = q; q != end; q++) {
@@ -236,7 +237,8 @@ again:
 			goto again;
 		end = p + parselleft;
 		*end = '\0';
-		q = strchrnul(p, '\n');
+		q = strchr(p, '\n');
+		if (!q) q = strchr(p, '\0');
 	}
 	if (q == end) {
 		parsenleft = parselleft;
diff --git a/bin/cash/mail.c b/bin/cash/mail.c
index 81243b87..6f8a3d39 100644
--- a/bin/cash/mail.c
+++ b/bin/cash/mail.c
@@ -87,7 +87,8 @@ chkmail(int silent)
 		p = mpath;
 		if (*p == '\0')
 			break;
-		mpath = strchrnul(mpath, ':');
+		mpath = strchr(p, ':');
+		if (!mpath) mpath = strchr(p, '\0');
 		if (*mpath != '\0') {
 			*mpath++ = '\0';
 			if (p == mpath - 1)
class='logheader'>2024-10-07Add photos from September 28June McEnroe 2024-10-07Add photos from September 22June McEnroe 2024-09-25Add photos from September 15June McEnroe 2024-09-24Add photos from September 14June McEnroe 2024-09-24Add photos from September 12June McEnroe 2024-09-24Add photos from September 7June McEnroe 2024-09-24Allow not having descriptionsJune McEnroe I'm sorry, I can't keep writing descriptions. It makes posting photos take too long, I often don't know the words for what I'm looking at, and a good description is an entirely different work of art than the photo I took, and I'm just a photographer. It's visual art. 2024-09-23Automatically select the last used lens for a bodyJune McEnroe 2024-09-19Add photos from September 5June McEnroe Had to prefix the folder number onto these file names manually because they must have come out of a different scanner or something. 2024-09-15Add some more film stocks to the listJune McEnroe 2024-09-13Add photos from September 2June McEnroe 2024-09-13Add Fomapan 200 to films listJune McEnroe 2024-09-10Add August 29 picnic photosJune McEnroe 2024-09-08Apply some bold to trips renderingJune McEnroe This seems easier to visually scan. The only other thing I'd like is a nicer date rendering but JavaScript is useless for that. 2024-09-08Render trips hopefully more efficientlyJune McEnroe 2024-09-08Allow removing bodies and lensesJune McEnroe 2024-09-08Limit body width so it looks less silly on desktopJune McEnroe 2024-09-07Handle no film being loadedJune McEnroe 2024-09-07Fancy up the text a littleJune McEnroe