/***********************************************************************1* *2* This software is part of the ast package *3* Copyright (c) 2000-2011 AT&T Intellectual Property *4* and is licensed under the *5* Eclipse Public License, Version 1.0 *6* by AT&T Intellectual Property *7* *8* A copy of the License is available at *9* http://www.eclipse.org/org/documents/epl-v10.html *10* (with md5 checksum b35adb5213ca9657e911e9befb180842) *11* *12* Information and Software Systems Research *13* AT&T Research *14* Florham Park NJ *15* *16* Glenn Fowler <[email protected]> *17* Phong Vo <[email protected]> *18* *19***********************************************************************/20#pragma prototyped21/*22* integer list regular expression interface23*24* Glenn Fowler25* AT&T research26*/2728#ifndef _IRE_H29#define _IRE_H3031#include <ast_common.h>3233#define IRE_VERSION 20030115L /* interface version */3435#define IRE_SET (~0) /* as path set marker */3637#define ireinit(p) (memset(p,0,sizeof(*(p))),(p)->version=IRE_VERSION)3839typedef uint32_t Ireint_t;4041struct Ire_s; typedef struct Ire_s Ire_t;42struct Iredisc_s; typedef struct Iredisc_s Iredisc_t;4344typedef void* (*Ireresize_f)(void*, void*, size_t);4546struct Iredisc_s47{48unsigned long version; /* discipline version */49Error_f errorf; /* error function */50Ireresize_f resizef; /* alloc/free function */51void* resizehandle; /* resizef handle */52};5354struct Ire_s /* RE handle */55{56const char* id; /* interface id */57int element; /* element size */58int dots; /* element dots */59int tuple; /* tuple size */60unsigned long group; /* embedded group mark */61#ifdef _IRE_PRIVATE_62_IRE_PRIVATE_63#endif64};6566#if _BLD_bgp && defined(__EXPORT__)67#define extern __EXPORT__68#endif6970extern Ire_t* irecomp(const char*, int, int, int, int, Iredisc_t*);71extern int ireexec(Ire_t*, void*, size_t);72extern int irefree(Ire_t*);7374#undef extern7576#endif777879