~ubuntu-branches/ubuntu/feisty/fpc/feisty

« back to all changes in this revision

Viewing changes to docs/olinuxex/ex53.pp

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2007-01-27 20:08:50 UTC
  • mfrom: (1.2.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20070127200850-9mrptaqqjsx9nwa7
Tags: 2.0.4-5
* Fixed Build-Depends.
* Add myself to Uploaders in debian/control.
* Make sure that the sources are really patched before building them.
* Build unit 'libc' on powerpc too.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Program Example53;
2
 
 
3
 
{ Program to demonstrate the S_ISLNK function. }
4
 
 
5
 
Uses oldlinux;
6
 
 
7
 
Var Info : Stat;
8
 
 
9
 
begin
10
 
  if LStat (paramstr(1),info) then
11
 
    begin
12
 
    if S_ISLNK(info.mode) then
13
 
      Writeln ('File is a link');
14
 
    if S_ISREG(info.mode) then
15
 
      Writeln ('File is a regular file');
16
 
    if S_ISDIR(info.mode) then
17
 
      Writeln ('File is a directory');
18
 
    if S_ISCHR(info.mode) then
19
 
      Writeln ('File is a character device file');
20
 
    if S_ISBLK(info.mode) then
21
 
      Writeln ('File is a block device file');
22
 
    if S_ISFIFO(info.mode) then
23
 
      Writeln ('File is a named pipe (FIFO)');
24
 
    if S_ISSOCK(info.mode) then
25
 
      Writeln ('File is a socket');
26
 
    end;
27
 
end.