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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [linux-2.4/] [net/] [802/] [pseudo/] [actionnm.awk] - Rev 1765

Compare with Previous | Blame | View Log

# usage: awk -f actionnm.awk pseudocode.h
#
BEGIN { "date" | getline
	today = $0
	printf("\n/* this file generated on %s  */\n", today )
	printf("\nstatic char *action_names[] = { \n    " )
	opl = 0
}
 
/^#define/ {			
	if ( opl > 3 ) {
	    printf("\n    ")
	    opl = 0
	}
	opl = opl +1
	t = sprintf("\"%s\"", $2 )
	printf("%-15s ,", t )
#	printf("%-10s", $2 )
}
 
END {		
	if ( opl > 3 ) {
	    printf("\n    ")
	}
	printf("\t  0\n};\n\n")
}
 
 

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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