summary refs log tree commit diff
path: root/blaze822.c
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2016-07-18 00:09:23 +0200
committerChristian Neukirchen <chneukirchen@gmail.com>2016-07-18 00:09:35 +0200
commit08032f89babab3b5ec792f6aa394a28f95112e11 (patch)
tree5a91d63a1c9e3c5f8f0db0aa3a83b667426079e4 /blaze822.c
parent7e17d9d631f9d47e9a03901c97a54649cd3542eb (diff)
downloadmblaze-08032f89babab3b5ec792f6aa394a28f95112e11.tar.gz
mblaze-08032f89babab3b5ec792f6aa394a28f95112e11.tar.xz
mblaze-08032f89babab3b5ec792f6aa394a28f95112e11.zip
seq: import most parts of mseq, make blaze822_loop resolve ranges
Diffstat (limited to 'blaze822.c')
-rw-r--r--blaze822.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/blaze822.c b/blaze822.c
index 4170ed5..dad52f3 100644
--- a/blaze822.c
+++ b/blaze822.c
@@ -450,30 +450,6 @@ blaze822_chdr(struct message *mesg, const char *chdr)
 	return blaze822_hdr_(mesg, hdr, l);
 }
 
-int
-blaze822_loop(int argc, char *argv[], void (*cb)(char *))
-{
-	char *line = 0;
-	size_t linelen = 0;
-	ssize_t rd;
-	int i = 0;
-
-	if (argc == 0 || (argc == 1 && strcmp(argv[0], "-") == 0)) {
-		while ((rd = getdelim(&line, &linelen, '\n', stdin)) != -1) {
-			if (line[rd-1] == '\n')
-				line[rd-1] = 0;
-			cb(line);
-			i++;
-		}
-		free(line);
-	} else {
-		for (i = 0; i < argc; i++)
-			cb(argv[i]);
-	}
-
-	return i;
-}
-
 struct message *
 blaze822_file(char *file)
 {