syslinux.pp 17 KB

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