X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=netrc.c;h=a585e1a0be37c236336713b949f15e7f9b3926e6;hb=da989f7b8294e342572ec5f27f1a6f3f2b1fe56f;hp=ea422edf3dfd02c475f437b9e6ce71c19aa5afc2;hpb=f6a2380b73de5b9c5fe306f362c8f5597749c552;p=~andy%2Ffetchmail diff --git a/netrc.c b/netrc.c index ea422edf..a585e1a0 100644 --- a/netrc.c +++ b/netrc.c @@ -10,12 +10,13 @@ (Makefile.am should have a rule so you can just type "make netrc") */ +#include "config.h" + #include #include #include #include -#include "config.h" #include "fetchmail.h" #include "netrc.h" #include "i18n.h" @@ -28,7 +29,7 @@ # define xmalloc malloc # define xrealloc realloc -char *program_name = "netrc"; +const char *program_name = "netrc"; #endif /* Maybe add NEWENTRY to the account information list, LIST. NEWENTRY is @@ -76,8 +77,7 @@ maybe_add_to_list (netrc_entry **newentry, netrc_entry **list) list of entries. NULL is returned if the file could not be parsed. */ netrc_entry * -parse_netrc (file) - char *file; +parse_netrc (char *file) { FILE *fp; char buf[POPBUFSIZE+1], *p, *tok; @@ -291,9 +291,7 @@ parse_netrc (file) /* Return the netrc entry from LIST corresponding to HOST. NULL is returned if no such entry exists. */ netrc_entry * -search_netrc (list, host, login) - netrc_entry *list; - char *host, *login; +search_netrc (netrc_entry *list, char *host, char *login) { /* Look for the HOST in LIST. */ while (list) @@ -334,7 +332,7 @@ free_netrc(netrc_entry *a) { int main (int argc, char **argv) { struct stat sb; - char *program_name, *file, *host, *login; + char *file, *host, *login; netrc_entry *head, *a; program_name = argv[0];