OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [linux-2.4/] [net/] [802/] [pseudo/] [actionnm.awk] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1275 phoenix
# usage: awk -f actionnm.awk pseudocode.h
2
#
3
BEGIN { "date" | getline
4
        today = $0
5
        printf("\n/* this file generated on %s  */\n", today )
6
        printf("\nstatic char *action_names[] = { \n    " )
7
        opl = 0
8
}
9
 
10
/^#define/ {
11
        if ( opl > 3 ) {
12
            printf("\n    ")
13
            opl = 0
14
        }
15
        opl = opl +1
16
        t = sprintf("\"%s\"", $2 )
17
        printf("%-15s ,", t )
18
#       printf("%-10s", $2 )
19
}
20
 
21
END {
22
        if ( opl > 3 ) {
23
            printf("\n    ")
24
        }
25
        printf("\t  0\n};\n\n")
26
}
27
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.