/**********************************************************************
 * ti library's routine for freeing a menu
 *
 * $Author: brlewis $
 * $Source: /afs/net.mit.edu/project/net_dev/brlewis/src/lib/RCS/ti_freemenu.c,v $
 * $Header: /afs/net.mit.edu/project/net_dev/brlewis/src/lib/RCS/ti_freemenu.c,v 0.1 92/03/12 15:27:28 brlewis Exp $
 *
 * Copyright 1992 by the Massachusetts Institute of Technology.
 *
 * For copying and distribution information, please see the file
 * <mit-copyright.h>.
 **********************************************************************/

#include <mit-copyright.h>

#ifndef lint
static char rcsid_ti_freemenu_c[] = "$Header: /afs/net.mit.edu/project/net_dev/brlewis/src/lib/RCS/ti_freemenu.c,v 0.1 92/03/12 15:27:28 brlewis Exp $";
#endif /* lint */

#include <ti/memory.h>
#include <ti/ti.h>

/**********************************************************************
 * ti_freemenu(ti_menu *mp)
 *	
 * - frees memory allocated by ti_otl() and similar calls
 **********************************************************************/

TI_INLINE
void
ti_freemenu(mp)
     ti_menu *mp;
{
  if (mp->query) free((char *) mp->query);
  if (mp->tp) ti_close(tp);	/* probably just dec ref count */
  free((char *) mp);
  return;
}
