File: serv.h

package info (click to toggle)
fbb 7.04j-8.2
  • links: PTS
  • area: main
  • in suites: squeeze, wheezy
  • size: 3,504 kB
  • ctags: 5,359
  • sloc: ansic: 85,097; sh: 985; makefile: 304
file content (157 lines) | stat: -rw-r--r-- 4,121 bytes parent folder | download | duplicates (4)
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
   /****************************************************************
    Copyright (C) 1986-2000 by

    F6FBB - Jean-Paul ROUBELAT
    6, rue George Sand
    31120 - Roquettes - France
	jpr@f6fbb.org

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

    Parts of code have been taken from many other softwares.
    Thanks for the help.
    ****************************************************************/

/*
 * Fichier des variables locales
 */

#ifndef _XFBB_SERV_H
#define _XFBB_SERV_H

#define ENGLISH

#include <dirent.h>
#include <sys/time.h>
#include <unistd.h>

#define _timezone timezone
#define xprintf printf
#define cprintf printf
#define stricmp strcasecmp
#define strcmpi strcasecmp
#define strnicmp strncasecmp
#define strncmpi strncasecmp
#define _read read
#define _write write
#define wsprintf sprintf

#define tell(fd) lseek((fd), 0L, SEEK_CUR)

#define MAXPATH 512
#define O_BINARY 0
#define O_TEXT   0100000        /* ne doit pas gener ds fcntl.h */

struct  ftime   {
    unsigned    ft_tsec  : 5;   /* Two second interval */
    unsigned    ft_min   : 6;   /* Minutes */
    unsigned    ft_hour  : 5;   /* Hours */
    unsigned    ft_day   : 5;   /* Days */
    unsigned    ft_month : 4;   /* Months */
    unsigned    ft_year  : 7;   /* Year */
};

#define FA_NORMAL   0x00        /* Normal file, no attributes */
#define FA_RDONLY   0x01        /* Read only attribute */
#define FA_HIDDEN   0x02        /* Hidden file */
#define FA_SYSTEM   0x04        /* System file */
#define FA_LABEL    0x08        /* Volume label */
#define FA_DIREC    0x10        /* Directory */
#define FA_ARCH     0x20        /* Archive */
#define FA_LINK     0x80        /* Lien */
 
#define FBB_NAMELENGTH 64
#define FBB_MASKLENGTH 64
#define FBB_BASELENGTH 256

struct  ffblk   {
  DIR        *ff_dir;
  char        ff_mask[FBB_MASKLENGTH+1];
  char        ff_base[FBB_BASELENGTH+1];
  char        ff_attrib;
  unsigned    ff_ftime;
  unsigned    ff_fdate;
  long        ff_fsize;
  char        ff_name[FBB_NAMELENGTH+1];
};

/* #define MAXPATH   80 */
#define MAXDIR    66
#define MAXFILE   9
#define MAXEXT    5

#define P_WAIT    0

#include "fbb_serv.h"
/*
#ifdef __cplusplus
extern "C" {
#endif

char *itoa(int, char*, int);
char *ltoa(long, char*, int);
char *ultoa(unsigned long, char*, int);
char *strupr(char *);

int GetFileNameDialog(char *);

void InfoMessage(int, char *, char *);
void FbbMem(int);
int fbb_list(int);

int fbb_ax25_config_load_ports(void);
int fbb_nr_config_load_ports(void);
int fbb_rs_config_load_ports(void);

void deb_io (void);
void fin_io (void);
void randomize(void);
int random_nb(int num);
long filelength(int fd);
int getdisk(void);
char *getcurdir(int drive, char *str);
int is_cdir(int chr);
int fnsplit(char *name, char *drive, char *rep, char *base, char *ext);
int getftime(int fd, struct ftime *ft);
void format_ffblk(struct ffblk *blk, struct dirent *dir);
int findfirst (char *rech, struct ffblk *blk, int mask);
int findnext (struct ffblk *blk);
unsigned long free_disk (int disk);
int filter (char *ligne, char *buffer, int len, char *data);

int fbb_statfs(char *filename, struct statfs *buf);

#ifdef __cplusplus
}
#endif
*/

#define CM_OPTIONJUSTIF   0
#define CM_OPTIONALARM    1
#define CM_OPTIONCALL     2
#define CM_OPTIONGATEWAY  3
#define CM_OPTIONAFFICH   4
#define CM_OPTIONSOUNDB   5
#define CM_OPTIONEDIT     6
#define CM_OPTIONINEXPORT 7

#define CM_FILESCANMSG  10

#endif