bbslist.h 1.71 KB
Newer Older
1
2
/* $Id$ */

3
4
5
#ifndef _BBSLIST_H_
#define _BBSLIST_H_

6
#include <stdio.h>	/* FILE * */
7
#include "gen_defs.h"
8
#include "dirwrap.h"	/* MAX_PATH */
9
10
11
#include <time.h>

#define LIST_NAME_MAX	30
12
#define LIST_ADDR_MAX	64
13
#define MAX_USER_LEN	30
14
#define MAX_PASSWD_LEN	16
15
#define MAX_SYSPASS_LEN	16
16

17
18
19
20
21
enum {
	 USER_BBSLIST
	,SYSTEM_BBSLIST
};

22
23
24
25
26
enum {
	 BBSLIST_SELECT
	,BBSLIST_EDIT
};

27
28
29
30
31
32
33
34
35
36
enum {
	 SCREEN_MODE_CURRENT
	,SCREEN_MODE_80X25
	,SCREEN_MODE_80X28
	,SCREEN_MODE_80X43
	,SCREEN_MODE_80X50
	,SCREEN_MODE_80X60
	,SCREEN_MODE_TERMINATOR
};

37
38
39
40
41
42
43
44
45
struct bbslist {
	char			name[LIST_NAME_MAX+1];
	char			addr[LIST_ADDR_MAX+1];
	short unsigned int port;
	time_t			added;
	time_t			connected;
	unsigned int	calls;
	char			user[MAX_USER_LEN+1];
	char			password[MAX_PASSWD_LEN+1];
46
	char			syspass[MAX_SYSPASS_LEN+1];
47
	int				type;
48
	int				conn_type;
49
	int				id;
50
	int				reversed;
51
	int				screen_mode;
deuce's avatar
deuce committed
52
	int				nostatus;
53
54
55
	char			dldir[MAX_PATH];
	char			uldir[MAX_PATH];
	int				loglevel;
56
	int				bpsrate;
57
	int				music;
58
59
60
61
62
63
64
65
	char			font[80];
};

struct font_files {
	char	*name;
	char	*path8x8;
	char	*path8x14;
	char	*path8x16;
66
67
};

68
struct bbslist *show_bbslist(int mode);
69
extern char *log_levels[];
70
71
extern char *rate_names[];
extern int rates[];
72
73
void read_item(FILE *listfile, struct bbslist *entry, char *bbsname, int id, int type);
void read_list(char *listpath, struct bbslist **list, struct bbslist *defaults, int *i, int type);
deuce's avatar
deuce committed
74
75
void free_list(struct bbslist **list, int listcount);
void add_bbs(char *listpath, struct bbslist *bbs);
76
int  get_rate_num(int rate);
77
78
79
80
81
void free_font_files(struct font_files *ff);
void save_font_files(struct font_files *fonts);
struct font_files *read_font_files(int *count);
void load_font_files(void);
int	find_font_id(char *name);
82
83

#endif