File: qftp.cc

package info (click to toggle)
qftp 0.97-1.1
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 204 kB
  • ctags: 168
  • sloc: cpp: 1,336; makefile: 61
file content (36 lines) | stat: -rw-r--r-- 574 bytes parent folder | download
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
/*
 *  qftp
 *  Copyright (C) 1997,1998 Peter Strand
 *  Distributed under the GNU Pulic Licence
 */

#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <unistd.h>

#include "ftpconn.h"
#include "txtif.h"
#include "conf.h"


void main(int argc, char *argv[])
{
	TxtIF *txtif;
	Conf gconf;
	int fd;
	char tmp[200], *p;

	p = getenv("HOME");
	if (p) {
		strcat(tmp, p);
		strcat(tmp, "/.qftprc");	
		fd = open(tmp, O_RDONLY);
		gconf.Parse(fd);
		close(fd);
	}
	txtif = new TxtIF(new FtpConn, gconf);
	if (argc > 1)
		txtif->Open(argc, argv);
	txtif->go();
}