summaryrefslogtreecommitdiff
path: root/support/dktools/dk3srch.h
blob: 2058d2cc52a60134e5e6d0af3c154ea05d10307d (plain)
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/*
Copyright (C) 2011-2020, Dirk Krause
SPDX-License-Identifier: BSD-3-Clause
*/

/*
	WARNING: This file was generated by the dkct program (see
	http://dktools.sourceforge.net/ for details).
	Changes you make here will be lost if dkct is run again!
	You should modify the original source and run dkct on it.
	Original source: dk3srch.ctr
*/

/**	@file dk3srch.h Header file for the dk3srch module.
*/

#ifndef DK3SRCH_H_INCLUDED
/** Avoid multiple inclusions. */
#define DK3SRCH_H_INCLUDED 1


#line 10 "dk3srch.ctr"

#include "dk3conf.h"
#include "dk3types.h"

#ifdef __cplusplus
extern "C" {
#endif

/**	Open search structure, allocate memory.
	@param	i	Flag: Inverse sort order.
	@param	app	Application structure for diagnostics, may be NULL.
	@return	Pointer to new structure on success, NULL on error.
*/
dk3_search_t *
dk3search_open_app(int i, dk3_app_t *app);

/**	Close search structure, release memory.
	@param	sp	Search structure to close.
*/
void
dk3search_close(dk3_search_t *sp);

/**	Add one result to result set.
	@param	sp	Search structure.
	@param	fn	File name to add.
	@return	1 on success, 0 on error (not enough memory).
*/
int
dk3search_add(dk3_search_t *sp, dkChar const *fn);

/**	Reset result traversal to traverse results again.
	@param	sp	Search structure.
*/
void
dk3search_reset(dk3_search_t *sp);

/**	Get next result entry.
	@param	sp	Search structure.
	@return	Pointer to next file name or NULL.
*/
dkChar const *
dk3search_next(dk3_search_t *sp);


#ifdef __cplusplus
}
#endif




#endif