2
0

syslinux.pp 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797
  1. {
  2. $Id$
  3. This file is part of the Free Pascal run time library.
  4. Copyright (c) 1993,97 by Michael Van Canneyt,
  5. member of the Free Pascal development team.
  6. See the file COPYING.FPC, included in this distribution,
  7. for details about the copyright.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. **********************************************************************}
  12. { These things are set in the makefile, }
  13. { But you can override them here.}
  14. { If you want to link to the C library, set the conditional crtlib }
  15. { $define crtlib}
  16. { If you use an aout system, set the conditional AOUT}
  17. { $Define AOUT}
  18. Unit SysLinux;
  19. {$I os.inc}
  20. Interface
  21. {$ifdef m68k}
  22. { used for single computations }
  23. const
  24. BIAS4 = $7f-1;
  25. {$endif}
  26. {$I systemh.inc}
  27. {$I heaph.inc}
  28. const
  29. UnusedHandle = -1;
  30. StdInputHandle = 0;
  31. StdOutputHandle = 1;
  32. StdErrorHandle = 2;
  33. var
  34. argc : longint;
  35. argv : ppchar;
  36. envp : ppchar;
  37. Implementation
  38. {$I system.inc}
  39. {$ifdef crtlib}
  40. Procedure _rtl_exit(l: longint); cdecl;
  41. Function _rtl_paramcount: longint; cdecl;
  42. Procedure _rtl_paramstr(st: pchar; l: longint); cdecl;
  43. Function _rtl_open(f: pchar; flags: longint): longint; cdecl;
  44. Procedure _rtl_close(h: longint); cdecl;
  45. Procedure _rtl_write(h: longint; addr: longInt; len : longint); cdecl;
  46. Procedure _rtl_erase(p: pchar); cdecl;
  47. Procedure _rtl_rename(p1: pchar; p2 : pchar); cdecl;
  48. Function _rtl_read(h: longInt; addr: longInt; len : longint) : longint; cdecl;
  49. Function _rtl_filepos(Handle: longint): longint; cdecl;
  50. Procedure _rtl_seek(Handle: longint; pos:longint); cdecl;
  51. Function _rtl_filesize(Handle:longint): longInt; cdecl;
  52. Procedure _rtl_rmdir(buffer: pchar); cdecl;
  53. Procedure _rtl_mkdir(buffer: pchar); cdecl;
  54. Procedure _rtl_chdir(buffer: pchar); cdecl;
  55. {$else}
  56. { used in syscall to report errors.}
  57. var
  58. Errno : longint;
  59. { Include constant and type definitions }
  60. {$i errno.inc } { Error numbers }
  61. {$i sysnr.inc } { System call numbers }
  62. {$i sysconst.inc } { Miscellaneous constants }
  63. {$i systypes.inc } { Types needed for system calls }
  64. { Read actual system call definitions. }
  65. {$i syscalls.inc }
  66. {$endif}
  67. {*****************************************************************************
  68. Misc. System Dependent Functions
  69. *****************************************************************************}
  70. {$ifdef i386}
  71. {$ASMMODE DIRECT}
  72. {$endif}
  73. Procedure Halt(ErrNum: Byte);
  74. Begin
  75. ExitCode:=Errnum;
  76. Do_Exit;
  77. {$ifdef i386}
  78. asm
  79. jmp _haltproc
  80. end;
  81. {$else}
  82. asm
  83. jmp _haltproc
  84. end;
  85. {$endif}
  86. End;
  87. Function ParamCount: Longint;
  88. Begin
  89. {$ifdef crtlib}
  90. ParamCount:=_rtl_paramcount;
  91. {$else}
  92. Paramcount:=argc-1
  93. {$endif}
  94. End;
  95. Function ParamStr(l: Longint): String;
  96. Var
  97. {$ifndef crtlib}
  98. i : longint;
  99. pp : ppchar;
  100. {$else}
  101. b : Array[0..255] of Char;
  102. {$endif}
  103. Begin
  104. {$ifdef crtlib}
  105. _rtl_paramstr(@b, l);
  106. ParamStr:=StrPas(b);
  107. {$else}
  108. if l>argc then
  109. begin
  110. paramstr:='';
  111. exit
  112. end;
  113. pp:=argv;
  114. i:=0;
  115. while (i<l) and (pp^<>nil) do
  116. begin
  117. pp:=pp+4;
  118. inc(i);
  119. end;
  120. if pp^<>nil then
  121. Paramstr:=StrPas(pp^)
  122. else
  123. ParamStr:='';
  124. {$endif}
  125. End;
  126. Procedure Randomize;
  127. Begin
  128. {$ifdef crtlib}
  129. _rtl_gettime(longint(@randseed));
  130. {$else}
  131. randseed:=sys_time;
  132. {$endif}
  133. End;
  134. {*****************************************************************************
  135. Heap Management
  136. *****************************************************************************}
  137. function getheapstart:pointer;assembler;
  138. {$ifdef i386}
  139. asm
  140. leal HEAP,%eax
  141. end ['EAX'];
  142. {$else}
  143. asm
  144. lea.l HEAP,a0
  145. move.l a0,d0
  146. end;
  147. {$endif}
  148. function getheapsize:longint;assembler;
  149. {$ifdef i386}
  150. asm
  151. movl HEAPSIZE,%eax
  152. end ['EAX'];
  153. {$else}
  154. asm
  155. move.l HEAP_SIZE,d0
  156. end ['D0'];
  157. {$endif}
  158. { ___fpc_brk_addr is defined and allocated in prt1.as }
  159. Function Get_Brk_addr : longint;assembler;
  160. {$ifdef i386}
  161. asm
  162. movl ___fpc_brk_addr,%eax
  163. end ['EAX'];
  164. {$else}
  165. asm
  166. move.l ___fpc_brk_addr,d0
  167. end ['D0'];
  168. {$endif}
  169. Procedure Set_brk_addr (NewAddr : longint);assembler;
  170. {$ifdef i386}
  171. asm
  172. movl NewAddr,%eax
  173. movl %eax,___fpc_brk_addr
  174. end ['EAX'];
  175. {$else}
  176. asm
  177. move.l NewAddr,d0
  178. move.l d0,___fpc_brk_addr
  179. end ['D0'];
  180. {$endif}
  181. {$ifdef i386}
  182. {$ASMMODE ATT}
  183. {$endif}
  184. Function brk(Location : longint) : Longint;
  185. { set end of data segment to location }
  186. var
  187. t : syscallregs;
  188. dummy : longint;
  189. begin
  190. t.reg2:=Location;
  191. dummy:=syscall(syscall_nr_brk,t);
  192. set_brk_addr(dummy);
  193. brk:=dummy;
  194. end;
  195. Function init_brk : longint;
  196. begin
  197. if Get_Brk_addr=0 then
  198. begin
  199. Set_brk_addr(brk(0));
  200. if Get_brk_addr=0 then
  201. exit(-1);
  202. end;
  203. init_brk:=0;
  204. end;
  205. Function sbrk(size : longint) : Longint;
  206. var
  207. Temp : longint;
  208. begin
  209. if init_brk=0 then
  210. begin
  211. Temp:=Get_Brk_Addr+size;
  212. if brk(temp)=-1 then
  213. exit(-1);
  214. if Get_brk_addr=temp then
  215. exit(temp-size);
  216. end;
  217. exit(-1);
  218. end;
  219. { include standard heap management }
  220. {$I heap.inc}
  221. {*****************************************************************************
  222. Low Level File Routines
  223. *****************************************************************************}
  224. {
  225. The lowlevel file functions should take care of setting the InOutRes to the
  226. correct value if an error has occured, else leave it untouched
  227. }
  228. Procedure Errno2Inoutres;
  229. {
  230. Convert ErrNo error to the correct Inoutres value
  231. }
  232. begin
  233. if ErrNo=0 then { Else it will go through all the cases }
  234. exit;
  235. case ErrNo of
  236. Sys_ENFILE,
  237. Sys_EMFILE : Inoutres:=4;
  238. Sys_ENOENT : Inoutres:=2;
  239. Sys_EBADF : Inoutres:=6;
  240. Sys_ENOMEM,
  241. Sys_EFAULT : Inoutres:=217;
  242. Sys_EINVAL : Inoutres:=218;
  243. Sys_EPIPE,
  244. Sys_EINTR,
  245. Sys_EIO,
  246. Sys_EAGAIN,
  247. Sys_ENOSPC : Inoutres:=101;
  248. Sys_ENAMETOOLONG,
  249. Sys_ELOOP,
  250. Sys_ENOTDIR : Inoutres:=3;
  251. Sys_EROFS,
  252. Sys_EEXIST,
  253. Sys_EACCES : Inoutres:=5;
  254. Sys_ETXTBSY : Inoutres:=162;
  255. end;
  256. end;
  257. Procedure Do_Close(Handle:Longint);
  258. Begin
  259. {$ifdef crtlib}
  260. _rtl_close(Handle);
  261. {$else}
  262. sys_close(Handle);
  263. {$endif}
  264. End;
  265. Procedure Do_Erase(p:pchar);
  266. Begin
  267. {$ifdef crtlib}
  268. _rtl_erase(p);
  269. {$else}
  270. sys_unlink(p);
  271. Errno2Inoutres;
  272. {$endif}
  273. End;
  274. Procedure Do_Rename(p1,p2:pchar);
  275. Begin
  276. {$ifdef crtlib}
  277. _rtl_rename(p1,p2);
  278. {$else }
  279. sys_rename(p1,p2);
  280. Errno2Inoutres;
  281. {$endif}
  282. End;
  283. Function Do_Write(Handle,Addr,Len:Longint):longint;
  284. Begin
  285. {$ifdef crtlib}
  286. _rtl_write(Handle,addr,len);
  287. Do_Write:=Len;
  288. {$else}
  289. Do_Write:=sys_write(Handle,pchar(addr),len);
  290. Errno2Inoutres;
  291. {$endif}
  292. if Do_Write<0 then
  293. Do_Write:=0;
  294. End;
  295. Function Do_Read(Handle,Addr,Len:Longint):Longint;
  296. Begin
  297. {$ifdef crtlib}
  298. Do_Read:=_rtl_read(Handle,addr,len);
  299. {$else}
  300. Do_Read:=sys_read(Handle,pchar(addr),len);
  301. Errno2Inoutres;
  302. {$endif}
  303. if Do_Read<0 then
  304. Do_Read:=0;
  305. End;
  306. Function Do_FilePos(Handle: Longint): Longint;
  307. Begin
  308. {$ifdef crtlib}
  309. Do_FilePos:=_rtl_filepos(Handle);
  310. {$else}
  311. Do_FilePos:=sys_lseek(Handle, 0, Seek_Cur);
  312. Errno2Inoutres;
  313. {$endif}
  314. End;
  315. Procedure Do_Seek(Handle,Pos:Longint);
  316. Begin
  317. {$ifdef crtlib}
  318. _rtl_seek(Handle, Pos);
  319. {$else}
  320. sys_lseek(Handle, pos, Seek_set);
  321. {$endif}
  322. End;
  323. Function Do_SeekEnd(Handle:Longint): Longint;
  324. begin
  325. {$ifdef crtlib}
  326. Do_SeekEnd:=_rtl_filesize(Handle);
  327. {$else}
  328. Do_SeekEnd:=sys_lseek(Handle,0,Seek_End);
  329. {$endif}
  330. end;
  331. Function Do_FileSize(Handle:Longint): Longint;
  332. {$ifndef crtlib}
  333. var
  334. regs : Syscallregs;
  335. Info : Stat;
  336. {$endif}
  337. Begin
  338. {$ifdef crtlib}
  339. Do_FileSize:=_rtl_filesize(Handle);
  340. {$else}
  341. regs.reg2:=Handle;
  342. regs.reg3:=longint(@Info);
  343. if SysCall(SysCall_nr_fstat,regs)=0 then
  344. Do_FileSize:=Info.Size
  345. else
  346. Do_FileSize:=0;
  347. Errno2Inoutres;
  348. {$endif}
  349. End;
  350. Procedure Do_Truncate(Handle,Pos:longint);
  351. {$ifndef crtlib}
  352. var
  353. sr : syscallregs;
  354. {$endif}
  355. begin
  356. {$ifndef crtlib}
  357. sr.reg2:=Handle;
  358. sr.reg3:=Pos;
  359. syscall(syscall_nr_ftruncate,sr);
  360. Errno2Inoutres;
  361. {$endif}
  362. end;
  363. Procedure Do_Open(var f;p:pchar;flags:longint);
  364. {
  365. FileRec and textrec have both Handle and mode as the first items so
  366. they could use the same routine for opening/creating.
  367. when (flags and $10) the file will be append
  368. when (flags and $100) the file will be truncate/rewritten
  369. when (flags and $1000) there is no check for close (needed for textfiles)
  370. }
  371. var
  372. {$ifndef crtlib}
  373. oflags : longint;
  374. {$endif}
  375. Begin
  376. { close first if opened }
  377. if ((flags and $1000)=0) then
  378. begin
  379. case FileRec(f).mode of
  380. fminput,fmoutput,fminout : Do_Close(FileRec(f).Handle);
  381. fmclosed : ;
  382. else
  383. begin
  384. inoutres:=102; {not assigned}
  385. exit;
  386. end;
  387. end;
  388. end;
  389. { reset file Handle }
  390. FileRec(f).Handle:=UnusedHandle;
  391. { We do the conversion of filemodes here, concentrated on 1 place }
  392. case (flags and 3) of
  393. 0 : begin
  394. oflags :=Open_RDONLY;
  395. FileRec(f).mode:=fminput;
  396. end;
  397. 1 : begin
  398. oflags :=Open_WRONLY;
  399. FileRec(f).mode:=fmoutput;
  400. end;
  401. 2 : begin
  402. oflags :=Open_RDWR;
  403. FileRec(f).mode:=fminout;
  404. end;
  405. end;
  406. if (flags and $100)=$100 then
  407. oflags:=oflags or (Open_CREAT or Open_TRUNC)
  408. else
  409. if (flags and $10)=$10 then
  410. oflags:=oflags or (Open_APPEND);
  411. { empty name is special }
  412. if p[0]=#0 then
  413. begin
  414. case FileRec(f).mode of
  415. fminput : FileRec(f).Handle:=StdInputHandle;
  416. fmoutput,
  417. fmappend : begin
  418. FileRec(f).Handle:=StdOutputHandle;
  419. FileRec(f).mode:=fmoutput; {fool fmappend}
  420. end;
  421. end;
  422. exit;
  423. end;
  424. { real open call }
  425. {$ifdef crtlib}
  426. FileRec(f).Handle:=_rtl_open(p, oflags);
  427. if FileRec(f).Handle<0 then
  428. InOutRes:=2
  429. else
  430. InOutRes:=0;
  431. {$else}
  432. FileRec(f).Handle:=sys_open(p,oflags,438);
  433. if (ErrNo=Sys_EROFS) and ((OFlags and Open_RDWR)<>0) then
  434. begin
  435. Oflags:=Oflags and not(Open_RDWR);
  436. FileRec(f).Handle:=sys_open(p,oflags,438);
  437. end;
  438. Errno2Inoutres;
  439. {$endif}
  440. End;
  441. Function Do_IsDevice(Handle:Longint):boolean;
  442. {
  443. Interface to Unix ioctl call.
  444. Performs various operations on the filedescriptor Handle.
  445. Ndx describes the operation to perform.
  446. Data points to data needed for the Ndx function. The structure of this
  447. data is function-dependent.
  448. }
  449. var
  450. sr: SysCallRegs;
  451. Data : array[0..255] of byte; {Large enough for termios info}
  452. begin
  453. sr.reg2:=Handle;
  454. sr.reg3:=$5401; {=TCGETS}
  455. sr.reg4:=Longint(@Data);
  456. Do_IsDevice:=(SysCall(Syscall_nr_ioctl,sr)=0);
  457. end;
  458. {*****************************************************************************
  459. UnTyped File Handling
  460. *****************************************************************************}
  461. {$i file.inc}
  462. {*****************************************************************************
  463. Typed File Handling
  464. *****************************************************************************}
  465. {$i typefile.inc}
  466. {*****************************************************************************
  467. Text File Handling
  468. *****************************************************************************}
  469. {$DEFINE SHORT_LINEBREAK}
  470. {$DEFINE EXTENDED_EOF}
  471. {$i text.inc}
  472. {*****************************************************************************
  473. Directory Handling
  474. *****************************************************************************}
  475. Procedure MkDir(Const s: String);[IOCheck];
  476. Var
  477. Buffer: Array[0..255] of Char;
  478. Begin
  479. If InOutRes <> 0 then exit;
  480. Move(s[1], Buffer, Length(s));
  481. Buffer[Length(s)] := #0;
  482. {$ifdef crtlib}
  483. _rtl_mkdir(@buffer);
  484. {$else}
  485. sys_mkdir(@buffer, 511);
  486. Errno2Inoutres;
  487. {$endif}
  488. End;
  489. Procedure RmDir(Const s: String);[IOCheck];
  490. Var
  491. Buffer: Array[0..255] of Char;
  492. Begin
  493. If InOutRes <> 0 then exit;
  494. Move(s[1], Buffer, Length(s));
  495. Buffer[Length(s)] := #0;
  496. {$ifdef crtlib}
  497. _rtl_rmdir(@buffer);
  498. {$else}
  499. sys_rmdir(@buffer);
  500. Errno2Inoutres;
  501. {$endif}
  502. End;
  503. Procedure ChDir(Const s: String);[IOCheck];
  504. Var
  505. Buffer: Array[0..255] of Char;
  506. Begin
  507. If InOutRes <> 0 then exit;
  508. Move(s[1], Buffer, Length(s));
  509. Buffer[Length(s)] := #0;
  510. {$ifdef crtlib}
  511. _rtl_chdir(@buffer);
  512. {$else}
  513. sys_chdir(@buffer);
  514. Errno2Inoutres;
  515. {$endif}
  516. End;
  517. procedure getdir(drivenr : byte;var dir : shortstring);
  518. {$ifndef crtlib}
  519. var
  520. thisdir : stat;
  521. rootino,
  522. thisino,
  523. dotdotino : longint;
  524. rootdev,
  525. thisdev,
  526. dotdotdev : word;
  527. thedir,dummy : string[255];
  528. dirstream : pdir;
  529. d : pdirent;
  530. mountpoint : boolean;
  531. predot : string[255];
  532. procedure dodispose (p : pdir);
  533. begin
  534. dispose (p^.buf);
  535. dispose (p)
  536. end;
  537. {$endif}
  538. begin
  539. drivenr:=0;
  540. dir:='';
  541. {$ifndef crtlib}
  542. thedir:='/'#0;
  543. if sys_stat(@thedir[1],thisdir)<0 then
  544. exit;
  545. rootino:=thisdir.ino;
  546. rootdev:=thisdir.dev;
  547. thedir:='.'#0;
  548. if sys_stat(@thedir[1],thisdir)<0 then
  549. exit;
  550. thisino:=thisdir.ino;
  551. thisdev:=thisdir.dev;
  552. { Now we can uniquely identify the current and root dir }
  553. thedir:='';
  554. predot:='';
  555. while not ((thisino=rootino) and (thisdev=rootdev)) do
  556. begin
  557. { Are we on a mount point ? }
  558. dummy:=predot+'..'#0;
  559. if sys_stat(@dummy[1],thisdir)<0 then
  560. exit;
  561. dotdotino:=thisdir.ino;
  562. dotdotdev:=thisdir.dev;
  563. mountpoint:=(thisdev<>dotdotdev);
  564. { Now, Try to find the name of this dir in the previous one }
  565. dirstream:=opendir (@dummy[1]);
  566. if dirstream=nil then
  567. exit;
  568. repeat
  569. d:=sys_readdir (dirstream);
  570. if (d<>nil) and
  571. (not ((d^.name[0]='.') and ((d^.name[1]=#0) or ((d^.name[1]='.') and (d^.name[2]=#0))))) and
  572. (mountpoint or (d^.ino=thisino)) then
  573. begin
  574. dummy:=predot+'../'+strpas(@(d^.name[0]))+#0;
  575. if sys_stat (@(dummy[1]),thisdir)<0 then
  576. d:=nil;
  577. end;
  578. until (d=nil) or ((thisdir.dev=thisdev) and (thisdir.ino=thisino) );
  579. if (closedir (dirstream)<0) or (d=nil) then
  580. begin
  581. dodispose (dirstream);
  582. exit;
  583. end;
  584. { At this point, d.name contains the name of the current dir}
  585. thedir:='/'+strpas(@(d^.name[0]))+thedir;
  586. thisdev:=dotdotdev;
  587. thisino:=dotdotino;
  588. predot:=predot+'../';
  589. { We don't want to clutter op the heap with DIR records... }
  590. dodispose (dirstream);
  591. end;
  592. { Now rootino=thisino and rootdev=thisdev so we've reached / }
  593. dir:=thedir
  594. {$endif}
  595. end;
  596. {*****************************************************************************
  597. SystemUnit Initialization
  598. *****************************************************************************}
  599. Procedure SignalToRunError(Sig:longint);
  600. begin
  601. case sig of
  602. 8 : HandleError(200);
  603. 11 : HandleError(216);
  604. end;
  605. end;
  606. Procedure InstallSignals;
  607. var
  608. sr : syscallregs;
  609. begin
  610. sr.reg3:=longint(@SignalToRunError);
  611. { sigsegv }
  612. sr.reg2:=11;
  613. syscall(syscall_nr_signal,sr);
  614. { sigfpe }
  615. sr.reg2:=8;
  616. syscall(syscall_nr_signal,sr);
  617. end;
  618. Begin
  619. { Set up signals handlers }
  620. InstallSignals;
  621. { Setup heap }
  622. InitHeap;
  623. { Setup stdin, stdout and stderr }
  624. OpenStdIO(Input,fmInput,StdInputHandle);
  625. OpenStdIO(Output,fmOutput,StdOutputHandle);
  626. OpenStdIO(StdOut,fmOutput,StdOutputHandle);
  627. OpenStdIO(StdErr,fmOutput,StdErrorHandle);
  628. { Reset IO Error }
  629. InOutRes:=0;
  630. End.
  631. {
  632. $Log$
  633. Revision 1.21 1998-12-28 15:50:49 peter
  634. + stdout, which is needed when you write something in the system unit
  635. to the screen. Like the runtime error
  636. Revision 1.20 1998/12/18 17:21:34 peter
  637. * fixed io-error handling
  638. Revision 1.19 1998/12/15 22:43:08 peter
  639. * removed temp symbols
  640. Revision 1.18 1998/11/16 10:21:32 peter
  641. * fixes for H+
  642. Revision 1.17 1998/10/15 08:30:00 peter
  643. + sigfpe -> runerror 200
  644. Revision 1.16 1998/09/14 10:48:27 peter
  645. * FPC_ names
  646. * Heap manager is now system independent
  647. Revision 1.15 1998/09/06 19:41:40 peter
  648. * fixed unusedhandle for 0.99.5
  649. Revision 1.14 1998/09/04 18:16:16 peter
  650. * uniform filerec/textrec (with recsize:longint and name:0..255)
  651. Revision 1.13 1998/08/14 11:59:41 carl
  652. + m68k fixes
  653. Revision 1.12 1998/08/12 14:01:37 michael
  654. + Small m68k fixes
  655. Revision 1.11 1998/08/11 08:30:37 michael
  656. + Fixed paramstr() - sometimes there are no 255 characters available.
  657. Revision 1.10 1998/07/30 13:26:15 michael
  658. + Added support for ErrorProc variable. All internal functions are required
  659. to call HandleError instead of runerror from now on.
  660. This is necessary for exception support.
  661. Revision 1.9 1998/07/20 23:40:20 michael
  662. changed sbrk to fc_sbrk, to avoid conflicts with C library.
  663. Revision 1.8 1998/07/13 21:19:14 florian
  664. * some problems with ansi string support fixed
  665. Revision 1.7 1998/07/02 12:36:21 carl
  666. * IOCheck/InOutRes check for mkdir, chdir and rmdir as in TP
  667. Revision 1.6 1998/07/01 15:30:01 peter
  668. * better readln/writeln
  669. Revision 1.4 1998/05/30 14:18:43 peter
  670. * fixed to remake with -Rintel in the ppc386.cfg
  671. Revision 1.3 1998/05/12 10:42:48 peter
  672. * moved getopts to inc/, all supported OS's need argc,argv exported
  673. + strpas, strlen are now exported in the systemunit
  674. * removed logs
  675. * removed $ifdef ver_above
  676. Revision 1.2 1998/05/06 12:35:26 michael
  677. + Removed log from before restored version.
  678. }