home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / lifeos2.zip / LIFE-1.02 / SOURCE / TEMPLATE.C < prev    next >
C/C++ Source or Header  |  1996-06-14  |  1KB  |  63 lines

  1. /* Copyright 1991 Digital Equipment Corporation.
  2.  * All Rights Reserved.
  3. *****************************************************************/
  4. /*     $Id: templates.c,v 1.2 1994/12/08 23:33:53 duchier Exp $     */
  5.  
  6. #ifndef lint
  7. static char vcid[] = "$Id: templates.c,v 1.2 1994/12/08 23:33:53 duchier Exp $";
  8. #endif /* lint */
  9.  
  10. #include "extern.h"
  11. #include "print.h"
  12. #ifndef OS2_PORT
  13. #include "built_ins.h"
  14. #else
  15. #include "built_in.h"
  16. #endif
  17.  
  18. #include "types.h"
  19. #include "trees.h"
  20. #include "lefun.h"
  21. #include "error.h"
  22. #ifndef OS2_PORT
  23. #include "templates.h"
  24. #else
  25. #include "template.h"
  26. #endif
  27.  
  28.  
  29. /******** next things have to be defined in a header file
  30. */
  31.  
  32. char *numbers[] = {"1","2","3","4","5","6","7","8","9","10",
  33.            "11","12","13","14","15","16","17","18","19","20",
  34.            NULL};
  35.  
  36.  
  37. long set_extra_args[] = {set_empty, set_1, set_2, set_1_2, set_1_2_3, set_1_2_3_4};
  38.  
  39.  
  40.  
  41. /******** GET_ARG
  42.  
  43.   assign the argument "number" of the goal "g" in "arg".
  44.   return FALSE if bad argument.
  45. */
  46.  
  47. long get_arg (g, arg, number)
  48.  
  49. ptr_psi_term g, *arg;
  50. char *number;
  51. {
  52.     ptr_node n;
  53.  
  54.  
  55.     if (n = find (featcmp, number, g->attr_list))
  56.         return (*arg = (ptr_psi_term) n->data) ? TRUE: FALSE;
  57.     else
  58.         return FALSE;
  59. }
  60.  
  61.  
  62.  
  63.