#!/bin/awk -f
# Copyright (c) 1986, 1990 by The Trustees of Columbia University in
# the City of New York.  Permission is granted to any individual or
# institution to use, copy, or redistribute this software so long as it
# is not sold for profit, provided this copyright notice is retained.
#
# $Header: /f/src2/encore.bin/cucca/mm/tarring-it-up/RCS/mkdefines,v 2.1 90/10/04 18:32:58 melissa Exp $

BEGIN { n = 0 }
/^#number/	{ n = $2; next }
/^#def [A-Za-z]/{ for (i=2; length($i) == 0; i++)
				;
		  p = sprintf ("#define %-16s %d", $i, n++);
		  s = " ";
		  while (++i <= NF)
			if (length ($i) > 0)
				s = s $i " ";
		  printf ("%-40s /*%s*/\n", p, s);
		  next }
		{ print }

