syslinux.pp 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749
  1. {
  2. $Id$
  3. This file is part of the Free Pascal run time library.
  4. Copyright (c) 1999-2000 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. procedure prthaltproc;external name '_haltproc';
  70. procedure System_exit;
  71. begin
  72. {$ifdef i386}
  73. asm
  74. jmp prthaltproc
  75. end;
  76. {$else}
  77. asm
  78. jmp prthaltproc
  79. end;
  80. {$endif}
  81. End;
  82. Function ParamCount: Longint;
  83. Begin
  84. Paramcount:=argc-1
  85. End;
  86. Function ParamStr(l: Longint): String;
  87. var
  88. link,
  89. hs : string;
  90. i : longint;
  91. begin
  92. if l=0 then
  93. begin
  94. str(sys_getpid,hs);
  95. hs:='/proc/'+hs+'/exe'#0;
  96. i:=Sys_readlink(@hs[1],@link[1],high(link));
  97. if i>0 then
  98. begin
  99. link[0]:=chr(i);
  100. paramstr:=link;
  101. end
  102. else
  103. paramstr:=strpas(argv[0]);
  104. end
  105. else
  106. if (l>0) and (l<argc) then
  107. paramstr:=strpas(argv[l])
  108. else
  109. paramstr:='';
  110. end;
  111. Procedure Randomize;
  112. Begin
  113. randseed:=sys_time;
  114. End;
  115. {*****************************************************************************
  116. Heap Management
  117. *****************************************************************************}
  118. var
  119. _HEAP : longint;external name 'HEAP';
  120. _HEAPSIZE : longint;external name 'HEAPSIZE';
  121. function getheapstart:pointer;assembler;
  122. {$ifdef i386}
  123. asm
  124. leal _HEAP,%eax
  125. end ['EAX'];
  126. {$else}
  127. asm
  128. lea.l _HEAP,a0
  129. move.l a0,d0
  130. end;
  131. {$endif}
  132. function getheapsize:longint;assembler;
  133. {$ifdef i386}
  134. asm
  135. movl _HEAPSIZE,%eax
  136. end ['EAX'];
  137. {$else}
  138. asm
  139. move.l _HEAPSIZE,d0
  140. end ['D0'];
  141. {$endif}
  142. Function sbrk(size : longint) : Longint;
  143. CONST MAP_PRIVATE =2;
  144. MAP_ANONYMOUS =$1000; {$20 under linux}
  145. begin
  146. Sbrk:=do_syscall(syscall_nr_mmap,0,size,3,MAP_PRIVATE+MAP_ANONYMOUS,-1,0,0);
  147. if ErrNo<>0 then
  148. Sbrk:=0;
  149. end;
  150. { include standard heap management }
  151. {$I heap.inc}
  152. {*****************************************************************************
  153. Low Level File Routines
  154. *****************************************************************************}
  155. {
  156. The lowlevel file functions should take care of setting the InOutRes to the
  157. correct value if an error has occured, else leave it untouched
  158. }
  159. Procedure Errno2Inoutres;
  160. {
  161. Convert ErrNo error to the correct Inoutres value
  162. }
  163. begin
  164. if ErrNo=0 then { Else it will go through all the cases }
  165. exit;
  166. case ErrNo of
  167. Sys_ENFILE,
  168. Sys_EMFILE : Inoutres:=4;
  169. Sys_ENOENT : Inoutres:=2;
  170. Sys_EBADF : Inoutres:=6;
  171. Sys_ENOMEM,
  172. Sys_EFAULT : Inoutres:=217;
  173. Sys_EINVAL : Inoutres:=218;
  174. Sys_EPIPE,
  175. Sys_EINTR,
  176. Sys_EIO,
  177. Sys_EAGAIN,
  178. Sys_ENOSPC : Inoutres:=101;
  179. Sys_ENAMETOOLONG,
  180. Sys_ELOOP,
  181. Sys_ENOTDIR : Inoutres:=3;
  182. Sys_EROFS,
  183. Sys_EEXIST,
  184. Sys_EACCES : Inoutres:=5;
  185. Sys_ETXTBSY : Inoutres:=162;
  186. end;
  187. end;
  188. Procedure Do_Close(Handle:Longint);
  189. Begin
  190. if Handle<=4 then
  191. exit;
  192. {$ifdef crtlib}
  193. _rtl_close(Handle);
  194. {$else}
  195. sys_close(Handle);
  196. {$endif}
  197. End;
  198. Procedure Do_Erase(p:pchar);
  199. Begin
  200. {$ifdef crtlib}
  201. _rtl_erase(p);
  202. {$else}
  203. sys_unlink(p);
  204. Errno2Inoutres;
  205. {$endif}
  206. End;
  207. Procedure Do_Rename(p1,p2:pchar);
  208. Begin
  209. {$ifdef crtlib}
  210. _rtl_rename(p1,p2);
  211. {$else }
  212. sys_rename(p1,p2);
  213. Errno2Inoutres;
  214. {$endif}
  215. End;
  216. Function Do_Write(Handle,Addr,Len:Longint):longint;
  217. Begin
  218. {$ifdef crtlib}
  219. _rtl_write(Handle,addr,len);
  220. Do_Write:=Len;
  221. {$else}
  222. Do_Write:=sys_write(Handle,pchar(addr),len);
  223. Errno2Inoutres;
  224. {$endif}
  225. if Do_Write<0 then
  226. Do_Write:=0;
  227. End;
  228. Function Do_Read(Handle,Addr,Len:Longint):Longint;
  229. Begin
  230. {$ifdef crtlib}
  231. Do_Read:=_rtl_read(Handle,addr,len);
  232. {$else}
  233. Do_Read:=sys_read(Handle,pchar(addr),len);
  234. Errno2Inoutres;
  235. {$endif}
  236. if Do_Read<0 then
  237. Do_Read:=0;
  238. End;
  239. Function Do_FilePos(Handle: Longint): Longint;
  240. Begin
  241. {$ifdef crtlib}
  242. Do_FilePos:=_rtl_filepos(Handle);
  243. {$else}
  244. Do_FilePos:=sys_lseek(Handle, 0, Seek_Cur);
  245. Errno2Inoutres;
  246. {$endif}
  247. End;
  248. Procedure Do_Seek(Handle,Pos:Longint);
  249. Begin
  250. {$ifdef crtlib}
  251. _rtl_seek(Handle, Pos);
  252. {$else}
  253. sys_lseek(Handle, pos, Seek_set);
  254. {$endif}
  255. End;
  256. Function Do_SeekEnd(Handle:Longint): Longint;
  257. begin
  258. {$ifdef crtlib}
  259. Do_SeekEnd:=_rtl_filesize(Handle);
  260. {$else}
  261. Do_SeekEnd:=sys_lseek(Handle,0,Seek_End);
  262. {$endif}
  263. end;
  264. Function Do_FileSize(Handle:Longint): Longint;
  265. {$ifndef crtlib}
  266. var
  267. Info : Stat;
  268. {$endif}
  269. Begin
  270. {$ifdef crtlib}
  271. Do_FileSize:=_rtl_filesize(Handle);
  272. {$else}
  273. if do_SysCall(syscall_nr_fstat,handle,longint(@info))=0 then
  274. Do_FileSize:=Info.Size
  275. else
  276. Do_FileSize:=0;
  277. Errno2Inoutres;
  278. {$endif}
  279. End;
  280. Procedure Do_Truncate(Handle,Pos:longint);
  281. begin
  282. {$ifndef crtlib}
  283. do_syscall(syscall_nr_ftruncate,handle,pos,0);
  284. Errno2Inoutres;
  285. {$endif}
  286. end;
  287. Procedure Do_Open(var f;p:pchar;flags:longint);
  288. {
  289. FileRec and textrec have both Handle and mode as the first items so
  290. they could use the same routine for opening/creating.
  291. when (flags and $100) the file will be append
  292. when (flags and $1000) the file will be truncate/rewritten
  293. when (flags and $10000) there is no check for close (needed for textfiles)
  294. }
  295. var
  296. {$ifndef crtlib}
  297. oflags : longint;
  298. {$endif}
  299. Begin
  300. { close first if opened }
  301. if ((flags and $10000)=0) then
  302. begin
  303. case FileRec(f).mode of
  304. fminput,fmoutput,fminout : Do_Close(FileRec(f).Handle);
  305. fmclosed : ;
  306. else
  307. begin
  308. inoutres:=102; {not assigned}
  309. exit;
  310. end;
  311. end;
  312. end;
  313. { reset file Handle }
  314. FileRec(f).Handle:=UnusedHandle;
  315. { We do the conversion of filemodes here, concentrated on 1 place }
  316. case (flags and 3) of
  317. 0 : begin
  318. oflags :=Open_RDONLY;
  319. FileRec(f).mode:=fminput;
  320. end;
  321. 1 : begin
  322. oflags :=Open_WRONLY;
  323. FileRec(f).mode:=fmoutput;
  324. end;
  325. 2 : begin
  326. oflags :=Open_RDWR;
  327. FileRec(f).mode:=fminout;
  328. end;
  329. end;
  330. if (flags and $1000)=$1000 then
  331. oflags:=oflags or (Open_CREATE or Open_TRUNC)
  332. else
  333. if (flags and $100)=$100 then
  334. oflags:=oflags or (Open_APPEND);
  335. { empty name is special }
  336. if p[0]=#0 then
  337. begin
  338. case FileRec(f).mode of
  339. fminput :
  340. FileRec(f).Handle:=StdInputHandle;
  341. fminout, { this is set by rewrite }
  342. fmoutput :
  343. FileRec(f).Handle:=StdOutputHandle;
  344. fmappend :
  345. begin
  346. FileRec(f).Handle:=StdOutputHandle;
  347. FileRec(f).mode:=fmoutput; {fool fmappend}
  348. end;
  349. end;
  350. exit;
  351. end;
  352. { real open call }
  353. {$ifdef crtlib}
  354. FileRec(f).Handle:=_rtl_open(p, oflags);
  355. if FileRec(f).Handle<0 then
  356. InOutRes:=2
  357. else
  358. InOutRes:=0;
  359. {$else}
  360. FileRec(f).Handle:=sys_open(p,oflags,438);
  361. if (ErrNo=Sys_EROFS) and ((OFlags and Open_RDWR)<>0) then
  362. begin
  363. Oflags:=Oflags and not(Open_RDWR);
  364. FileRec(f).Handle:=sys_open(p,oflags,438);
  365. end;
  366. Errno2Inoutres;
  367. {$endif}
  368. End;
  369. Function Do_IsDevice(Handle:Longint):boolean;
  370. {
  371. Interface to Unix ioctl call.
  372. Performs various operations on the filedescriptor Handle.
  373. Ndx describes the operation to perform.
  374. Data points to data needed for the Ndx function. The structure of this
  375. data is function-dependent.
  376. }
  377. var
  378. Data : array[0..255] of byte; {Large enough for termios info}
  379. begin
  380. Do_IsDevice:=(do_SysCall(syscall_nr_ioctl,handle,$5401,longint(@data))=0);
  381. end;
  382. {*****************************************************************************
  383. UnTyped File Handling
  384. *****************************************************************************}
  385. {$i file.inc}
  386. {*****************************************************************************
  387. Typed File Handling
  388. *****************************************************************************}
  389. {$i typefile.inc}
  390. {*****************************************************************************
  391. Text File Handling
  392. *****************************************************************************}
  393. {$DEFINE SHORT_LINEBREAK}
  394. {$DEFINE EXTENDED_EOF}
  395. {$i text.inc}
  396. {*****************************************************************************
  397. Directory Handling
  398. *****************************************************************************}
  399. Procedure MkDir(Const s: String);[IOCheck];
  400. Var
  401. Buffer: Array[0..255] of Char;
  402. Begin
  403. If InOutRes <> 0 then exit;
  404. Move(s[1], Buffer, Length(s));
  405. Buffer[Length(s)] := #0;
  406. {$ifdef crtlib}
  407. _rtl_mkdir(@buffer);
  408. {$else}
  409. sys_mkdir(@buffer, 511);
  410. Errno2Inoutres;
  411. {$endif}
  412. End;
  413. Procedure RmDir(Const s: String);[IOCheck];
  414. Var
  415. Buffer: Array[0..255] of Char;
  416. Begin
  417. If InOutRes <> 0 then exit;
  418. Move(s[1], Buffer, Length(s));
  419. Buffer[Length(s)] := #0;
  420. {$ifdef crtlib}
  421. _rtl_rmdir(@buffer);
  422. {$else}
  423. sys_rmdir(@buffer);
  424. Errno2Inoutres;
  425. {$endif}
  426. End;
  427. Procedure ChDir(Const s: String);[IOCheck];
  428. Var
  429. Buffer: Array[0..255] of Char;
  430. Begin
  431. If InOutRes <> 0 then exit;
  432. Move(s[1], Buffer, Length(s));
  433. Buffer[Length(s)] := #0;
  434. {$ifdef crtlib}
  435. _rtl_chdir(@buffer);
  436. {$else}
  437. sys_chdir(@buffer);
  438. Errno2Inoutres;
  439. {$endif}
  440. End;
  441. procedure getdir(drivenr : byte;var dir : shortstring);
  442. {$ifndef crtlib}
  443. var
  444. thisdir : stat;
  445. rootino,
  446. thisino,
  447. dotdotino : longint;
  448. rootdev,
  449. thisdev,
  450. dotdotdev : word;
  451. thedir,dummy : string[255];
  452. dirstream : pdir;
  453. d : pdirent;
  454. mountpoint : boolean;
  455. predot : string[255];
  456. {$endif}
  457. begin
  458. drivenr:=0;
  459. dir:='';
  460. {$ifndef crtlib}
  461. thedir:='/'#0;
  462. if sys_stat(@thedir[1],thisdir)<0 then
  463. exit;
  464. rootino:=thisdir.ino;
  465. rootdev:=thisdir.dev;
  466. thedir:='.'#0;
  467. if sys_stat(@thedir[1],thisdir)<0 then
  468. exit;
  469. thisino:=thisdir.ino;
  470. thisdev:=thisdir.dev;
  471. { Now we can uniquely identify the current and root dir }
  472. thedir:='';
  473. predot:='';
  474. while not ((thisino=rootino) and (thisdev=rootdev)) do
  475. begin
  476. { Are we on a mount point ? }
  477. dummy:=predot+'..'#0;
  478. if sys_stat(@dummy[1],thisdir)<0 then
  479. exit;
  480. dotdotino:=thisdir.ino;
  481. dotdotdev:=thisdir.dev;
  482. mountpoint:=(thisdev<>dotdotdev);
  483. { Now, Try to find the name of this dir in the previous one }
  484. dirstream:=opendir (@dummy[1]);
  485. if dirstream=nil then
  486. exit;
  487. repeat
  488. d:=sys_readdir (dirstream);
  489. if (d<>nil) and
  490. (not ((d^.name[0]='.') and ((d^.name[1]=#0) or ((d^.name[1]='.') and (d^.name[2]=#0))))) and
  491. (mountpoint or (d^.ino=thisino)) then
  492. begin
  493. dummy:=predot+'../'+strpas(@(d^.name[0]))+#0;
  494. if sys_stat (@(dummy[1]),thisdir)<0 then
  495. d:=nil;
  496. end;
  497. until (d=nil) or ((thisdir.dev=thisdev) and (thisdir.ino=thisino) );
  498. if (closedir(dirstream)<0) or (d=nil) then
  499. exit;
  500. { At this point, d.name contains the name of the current dir}
  501. thedir:='/'+strpas(@(d^.name[0]))+thedir;
  502. thisdev:=dotdotdev;
  503. thisino:=dotdotino;
  504. predot:=predot+'../';
  505. end;
  506. { Now rootino=thisino and rootdev=thisdev so we've reached / }
  507. dir:=thedir
  508. {$endif}
  509. end;
  510. {*****************************************************************************
  511. SystemUnit Initialization
  512. *****************************************************************************}
  513. Procedure SignalToRunError(Sig:longint);
  514. begin
  515. case sig of
  516. 8 : HandleError(200);
  517. 11 : HandleError(216);
  518. end;
  519. end;
  520. Procedure InstallSignals;
  521. begin
  522. { sr.reg3:=longint(@SignalToRunError);
  523. { sigsegv }
  524. sr.reg2:=11;
  525. syscall(syscall_nr_signal,sr);
  526. { sigfpe }
  527. sr.reg2:=8;
  528. syscall(syscall_nr_signal,sr);
  529. }
  530. end;
  531. procedure SetupCmdLine;
  532. var
  533. bufsize,
  534. len,j,
  535. size,i : longint;
  536. found : boolean;
  537. buf : array[0..1026] of char;
  538. procedure AddBuf;
  539. begin
  540. reallocmem(cmdline,size+bufsize);
  541. move(buf,cmdline[size],bufsize);
  542. inc(size,bufsize);
  543. bufsize:=0;
  544. end;
  545. begin
  546. size:=0;
  547. bufsize:=0;
  548. i:=0;
  549. while (i<argc) do
  550. begin
  551. len:=strlen(argv[i]);
  552. if len>sizeof(buf)-2 then
  553. len:=sizeof(buf)-2;
  554. found:=false;
  555. for j:=1 to len do
  556. if argv[i][j]=' ' then
  557. begin
  558. found:=true;
  559. break;
  560. end;
  561. if bufsize+len>=sizeof(buf)-2 then
  562. AddBuf;
  563. if found then
  564. begin
  565. buf[bufsize]:='"';
  566. inc(bufsize);
  567. end;
  568. move(argv[i]^,buf[bufsize],len);
  569. inc(bufsize,len);
  570. if found then
  571. begin
  572. buf[bufsize]:='"';
  573. inc(bufsize);
  574. end;
  575. if i<argc then
  576. buf[bufsize]:=' '
  577. else
  578. buf[bufsize]:=#0;
  579. inc(bufsize);
  580. inc(i);
  581. end;
  582. AddBuf;
  583. end;
  584. Begin
  585. { Set up signals handlers }
  586. InstallSignals;
  587. { Setup heap }
  588. InitHeap;
  589. InitExceptions;
  590. { Arguments }
  591. SetupCmdLine;
  592. { Setup stdin, stdout and stderr }
  593. OpenStdIO(Input,fmInput,StdInputHandle);
  594. OpenStdIO(Output,fmOutput,StdOutputHandle);
  595. OpenStdIO(StdOut,fmOutput,StdOutputHandle);
  596. OpenStdIO(StdErr,fmOutput,StdErrorHandle);
  597. { Reset IO Error }
  598. InOutRes:=0;
  599. End.
  600. {
  601. $Log$
  602. Revision 1.5 2000-04-10 15:46:52 marco
  603. * worked all day. probably a lot changed
  604. Revision 1.3 2000/03/17 12:58:57 marco
  605. * some changes to ftruncate based procs. Added a "0" as extra parameter
  606. Revision 1.2 2000/03/16 16:21:10 marco
  607. * changes to get ppc386 -h working
  608. Revision 1.1 2000/03/01 20:23:07 marco
  609. * Initial version. Compiles (syscall.inc inclusion prob has to be solved
  610. Revision 1.37 2000/02/09 16:59:32 peter
  611. * truncated log
  612. Revision 1.36 2000/02/09 12:17:51 peter
  613. * moved halt to system.inc
  614. * syslinux doesn't use direct asm anymore
  615. Revision 1.35 2000/02/08 11:47:09 peter
  616. * paramstr(0) support
  617. Revision 1.34 2000/01/20 23:38:02 peter
  618. * support fm_inout as stdoutput for assign(f,'');rewrite(f,1); becuase
  619. rewrite opens always with filemode 2
  620. Revision 1.33 2000/01/16 22:25:38 peter
  621. * check handle for file closing
  622. Revision 1.32 2000/01/07 16:41:41 daniel
  623. * copyright 2000
  624. Revision 1.31 2000/01/07 16:32:28 daniel
  625. * copyright 2000 added
  626. Revision 1.30 1999/12/01 22:57:31 peter
  627. * cmdline support
  628. Revision 1.29 1999/11/06 14:39:12 peter
  629. * truncated log
  630. Revision 1.28 1999/10/28 09:50:06 peter
  631. * use mmap instead of brk
  632. Revision 1.27 1999/09/10 15:40:35 peter
  633. * fixed do_open flags to be > $100, becuase filemode can be upto 255
  634. Revision 1.26 1999/09/08 16:14:43 peter
  635. * pointer fixes
  636. Revision 1.25 1999/07/28 23:18:36 peter
  637. * closedir fixes, which now disposes the pdir itself
  638. }