sysutils.pp 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729
  1. {
  2. $Id$
  3. This file is part of the Free Pascal run time library.
  4. Copyright (c) 1999-2000 by Florian Klaempfl
  5. member of the Free Pascal development team
  6. Sysutils unit for win32
  7. See the file COPYING.FPC, included in this distribution,
  8. for details about the copyright.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  12. **********************************************************************}
  13. unit sysutils;
  14. interface
  15. {$MODE objfpc}
  16. { force ansistrings }
  17. {$H+}
  18. uses
  19. dos,windows;
  20. { Include platform independent interface part }
  21. {$i sysutilh.inc}
  22. implementation
  23. { Include platform independent implementation part }
  24. {$i sysutils.inc}
  25. {****************************************************************************
  26. File Functions
  27. ****************************************************************************}
  28. Function FileOpen (Const FileName : string; Mode : Integer) : Longint;
  29. const
  30. AccessMode: array[0..2] of Cardinal = (
  31. GENERIC_READ,
  32. GENERIC_WRITE,
  33. GENERIC_READ or GENERIC_WRITE);
  34. ShareMode: array[0..4] of Integer = (
  35. 0,
  36. 0,
  37. FILE_SHARE_READ,
  38. FILE_SHARE_WRITE,
  39. FILE_SHARE_READ or FILE_SHARE_WRITE);
  40. Var
  41. FN : string;
  42. begin
  43. FN:=FileName+#0;
  44. result := CreateFile(@FN[1], dword(AccessMode[Mode and 3]),
  45. dword(ShareMode[(Mode and $F0) shr 4]), nil, OPEN_EXISTING,
  46. FILE_ATTRIBUTE_NORMAL, 0);
  47. end;
  48. Function FileCreate (Const FileName : String) : Longint;
  49. Var
  50. FN : string;
  51. begin
  52. FN:=FileName+#0;
  53. Result := CreateFile(@FN[1], GENERIC_READ or GENERIC_WRITE,
  54. 0, nil, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0);
  55. end;
  56. Function FileRead (Handle : Longint; Var Buffer; Count : longint) : Longint;
  57. Var
  58. res : dword;
  59. begin
  60. if ReadFile(Handle, Buffer, Count, res, nil) then
  61. FileRead:=Res
  62. else
  63. FileRead:=-1;
  64. end;
  65. Function FileWrite (Handle : Longint; const Buffer; Count : Longint) : Longint;
  66. Var
  67. Res : dword;
  68. begin
  69. if WriteFile(Handle, Buffer, Count, Res, nil) then
  70. FileWrite:=Res
  71. else
  72. FileWrite:=-1;
  73. end;
  74. Function FileSeek (Handle,FOffset,Origin : Longint) : Longint;
  75. begin
  76. Result := longint(SetFilePointer(Handle, FOffset, nil, Origin));
  77. end;
  78. Function FileSeek (Handle : Longint; FOffset,Origin : Int64) : Int64;
  79. begin
  80. {$warning need to add 64bit call }
  81. Result := longint(SetFilePointer(Handle, FOffset, nil, Origin));
  82. end;
  83. Procedure FileClose (Handle : Longint);
  84. begin
  85. if Handle<=4 then
  86. exit;
  87. CloseHandle(Handle);
  88. end;
  89. Function FileTruncate (Handle,Size: Longint) : boolean;
  90. begin
  91. Result:=longint(SetFilePointer(handle,Size,nil,FILE_BEGIN))<>-1;
  92. If Result then
  93. Result:=SetEndOfFile(handle);
  94. end;
  95. Function DosToWinTime (DTime:longint;Var Wtime : TFileTime):longbool;
  96. var
  97. lft : TFileTime;
  98. begin
  99. DosToWinTime:=DosDateTimeToFileTime(longrec(dtime).hi,longrec(dtime).lo,@lft) and
  100. LocalFileTimeToFileTime(lft,@Wtime);
  101. end;
  102. Function WinToDosTime (Var Wtime : TFileTime;var DTime:longint):longbool;
  103. var
  104. lft : FileTime;
  105. begin
  106. WinToDosTime:=FileTimeToLocalFileTime(WTime,@lft) and
  107. FileTimeToDosDateTime(lft,@Longrec(Dtime).Hi,@LongRec(DTIME).lo);
  108. end;
  109. Function FileAge (Const FileName : String): Longint;
  110. var
  111. Handle: THandle;
  112. FindData: TWin32FindData;
  113. begin
  114. Handle := FindFirstFile(Pchar(FileName), @FindData);
  115. if Handle <> INVALID_HANDLE_VALUE then
  116. begin
  117. Windows.FindClose(Handle);
  118. if (FindData.dwFileAttributes and FILE_ATTRIBUTE_DIRECTORY) = 0 then
  119. If WinToDosTime(FindData.ftLastWriteTime,Result) then
  120. exit;
  121. end;
  122. Result := -1;
  123. end;
  124. Function FileExists (Const FileName : String) : Boolean;
  125. var
  126. Handle: THandle;
  127. FindData: TWin32FindData;
  128. begin
  129. Handle := FindFirstFile(Pchar(FileName), @FindData);
  130. Result:=Handle <> INVALID_HANDLE_VALUE;
  131. If Result then
  132. Windows.FindClose(Handle);
  133. end;
  134. Function FindMatch(var f: TSearchRec) : Longint;
  135. begin
  136. { Find file with correct attribute }
  137. While (F.FindData.dwFileAttributes and cardinal(F.ExcludeAttr))<>0 do
  138. begin
  139. if not FindNextFile (F.FindHandle,@F.FindData) then
  140. begin
  141. Result:=GetLastError;
  142. exit;
  143. end;
  144. end;
  145. { Convert some attributes back }
  146. WinToDosTime(F.FindData.ftLastWriteTime,F.Time);
  147. f.size:=F.FindData.NFileSizeLow;
  148. f.attr:=F.FindData.dwFileAttributes;
  149. f.Name:=StrPas(@F.FindData.cFileName);
  150. Result:=0;
  151. end;
  152. Function FindFirst (Const Path : String; Attr : Longint; Var Rslt : TSearchRec) : Longint;
  153. begin
  154. Rslt.Name:=Path;
  155. Rslt.Attr:=attr;
  156. Rslt.ExcludeAttr:=(not Attr) and ($1e);
  157. { $1e = faHidden or faSysFile or faVolumeID or faDirectory }
  158. { FindFirstFile is a Win32 Call }
  159. Rslt.FindHandle:=FindFirstFile (PChar(Path),@Rslt.FindData);
  160. If Rslt.FindHandle=Invalid_Handle_value then
  161. begin
  162. Result:=GetLastError;
  163. exit;
  164. end;
  165. { Find file with correct attribute }
  166. Result:=FindMatch(Rslt);
  167. end;
  168. Function FindNext (Var Rslt : TSearchRec) : Longint;
  169. begin
  170. if FindNextFile(Rslt.FindHandle, @Rslt.FindData) then
  171. Result := FindMatch(Rslt)
  172. else
  173. Result := GetLastError;
  174. end;
  175. Procedure FindClose (Var F : TSearchrec);
  176. begin
  177. if F.FindHandle <> INVALID_HANDLE_VALUE then
  178. Windows.FindClose(F.FindHandle);
  179. end;
  180. Function FileGetDate (Handle : Longint) : Longint;
  181. Var
  182. FT : TFileTime;
  183. begin
  184. If GetFileTime(Handle,nil,nil,@ft) and
  185. WinToDosTime(FT,Result) then
  186. exit;
  187. Result:=-1;
  188. end;
  189. Function FileSetDate (Handle,Age : Longint) : Longint;
  190. Var
  191. FT: TFileTime;
  192. begin
  193. Result := 0;
  194. if DosToWinTime(Age,FT) and
  195. SetFileTime(Handle, ft, ft, FT) then
  196. Exit;
  197. Result := GetLastError;
  198. end;
  199. Function FileGetAttr (Const FileName : String) : Longint;
  200. begin
  201. Result:=GetFileAttributes(PChar(FileName));
  202. end;
  203. Function FileSetAttr (Const Filename : String; Attr: longint) : Longint;
  204. begin
  205. if not SetFileAttributes(PChar(FileName), Attr) then
  206. Result := GetLastError
  207. else
  208. Result:=0;
  209. end;
  210. Function DeleteFile (Const FileName : String) : Boolean;
  211. begin
  212. DeleteFile:=Windows.DeleteFile(Pchar(FileName));
  213. end;
  214. Function RenameFile (Const OldName, NewName : String) : Boolean;
  215. begin
  216. Result := MoveFile(PChar(OldName), PChar(NewName));
  217. end;
  218. Function FileSearch (Const Name, DirList : String) : String;
  219. Var
  220. I : longint;
  221. Temp : String;
  222. begin
  223. { check if the file specified exists }
  224. If FileExists(Name) Then
  225. begin
  226. Result:=Name;
  227. exit;
  228. end;
  229. Result:='';
  230. temp:=Dirlist;
  231. repeat
  232. I:=pos(';',Temp);
  233. If I<>0 then
  234. begin
  235. Result:=Copy (Temp,1,i-1);
  236. system.Delete(Temp,1,I);
  237. end
  238. else
  239. begin
  240. Result:=Temp;
  241. Temp:='';
  242. end;
  243. If (result<>'') and (result[length(result)]<>'\') then
  244. Result:=Result+'\';
  245. Result:=Result+name;
  246. If not FileExists(Result) Then
  247. Result:='';
  248. until (Temp='') or (Result<>'');
  249. end;
  250. {****************************************************************************
  251. Disk Functions
  252. ****************************************************************************}
  253. function GetDiskFreeSpace(drive:pchar;var sector_cluster,bytes_sector,
  254. freeclusters,totalclusters:longint):longbool;
  255. external 'kernel32' name 'GetDiskFreeSpaceA';
  256. type
  257. TGetDiskFreeSpaceEx = function(drive:pchar;var availableforcaller,total,free):longbool;stdcall;
  258. var
  259. GetDiskFreeSpaceEx : TGetDiskFreeSpaceEx;
  260. function diskfree(drive : byte) : int64;
  261. var
  262. disk : array[1..4] of char;
  263. secs,bytes,
  264. free,total : longint;
  265. qwtotal,qwfree,qwcaller : int64;
  266. begin
  267. if drive=0 then
  268. begin
  269. disk[1]:='\';
  270. disk[2]:=#0;
  271. end
  272. else
  273. begin
  274. disk[1]:=chr(drive+64);
  275. disk[2]:=':';
  276. disk[3]:='\';
  277. disk[4]:=#0;
  278. end;
  279. if assigned(GetDiskFreeSpaceEx) then
  280. begin
  281. if GetDiskFreeSpaceEx(@disk,qwcaller,qwtotal,qwfree) then
  282. diskfree:=qwfree
  283. else
  284. diskfree:=-1;
  285. end
  286. else
  287. begin
  288. if GetDiskFreeSpace(@disk,secs,bytes,free,total) then
  289. diskfree:=int64(free)*secs*bytes
  290. else
  291. diskfree:=-1;
  292. end;
  293. end;
  294. function disksize(drive : byte) : int64;
  295. var
  296. disk : array[1..4] of char;
  297. secs,bytes,
  298. free,total : longint;
  299. qwtotal,qwfree,qwcaller : int64;
  300. begin
  301. if drive=0 then
  302. begin
  303. disk[1]:='\';
  304. disk[2]:=#0;
  305. end
  306. else
  307. begin
  308. disk[1]:=chr(drive+64);
  309. disk[2]:=':';
  310. disk[3]:='\';
  311. disk[4]:=#0;
  312. end;
  313. if assigned(GetDiskFreeSpaceEx) then
  314. begin
  315. if GetDiskFreeSpaceEx(@disk,qwcaller,qwtotal,qwfree) then
  316. disksize:=qwtotal
  317. else
  318. disksize:=-1;
  319. end
  320. else
  321. begin
  322. if GetDiskFreeSpace(@disk,secs,bytes,free,total) then
  323. disksize:=int64(total)*secs*bytes
  324. else
  325. disksize:=-1;
  326. end;
  327. end;
  328. Function GetCurrentDir : String;
  329. begin
  330. GetDir(0, result);
  331. end;
  332. Function SetCurrentDir (Const NewDir : String) : Boolean;
  333. begin
  334. {$I-}
  335. ChDir(NewDir);
  336. {$I+}
  337. result := (IOResult = 0);
  338. end;
  339. Function CreateDir (Const NewDir : String) : Boolean;
  340. begin
  341. {$I-}
  342. MkDir(NewDir);
  343. {$I+}
  344. result := (IOResult = 0);
  345. end;
  346. Function RemoveDir (Const Dir : String) : Boolean;
  347. begin
  348. {$I-}
  349. RmDir(Dir);
  350. {$I+}
  351. result := (IOResult = 0);
  352. end;
  353. {****************************************************************************
  354. Time Functions
  355. ****************************************************************************}
  356. Procedure GetLocalTime(var SystemTime: TSystemTime);
  357. Var
  358. Syst : Windows.TSystemtime;
  359. begin
  360. windows.Getlocaltime(@syst);
  361. SystemTime.year:=syst.wYear;
  362. SystemTime.month:=syst.wMonth;
  363. SystemTime.day:=syst.wDay;
  364. SystemTime.hour:=syst.wHour;
  365. SystemTime.minute:=syst.wMinute;
  366. SystemTime.second:=syst.wSecond;
  367. SystemTime.millisecond:=syst.wMilliSeconds;
  368. end;
  369. {****************************************************************************
  370. Misc Functions
  371. ****************************************************************************}
  372. procedure Beep;
  373. begin
  374. MessageBeep(0);
  375. end;
  376. {****************************************************************************
  377. Locale Functions
  378. ****************************************************************************}
  379. Procedure InitAnsi;
  380. Var
  381. i : longint;
  382. begin
  383. { Fill table entries 0 to 127 }
  384. for i := 0 to 96 do
  385. UpperCaseTable[i] := chr(i);
  386. for i := 97 to 122 do
  387. UpperCaseTable[i] := chr(i - 32);
  388. for i := 123 to 191 do
  389. UpperCaseTable[i] := chr(i);
  390. Move (CPISO88591UCT,UpperCaseTable[192],SizeOf(CPISO88591UCT));
  391. for i := 0 to 64 do
  392. LowerCaseTable[i] := chr(i);
  393. for i := 65 to 90 do
  394. LowerCaseTable[i] := chr(i + 32);
  395. for i := 91 to 191 do
  396. LowerCaseTable[i] := chr(i);
  397. Move (CPISO88591LCT,UpperCaseTable[192],SizeOf(CPISO88591UCT));
  398. end;
  399. function GetLocaleStr(LID, LT: Longint; const Def: string): ShortString;
  400. var
  401. L: Integer;
  402. Buf: array[0..255] of Char;
  403. begin
  404. L := GetLocaleInfo(LID, LT, Buf, SizeOf(Buf));
  405. if L > 0 then
  406. SetString(Result, @Buf[0], L - 1)
  407. else
  408. Result := Def;
  409. end;
  410. function GetLocaleChar(LID, LT: Longint; Def: Char): Char;
  411. var
  412. Buf: array[0..1] of Char;
  413. begin
  414. if GetLocaleInfo(LID, LT, Buf, 2) > 0 then
  415. Result := Buf[0]
  416. else
  417. Result := Def;
  418. end;
  419. Function GetLocaleInt(LID,TP,Def: LongInt): LongInt;
  420. Var
  421. S: String;
  422. C: Integer;
  423. Begin
  424. S:=GetLocaleStr(LID,TP,'0');
  425. Val(S,Result,C);
  426. If C<>0 Then
  427. Result:=Def;
  428. End;
  429. procedure GetFormatSettings;
  430. var
  431. HF : Shortstring;
  432. LID : LCID;
  433. I,Day,DateOrder : longint;
  434. begin
  435. LID := GetThreadLocale;
  436. { Date stuff }
  437. for I := 1 to 12 do
  438. begin
  439. ShortMonthNames[I]:=GetLocaleStr(LID,LOCALE_SABBREVMONTHNAME1+I-1,ShortMonthNames[i]);
  440. LongMonthNames[I]:=GetLocaleStr(LID,LOCALE_SMONTHNAME1+I-1,LongMonthNames[i]);
  441. end;
  442. for I := 1 to 7 do
  443. begin
  444. Day := (I + 5) mod 7;
  445. ShortDayNames[I]:=GetLocaleStr(LID,LOCALE_SABBREVDAYNAME1+Day,ShortDayNames[i]);
  446. LongDayNames[I]:=GetLocaleStr(LID,LOCALE_SDAYNAME1+Day,LongDayNames[i]);
  447. end;
  448. DateSeparator := GetLocaleChar(LID, LOCALE_SDATE, '/');
  449. DateOrder := GetLocaleInt(LID, LOCALE_IDate, 0);
  450. Case DateOrder Of
  451. 1: Begin
  452. ShortDateFormat := 'dd/mm/yyyy';
  453. LongDateFormat := 'dddd, d. mmmm yyyy';
  454. End;
  455. 2: Begin
  456. ShortDateFormat := 'yyyy/mm/dd';
  457. LongDateFormat := 'dddd, yyyy mmmm d.';
  458. End;
  459. else
  460. // Default american settings...
  461. ShortDateFormat := 'mm/dd/yyyy';
  462. LongDateFormat := 'dddd, mmmm d. yyyy';
  463. End;
  464. { Time stuff }
  465. TimeSeparator := GetLocaleChar(LID, LOCALE_STIME, ':');
  466. TimeAMString := GetLocaleStr(LID, LOCALE_S1159, 'AM');
  467. TimePMString := GetLocaleStr(LID, LOCALE_S2359, 'PM');
  468. if StrToIntDef(GetLocaleStr(LID, LOCALE_ITLZERO, '0'), 0) = 0 then
  469. HF:='h'
  470. else
  471. HF:='hh';
  472. // No support for 12 hour stuff at the moment...
  473. ShortTimeFormat := HF+':mm';
  474. LongTimeFormat := HF + ':mm:ss';
  475. { Currency stuff }
  476. CurrencyString:=GetLocaleStr(LID, LOCALE_SCURRENCY, '');
  477. CurrencyFormat:=StrToIntDef(GetLocaleStr(LID, LOCALE_ICURRENCY, '0'), 0);
  478. NegCurrFormat:=StrToIntDef(GetLocaleStr(LID, LOCALE_INEGCURR, '0'), 0);
  479. { Number stuff }
  480. ThousandSeparator:=GetLocaleChar(LID, LOCALE_STHOUSAND, ',');
  481. DecimalSeparator:=GetLocaleChar(LID, LOCALE_SDECIMAL, '.');
  482. CurrencyDecimals:=StrToIntDef(GetLocaleStr(LID, LOCALE_ICURRDIGITS, '0'), 0);
  483. end;
  484. Procedure InitInternational;
  485. begin
  486. InitAnsi;
  487. GetFormatSettings;
  488. end;
  489. {****************************************************************************
  490. Target Dependent
  491. ****************************************************************************}
  492. function FormatMessageA(dwFlags : DWORD;
  493. lpSource : Pointer;
  494. dwMessageId : DWORD;
  495. dwLanguageId: DWORD;
  496. lpBuffer : PCHAR;
  497. nSize : DWORD;
  498. Arguments : Pointer): DWORD; external 'kernel32' name 'FormatMessageA';
  499. function SysErrorMessage(ErrorCode: Integer): String;
  500. const
  501. MaxMsgSize = Format_Message_Max_Width_Mask;
  502. var
  503. MsgBuffer: pChar;
  504. begin
  505. GetMem(MsgBuffer, MaxMsgSize);
  506. FillChar(MsgBuffer^, MaxMsgSize, #0);
  507. FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM,
  508. nil,
  509. ErrorCode,
  510. MakeLangId(LANG_NEUTRAL, SUBLANG_DEFAULT),
  511. MsgBuffer, { This function allocs the memory }
  512. MaxMsgSize, { Maximum message size }
  513. nil);
  514. SysErrorMessage := StrPas(MsgBuffer);
  515. FreeMem(MsgBuffer, MaxMsgSize);
  516. end;
  517. {****************************************************************************
  518. Initialization code
  519. ****************************************************************************}
  520. Function GetEnvironmentVariable(Const EnvVar : String) : String;
  521. var
  522. s : string;
  523. i : longint;
  524. hp,p : pchar;
  525. begin
  526. Result:='';
  527. p:=GetEnvironmentStrings;
  528. hp:=p;
  529. while hp^<>#0 do
  530. begin
  531. s:=strpas(hp);
  532. i:=pos('=',s);
  533. if upcase(copy(s,1,i-1))=upcase(envvar) then
  534. begin
  535. Result:=copy(s,i+1,length(s)-i);
  536. break;
  537. end;
  538. { next string entry}
  539. hp:=hp+strlen(hp)+1;
  540. end;
  541. FreeEnvironmentStrings(p);
  542. end;
  543. {****************************************************************************
  544. Initialization code
  545. ****************************************************************************}
  546. var
  547. versioninfo : OSVERSIONINFO;
  548. kernel32dll : THandle;
  549. function FreeLibrary(hLibModule : THANDLE) : longbool;
  550. external 'kernel32' name 'FreeLibrary';
  551. function GetVersionEx(var VersionInformation:OSVERSIONINFO) : longbool;
  552. external 'kernel32' name 'GetVersionExA';
  553. function LoadLibrary(lpLibFileName : pchar):THandle;
  554. external 'kernel32' name 'LoadLibraryA';
  555. function GetProcAddress(hModule : THandle;lpProcName : pchar) : pointer;
  556. external 'kernel32' name 'GetProcAddress';
  557. Initialization
  558. InitExceptions; { Initialize exceptions. OS independent }
  559. InitInternational; { Initialize internationalization settings }
  560. versioninfo.dwOSVersionInfoSize:=sizeof(versioninfo);
  561. GetVersionEx(versioninfo);
  562. kernel32dll:=0;
  563. GetDiskFreeSpaceEx:=nil;
  564. if ((versioninfo.dwPlatformId=VER_PLATFORM_WIN32_WINDOWS) and
  565. (versioninfo.dwBuildNUmber>=1000)) or
  566. (versioninfo.dwPlatformId=VER_PLATFORM_WIN32_NT) then
  567. begin
  568. kernel32dll:=LoadLibrary('kernel32');
  569. if kernel32dll<>0 then
  570. GetDiskFreeSpaceEx:=TGetDiskFreeSpaceEx(GetProcAddress(kernel32dll,'GetDiskFreeSpaceExA'));
  571. end;
  572. Finalization
  573. DoneExceptions;
  574. if kernel32dll<>0 then
  575. FreeLibrary(kernel32dll);
  576. end.
  577. {
  578. $Log$
  579. Revision 1.11 2001-12-11 23:10:18 carl
  580. * Range check error fix
  581. Revision 1.10 2001/10/25 21:23:49 peter
  582. * added 64bit fileseek
  583. Revision 1.9 2001/06/03 15:18:01 peter
  584. * eoutofmemory and einvalidpointer fix
  585. Revision 1.8 2001/05/20 12:08:36 peter
  586. * fixed filesearch
  587. Revision 1.7 2001/04/16 10:57:05 peter
  588. * stricter compiler fixes
  589. Revision 1.6 2001/02/20 22:14:19 peter
  590. * merged getenvironmentvariable
  591. Revision 1.5 2000/12/18 17:28:58 jonas
  592. * fixed range check errors
  593. Revision 1.4 2000/09/19 23:57:57 pierre
  594. * bug fix for 1041 (merged)
  595. Revision 1.3 2000/08/29 18:01:52 michael
  596. Merged syserrormsg fix
  597. Revision 1.2 2000/08/20 15:46:46 peter
  598. * sysutils.pp moved to target and merged with disk.inc, filutil.inc
  599. Revision 1.1.2.3 2000/08/22 19:21:49 michael
  600. + Implemented syserrormessage. Made dummies for go32v2 and OS/2
  601. * Changed linux/errors.pp so it uses pchars for storage.
  602. Revision 1.1.2.2 2000/08/20 15:40:03 peter
  603. * syserrormessage function added
  604. Revision 1.1.2.1 2000/08/20 15:08:32 peter
  605. * forgot the add command :(
  606. }