source: tags/arb_5.5/GDEHELP/cleanmenu.pl

Last change on this file was 9151, checked in by westram, 13 years ago

merge from trunk [7491] [8805:8808]

  • cooked my own preprocessor for ARB_GDEmenus generation (no longer use C-preprocessor)
  • cleanup generated menu
  • removed obsolete file ('GDEmenus', the interesting file is called 'ARB_GDEmenus')
  • Property svn:executable set to *
File size: 318 bytes
Line 
1#!/usr/bin/perl
2
3use strict;
4use warnings;
5
6my $line;
7my $lastWasEmpty = 1;
8while (defined ($line=<>)) {
9  if ($line =~ /^[#]\s*[0-9]/o) { ; }
10  elsif ($line eq "\n") {
11    if ($lastWasEmpty) { ; }
12    else {
13      print $line;
14      $lastWasEmpty = 1;
15    }
16  }
17  else {
18    print $line;
19    $lastWasEmpty = 0;
20  }
21}
Note: See TracBrowser for help on using the repository browser.