syslinux.pp 17 KB

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