summaryrefslogtreecommitdiffstats
path: root/misc/valgrind-supp-extractor.c
blob: 0b56a9155bf2789789cc95121ab701104adbe9b6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <stdio.h>
int main (int argc, char ** argv) {
	char c = fgetc(stdin);
	int s = 0; /* 0: not in supp, 1: in supp */
	while (!feof(stdin)) {
		if (c == '}')
			s = 0;
		if (s)
			fputc(c, stdout);
		if (c == '{')
			s = 1;
		c = fgetc(stdin);
	}
	fflush(stdout);
	return 0;
}