#!/usr/bin/perl # copyright 2002 yenar@host.sk # covered by GNU LGPL my $in; while () { $in .= $_; } $_ = $in; s!(\#if 0\n).*?(\#else /\* \!0 \*/\n)!!gsm; s!(\#if 0\n).*?(\#endif /\* 0 \*/\n)!!gsm; s#//.*?$# #gsm; s#/\*.*?\*/# #gsm; s#^[ \t]*\n##gsm; print $_;