#!/bin/csh -f
#
# Renumbers the PLED values in prom_leds.h

cp prom_leds.h prom_leds_awk.old
cat prom_leds_awk.old | nawk ' 				\
{							\
	if ($1 == "#define" && ($2 ~ /^PLED_/)) {	\
		$3 = ++num 				\
		printf "#define %-31s %d\n", $2, $3	\
	} else						\
		print $0				\
}' > prom_leds.h
