aboutsummaryrefslogtreecommitdiffstats
path: root/lib/url.h
blob: 55107ad2bd0218e8b9f2afeed1c981d0b2bd3bcb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
  /********************************************************************\
  * BitlBee -- An IRC to other IM-networks gateway                     *
  *                                                                    *
  * Copyright 2001-2004 Wilmer van der Gaast and others                *
  \********************************************************************/

/* URL/mirror stuff - Stolen from Axel                                  */

/*
  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License with
  the Debian GNU/Linux distribution in /usr/share/common-licenses/GPL;
  if not, write to the Free Software Foundation, Inc., 59 Temple Place,
  Suite 330, Boston, MA  02111-1307  USA
*/

#include "bitlbee.h"

#define PROTO_HTTP      2
#define PROTO_HTTPS     5
#define PROTO_SOCKS4    3
#define PROTO_SOCKS5    4
#define PROTO_DEFAULT   PROTO_HTTP

typedef struct url
{
	int proto;
	int port;
	char host[MAX_STRING+1];
	char file[MAX_STRING+1];
	char user[MAX_STRING+1];
	char pass[MAX_STRING+1];
} url_t;

int url_set( url_t *url, const char *set_url );
td class='form'>
path: root/vendor/gems/rdoc-2.4.3/lib/rdoc/alias.rb
blob: 74a8d4e7c7237a3b4dfcd184c3787555a37b464a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
require 'rdoc/code_object'

##
# Represent an alias, which is an old_name/new_name pair associated with a
# particular context

class RDoc::Alias < RDoc::CodeObject

  ##
  # Allow comments to be overridden

  attr_writer :comment

  ##
  # Aliased name

  attr_accessor :new_name

  ##
  # Aliasee's name

  attr_accessor :old_name

  ##
  # Source file token stream

  attr_accessor :text

  ##
  # Creates a new Alias with a token stream of +text+ that aliases +old_name+
  # to +new_name+ and has +comment+

  def initialize(text, old_name, new_name, comment)
    super()
    @text = text
    @old_name = old_name
    @new_name = new_name
    self.comment = comment
  end

  def inspect # :nodoc:
    "#<%s:0x%x %s.alias_method %s, %s>" % [
      self.class, object_id,
      parent.name, @old_name, @new_name,
    ]
  end

  def to_s # :nodoc:
    "alias: #{self.old_name} -> #{self.new_name}\n#{self.comment}"
  end

end