summaryrefslogtreecommitdiffstats
path: root/usr.bin/ncftp/ftprc.h
blob: eed0217ea721fa5057dc7d4628942f77258666ea (plain)
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
/* ftprc.h */

#ifndef _ftprc_h_
#define _ftprc_h_

/*  $RCSfile: ftprc.h,v $
 *  $Revision: 14020.11 $
 *  $Date: 93/05/21 05:45:31 $
 */

#define NETRC "netrc"
#define FTPRC "ncftprc"

#define RC_DELIM " \n\t,"

typedef struct site *siteptr;
typedef struct site {
	char *name;			/* name (or IP address) of site */
	siteptr next;
} site;

typedef struct recentsite {
	char *name;			/* name (or IP address) of site */
	char *dir;			/* directory we were in last time we called. */
	time_t lastcall;	/* when this site was called last. */
} recentsite;

int thrash_rc(void);
void AddNewSitePtr(char *word);
int ruserpass2(char *host, char **user, char **pass, char **acct);
void GetFullSiteName(char *host, char *lastdir);
void ReadRecentSitesFile(void);
int  WriteRecentSitesFile(void);
void AddRecentSite(char *host, char *lastdir);
void UpdateRecentSitesList(char *host, char *lastdir);
void PrintSiteList(void);

#endif
/* eof */
OpenPOWER on IntegriCloud