Hi
First of all let me thank Authors for supplying SetTextBuf in GPC (20000401 snapshot). There are still, however, some BP functions missing in GPC: SeekEOLN, SeekEOF, Include and Exclude. Providing them in GPC would make porting from BP easier. Maybe the following code could be utilized:
const acTAB = #009; acLF = #010; acCR = #013; acWS = #032;
type AnySetElement = 0..255; AnySet = set of AnySetElement;
function SeekEoln(var aFile: Text): Boolean; var CurPos: Integer; CurChar: Char; begin if not Eoln(aFile) and not Eof(aFile) then begin repeat CurPos := FilePos(aFile); Read(aFile, CurChar); until ((CurChar <> acTAB) and (CurChar <> acWS)) or Eof(aFile); Seek(aFile, CurPos); end; SeekEoln := Eoln(aFile); end;
function SeekEof(var aFile: Text): Boolean; begin while SeekEoln(aFile) and not Eof(aFile) do Readln(aFile); SeekEof := Eof(aFile); end;
procedure Include(var aSet: AnySet; aElement: AnySetElement); begin aSet := aSet + [aElement]; end;
procedure Exclude(var aSet: AnySet; aElement: AnySetElement); begin aSet := aSet - [aElement]; end;
Regards
Couldn't find 2004 snapshot on Agnes. Where can I find it?
I prefer Linux and go32v2 or win32 (mingw, cygwin what is advised?) Marco van de Voort (MarcoV@Stack.nl) http://www.stack.nl/~marcov/xtdlib.htm