syslinux.pp 18 KB

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