Wild Life  2.30
 All Data Structures Files Functions Variables Typedefs Macros
Functions
templates.c File Reference

templates More...

Go to the source code of this file.

Functions

long get_arg (ptr_psi_term g, ptr_psi_term *arg, char *number)
 get_arg More...
 

Detailed Description

templates

Definition in file templates.c.

Function Documentation

long get_arg ( ptr_psi_term  g,
ptr_psi_term arg,
char *  number 
)

get_arg

Parameters
g- ptr_psi_term g
arg- ptr_psi_term *arg
number- char *number

GET_ARG assign the argument "number" of the goal "g" in "arg". return FALSE if bad argument.

Definition at line 25 of file templates.c.

References wl_psi_term::attr_list, wl_node::data, FALSE, FEATCMP, find(), and TRUE.

26 {
27  ptr_node n;
28 
29  if ((n = find (FEATCMP, number, g->attr_list)))
30  return (*arg = (ptr_psi_term) n->data) ? TRUE: FALSE;
31  else
32  return FALSE;
33 }
#define FEATCMP
indicates to use featcmp for comparison (in trees.c)
Definition: def_const.h:979
GENERIC data
Definition: def_struct.h:201
#define TRUE
Standard boolean.
Definition: def_const.h:268
#define FALSE
Standard boolean.
Definition: def_const.h:275
ptr_node find(long comp, char *keystr, ptr_node tree)
find
Definition: trees.c:394
ptr_node attr_list
Definition: def_struct.h:187