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

« back to all changes in this revision

Viewing changes to packages/base/netdb/testnet.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: testnet.pp,v 1.2 2003/05/17 20:54:03 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 netdb unit, network part
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
 
program testhst;
17
 
 
18
 
uses netdb;
19
 
 
20
 
Procedure DumpNetEntry(Const N : TNetworkEntry);
21
 
 
22
 
begin
23
 
  With N do
24
 
    begin
25
 
    Writeln('Name     : ',Name);
26
 
    Writeln('Addr     : ',HostAddrToStr(Addr));
27
 
    Writeln('Aliases  : ',Aliases);
28
 
    Writeln;
29
 
    end;
30
 
end;
31
 
 
32
 
Procedure TestAddr(Addr : string);
33
 
 
34
 
Var
35
 
  N : TNetworkEntry;
36
 
 
37
 
begin
38
 
  If GetNetworkByAddr(StrToHostAddr(Addr),N) then
39
 
    DumpNetEntry(N)
40
 
  else
41
 
    Writeln('No entry for address ',Addr)  
42
 
end;
43
 
 
44
 
Procedure TestName(Const Net : string);
45
 
 
46
 
Var
47
 
  N : TNetworkEntry;
48
 
 
49
 
begin
50
 
  If GetNetworkByName(Net,N) then
51
 
    DumpNetEntry(N)
52
 
  else
53
 
    Writeln('No entry for netname ',Net)  
54
 
end;
55
 
 
56
 
begin
57
 
  testaddr('127.0.0.0');
58
 
  testname('loopback');
59
 
end.
60
 
 
61
 
{
62
 
  $Log: testnet.pp,v $
63
 
  Revision 1.2  2003/05/17 20:54:03  michael
64
 
  + uriparser unit added. Header/Footer blocks added
65
 
 
66
 
}