~ubuntu-branches/debian/lenny/fpc/lenny

« back to all changes in this revision

Viewing changes to packages/base/netdb/testuri.pp

  • Committer: Bazaar Package Importer
  • Author(s): Mazen Neifer, Torsten Werner, Mazen Neifer
  • Date: 2008-05-17 17:12:11 UTC
  • mfrom: (3.1.9 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080517171211-9qi33xhd9evfa0kg
Tags: 2.2.0-dfsg1-9
[ Torsten Werner ]
* Add Mazen Neifer to Uploaders field.

[ Mazen Neifer ]
* Moved FPC sources into a version dependent directory from /usr/share/fpcsrc
  to /usr/share/fpcsrc/${FPCVERSION}. This allow installing more than on FPC
  release.
* Fixed far call issue in compiler preventing building huge binearies.
  (closes: #477743)
* Updated building dependencies, recomennded and suggested packages.
* Moved fppkg to fp-utils as it is just a helper tool and is not required by
  compiler.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
{
2
 
    $Id: testuri.pp,v 1.2 2003/11/22 23:17:50 michael Exp $
3
 
    This file is part of the Free Pascal run time library.
4
 
    Copyright (c) 2003 by the Free Pascal development team
5
 
 
6
 
    Test uriparser unit
7
 
    
8
 
    See the file COPYING.FPC, included in this distribution,
9
 
    for details about the copyright.
10
 
 
11
 
    This program is distributed in the hope that it will be useful,
12
 
    but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14
 
 
15
 
 **********************************************************************}
16
 
{$MODE objfpc}
17
 
{$H+}
18
 
 
19
 
program Testuri;
20
 
 
21
 
uses URIParser;
22
 
 
23
 
var
24
 
  URI: TURI;
25
 
  s: String;
26
 
begin
27
 
  with URI do
28
 
  begin
29
 
    Protocol := 'http';
30
 
    Username := 'user';
31
 
    Password := 'pass';
32
 
    Host := 'localhost';
33
 
    Port := 8080;
34
 
    Path := '/test/dir';
35
 
    Document := 'some index.html';
36
 
    Params := 'param1=value1&param2=value2';
37
 
    Bookmark := 'bookmark';
38
 
  end;
39
 
 
40
 
  s := EncodeURI(URI);
41
 
  WriteLn(s);
42
 
 
43
 
  FillChar(URI, SizeOf(URI), #0);
44
 
 
45
 
//  URI := ParseURI(s, 'defaultprotocol', 1234);
46
 
  URI:=ParseURI('http://www.lazarus.freepascal.org/main.php');
47
 
  with URI do
48
 
  begin
49
 
    WriteLn('Protocol: ', Protocol);
50
 
    WriteLn('Username: ', Username);
51
 
    WriteLn('Password: ', Password);
52
 
    WriteLn('Host: ', Host);
53
 
    WriteLn('Port: ', Port);
54
 
    WriteLn('Path: ', Path);
55
 
    WriteLn('Document: ', Document);
56
 
    WriteLn('Params: ', Params);
57
 
    WriteLn('Bookmark: ', Bookmark);
58
 
  end;
59
 
 
60
 
end.
61
 
 
62
 
{
63
 
  $Log: testuri.pp,v $
64
 
  Revision 1.2  2003/11/22 23:17:50  michael
65
 
  Patch for ipv6 and CNAME record support from Johannes Berg
66
 
 
67
 
  Revision 1.1  2003/05/17 20:54:03  michael
68
 
  + uriparser unit added. Header/Footer blocks added
69
 
 
70
 
}