sysos2.pas 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864
  1. {****************************************************************************
  2. Free Pascal -- OS/2 runtime library
  3. Copyright (c) 1999-2000 by Florian Klaempfl
  4. Copyright (c) 1999-2000 by Daniel Mantione
  5. Free Pascal is distributed under the GNU Public License v2. So is this unit.
  6. The GNU Public License requires you to distribute the source code of this
  7. unit with any product that uses it. We grant you an exception to this, and
  8. that is, when you compile a program with the Free Pascal Compiler, you do not
  9. need to ship source code with that program, AS LONG AS YOU ARE USING
  10. UNMODIFIED CODE! If you modify this code, you MUST change the next line:
  11. <This an official, unmodified Free Pascal source code file.>
  12. Send us your modified files, we can work together if you want!
  13. Free Pascal is distributed in the hope that it will be useful,
  14. but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. Library GNU General Public License for more details.
  17. You should have received a copy of the Library GNU General Public License
  18. along with Free Pascal; see the file COPYING.LIB. If not, write to
  19. the Free Software Foundation, 59 Temple Place - Suite 330,
  20. Boston, MA 02111-1307, USA.
  21. ****************************************************************************}
  22. unit sysos2;
  23. {Changelog:
  24. People:
  25. DM - Daniel Mantione
  26. Date: Description of change: Changed by:
  27. - First released version 0.1. DM
  28. Coding style:
  29. My coding style is a bit unusual for Pascal. Nevertheless I friendly ask
  30. you to try to make your changes not look all to different. In general,
  31. set your IDE to use tab characters, optimal fill on and a tabsize of 4.}
  32. interface
  33. {Link the startup code.}
  34. {$l prt1.oo2}
  35. {$I SYSTEMH.INC}
  36. {$I heaph.inc}
  37. type Tos=(osDOS,osOS2,osDPMI);
  38. var os_mode:Tos;
  39. first_meg:pointer;
  40. type Psysthreadib=^Tsysthreadib;
  41. Pthreadinfoblock=^Tthreadinfoblock;
  42. Pprocessinfoblock=^Tprocessinfoblock;
  43. Tbytearray=array[0..$ffff] of byte;
  44. Pbytearray=^Tbytearray;
  45. Tsysthreadib=record
  46. tid,
  47. priority,
  48. version:longint;
  49. MCcount,
  50. MCforceflag:word;
  51. end;
  52. Tthreadinfoblock=record
  53. pexchain,
  54. stack,
  55. stacklimit:pointer;
  56. tib2:Psysthreadib;
  57. version,
  58. ordinal:longint;
  59. end;
  60. Tprocessinfoblock=record
  61. pid,
  62. parentpid,
  63. hmte:longint;
  64. cmd,
  65. env:Pbytearray;
  66. flstatus,
  67. ttype:longint;
  68. end;
  69. const UnusedHandle=$ffff;
  70. StdInputHandle=0;
  71. StdOutputHandle=1;
  72. StdErrorHandle=2;
  73. FileNameCaseSensitive : boolean = false;
  74. var
  75. { C-compatible arguments and environment }
  76. argc : longint;external name '_argc';
  77. argv : ppchar;external name '_argv';
  78. envp : ppchar;external name '_environ';
  79. implementation
  80. {$I SYSTEM.INC}
  81. procedure DosGetInfoBlocks (var Atib: PThreadInfoBlock;
  82. var Apib: PProcessInfoBlock); cdecl;
  83. external 'DOSCALLS' index 312;
  84. function DosSetRelMaxFH (var ReqCount, CurMaxFH: longint): longint; cdecl;
  85. external 'DOSCALLS' index 382;
  86. {This is the correct way to call external assembler procedures.}
  87. procedure syscall; external name '___SYSCALL';
  88. {***************************************************************************
  89. Runtime error checking related routines.
  90. ***************************************************************************}
  91. {$S-}
  92. procedure st1(stack_size:longint);[public,alias: 'STACKCHECK'];
  93. begin
  94. { called when trying to get local stack }
  95. { if the compiler directive $S is set }
  96. {$ASMMODE DIRECT}
  97. asm
  98. movl stack_size,%ebx
  99. movl %esp,%eax
  100. subl %ebx,%eax
  101. {$ifdef SYSTEMDEBUG}
  102. movl U_SYSOS2_LOWESTSTACK,%ebx
  103. cmpl %eax,%ebx
  104. jb Lis_not_lowest
  105. movl %eax,U_SYSOS2_LOWESTSTACK
  106. Lis_not_lowest:
  107. {$endif SYSTEMDEBUG}
  108. cmpb $2,U_SYSOS2_OS_MODE
  109. jne Lrunning_in_dos
  110. movl U_SYSOS2_STACKBOTTOM,%ebx
  111. jmp Lrunning_in_os2
  112. Lrunning_in_dos:
  113. movl __heap_brk,%ebx
  114. Lrunning_in_os2:
  115. cmpl %eax,%ebx
  116. jae Lshort_on_stack
  117. leave
  118. ret $4
  119. Lshort_on_stack:
  120. end ['EAX','EBX'];
  121. {$ASMMODE ATT}
  122. { this needs a local variable }
  123. { so the function called itself !! }
  124. { Writeln('low in stack ');}
  125. HandleError(202);
  126. end;
  127. {no stack check in system }
  128. {****************************************************************************
  129. Miscellaneous related routines.
  130. ****************************************************************************}
  131. procedure system_exit; assembler;
  132. asm
  133. movb $0x4c,%ah
  134. movb exitcode,%al
  135. call syscall
  136. end;
  137. {$asmmode direct}
  138. function paramcount:longint;assembler;
  139. asm
  140. movl _argc,%eax
  141. decl %eax
  142. end ['EAX'];
  143. function paramstr(l:longint):string;
  144. function args:pointer;assembler;
  145. asm
  146. movl _argv,%eax
  147. end ['EAX'];
  148. var p:^Pchar;
  149. begin
  150. if (l>=0) and (l<=paramcount) then
  151. begin
  152. p:=args;
  153. paramstr:=strpas(p[l]);
  154. end
  155. else paramstr:='';
  156. end;
  157. {$asmmode att}
  158. procedure randomize;
  159. var hl:longint;
  160. begin
  161. asm
  162. movb $0x2c,%ah
  163. call syscall
  164. movw %cx,-4(%ebp)
  165. movw %dx,-2(%ebp)
  166. end;
  167. randseed:=hl;
  168. end;
  169. {****************************************************************************
  170. Heap management releated routines.
  171. ****************************************************************************}
  172. { this function allows to extend the heap by calling
  173. syscall $7f00 resizes the brk area}
  174. function sbrk(size:longint):longint; assembler;
  175. asm
  176. movl size,%edx
  177. movw $0x7f00,%ax
  178. call syscall
  179. end;
  180. {$ASMMODE direct}
  181. function getheapstart:pointer;assembler;
  182. asm
  183. movl __heap_base,%eax
  184. end ['EAX'];
  185. function getheapsize:longint;assembler;
  186. asm
  187. movl HEAPSIZE,%eax
  188. end ['EAX'];
  189. {$ASMMODE ATT}
  190. {$i heap.inc}
  191. {****************************************************************************
  192. Low Level File Routines
  193. ****************************************************************************}
  194. procedure allowslash(p:Pchar);
  195. {Allow slash as backslash.}
  196. var i:longint;
  197. begin
  198. for i:=0 to strlen(p) do
  199. if p[i]='/' then p[i]:='\';
  200. end;
  201. procedure do_close(h:longint);
  202. begin
  203. { Only three standard handles under real OS/2 }
  204. if (h > 4) or
  205. (os_MODE = osOS2) and (h > 2) then
  206. begin
  207. asm
  208. movb $0x3e,%ah
  209. mov h,%ebx
  210. call syscall
  211. end;
  212. end;
  213. end;
  214. procedure do_erase(p:Pchar);
  215. begin
  216. allowslash(p);
  217. asm
  218. movl P,%edx
  219. movb $0x41,%ah
  220. call syscall
  221. jnc .LERASE1
  222. movw %ax,inoutres;
  223. .LERASE1:
  224. end;
  225. end;
  226. procedure do_rename(p1,p2:Pchar);
  227. begin
  228. allowslash(p1);
  229. allowslash(p2);
  230. asm
  231. movl P1, %edx
  232. movl P2, %edi
  233. movb $0x56,%ah
  234. call syscall
  235. jnc .LRENAME1
  236. movw %ax,inoutres;
  237. .LRENAME1:
  238. end;
  239. end;
  240. function do_read(h,addr,len:longint):longint; assembler;
  241. asm
  242. movl len,%ecx
  243. movl addr,%edx
  244. movl h,%ebx
  245. movb $0x3f,%ah
  246. call syscall
  247. jnc .LDOSREAD1
  248. movw %ax,inoutres;
  249. xorl %eax,%eax
  250. .LDOSREAD1:
  251. end;
  252. function do_write(h,addr,len:longint) : longint; assembler;
  253. asm
  254. movl len,%ecx
  255. movl addr,%edx
  256. movl h,%ebx
  257. movb $0x40,%ah
  258. call syscall
  259. jnc .LDOSWRITE1
  260. movw %ax,inoutres;
  261. .LDOSWRITE1:
  262. end;
  263. function do_filepos(handle:longint): longint; assembler;
  264. asm
  265. movw $0x4201,%ax
  266. movl handle,%ebx
  267. xorl %edx,%edx
  268. call syscall
  269. jnc .LDOSFILEPOS
  270. movw %ax,inoutres;
  271. xorl %eax,%eax
  272. .LDOSFILEPOS:
  273. end;
  274. procedure do_seek(handle,pos:longint); assembler;
  275. asm
  276. movw $0x4200,%ax
  277. movl handle,%ebx
  278. movl pos,%edx
  279. call syscall
  280. jnc .LDOSSEEK1
  281. movw %ax,inoutres;
  282. .LDOSSEEK1:
  283. end;
  284. function do_seekend(handle:longint):longint; assembler;
  285. asm
  286. movw $0x4202,%ax
  287. movl handle,%ebx
  288. xorl %edx,%edx
  289. call syscall
  290. jnc .Lset_at_end1
  291. movw %ax,inoutres;
  292. xorl %eax,%eax
  293. .Lset_at_end1:
  294. end;
  295. function do_filesize(handle:longint):longint;
  296. var aktfilepos:longint;
  297. begin
  298. aktfilepos:=do_filepos(handle);
  299. do_filesize:=do_seekend(handle);
  300. do_seek(handle,aktfilepos);
  301. end;
  302. procedure do_truncate(handle,pos:longint); assembler;
  303. asm
  304. (* DOS function 40h isn't safe for this according to EMX documentation
  305. movl $0x4200,%eax
  306. movl 8(%ebp),%ebx
  307. movl 12(%ebp),%edx
  308. call syscall
  309. jc .LTruncate1
  310. movl 8(%ebp),%ebx
  311. movl 12(%ebp),%edx
  312. movl %ebp,%edx
  313. xorl %ecx,%ecx
  314. movb $0x40,%ah
  315. call syscall
  316. *)
  317. movl $0x7F25,%eax
  318. movl Handle,%ebx
  319. movl Pos,%edx
  320. call syscall
  321. inc %eax
  322. movl %ecx, %eax
  323. jnz .LTruncate1
  324. (* File position is undefined after truncation, move to the end. *)
  325. movl $0x4202,%eax
  326. movl Handle,%ebx
  327. movl $0,%edx
  328. call syscall
  329. jnc .LTruncate2
  330. .LTruncate1:
  331. movw %ax,inoutres;
  332. .LTruncate2:
  333. end;
  334. const
  335. FileHandleCount: longint = 20;
  336. function Increase_File_Handle_Count: boolean;
  337. var Err: word;
  338. L1, L2: longint;
  339. begin
  340. if os_mode = osOS2 then
  341. begin
  342. L1 := 10;
  343. if DosSetRelMaxFH (L1, L2) <> 0 then
  344. Increase_File_Handle_Count := false
  345. else
  346. if L2 > FileHandleCount then
  347. begin
  348. FileHandleCount := L2;
  349. Increase_File_Handle_Count := true;
  350. end
  351. else
  352. Increase_File_Handle_Count := false;
  353. end
  354. else
  355. begin
  356. Inc (FileHandleCount, 10);
  357. Err := 0;
  358. asm
  359. movl $0x6700, %eax
  360. movl FileHandleCount, %ebx
  361. call syscall
  362. jnc .LIncFHandles
  363. movw %ax, Err
  364. .LIncFHandles:
  365. end;
  366. if Err <> 0 then
  367. begin
  368. Increase_File_Handle_Count := false;
  369. Dec (FileHandleCount, 10);
  370. end
  371. else
  372. Increase_File_Handle_Count := true;
  373. end;
  374. end;
  375. procedure do_open(var f;p:pchar;flags:longint);
  376. {
  377. filerec and textrec have both handle and mode as the first items so
  378. they could use the same routine for opening/creating.
  379. when (flags and $100) the file will be append
  380. when (flags and $1000) the file will be truncate/rewritten
  381. when (flags and $10000) there is no check for close (needed for textfiles)
  382. }
  383. var Action: longint;
  384. begin
  385. allowslash(p);
  386. { close first if opened }
  387. if ((flags and $10000)=0) then
  388. begin
  389. case filerec(f).mode of
  390. fminput,fmoutput,fminout : Do_Close(filerec(f).handle);
  391. fmclosed:;
  392. else
  393. begin
  394. inoutres:=102; {not assigned}
  395. exit;
  396. end;
  397. end;
  398. end;
  399. { reset file handle }
  400. filerec(f).handle := UnusedHandle;
  401. Action := 0;
  402. { convert filemode to filerec modes }
  403. case (flags and 3) of
  404. 0 : filerec(f).mode:=fminput;
  405. 1 : filerec(f).mode:=fmoutput;
  406. 2 : filerec(f).mode:=fminout;
  407. end;
  408. if (flags and $1000)<>0 then
  409. Action := $50000; (* Create / replace *)
  410. { empty name is special }
  411. if p[0]=#0 then
  412. begin
  413. case FileRec(f).mode of
  414. fminput :
  415. FileRec(f).Handle:=StdInputHandle;
  416. fminout, { this is set by rewrite }
  417. fmoutput :
  418. FileRec(f).Handle:=StdOutputHandle;
  419. fmappend :
  420. begin
  421. FileRec(f).Handle:=StdOutputHandle;
  422. FileRec(f).mode:=fmoutput; {fool fmappend}
  423. end;
  424. end;
  425. exit;
  426. end;
  427. Action := Action or (Flags and $FF);
  428. (* DenyAll if sharing not specified. *)
  429. if Flags and 112 = 0 then
  430. Action := Action or 16;
  431. asm
  432. movl $0x7f2b, %eax
  433. movl Action, %ecx
  434. movl p, %edx
  435. call syscall
  436. cmpl $0xffffffff, %eax
  437. jnz .LOPEN1
  438. movw %cx, InOutRes
  439. movw UnusedHandle, %ax
  440. .LOPEN1:
  441. movl f,%edx
  442. movw %ax,(%edx)
  443. end;
  444. if (InOutRes = 4) and Increase_File_Handle_Count then
  445. (* Trying again after increasing amount of file handles *)
  446. asm
  447. movl $0x7f2b, %eax
  448. movl Action, %ecx
  449. movl p, %edx
  450. call syscall
  451. cmpl $0xffffffff, %eax
  452. jnz .LOPEN2
  453. movw %cx, InOutRes
  454. movw UnusedHandle, %ax
  455. .LOPEN2:
  456. movl f,%edx
  457. movw %ax,(%edx)
  458. end;
  459. { for systems that have more handles }
  460. if FileRec (F).Handle > FileHandleCount then
  461. FileHandleCount := FileRec (F).Handle;
  462. if (flags and $100)<>0 then
  463. begin
  464. do_seekend(filerec(f).handle);
  465. FileRec (F).Mode := fmOutput; {fool fmappend}
  466. end;
  467. end;
  468. {$ASMMODE INTEL}
  469. function do_isdevice (Handle: longint): boolean; assembler;
  470. (*
  471. var HT, Attr: longint;
  472. begin
  473. if os_mode = osOS2 then
  474. begin
  475. if DosQueryHType (Handle, HT, Attr) <> 0 then HT := 1;
  476. end
  477. else
  478. *)
  479. asm
  480. mov ebx, Handle
  481. mov eax, 4400h
  482. call syscall
  483. mov eax, 1
  484. jc @IsDevEnd
  485. test edx, 80h
  486. jnz @IsDevEnd
  487. dec eax
  488. @IsDevEnd:
  489. end;
  490. {$ASMMODE ATT}
  491. {*****************************************************************************
  492. UnTyped File Handling
  493. *****************************************************************************}
  494. {$i file.inc}
  495. {*****************************************************************************
  496. Typed File Handling
  497. *****************************************************************************}
  498. {$i typefile.inc}
  499. {*****************************************************************************
  500. Text File Handling
  501. *****************************************************************************}
  502. {$DEFINE EOF_CTRLZ}
  503. {$i text.inc}
  504. {****************************************************************************
  505. Directory related routines.
  506. ****************************************************************************}
  507. {*****************************************************************************
  508. Directory Handling
  509. *****************************************************************************}
  510. procedure dosdir(func:byte;const s:string);
  511. var buffer:array[0..255] of char;
  512. begin
  513. move(s[1],buffer,length(s));
  514. buffer[length(s)]:=#0;
  515. allowslash(Pchar(@buffer));
  516. asm
  517. leal buffer,%edx
  518. movb func,%ah
  519. call syscall
  520. jnc .LDOS_DIRS1
  521. movw %ax,inoutres;
  522. .LDOS_DIRS1:
  523. end;
  524. end;
  525. procedure mkdir(const s : string);
  526. begin
  527. DosDir($39,s);
  528. end;
  529. procedure rmdir(const s : string);
  530. begin
  531. DosDir($3a,s);
  532. end;
  533. procedure chdir(const s : string);
  534. begin
  535. DosDir($3b,s);
  536. end;
  537. procedure getdir(drivenr : byte;var dir : shortstring);
  538. {Written by Michael Van Canneyt.}
  539. var temp:array[0..255] of char;
  540. sof:Pchar;
  541. i:byte;
  542. begin
  543. sof:=pchar(@dir[4]);
  544. { dir[1..3] will contain '[drivenr]:\', but is not }
  545. { supplied by DOS, so we let dos string start at }
  546. { dir[4] }
  547. { Get dir from drivenr : 0=default, 1=A etc... }
  548. asm
  549. movb drivenr,%dl
  550. movl sof,%esi
  551. mov $0x47,%ah
  552. call syscall
  553. end;
  554. { Now Dir should be filled with directory in ASCIIZ, }
  555. { starting from dir[4] }
  556. dir[0]:=#3;
  557. dir[2]:=':';
  558. dir[3]:='\';
  559. i:=4;
  560. {Conversion to Pascal string }
  561. while (dir[i]<>#0) do
  562. begin
  563. { convert path name to DOS }
  564. if dir[i]='/' then
  565. dir[i]:='\';
  566. dir[0]:=char(i);
  567. inc(i);
  568. end;
  569. { upcase the string (FPC function) }
  570. if not (FileNameCaseSensitive) then dir:=upcase(dir);
  571. if drivenr<>0 then { Drive was supplied. We know it }
  572. dir[1]:=char(65+drivenr-1)
  573. else
  574. begin
  575. { We need to get the current drive from DOS function 19H }
  576. { because the drive was the default, which can be unknown }
  577. asm
  578. movb $0x19,%ah
  579. call syscall
  580. addb $65,%al
  581. movb %al,i
  582. end;
  583. dir[1]:=char(i);
  584. end;
  585. end;
  586. {****************************************************************************
  587. System unit initialization.
  588. ****************************************************************************}
  589. function GetFileHandleCount: longint;
  590. var L1, L2: longint;
  591. begin
  592. L1 := 0; (* Don't change the amount, just check. *)
  593. if DosSetRelMaxFH (L1, L2) <> 0 then GetFileHandleCount := 50
  594. else GetFileHandleCount := L2;
  595. end;
  596. var pib:Pprocessinfoblock;
  597. tib:Pthreadinfoblock;
  598. begin
  599. {Determine the operating system we are running on.}
  600. asm
  601. movl $0,os_mode
  602. movw $0x7f0a,%ax
  603. call syscall
  604. testw $512,%bx {Bit 9 is OS/2 flag.}
  605. setnzb os_mode
  606. testw $4096,%bx
  607. jz .LnoRSX
  608. movl $2,os_mode
  609. .LnoRSX:
  610. end;
  611. {$ASMMODE DIRECT}
  612. {Enable the brk area by initializing it with the initial heap size.}
  613. asm
  614. movw $0x7f01,%ax
  615. movl HEAPSIZE,%edx
  616. addl __heap_base,%edx
  617. call ___SYSCALL
  618. cmpl $-1,%eax
  619. jnz Lheapok
  620. pushl $204
  621. {call RUNERROR$$WORD}
  622. Lheapok:
  623. end;
  624. {$ASMMODE ATT}
  625. {Now request, if we are running under DOS,
  626. read-access to the first meg. of memory.}
  627. if os_mode in [osDOS,osDPMI] then
  628. asm
  629. movw $0x7f13,%ax
  630. xorl %ebx,%ebx
  631. movl $0xfff,%ecx
  632. xorl %edx,%edx
  633. call syscall
  634. movl %eax,first_meg
  635. end
  636. else
  637. begin
  638. first_meg := nil;
  639. (* Initialize the amount of file handles *)
  640. FileHandleCount := GetFileHandleCount;
  641. end;
  642. {At 0.9.2, case for enumeration does not work.}
  643. case os_mode of
  644. osDOS:
  645. stackbottom:=0; {In DOS mode, heap_brk is also the
  646. stack bottom.}
  647. osOS2:
  648. begin
  649. dosgetinfoblocks(tib,pib);
  650. stackbottom:=longint(tib^.stack);
  651. end;
  652. osDPMI:
  653. stackbottom:=0; {Not sure how to get it, but seems to be
  654. always zero.}
  655. end;
  656. exitproc:=nil;
  657. {Initialize the heap.}
  658. initheap;
  659. { ... and exceptions }
  660. InitExceptions;
  661. { to test stack depth }
  662. loweststack:=maxlongint;
  663. OpenStdIO(Input,fmInput,StdInputHandle);
  664. OpenStdIO(Output,fmOutput,StdOutputHandle);
  665. OpenStdIO(StdOut,fmOutput,StdOutputHandle);
  666. OpenStdIO(StdErr,fmOutput,StdErrorHandle);
  667. { no I/O-Error }
  668. inoutres:=0;
  669. end.
  670. {
  671. $Log$
  672. Revision 1.34 2000-07-09 17:09:47 hajny
  673. * little mistyping
  674. Revision 1.33 2000/07/09 17:05:24 hajny
  675. * default sharing mode changed to deny all (compatibility)
  676. Revision 1.32 2000/06/11 09:47:57 hajny
  677. * error handling and sharing corrected
  678. Revision 1.31 2000/06/05 18:53:30 hajny
  679. * FileHandleCount handling for OS/2 added
  680. Revision 1.30 2000/06/04 14:14:01 hajny
  681. * do_truncate corrected, do_open might work under W9x now
  682. Revision 1.29 2000/05/28 18:17:39 hajny
  683. do_isdevice corrected
  684. Revision 1.28 2000/05/21 15:58:50 hajny
  685. + FileNameCaseSensitive added
  686. Revision 1.27 2000/04/07 17:47:34 hajny
  687. * got rid of os.inc
  688. Revision 1.26 2000/02/09 16:59:34 peter
  689. * truncated log
  690. Revision 1.25 2000/02/09 12:39:11 peter
  691. * halt moved to system.inc
  692. Revision 1.24 2000/01/20 23:38:02 peter
  693. * support fm_inout as stdoutput for assign(f,'');rewrite(f,1); becuase
  694. rewrite opens always with filemode 2
  695. Revision 1.23 2000/01/16 23:10:15 peter
  696. * handle check fixed
  697. Revision 1.22 2000/01/16 22:25:38 peter
  698. * check handle for file closing
  699. Revision 1.21 2000/01/09 20:45:58 hajny
  700. * FPK changed to FPC
  701. Revision 1.20 2000/01/07 16:41:50 daniel
  702. * copyright 2000
  703. Revision 1.19 2000/01/07 16:32:33 daniel
  704. * copyright 2000 added
  705. Revision 1.18 2000/01/02 17:45:25 hajny
  706. * cdecl added for doscalls routines
  707. Revision 1.17 1999/09/10 15:40:35 peter
  708. * fixed do_open flags to be > $100, becuase filemode can be upto 255
  709. }