/* -*-Mode: C;-*- coltype.c -[Sun Oct 11 19:49:14 1992 by cxh]- */
#ifndef lint
static char     rcsid[] = "$Id$";
#endif
/*
 * Copyright 1992 Regents of the University of California. Permission to use,
 * copy, modify, and distribute this software and its documentation for any
 * purpose and without fee is hereby granted, provided that the above
 * copyright notice appear in all copies.  The University of California makes
 * no representations about the suitability of this software for any purpose.
 * It is provided 'as is' without express or implied warranty.
 */
#include <stdio.h>
#include "coltype.h"

/* We track initial column types so that SQLcolTypesCursor will work. */
COLTYPE        *
init_coltype(num_elements)
     int             num_elements;
{
  COLTYPE        *coltype = NULL;
  coltype = (COLTYPE *) sql_malloc((int) (num_elements * sizeof(COLTYPE)),
				   "Internal error: init_coltype()");
  if (coltype == NULL)
    return NULL;
  return coltype;
}


COLTYPE        *
free_coltype(coltype)
     COLTYPE        *coltype;
{
  if (coltype) {
    free((char *) coltype);
  }
  return (COLTYPE *) 0;
}
