File: mandata.h

package info (click to toggle)
gman 0.9.3-5.3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 652 kB
  • sloc: ansic: 7,389; makefile: 131; perl: 105
file content (56 lines) | stat: -rw-r--r-- 1,180 bytes parent folder | download | duplicates (8)
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
/********************** modified from t2.c *******************/
/********************* kman.h ********************************/
#include "list.h"

#ifndef	_KMAN_H
#define _KMAN_H

#define MAX_MAN_SECTION 15
#define BUFFER_SIZE 200

class ManPath;
class ManItem;

class ManPath
{
private:
	char *	path_name;
	List *	section[MAX_MAN_SECTION]; //1:2:3:4:5:6:7:8:9:tcl:n:l:p:o
private:
	int LoadManSubPath(char *);
public:
	int active;
	ManPath(char * path_name);
	~ManPath();
	int LoadManPath(char *);
	const char * GetPath();
	int GetSize(int section_ID);
	int GetItems(int section_ID, ManItem **buffer);
	ManItem * search_man_item(char * name, char * section);
};

class ManItem
{
public:
	ManItem(ManPath *, char * file_name);
	~ManItem();
	char * 	get_display_name(char * buffer);
	char * 	get_section_name(char * buffer);
	int		get_section_ID();
	void *	get_man_path();
	void 	active_man_page();	
private:	
	ManPath	* man_path;
	char *	file_name;
	char * display_name;
	char * 	section_name;
	int 	section_ID;
};

//int ItemMatch(char * name);
int man_item_compare(ManItem **,ManItem **);
void attach (char *dest, const char *dirname, const char *name);

#endif /* _KMAN_H */