#!/usr/bin/perl -w # # nodebug.pl -- strips the "#ifdef YOUR_DEBUG ... #endif" # out of C proggies use strict; my $state = 0; while(<>) { if( ($state == 0) && ($_ =~ /#if.*DEBUG/) ) { $state = 1; } if( $state == 0 ) { print $_; } if( ($state == 1) && ($_ =~ /#endif/) ) { $state = 0; } }
In reply to nodebug.pl by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |