]>
git.ipfire.org Git - thirdparty/cups.git/blob - cgi-bin/help-index.h
2 * "$Id: help-index.h 6257 2007-02-11 01:11:57Z mike $"
4 * On-line help index definitions for the Common UNIX Printing System (CUPS).
6 * Copyright 1997-2007 by Easy Software Products.
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
15 * Attn: CUPS Licensing Information
16 * Easy Software Products
17 * 44141 Airport View Drive, Suite 204
18 * Hollywood, Maryland 20636 USA
20 * Voice: (301) 373-9600
21 * EMail: cups-info@cups.org
22 * WWW: http://www.cups.org
25 #ifndef _CUPS_HELP_INDEX_H_
26 # define _CUPS_HELP_INDEX_H_
29 * Include necessary headers...
32 # include <cups/array.h>
39 typedef struct help_word_s
/**** Help word structure... ****/
41 int count
; /* Number of occurrences */
42 char *text
; /* Word text */
45 typedef struct help_node_s
/**** Help node structure... ****/
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 */
51 cups_array_t
*words
; /* Words after this node */
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 */
58 typedef struct help_index_s
/**** Help index structure ****/
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 */
70 extern void helpDeleteIndex(help_index_t
*hi
);
71 extern help_node_t
*helpFindNode(help_index_t
*hi
, const char *filename
,
73 extern help_index_t
*helpLoadIndex(const char *hifile
, const char *directory
);
74 extern int helpSaveIndex(help_index_t
*hi
, const char *hifile
);
75 extern help_index_t
*helpSearchIndex(help_index_t
*hi
, const char *query
,
77 const char *filename
);
80 #endif /* !_CUPS_HELP_INDEX_H_ */
83 * End of "$Id: help-index.h 6257 2007-02-11 01:11:57Z mike $".