CoCalc Public Fileswww / onhand / fton02 / rupcommand.h
Author: William A. Stein
1/* rupcommand.h
2 * Copyright (C) 1998 N.Fukase
3 *
4 * This program is free software; you can redistribute it and/or modify
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA
18 */
19
20/*_____ �ɤ����Ǹ����褦�������ޥ��� ________________________________________*/
21#define WORD(b)		(((b)[0] & 0xff) + (((b)[1] & 0xff) << 8))
22#define DWORD(b)	(((b)[0] & 0xff) + (((b)[1] & 0xff) << 8) +\
23			(((b)[2] & 0xff) << 16) + (((b)[3] & 0xff) << 24))
24
25#define WORD2(b,c)	(((b)[0] = (c & 0xff)), \
26			 ((b)[1] = ((c & 0xff00) >> 8)))
27#define DWORD2(b,c)	(((b)[0] = (c & 0xff)),\
28			 ((b)[1] = ((c & 0xff00) >> 8)),\
29			 ((b)[2] = ((c & 0xff0000) >> 16)), \
30			 ((b)[3] = ((c & 0xff000000) >> 24)))
31
32/*----- ��̣�ι�¤��s ------------------------------------------------------*/
33/* Ruputer�ե�������� */
34typedef struct {
35  unsigned short	ctime,
36			cdate;
37  unsigned		size;
38  unsigned char		attr;
39  char			name[13];
40} RFINFO;
41
42/* �ǥ��쥯�ȥꥨ��ȥ� */
43typedef struct {
44  int			nfiles;
45  RFINFO		*rfi;
46  char			path[64];
47} RDENT;
48
49/* �Х��ʥ�ǡ����Ȥ��Υǡ���Ĺ */
50typedef struct {
51  int	length;
52  char	*data;
53} LENDAT;
54
55/*-----  ------------------------------------------------------*/
56extern int command_end(void);
57extern int command_dir(RDENT *dent);
58extern int command_ver(void);
59extern int command_upload(LENDAT *dat, RFINFO *rfi, char *path);