about summary refs log tree commit diff
path: root/mseq.c
blob: a700b72250a685792bdd18eb21596a962891d78b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <unistd.h>
#include <sys/mman.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <limits.h>
#include <errno.h>

#include "blaze822.h"

int
main(int argc, char *argv[])
{
	char *map = blaze822_seq_open(0);
	if (!map)
		return 1;

	int i;
	char *f;
	struct blaze822_seq_iter iter = { 0 };
	for (i = 1; i < argc; i++) {
		while ((f = blaze822_seq_next(map, argv[i], &iter))) {
			printf("%s\n", f);
			free(f);
		}
	}

	return 0;
}