head	1.1;
access;
symbols
	PG95_1_01:1.1;
locks; strict;
comment	@# @;


1.1
date	96.02.24.01.16.25;	author jolly;	state Exp;
branches;
next	;


desc
@@


1.1
log
@SQL-ized Reference Manual (ported from postgres v4r2)
Thanks to Andrew (and Claire and Dorothy)
@
text
@#!/bin/sh
#
# $Header: /data/01/postgres/src/ref/RCS/make_kwtab,v 1.1 1993/01/26 02:43:13 aoki Exp $
#
# XXX column widths are hard-coded to 15 characters.
#	I could fix this using 2-pass system but it doesn't seem 
#	worth it...
#
awk '/ScanKeywords\[\]/,/^};/ { print; }' $1 | \
	egrep '^[ 	]*{' | \
	sed -e 's/^[^"]*"//' -e 's/".*$//' | \
	sort -f | \
	awk '
{
	++n;
	save[n] = $0;
}
END {
	print ".ft B";
	print ".nf";
	print ".if n .ta 5 +15 +15 +15";
	print ".if t .ta 0.5i +1.5i +1.5i +1.5i"
	ncol = 4;
	nrow = int(n / ncol);
	if (n % ncol > 0) {
		++nrow;
	}
	for (i = 1; i <= nrow; ++i) {
		x1=i; x2=x1+nrow; x3=x2+nrow; x4=x3+nrow;
		print "\t" save[x1] "\t" save[x2] "\t" save[x3] "\t" save[x4];
	}
	print ".fi";
	print ".ft";
}'
@
