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

« back to all changes in this revision

Viewing changes to rtl/objpas/sysutils/osutilsh.inc

  • 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: osutilsh.inc,v 1.6 2004/02/13 13:02:21 marco Exp $
 
2
    $Id: osutilsh.inc,v 1.10 2005/02/14 17:13:31 peter Exp $
3
3
    This file is part of the Free Pascal run time library.
4
4
    Copyright (c) 1999-2000 by Michael Van Canneyt
5
5
    member of the Free Pascal development team
16
16
{ OS handling utilities }
17
17
 
18
18
{$ifdef HAS_OSERROR}
19
 
Function GetLastOSError : Integer; 
 
19
Function GetLastOSError : Integer;
20
20
{$endif}
21
21
Procedure RaiseLastOSError;
22
22
Function GetEnvironmentVariable(Const EnvVar : String) : String;
 
23
Function GetEnvironmentVariableCount : Integer;
 
24
Function GetEnvironmentString(Index : Integer) : String;
23
25
{$IFDEF HAS_SLEEP}
24
26
procedure Sleep(milliseconds: Cardinal);
25
27
{$ENDIF}
26
28
function ExecuteProcess(Const Path: AnsiString; Const ComLine: AnsiString):integer;
27
29
function ExecuteProcess(Const Path: AnsiString; Const ComLine: Array of AnsiString):integer;
28
30
 
 
31
 
 
32
Function GetTempDir(Global : Boolean) : String;
 
33
Function GetTempDir : String;
 
34
Function GetTempFileName(Const Dir,Prefix : String) : String;
 
35
Function GetTempFileName : String;
 
36
Function GetAppConfigDir(Global : Boolean) : String;
 
37
Function GetAppConfigFile(Global : Boolean) : String;
 
38
Function GetAppConfigFile(Global : Boolean; SubDir : Boolean) : String;
 
39
Function ApplicationName : String;
 
40
 
 
41
Const
 
42
  ConfigExtension : String = '.cfg';
 
43
  SysConfigDir    : String = '';
 
44
 
 
45
Type
 
46
  TGetAppNameEvent  = Function : String;
 
47
  TGetTempDirEvent  = Function (Global : Boolean) : String;
 
48
  TGetTempFileEvent = Function (Const Dir,Prefix : String) : String;
 
49
 
 
50
Var
 
51
  OnGetApplicationName : TGetAppNameEvent;
 
52
  OnGetTempDir         : TGetTempDirEvent;
 
53
  OnGetTempFile        : TGetTempFileEvent;
 
54
 
 
55
 
29
56
{
30
57
  $Log: osutilsh.inc,v $
31
 
  Revision 1.6  2004/02/13 13:02:21  marco
32
 
   * addition of second executeprocess prototype
33
 
 
34
 
  Revision 1.5  2004/02/08 11:02:40  michael
35
 
  + Implemented RaiseLastOSError
36
 
 
37
 
  Revision 1.4  2004/01/10 17:34:36  michael
38
 
  + Implemented sleep() on Unix.
39
 
 
40
 
  Revision 1.3  2004/01/05 22:37:24  florian
41
 
    * changed sysutils.exec to ExecuteProcess
42
 
 
43
 
  Revision 1.2  2004/01/03 08:55:58  marco
44
 
   * Exec(ansistring) function
45
 
 
46
 
  Revision 1.1  2003/10/06 21:01:06  peter
47
 
    * moved classes unit to rtl
48
 
 
49
 
  Revision 1.3  2002/09/07 16:01:22  peter
50
 
    * old logs removed and tabs fixed
51
 
 
52
 
}
 
 
b'\\ No newline at end of file'
 
58
  Revision 1.10  2005/02/14 17:13:31  peter
 
59
    * truncate log
 
60
 
 
61
}