]> git.ipfire.org Git - thirdparty/cups.git/blame - cgi-bin/help-index.h
Load cups into easysw/current.
[thirdparty/cups.git] / cgi-bin / help-index.h
CommitLineData
ef416fc2 1/*
f7deaa1a 2 * "$Id: help-index.h 6257 2007-02-11 01:11:57Z mike $"
ef416fc2 3 *
4 * On-line help index definitions for the Common UNIX Printing System (CUPS).
5 *
f7deaa1a 6 * Copyright 1997-2007 by Easy Software Products.
ef416fc2 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
ecdc0628 28/*
29 * Include necessary headers...
30 */
31
32# include <cups/array.h>
33
ef416fc2 34
35/*
36 * Data structures...
37 */
38
f7deaa1a 39typedef struct help_word_s /**** Help word structure... ****/
40{
41 int count; /* Number of occurrences */
42 char *text; /* Word text */
43} help_word_t;
44
45typedef struct help_node_s /**** Help node structure... ****/
ef416fc2 46{
47 char *filename; /* Filename, relative to help dir */
48 char *section; /* Section name (NULL if none) */
49 char *anchor; /* Anchor name (NULL if none) */
50 char *text; /* Text in anchor */
f7deaa1a 51 cups_array_t *words; /* Words after this node */
ef416fc2 52 time_t mtime; /* Last modification time */
53 off_t offset; /* Offset in file */
54 size_t length; /* Length in bytes */
55 int score; /* Search score */
56} help_node_t;
57
f7deaa1a 58typedef struct help_index_s /**** Help index structure ****/
ef416fc2 59{
ecdc0628 60 int search; /* 1 = search index, 0 = normal */
61 cups_array_t *nodes; /* Nodes sorted by filename */
62 cups_array_t *sorted; /* Nodes sorted by score + text */
ef416fc2 63} help_index_t;
64
65
66/*
67 * Functions...
68 */
69
70extern void helpDeleteIndex(help_index_t *hi);
ecdc0628 71extern help_node_t *helpFindNode(help_index_t *hi, const char *filename,
72 const char *anchor);
ef416fc2 73extern help_index_t *helpLoadIndex(const char *hifile, const char *directory);
74extern int helpSaveIndex(help_index_t *hi, const char *hifile);
75extern help_index_t *helpSearchIndex(help_index_t *hi, const char *query,
76 const char *section,
77 const char *filename);
78
79
80#endif /* !_CUPS_HELP_INDEX_H_ */
81
82/*
f7deaa1a 83 * End of "$Id: help-index.h 6257 2007-02-11 01:11:57Z mike $".
ef416fc2 84 */