From 2a5e31c42603f38e9933e0f0cc1857da618f98c5 Mon Sep 17 00:00:00 2001 From: sijanec Date: Wed, 17 Mar 2021 23:21:37 +0100 Subject: =?UTF-8?q?ve=C4=8D=20napisanega,=20manj=20delujo=C4=8Dega=20(:?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- misc/valgrind-supp-extractor.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 misc/valgrind-supp-extractor.c (limited to 'misc/valgrind-supp-extractor.c') diff --git a/misc/valgrind-supp-extractor.c b/misc/valgrind-supp-extractor.c new file mode 100644 index 0000000..0b56a91 --- /dev/null +++ b/misc/valgrind-supp-extractor.c @@ -0,0 +1,16 @@ +#include +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; +} -- cgit v1.2.3