1 /* netrc.h -- declarations for netrc.c
2 * For license terms, see the file COPYING in this directory.
11 # define __BEGIN_DECLS extern "C" {
12 # define __END_DECLS }
14 # define __BEGIN_DECLS /* empty */
15 # define __END_DECLS /* empty */
19 #if defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(WIN32) || defined(__cplusplus)
20 # define __P(protos) protos
22 # define __P(protos) ()
25 /* The structure used to return account information from the .netrc. */
26 typedef struct _netrc_entry {
27 /* The exact host name given in the .netrc, NULL if default. */
30 /* The login name of the user. */
33 /* Password for the account (NULL, if none). */
36 /* Pointer to the next entry in the list. */
37 struct _netrc_entry *next;
41 /* Parse FILE as a .netrc file (as described in ftp(1)), and return a
42 list of entries. NULL is returned if the file could not be
44 netrc_entry *parse_netrc __P((char *file));
46 /* Return the netrc entry from LIST corresponding to HOST. NULL is
47 returned if no such entry exists. */
48 netrc_entry *search_netrc __P((netrc_entry *list, char *host, char *account));
50 /* Free the netrc list structure */
51 void free_netrc __P((netrc_entry *list));
54 #endif /* _NETRC_H_ */