~ubuntu-branches/ubuntu/dapper/fpc/dapper

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Carlos Laviola
  • Date: 2005-05-30 11:59:10 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20050530115910-x5pbzm4qqta4i94h
Tags: 2.0.0-2
debian/fp-compiler.postinst.in: forgot to reapply the patch that
correctly creates the slave link to pc(1).  (Closes: #310907)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
{
2
 
    $Id: testhst.pp,v 1.2 2003/05/17 20:54:03 michael Exp $
 
2
    $Id: testhst.pp,v 1.4 2005/03/18 12:08:09 marco Exp $
3
3
    This file is part of the Free Pascal run time library.
4
4
    Copyright (c) 2003 by the Free Pascal development team
5
5
 
6
6
    test netdb unit, hosts part.
7
 
    
 
7
 
8
8
    See the file COPYING.FPC, included in this distribution,
9
9
    for details about the copyright.
10
10
 
15
15
 **********************************************************************}
16
16
program testhst;
17
17
 
18
 
uses netdb;
 
18
uses netdb,sockets;
19
19
 
20
20
Procedure DumpHostEntry(Const H : THostEntry);
21
21
 
38
38
  If GetHostByAddr(StrToHostAddr(Addr),H) then
39
39
    DumpHostEntry(H)
40
40
  else
41
 
    Writeln('No entry for address ',Addr)  
 
41
    Writeln('No entry for address ',Addr)
42
42
end;
43
43
 
44
44
Procedure TestName(Const N : string);
50
50
  If GetHostByName(N,H) then
51
51
    DumpHostEntry(H)
52
52
  else
53
 
    Writeln('No entry for hostname ',N)  
 
53
    Writeln('No entry for hostname ',N)
54
54
end;
55
55
 
56
56
begin
64
64
 
65
65
{
66
66
  $Log: testhst.pp,v $
67
 
  Revision 1.2  2003/05/17 20:54:03  michael
68
 
  + uriparser unit added. Header/Footer blocks added
 
67
  Revision 1.4  2005/03/18 12:08:09  marco
 
68
   * sockets now imported for conversion funcs
 
69
 
 
70
  Revision 1.3  2005/02/14 17:13:19  peter
 
71
    * truncate log
69
72
 
70
73
}