core/find.c File Reference


Detailed Description

Id
find.c,v 1.45 2008/02/01 00:53:24 d3p988 Exp

Author:
David P. Chassin

Definition in file find.c.

Go to the source code of this file.

Defines

#define ACCEPT   { _n+=_m; _p+=_m; _m=0; }
#define ADDALL(L)   ((L).hit_count=object_get_count(),memset((L).result,0xff,(L).result_size))
#define ADDOBJ(L, N)   (!FOUND((L),(N))?((L).result[(N)>>3]|=(1<<((N)&0x7)),++((L).hit_count)):(L).hit_count)
#define COPY(X)   {size--; (X)[_n++]=*_p++;}
#define COUNT(L)   ((L).hit_count)
#define DELALL(L)   ((L).hit_count=object_get_count(),memset((L).result,0x00,(L).result_size))
#define DELOBJ(L, N)   (FOUND((L),(N))?((L).result[(N)>>3]&=~(1<<((N)&0x7)),--((L).hit_count)):(L).hit_count)
#define DONE   return _n;
#define FOUND(L, N)   (((L).result[(N)>>3]&(1<<((N)&0x7)))!=0)
#define HERE   (_p+_m)
#define LITERAL(X)   ((_m+=literal(HERE,(X)))>0)
#define OR   {_m=0;}
#define PARSER   char *_p
#define REJECT   { return 0; }
#define SIZE(L)   ((L).result_size)
#define START   int _m=0, _n=0;
#define TERM(X)   ((_m+=(X))>0)
#define VALUE(X, T, M)   ((X).isconstant?(X).value.constant.M:*((X).value.ref.T))
#define WHITE   (_m+=white(HERE))

Functions

int compare_integer16_eq (void *a, FINDVALUE b)
int compare_integer16_ge (void *a, FINDVALUE b)
int compare_integer16_gt (void *a, FINDVALUE b)
int compare_integer16_le (void *a, FINDVALUE b)
int compare_integer16_li (void *a, FINDVALUE b)
int compare_integer16_lt (void *a, FINDVALUE b)
int compare_integer16_ne (void *a, FINDVALUE b)
int compare_integer16_nl (void *a, FINDVALUE b)
int compare_integer32_eq (void *a, FINDVALUE b)
int compare_integer32_ge (void *a, FINDVALUE b)
int compare_integer32_gt (void *a, FINDVALUE b)
int compare_integer32_le (void *a, FINDVALUE b)
int compare_integer32_li (void *a, FINDVALUE b)
int compare_integer32_lt (void *a, FINDVALUE b)
int compare_integer32_ne (void *a, FINDVALUE b)
int compare_integer32_nl (void *a, FINDVALUE b)
int compare_integer64_eq (void *a, FINDVALUE b)
int compare_integer64_ge (void *a, FINDVALUE b)
int compare_integer64_gt (void *a, FINDVALUE b)
int compare_integer64_le (void *a, FINDVALUE b)
int compare_integer64_li (void *a, FINDVALUE b)
int compare_integer64_lt (void *a, FINDVALUE b)
int compare_integer64_ne (void *a, FINDVALUE b)
int compare_integer64_nl (void *a, FINDVALUE b)
int compare_integer_eq (void *a, FINDVALUE b)
int compare_integer_ge (void *a, FINDVALUE b)
int compare_integer_gt (void *a, FINDVALUE b)
int compare_integer_le (void *a, FINDVALUE b)
int compare_integer_li (void *a, FINDVALUE b)
int compare_integer_lt (void *a, FINDVALUE b)
int compare_integer_ne (void *a, FINDVALUE b)
int compare_integer_nl (void *a, FINDVALUE b)
int compare_pointer_eq (void *a, FINDVALUE b)
int compare_pointer_ge (void *a, FINDVALUE b)
int compare_pointer_gt (void *a, FINDVALUE b)
int compare_pointer_le (void *a, FINDVALUE b)
int compare_pointer_li (void *a, FINDVALUE b)
int compare_pointer_lt (void *a, FINDVALUE b)
int compare_pointer_ne (void *a, FINDVALUE b)
int compare_pointer_nl (void *a, FINDVALUE b)
int compare_real_eq (void *a, FINDVALUE b)
int compare_real_ge (void *a, FINDVALUE b)
int compare_real_gt (void *a, FINDVALUE b)
int compare_real_le (void *a, FINDVALUE b)
int compare_real_li (void *a, FINDVALUE b)
int compare_real_lt (void *a, FINDVALUE b)
int compare_real_ne (void *a, FINDVALUE b)
int compare_real_nl (void *a, FINDVALUE b)
int compare_string_eq (void *a, FINDVALUE b)
int compare_string_ge (void *a, FINDVALUE b)
int compare_string_gt (void *a, FINDVALUE b)
int compare_string_le (void *a, FINDVALUE b)
int compare_string_li (void *a, FINDVALUE b)
int compare_string_lt (void *a, FINDVALUE b)
int compare_string_ne (void *a, FINDVALUE b)
int compare_string_nl (void *a, FINDVALUE b)
char * find_file (char *name, char *path, int mode)
 Search for a file in the specified path (or in GLPATH environment variable) access flags: 0 = exist only, 2 = write, 4 = read, 6 = read/write.
OBJECTfind_first (FINDLIST *list)
 Returns the first object currently in the the search list return.
int find_makearray (FINDLIST *list, OBJECT ***objs)
 Makes an array from the objects currently in the search list result.
FINDPGMfind_mkpgm (char *expression)
OBJECTfind_next (FINDLIST *list, OBJECT *obj)
 Return the next object in the currenet search list.
FINDLISTfind_objects (FINDLIST *start,...)
 Search for objects that match criteria start may be a previous search result, or FT_NEW.
PGMCONSTFLAGS find_pgmconstants (FINDPGM *pgm)
FINDLISTfind_runpgm (FINDLIST *list, FINDPGM *pgm)
FINDLISTnew_list (unsigned int n)
void syntax_error (char *p)


GridLAB-DTM Version 1.0
An open-source project initiated by the US Department of Energy