]> git.ipfire.org Git - thirdparty/cups.git/blob - cgi-bin/help-index.h
Load cups into easysw/current.
[thirdparty/cups.git] / cgi-bin / help-index.h
1 /*
2 * "$Id: help-index.h 4863 2005-12-03 04:28:10Z mike $"
3 *
4 * On-line help index definitions for the Common UNIX Printing System (CUPS).
5 *
6 * Copyright 1997-2005 by Easy Software Products.
7 *
8 * These coded instructions, statements, and computer programs are the
9 * property of Easy Software Products and are protected by Federal
10 * copyright law. Distribution and use rights are outlined in the file
11 * "LICENSE.txt" which should have been included with this file. If this
12 * file is missing or damaged please contact Easy Software Products
13 * at:
14 *
15 * Attn: CUPS Licensing Information
16 * Easy Software Products
17 * 44141 Airport View Drive, Suite 204
18 * Hollywood, Maryland 20636 USA
19 *
20 * Voice: (301) 373-9600
21 * EMail: cups-info@cups.org
22 * WWW: http://www.cups.org
23 */
24
25 #ifndef _CUPS_HELP_INDEX_H_
26 # define _CUPS_HELP_INDEX_H_
27
28
29 /*
30 * Data structures...
31 */
32
33 typedef struct /**** Help node structure... ****/
34 {
35 char *filename; /* Filename, relative to help dir */
36 char *section; /* Section name (NULL if none) */
37 char *anchor; /* Anchor name (NULL if none) */
38 char *text; /* Text in anchor */
39 time_t mtime; /* Last modification time */
40 off_t offset; /* Offset in file */
41 size_t length; /* Length in bytes */
42 int score; /* Search score */
43 } help_node_t;
44
45 typedef struct /**** Help index structure ****/
46 {
47 int search, /* 1 = search index, 0 = normal */
48 num_nodes, /* Number of nodes */
49 alloc_nodes; /* Allocated nodes */
50 help_node_t **nodes; /* Nodes sorted by filename */
51 help_node_t **sorted; /* Nodes sorted by score + text */
52 } help_index_t;
53
54
55 /*
56 * Functions...
57 */
58
59 extern void helpDeleteIndex(help_index_t *hi);
60 extern help_node_t **helpFindNode(help_index_t *hi, const char *filename,
61 const char *anchor);
62 extern help_index_t *helpLoadIndex(const char *hifile, const char *directory);
63 extern int helpSaveIndex(help_index_t *hi, const char *hifile);
64 extern help_index_t *helpSearchIndex(help_index_t *hi, const char *query,
65 const char *section,
66 const char *filename);
67
68
69 #endif /* !_CUPS_HELP_INDEX_H_ */
70
71 /*
72 * End of "$Id: help-index.h 4863 2005-12-03 04:28:10Z mike $".
73 */