|
Last change
on this file was
8806,
checked in by westram, 13 years ago
|
- cooked my own preprocessor for ARB_GDEmenus generation
- intermediate checkin:
- uses two methods to generate ARB_GDEmenus
- compares results and fails on difference. Branch from here, if own pp needs changes
|
-
Property svn:executable set to
*
|
|
File size:
318 bytes
|
| Line | |
|---|
| 1 | #!/usr/bin/perl |
|---|
| 2 | |
|---|
| 3 | use strict; |
|---|
| 4 | use warnings; |
|---|
| 5 | |
|---|
| 6 | my $line; |
|---|
| 7 | my $lastWasEmpty = 1; |
|---|
| 8 | while (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.