~ubuntu-branches/debian/experimental/apt/experimental

« back to all changes in this revision

Viewing changes to apt-pkg/contrib/netrc.h

  • Committer: Bazaar Package Importer
  • Author(s): Michael Vogt
  • Date: 2010-02-18 22:07:23 UTC
  • mfrom: (9.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20100218220723-zb7zdh6fmsmp30tr
Tags: 0.7.26~exp2
fix crash when LANGUAGE is not set

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// -*- mode: cpp; mode: fold -*-
 
2
// Description                                                          /*{{{*/
 
3
// $Id: netrc.h,v 1.11 2004/01/07 09:19:35 bagder Exp $
 
4
/* ######################################################################
 
5
 
 
6
   netrc file parser - returns the login and password of a give host in
 
7
                       a specified netrc-type file
 
8
 
 
9
   Originally written by Daniel Stenberg, <daniel@haxx.se>, et al. and
 
10
   placed into the Public Domain, do with it what you will.
 
11
 
 
12
   ##################################################################### */
 
13
                                                                        /*}}}*/
 
14
#ifndef NETRC_H
 
15
#define NETRC_H
 
16
 
 
17
#include <apt-pkg/strutl.h>
 
18
 
 
19
#define DOT_CHAR "."
 
20
#define DIR_CHAR "/"
 
21
 
 
22
// Assume: password[0]=0, host[0] != 0.
 
23
// If login[0] = 0, search for login and password within a machine section
 
24
// in the netrc.
 
25
// If login[0] != 0, search for password within machine and login.
 
26
int parsenetrc (char *host, char *login, char *password, char *filename);
 
27
 
 
28
void maybe_add_auth (URI &Uri, string NetRCFile);
 
29
#endif