/**********************************************************************
 * ti library's routine for getting a new menu node
 *
 * $Author: brlewis $
 * $Source: /afs/net.mit.edu/project/net_dev/brlewis/src/lib/RCS/ti_newnode.c,v $
 * $Header: /afs/net.mit.edu/project/net_dev/brlewis/src/lib/RCS/ti_newnode.c,v 0.1 92/03/12 15:27:43 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_newnode_c[] = "$Header: /afs/net.mit.edu/project/net_dev/brlewis/src/lib/RCS/ti_newnode.c,v 0.1 92/03/12 15:27:43 brlewis Exp $";
#endif /* lint */

#include <errno.h>
#include <ti/memory.h>
#include <ti/ti.h>

/**********************************************************************
 * ti_newnode(ti_node **np)
 *	puts correct menu in mp
 *
 * - returns error code
 **********************************************************************/

/* jms 7/24/92 -- windows-izing completed, pending approval */

TI_INLINE
long
ti_newnode(phnode)
     ti_node_H FAR *phnode;
{
  long code = 0L;

  TI_MEM(*phnode = New(ti_node));
#if !defined(MEWEL) && !defined(WINDOWS)
  bzero((char *)*phnode, sizeof(ti_node));
#endif
 /* it's already zero-initialized in windows */

CLEANUP: /* do nothing. this is here for the TI_MEM. */
  return (code);
}
