system.pas 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804
  1. {
  2. $Id$
  3. This file is part of the Free Pascal run time library.
  4. Copyright (c) 1999-2000 by Carl Eric Codere
  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. {$define ATARI}
  13. unit {$ifdef VER1_0}sysatari{$else}{$ifdef VER0_99}sysatari{$ELSE}system{$endif}{$ENDIF};
  14. {--------------------------------------------------------------------}
  15. { LEFT TO DO: }
  16. {--------------------------------------------------------------------}
  17. { o SBrk }
  18. { o Implement truncate }
  19. { o Implement paramstr(0) }
  20. {--------------------------------------------------------------------}
  21. {$I os.inc}
  22. interface
  23. {$I systemh.inc}
  24. type
  25. THandle = longint;
  26. {$I heaph.inc}
  27. {Platform specific information}
  28. const
  29. LineEnding = #10;
  30. LFNSupport = true;
  31. DirectorySeparator = '/';
  32. DriveSeparator = ':';
  33. PathSeparator = ';';
  34. FileNameCaseSensitive = false;
  35. maxExitCode = 255;
  36. sLineBreak: string [1] = LineEnding;
  37. { used for single computations }
  38. const BIAS4 = $7f-1;
  39. const
  40. UnusedHandle = $ffff;
  41. StdInputHandle = 0;
  42. StdOutputHandle = 1;
  43. StdErrorHandle = $ffff;
  44. implementation
  45. {$I system.inc}
  46. {$I lowmath.inc}
  47. function GetProcessID:SizeUInt;
  48. begin
  49. {$WARNING To be checked by platform maintainer}
  50. GetProcessID := 1;
  51. end;
  52. const
  53. argc : longint = 0;
  54. var
  55. errno : integer;
  56. {$S-}
  57. procedure Stack_Check; assembler;
  58. { Check for local variable allocation }
  59. { On Entry -> d0 : size of local stack we are trying to allocate }
  60. asm
  61. XDEF STACKCHECK
  62. move.l sp,d1 { get value of stack pointer }
  63. sub.l d0,d1 { sp - stack_size }
  64. sub.l #2048,d1
  65. cmp.l __BREAK,d1
  66. bgt @st1nosweat
  67. move.l #202,d0
  68. jsr HALT_ERROR
  69. @st1nosweat:
  70. end;
  71. Procedure Error2InOut;
  72. Begin
  73. if (errno <= -2) and (errno >= -11) then
  74. InOutRes:=150-errno { 150+errno }
  75. else
  76. Begin
  77. case errno of
  78. -32 : InOutRes:=1;
  79. -33 : InOutRes:=2;
  80. -34 : InOutRes:=3;
  81. -35 : InOutRes:=4;
  82. -36 : InOutRes:=5;
  83. -37 : InOutRes:=8;
  84. -39 : InOutRes:=8;
  85. -40 : InOutRes:=9;
  86. -46 : InOutRes:=15;
  87. -67..-64 : InOutRes:=153;
  88. -15 : InOutRes:=151;
  89. -13 : InOutRes:=150;
  90. else
  91. InOutres := word(errno);
  92. end;
  93. end;
  94. errno:=0;
  95. end;
  96. procedure halt(errnum : byte);
  97. begin
  98. do_exit;
  99. flush(stderr);
  100. asm
  101. clr.l d0
  102. move.b errnum,d0
  103. move.w d0,-(sp)
  104. move.w #$4c,-(sp)
  105. trap #1
  106. end;
  107. end;
  108. function args : pointer; assembler;
  109. asm
  110. move.l __ARGS,d0
  111. end;
  112. Function GetParamCount(const p: pchar): longint;
  113. var
  114. i: word;
  115. count: word;
  116. Begin
  117. i:=0;
  118. count:=0;
  119. while p[count] <> #0 do
  120. Begin
  121. if (p[count] <> ' ') and (p[count] <> #9) and (p[count] <> #0) then
  122. Begin
  123. i:=i+1;
  124. while (p[count] <> ' ') and (p[count] <> #9) and (p[count] <> #0) do
  125. count:=count+1;
  126. end;
  127. if p[count] = #0 then break;
  128. count:=count+1;
  129. end;
  130. GetParamCount:=longint(i);
  131. end;
  132. Function GetParam(index: word; const p : pchar): string;
  133. { On Entry: index = string index to correct parameter }
  134. { On exit: = correct character index into pchar array }
  135. { Returns correct index to command line argument }
  136. var
  137. count: word;
  138. localindex: word;
  139. l: byte;
  140. temp: string;
  141. Begin
  142. temp:='';
  143. count := 0;
  144. { first index is one }
  145. localindex := 1;
  146. l:=0;
  147. While p[count] <> #0 do
  148. Begin
  149. if (p[count] <> ' ') and (p[count] <> #9) then
  150. Begin
  151. if localindex = index then
  152. Begin
  153. while (p[count] <> #0) and (p[count] <> ' ') and (p[count] <> #9) and (l < 256) do
  154. Begin
  155. temp:=temp+p[count];
  156. l:=l+1;
  157. count:=count+1;
  158. end;
  159. temp[0]:=char(l);
  160. GetParam:=temp;
  161. exit;
  162. end;
  163. { Point to next argument in list }
  164. while (p[count] <> #0) and (p[count] <> ' ') and (p[count] <> #9) do
  165. Begin
  166. count:=count+1;
  167. end;
  168. localindex:=localindex+1;
  169. end;
  170. if p[count] = #0 then break;
  171. count:=count+1;
  172. end;
  173. GetParam:=temp;
  174. end;
  175. function paramstr(l : longint) : string;
  176. var
  177. p : pchar;
  178. s1 : string;
  179. begin
  180. if l = 0 then
  181. Begin
  182. s1 := '';
  183. end
  184. else
  185. if (l>0) and (l<=paramcount) then
  186. begin
  187. p:=args;
  188. paramstr:=GetParam(word(l),p);
  189. end
  190. else paramstr:='';
  191. end;
  192. function paramcount : longint;
  193. Begin
  194. paramcount := argc;
  195. end;
  196. procedure randomize;
  197. var
  198. hl : longint;
  199. begin
  200. asm
  201. movem.l d2/d3/a2/a3, -(sp) { save OS registers }
  202. move.w #17,-(sp)
  203. trap #14 { call xbios - random number }
  204. add.l #2,sp
  205. movem.l (sp)+,d2/d3/a2/a3
  206. move.l d0,hl { result in d0 }
  207. end;
  208. randseed:=hl;
  209. end;
  210. function getheapstart:pointer;assembler;
  211. asm
  212. lea.l HEAP,a0
  213. move.l a0,d0
  214. end;
  215. function getheapsize:longint;assembler;
  216. asm
  217. move.l HEAP_SIZE,d0
  218. end ['D0'];
  219. { This routine is used to grow the heap. }
  220. { But here we do a trick, we say that the }
  221. { heap cannot be regrown! }
  222. function sbrk( size: longint): pointer;
  223. { on exit nil = if fails. }
  224. Begin
  225. sbrk:=nil;
  226. end;
  227. {$I heap.inc}
  228. {****************************************************************************
  229. Low Level File Routines
  230. ****************************************************************************}
  231. procedure AllowSlash(p:pchar);
  232. var
  233. i : longint;
  234. begin
  235. { allow slash as backslash }
  236. for i:=0 to strlen(p) do
  237. if p[i]='/' then p[i]:='\';
  238. end;
  239. procedure do_close(h : longint);
  240. begin
  241. asm
  242. movem.l d2/d3/a2/a3,-(sp)
  243. move.l h,d0
  244. move.w d0,-(sp)
  245. move.w #$3e,-(sp)
  246. trap #1
  247. add.l #4,sp { restore stack ... }
  248. movem.l (sp)+,d2/d3/a2/a3
  249. end;
  250. end;
  251. procedure do_erase(p : pchar);
  252. begin
  253. AllowSlash(p);
  254. asm
  255. move.l d2,d6 { save d2 }
  256. movem.l d3/a2/a3,-(sp) { save regs }
  257. move.l p,-(sp)
  258. move.w #$41,-(sp)
  259. trap #1
  260. add.l #6,sp
  261. move.l d6,d2 { restore d2 }
  262. movem.l (sp)+,d3/a2/a3
  263. tst.w d0
  264. beq @doserend
  265. move.w d0,errno
  266. @doserend:
  267. end;
  268. if errno <> 0 then
  269. Error2InOut;
  270. end;
  271. procedure do_rename(p1,p2 : pchar);
  272. begin
  273. AllowSlash(p1);
  274. AllowSlash(p2);
  275. asm
  276. move.l d2,d6 { save d2 }
  277. movem.l d3/a2/a3,-(sp)
  278. move.l p1,-(sp)
  279. move.l p2,-(sp)
  280. clr.w -(sp)
  281. move.w #$56,-(sp)
  282. trap #1
  283. lea 12(sp),sp
  284. move.l d6,d2 { restore d2 }
  285. movem.l (sp)+,d3/a2/a3
  286. tst.w d0
  287. beq @dosreend
  288. move.w d0,errno { error ... }
  289. @dosreend:
  290. end;
  291. if errno <> 0 then
  292. Error2InOut;
  293. end;
  294. function do_isdevice(handle:word):boolean;
  295. begin
  296. if (handle=stdoutputhandle) or (handle=stdinputhandle) or
  297. (handle=stderrorhandle) then
  298. do_isdevice:=FALSE
  299. else
  300. do_isdevice:=TRUE;
  301. end;
  302. function do_write(h,addr,len : longint) : longint;
  303. begin
  304. asm
  305. move.l d2,d6 { save d2 }
  306. movem.l d3/a2/a3,-(sp)
  307. move.l addr,-(sp)
  308. move.l len,-(sp)
  309. move.l h,d0
  310. move.w d0,-(sp)
  311. move.w #$40,-(sp)
  312. trap #1
  313. lea 12(sp),sp
  314. move.l d6,d2 { restore d2 }
  315. movem.l (sp)+,d3/a2/a3
  316. tst.l d0
  317. bpl @doswrend
  318. move.w d0,errno { error ... }
  319. @doswrend:
  320. move.l d0,@RESULT
  321. end;
  322. if errno <> 0 then
  323. Error2InOut;
  324. end;
  325. function do_read(h,addr,len : longint) : longint;
  326. begin
  327. asm
  328. move.l d2,d6 { save d2 }
  329. movem.l d3/a2/a3,-(sp)
  330. move.l addr,-(sp)
  331. move.l len,-(sp)
  332. move.l h,d0
  333. move.w d0,-(sp)
  334. move.w #$3f,-(sp)
  335. trap #1
  336. lea 12(sp),sp
  337. move.l d6,d2 { restore d2 }
  338. movem.l (sp)+,d3/a2/a3
  339. tst.l d0
  340. bpl @dosrdend
  341. move.w d0,errno { error ... }
  342. @dosrdend:
  343. move.l d0,@Result
  344. end;
  345. if errno <> 0 then
  346. Error2InOut;
  347. end;
  348. function do_filepos(handle : longint) : longint;
  349. begin
  350. asm
  351. move.l d2,d6 { save d2 }
  352. movem.l d3/a2/a3,-(sp)
  353. move.w #1,-(sp) { seek from current position }
  354. move.l handle,d0
  355. move.w d0,-(sp)
  356. move.l #0,-(sp) { with a seek offset of zero }
  357. move.w #$42,-(sp)
  358. trap #1
  359. lea 10(sp),sp
  360. move.l d6,d2 { restore d2 }
  361. movem.l (sp)+,d3/a2/a3
  362. move.l d0,@Result
  363. end;
  364. end;
  365. procedure do_seek(handle,pos : longint);
  366. begin
  367. asm
  368. move.l d2,d6 { save d2 }
  369. movem.l d3/a2/a3,-(sp)
  370. move.w #0,-(sp) { seek from start of file }
  371. move.l handle,d0
  372. move.w d0,-(sp)
  373. move.l pos,-(sp)
  374. move.w #$42,-(sp)
  375. trap #1
  376. lea 10(sp),sp
  377. move.l d6,d2 { restore d2 }
  378. movem.l (sp)+,d3/a2/a3
  379. end;
  380. end;
  381. function do_seekend(handle:longint):longint;
  382. var
  383. t: longint;
  384. begin
  385. asm
  386. move.l d2,d6 { save d2 }
  387. movem.l d3/a2/a3,-(sp)
  388. move.w #2,-(sp) { seek from end of file }
  389. move.l handle,d0
  390. move.w d0,-(sp)
  391. move.l #0,-(sp) { with an offset of 0 from end }
  392. move.w #$42,-(sp)
  393. trap #1
  394. lea 10(sp),sp
  395. move.l d6,d2 { restore d2 }
  396. movem.l (sp)+,d3/a2/a3
  397. move.l d0,t
  398. end;
  399. do_seekend:=t;
  400. end;
  401. function do_filesize(handle : longint) : longint;
  402. var
  403. aktfilepos : longint;
  404. begin
  405. aktfilepos:=do_filepos(handle);
  406. do_filesize:=do_seekend(handle);
  407. do_seek(handle,aktfilepos);
  408. end;
  409. procedure do_truncate (handle,pos:longint);
  410. begin
  411. do_seek(handle,pos);
  412. {!!!!!!!!!!!!}
  413. end;
  414. procedure do_open(var f;p:pchar;flags:longint);
  415. {
  416. filerec and textrec have both handle and mode as the first items so
  417. they could use the same routine for opening/creating.
  418. when (flags and $100) the file will be append
  419. when (flags and $1000) the file will be truncate/rewritten
  420. when (flags and $10000) there is no check for close (needed for textfiles)
  421. }
  422. var
  423. i : word;
  424. oflags: longint;
  425. begin
  426. AllowSlash(p);
  427. { close first if opened }
  428. if ((flags and $10000)=0) then
  429. begin
  430. case filerec(f).mode of
  431. fminput,fmoutput,fminout : Do_Close(filerec(f).handle);
  432. fmclosed : ;
  433. else
  434. begin
  435. inoutres:=102; {not assigned}
  436. exit;
  437. end;
  438. end;
  439. end;
  440. { reset file handle }
  441. filerec(f).handle:=UnusedHandle;
  442. oflags:=$02; { read/write mode }
  443. { convert filemode to filerec modes }
  444. case (flags and 3) of
  445. 0 : begin
  446. filerec(f).mode:=fminput;
  447. oflags:=$00; { read mode only }
  448. end;
  449. 1 : filerec(f).mode:=fmoutput;
  450. 2 : filerec(f).mode:=fminout;
  451. end;
  452. if (flags and $1000)<>0 then
  453. begin
  454. filerec(f).mode:=fmoutput;
  455. oflags:=$04; { read/write with create }
  456. end
  457. else
  458. if (flags and $100)<>0 then
  459. begin
  460. filerec(f).mode:=fmoutput;
  461. oflags:=$02; { read/write }
  462. end;
  463. { empty name is special }
  464. if p[0]=#0 then
  465. begin
  466. case filerec(f).mode of
  467. fminput : filerec(f).handle:=StdInputHandle;
  468. fmappend,
  469. fmoutput : begin
  470. filerec(f).handle:=StdOutputHandle;
  471. filerec(f).mode:=fmoutput; {fool fmappend}
  472. end;
  473. end;
  474. exit;
  475. end;
  476. asm
  477. movem.l d2/d3/a2/a3,-(sp) { save used registers }
  478. cmp.l #4,oflags { check if rewrite mode ... }
  479. bne @opencont2
  480. { rewrite mode - create new file }
  481. move.w #0,-(sp)
  482. move.l p,-(sp)
  483. move.w #$3c,-(sp)
  484. trap #1
  485. add.l #8,sp { restore stack of os call }
  486. bra @end
  487. { reset - open existing files }
  488. @opencont2:
  489. move.l oflags,d0 { use flag as source ... }
  490. @opencont1:
  491. move.w d0,-(sp)
  492. move.l p,-(sp)
  493. move.w #$3d,-(sp)
  494. trap #1
  495. add.l #8,sp { restore stack of os call }
  496. @end:
  497. movem.l (sp)+,d2/d3/a2/a3
  498. tst.w d0
  499. bpl @opennoerr { if positive return values then ok }
  500. cmp.w #-1,d0 { if handle is -1 CON: }
  501. beq @opennoerr
  502. cmp.w #-2,d0 { if handle is -2 AUX: }
  503. beq @opennoerr
  504. cmp.w #-3,d0 { if handle is -3 PRN: }
  505. beq @opennoerr
  506. move.w d0,errno { otherwise normal error }
  507. @opennoerr:
  508. move.w d0,i { get handle as SIGNED VALUE... }
  509. end;
  510. if errno <> 0 then
  511. Error2InOut;
  512. filerec(f).handle:=i;
  513. if ((flags and $100) <> 0) and
  514. (FileRec (F).Handle <> UnusedHandle) then
  515. do_seekend(filerec(f).handle);
  516. end;
  517. {*****************************************************************************
  518. UnTyped File Handling
  519. *****************************************************************************}
  520. {$i file.inc}
  521. {*****************************************************************************
  522. Typed File Handling
  523. *****************************************************************************}
  524. {$i typefile.inc}
  525. {*****************************************************************************
  526. Text File Handling
  527. *****************************************************************************}
  528. {$i text.inc}
  529. {*****************************************************************************
  530. Directory Handling
  531. *****************************************************************************}
  532. procedure DosDir(func:byte;const s:string);
  533. var
  534. buffer : array[0..255] of char;
  535. c : word;
  536. begin
  537. move(s[1],buffer,length(s));
  538. buffer[length(s)]:=#0;
  539. AllowSlash(pchar(@buffer));
  540. c:=word(func);
  541. asm
  542. move.l d2,d6 { save d2 }
  543. movem.l d3/a2/a3,-(sp)
  544. pea buffer
  545. move.w c,-(sp)
  546. trap #1
  547. add.l #6,sp
  548. move.l d6,d2 { restore d2 }
  549. movem.l (sp)+,d3/a2/a3
  550. tst.w d0
  551. beq @dosdirend
  552. move.w d0,errno
  553. @dosdirend:
  554. end;
  555. if errno <> 0 then
  556. Error2InOut;
  557. end;
  558. procedure mkdir(const s : string);[IOCheck];
  559. begin
  560. If InOutRes <> 0 then exit;
  561. DosDir($39,s);
  562. end;
  563. procedure rmdir(const s : string);[IOCheck];
  564. begin
  565. If InOutRes <> 0 then exit;
  566. DosDir($3a,s);
  567. end;
  568. procedure chdir(const s : string);[IOCheck];
  569. begin
  570. If InOutRes <> 0 then exit;
  571. DosDir($3b,s);
  572. end;
  573. function GetDirIO (DriveNr: byte; var Dir: ShortString): word;
  574. [public, alias: 'FPC_GETDIRIO'];
  575. var
  576. temp : array[0..255] of char;
  577. i : longint;
  578. j: byte;
  579. drv: word;
  580. begin
  581. GetDirIO := 0;
  582. drv:=word(drivenr);
  583. asm
  584. move.l d2,d6 { save d2 }
  585. movem.l d3/a2/a3,-(sp)
  586. { Get dir from drivenr : 0=default, 1=A etc... }
  587. move.w drv,-(sp)
  588. { put (previously saved) offset in si }
  589. { move.l temp,-(sp)}
  590. pea temp
  591. { call attos function 47H : Get dir }
  592. move.w #$47,-(sp)
  593. { make the call }
  594. trap #1
  595. add.l #8,sp
  596. move.l d6,d2 { restore d2 }
  597. movem.l (sp)+,d3/a2/a3
  598. end;
  599. { conversion to pascal string }
  600. i:=0;
  601. while (temp[i]<>#0) do
  602. begin
  603. if temp[i]='/' then
  604. temp[i]:='\';
  605. dir[i+3]:=temp[i];
  606. inc(i);
  607. end;
  608. dir[2]:=':';
  609. dir[3]:='\';
  610. dir[0]:=char(i+2);
  611. { upcase the string (FPC Pascal function) }
  612. dir:=upcase(dir);
  613. if drivenr<>0 then { Drive was supplied. We know it }
  614. dir[1]:=chr(65+drivenr-1)
  615. else
  616. begin
  617. asm
  618. move.l d2,d6 { save d2 }
  619. movem.l d3/a2/a3,-(sp)
  620. move.w #$19,-(sp)
  621. trap #1
  622. add.l #2,sp
  623. move.w d0,drv
  624. move.l d6,d2 { restore d2 }
  625. movem.l (sp)+,d3/a2/a3
  626. end;
  627. dir[1]:=chr(byte(drv)+ord('A'));
  628. end;
  629. end;
  630. procedure GetDir (DriveNr: byte; var Dir: ShortString);
  631. begin
  632. InOutRes := GetDirIO (DriveNr, Dir);
  633. end;
  634. {*****************************************************************************
  635. System Dependent Exit code
  636. *****************************************************************************}
  637. Procedure system_exit;
  638. begin
  639. end;
  640. {*****************************************************************************
  641. SystemUnit Initialization
  642. *****************************************************************************}
  643. begin
  644. { Initialize ExitProc }
  645. ExitProc:=Nil;
  646. { Setup heap }
  647. InitHeap;
  648. { Setup stdin, stdout and stderr }
  649. OpenStdIO(Input,fmInput,StdInputHandle);
  650. OpenStdIO(Output,fmOutput,StdOutputHandle);
  651. OpenStdIO(StdOut,fmOutput,StdOutputHandle);
  652. OpenStdIO(StdErr,fmOutput,StdErrorHandle);
  653. { Reset IO Error }
  654. InOutRes:=0;
  655. (* This should be changed to a real value during *)
  656. (* thread driver initialization if appropriate. *)
  657. ThreadID := 1;
  658. errno := 0;
  659. { Setup command line arguments }
  660. argc:=GetParamCount(args);
  661. {$ifdef HASVARIANT}
  662. initvariantmanager;
  663. {$endif HASVARIANT}
  664. end.
  665. {
  666. $Log$
  667. Revision 1.12 2004-12-05 14:36:37 hajny
  668. + GetProcessID added
  669. Revision 1.11 2004/09/03 19:25:21 olle
  670. + added maxExitCode to all System.pp
  671. * constrained error code to be below maxExitCode in RunError et. al.
  672. Revision 1.10 2004/01/20 23:05:31 hajny
  673. * ExecuteProcess fixes, ProcessID and ThreadID added
  674. Revision 1.9 2003/10/25 23:42:35 hajny
  675. * THandle in sysutils common using System.THandle
  676. Revision 1.8 2003/09/29 18:52:36 hajny
  677. * append fix applied to Amiga, Atari, EMX, GO32v2, OS/2 and Watcom
  678. Revision 1.7 2003/09/27 11:52:35 peter
  679. * sbrk returns pointer
  680. Revision 1.6 2002/10/20 12:00:52 carl
  681. - remove objinc.inc (unused file)
  682. * update makefiles accordingly
  683. Revision 1.5 2002/10/13 09:25:23 florian
  684. + call to initvariantmanager inserted
  685. Revision 1.4 2002/09/07 16:01:16 peter
  686. * old logs removed and tabs fixed
  687. }