summaryrefslogtreecommitdiffstats
path: root/tests/inputfilegen.c
blob: 26fb79afc298a52de4df6a0718b551f52d71c6aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* generate an input file suitable for use by the testbench
 * Copyright (C) 2011 by Rainer Gerhards and Adiscon GmbH.
 * Part of rsyslog, licensed under GPLv3
 */
#include <stdio.h>
#include <stdlib.h>

int main(int argc, char* argv[])
{
	int nmsgs;
	int i;

	if(argc != 2) {
		fprintf(stderr, "usage: inputfilegen num-messages\n");
		return 1;
	}

	nmsgs = atoi(argv[1]);
	for(i = 0 ; i < nmsgs ; ++i) {
		printf("msgnum:%8.8d:\n", i);
	}
	return 0;
}