Open with one click!
1
/* rupcommand.h
2
* Copyright (C) 1998 N.Fukase
3
*
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
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�ե�������� */
34
typedef struct {
35
unsigned short ctime,
36
cdate;
37
unsigned size;
38
unsigned char attr;
39
char name[13];
40
} RFINFO;
41
42
/* �ǥ��쥯�ȥꥨ��ȥ� */
43
typedef struct {
44
int nfiles;
45
RFINFO *rfi;
46
char path[64];
47
} RDENT;
48
49
/* �Х��ʥ�ǡ����Ȥ��Υǡ���Ĺ */
50
typedef struct {
51
int length;
52
char *data;
53
} LENDAT;
54
55
/*----- ------------------------------------------------------*/
56
extern int command_end(void);
57
extern int command_dir(RDENT *dent);
58
extern int command_ver(void);
59
extern int command_upload(LENDAT *dat, RFINFO *rfi, char *path);
60
extern int command_download(LENDAT *dat, RFINFO *rfi, char *path);
61
extern int command_mkdir(char *dname);
62
extern int command_rmdir(char *dname);
63
extern int command_del(char *dname);
64
extern int command_chdir(char *dname);
65
extern int command_ren(char *new, char *old);
66
extern int command_copy(char *new, char *old);
67