Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
STRUCTS_TYPE_REGEX(3)	 BSD Library Functions Manual	 STRUCTS_TYPE_REGEX(3)

NAME
     structs_type_regex	-- structs type	for regular expressions

LIBRARY
     PDEL Library (libpdel, -lpdel)

SYNOPSIS
     #include <sys/types.h>
     #include <regex.h>
     #include <pdel/structs/structs.h>
     #include <pdel/structs/type/regex.h>

     STRUCTS_REGEX_TYPE(mtype, flags);

     extern const struct structs_type structs_type_regex;
     extern const struct structs_type structs_type_regex_icase;

DESCRIPTION
     The STRUCTS_REGEX_TYPE() macro defines a structs(3) type (i.e., a struct
     structs_type) for describing regular expressions.	The data structure de-
     scribed by	this type is a struct structs_regex:

	struct structs_regex {
	    const char	*pat;	    /* ascii pattern */
	    regex_t	reg;	    /* compiled	pattern	*/
	};

     pat points	to the ASCII form of the regular expression pattern, which is
     stored in a buffer	allocated using	typed_mem(3) type mtype.  reg is the
     compiled form of the pattern.

     The flags parameter is passed to regcomp(3).

     The default value for this	type is	the pattern represented	by the empty
     string.

     Two pre-defined types are included.  structs_type_regex is	defined	with
     memory type STRUCTS_REGEX_MTYPE and flags REG_EXTENDED.

     structs_type_regex_icase is defined with memory type STRUCTS_REGEX_MTYPE
     and flags REG_EXTENDED | REG_ICASE.

SEE ALSO
     libpdel(3), regex(3), structs(3), structs_type(3),	typed_mem(3)

HISTORY
     The PDEL library was developed at Packet Design, LLC.
     http://www.packetdesign.com/

AUTHORS
     Archie Cobbs <archie@freebsd.org>

BSD				April 22, 2002				   BSD

NAME | LIBRARY | SYNOPSIS | DESCRIPTION | SEE ALSO | HISTORY | AUTHORS

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=structs_type_regex&sektion=3&manpath=FreeBSD+12.1-RELEASE+and+Ports>

home | help