]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[Bug 262] Petter Reinholdtsen: Fix gcc3/Mac OS X output regexp for ntpdc/nl.pl
authorHarlan Stenn <stenn@ntp.org>
Sat, 20 Dec 2003 23:44:12 +0000 (18:44 -0500)
committerHarlan Stenn <stenn@ntp.org>
Sat, 20 Dec 2003 23:44:12 +0000 (18:44 -0500)
bk: 3fe4deccTfL564YbWqeQNTPMgzBIUg

ntpdc/nl.pl.in

index dfa79c26abf2ec8c290a6122ed82072200b8b6b7..720968978c5b3aab862c87ac398ceaa62f7904f9 100644 (file)
@@ -20,13 +20,13 @@ while (<>) {
            printf "  printf(\"sizeof($type) = %%d\\n\", \n\t (int) sizeof($type));\n";
            next;
        }
-       if (/\s*\w+\s*(\w*)(\[.*\])?\s*;\s*$/) {
+       if (/\s*\w+\s+(\w*)\s*(\[.*\])?\s*;\s*$/) {
            $field = $1;
            print STDERR "\tfield = '$field'\n" if $debug;
            printf "  printf(\"offsetof($field) = %%d\\n\", \n\t (int) offsetof($type, $field));\n";
            next;
        }
-       if (/^};$/) {
+       if (/^} *; *$/) {
            printf "  printf(\"\\n\");\n\n";
            $found = 0 if $last;
            next;