home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume8 / graph+ / part03 / parmnode.c < prev    next >
Encoding:
C/C++ Source or Header  |  1987-03-01  |  749 b   |  41 lines

  1. /*
  2.  * Copyright (C) 1986   Alan Kent
  3.  *
  4.  * Permission is granted to freely distribute part or
  5.  * all of this code as long as it is not for profit
  6.  * and this message is retained in the code.
  7.  *
  8.  * No resposibility is taken for any damage or incorect
  9.  * results this program generates.
  10.  * 
  11.  */
  12.  
  13.  
  14. #include <stdio.h>
  15. #include "graph.h"
  16. #include "y.tab.h"
  17.  
  18.  
  19. extern char *new ();
  20.  
  21.  
  22. parm_st *
  23. parm_node ( ident , parm_type )
  24. char *ident;
  25. int parm_type;
  26. {
  27.     parm_st *p;
  28.  
  29.     p = (parm_st *) new ( sizeof ( parm_st ) );
  30.     p->ident = ident;
  31.     p->parm_type = parm_type;
  32.     p->next = NULL;
  33.     if ( ident != NULL ) {
  34.     if ( parm_type == TABLE )
  35.         tab_declare ( ident , NULL );
  36.     else
  37.         var_declare ( ident , (double)0.0 );
  38.     }
  39.     return ( p );
  40. }
  41.