1 /* netrc.h -- declarations for netrc.c
2 Copyright (C) 1996, Free Software Foundation, Inc.
3 Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
25 # define __BEGIN_DECLS extern "C" {
26 # define __END_DECLS }
28 # define __BEGIN_DECLS /* empty */
29 # define __END_DECLS /* empty */
33 #if defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(WIN32) || defined(__cplusplus)
34 # define __P(protos) protos
36 # define __P(protos) ()
39 /* The structure used to return account information from the .netrc. */
40 typedef struct _netrc_entry {
41 /* The exact host name given in the .netrc, NULL if default. */
44 /* The name of the account. */
47 /* Password for the account (NULL, if none). */
50 /* Pointer to the next entry in the list. */
51 struct _netrc_entry *next;
55 /* Parse FILE as a .netrc file (as described in ftp(1)), and return a
56 list of entries. NULL is returned if the file could not be
58 netrc_entry *parse_netrc __P((char *file));
60 /* Return the netrc entry from LIST corresponding to HOST. NULL is
61 returned if no such entry exists. */
62 netrc_entry *search_netrc __P((netrc_entry *list, char *host, char *account));
65 #endif /* _NETRC_H_ */