#****************************************************************************
#  ##   ##         #####   #####  ##     **      NoSQL RDBMS - template     *
#  ###  ##        ####### ####### ##     **        $Revision: 2.1 $			*
#  #### ##        ###     ##   ## ##     ************************************
#  #######  ####  #####   ##   ## ##     **      Carlo Strozzi (c) 1998     *
#  ####### ######   ##### ## # ## ##     ************************************
#  ## #### ##  ##     ### ##  ### ##     **           Written by            *
#  ##  ### ###### ####### ######  ###### **          Carlo Strozzi          *
#  ##   ##  ####   #####   #### # ###### **     e-mail: carlos@linux.it     *
#****************************************************************************
#   NoSQL RDBMS, Copyright (C) 1998 Carlo Strozzi.                          *
#   This program comes with ABSOLUTELY NO WARRANTY; for details             *
#   refer to the GNU General Public License.                                *
#****************************************************************************
#
#  Builds a table template file for the input NoSQL table.
#
#  This NoSQL operator reads a table from STDIN and prints the
#  corresponding table template file to STDOUT, in a format suitable
#  for 'maketable'.
#
########################################################################

########################################################################
# BEGIN block
########################################################################

BEGIN { NULL = ""; FS = "\t"; OFS = "    " }

########################################################################
# Main loop
########################################################################

{
  split( $0, c_names )
  j_mode = "%" length( NF ) "s"
  for ( i = 1; i <= NF; i++ )
  {
	print " " sprintf( j_mode, i ), c_names[i]
  }
  exit
}

