"Fossies" - the Fresh Open Source Software Archive

Member "msmtp-1.8.5/src/netrc.h" (12 Dec 2018, 1527 Bytes) of package /linux/privat/msmtp-1.8.5.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "netrc.h" see the Fossies "Dox" file reference documentation and the last Fossies "Diffs" side-by-side code changes report: 1.8.1_vs_1.8.2.

    1 /* This file was taken from fetchmail 6.3.26. */
    2 /* netrc.h -- declarations for netrc.c
    3  * For license terms, see the file COPYING in this directory.
    4  */
    5 
    6 #ifndef _NETRC_H_
    7 #define _NETRC_H_ 1
    8 
    9 # undef __BEGIN_DECLS
   10 # undef __END_DECLS
   11 #ifdef __cplusplus
   12 # define __BEGIN_DECLS extern "C" {
   13 # define __END_DECLS }
   14 #else
   15 # define __BEGIN_DECLS /* empty */
   16 # define __END_DECLS /* empty */
   17 #endif
   18 
   19 #undef __P
   20 #if defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(WIN32) || defined(__cplusplus)
   21 # define __P(protos) protos
   22 #else
   23 # define __P(protos) ()
   24 #endif
   25 
   26 /* The structure used to return account information from the .netrc. */
   27 typedef struct _netrc_entry {
   28   /* The exact host name given in the .netrc, NULL if default. */
   29   char *host;
   30 
   31   /* The login name of the user. */
   32   char *login;
   33 
   34   /* Password for the account (NULL, if none). */
   35   char *password;
   36 
   37   /* Pointer to the next entry in the list. */
   38   struct _netrc_entry *next;
   39 } netrc_entry;
   40 
   41 __BEGIN_DECLS
   42 /* Parse FILE as a .netrc file (as described in ftp(1)), and return a
   43    list of entries.  NULL is returned if the file could not be
   44    parsed. */
   45 netrc_entry *parse_netrc __P((const char *file));
   46 
   47 /* Return the netrc entry from LIST corresponding to HOST.  NULL is
   48    returned if no such entry exists. */
   49 netrc_entry *search_netrc __P((netrc_entry *list, const char *host, const char *account));
   50 
   51 /* Free the netrc list structure */
   52 void free_netrc __P((netrc_entry *list));
   53 __END_DECLS
   54 
   55 #endif /* _NETRC_H_ */