File: tab_categories.h

package info (click to toggle)
gpr 0.12deb1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,568 kB
  • ctags: 250
  • sloc: sh: 6,138; ansic: 3,684; makefile: 86; sed: 16
file content (31 lines) | stat: -rw-r--r-- 1,230 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include <regex.h>

typedef struct tTab {
  char *title;
  char **patterns;
  regex_t **regexp;
  char **strings;
} tTab, *ptrTab;

/*-------------------------------------------------------------------
  Parse the xml file containing tab information.  Use this to build 
  a list of tTab structs that we'll use for matching later on.
-------------------------------------------------------------------*/
ptrTab * tab_parse_xml_file (char *filename);

/*-------------------------------------------------------------------
  Match the given description string to the list of strings and
  regexp patterns.  If there's a match, return the tab's title
  string.
-------------------------------------------------------------------*/
char * tab_match (char *desc, ptrTab *tablist);

/*-------------------------------------------------------------------
  Free a list of tTab structures, then free the list itself.
-------------------------------------------------------------------*/
void tab_free_all (ptrTab * tabs);

/*-------------------------------------------------------------------
  Print out data from a tTab struct to stdout.
-------------------------------------------------------------------*/
void tab_print (ptrTab tab);