Changeset 8be3230 in mainline for tools/autocheck.awk


Ignore:
Timestamp:
2018-11-18T01:01:02Z (5 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3b3fcf36
Parents:
ec18e454
Message:

Revert "Remove realmode VESA code" - needs more work

This reverts commit 8781e9d05ac3f6aeaa3ad709c5af9efa3209b87a.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/autocheck.awk

    rec18e454 r8be3230  
    3838
    3939/}.*;/ {
    40         pattern = "}( __attribute__\\(.*\\))? " struct_name "_t;"
    41         if ($0 ~ pattern) {
    42                 macro_name = toupper(struct_name) "_SIZE"
    43                 print "_Static_assert(" macro_name " == sizeof(struct " struct_name "), \"\");"
    44                 struct_name = ""
     40        pattern = "}( __attribute__\\(.*\\))? (" struct_name "_t)?;"
     41        if ($0 !~ pattern) {
     42                print("Bad struct ending: " $0) > "/dev/stderr"
     43                exit 1
    4544        }
     45        macro_name = toupper(struct_name) "_SIZE"
     46        print "_Static_assert(" macro_name " == sizeof(struct " struct_name "), \"\");"
     47        struct_name = ""
    4648}
    4749
    4850/;$/ {
    49         if (struct_name != "" && $0 !~ "}") {
     51        if (struct_name != "") {
    5052                # Remove array subscript, if any.
    5153                sub("(\\[.*\\])?;", "", $0)
Note: See TracChangeset for help on using the changeset viewer.