summaryrefslogtreecommitdiff
path: root/fileunit.pas
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-07-18 09:26:29 +0200
committerErich Eckner <git@eckner.net>2017-07-20 12:11:16 +0200
commit2798b395bc067293d3a7d338a792224da17854e3 (patch)
tree2f2edf0b5944a0e01b77029516b3236695cd92be /fileunit.pas
parent1d177b0eb1bcbea486318d5a68dc5f7c1b0e39df (diff)
downloadunits-2798b395bc067293d3a7d338a792224da17854e3.tar.xz
homogenisiere Grosz-Klein-Schreibung
Diffstat (limited to 'fileunit.pas')
-rw-r--r--fileunit.pas38
1 files changed, 19 insertions, 19 deletions
diff --git a/fileunit.pas b/fileunit.pas
index 259e4ff..f949c62 100644
--- a/fileunit.pas
+++ b/fileunit.pas
@@ -51,14 +51,14 @@ var
f: file;
n: string;
begin
- if fileexists(name) then
+ if fileExists(name) then
n:=mkTemp(name+'.XXXXXX')
else
n:=name;
- assignfile(f,n);
+ assignFile(f,n);
rewrite(f,1);
- blockwrite(f,pt^,len);
- closefile(f);
+ blockWrite(f,pt^,len);
+ closeFile(f);
if name<>n then begin
deleteFile(name);
rename(f,name);
@@ -95,30 +95,30 @@ var
it: tInputThread;
datNam: string;
begin
- if fileexists(name) then
+ if fileExists(name) then
datNam:=mkTemp(name+'.XXXXXX')
else
datNam:=name;
pr.options:=pr.options + [poUsePipes];
pr.execute;
- setlength(buf,minBufLen);
- fillchar(buf[0],length(buf)*sizeof(buf[0]),$0);
+ setLength(buf,minBufLen);
+ fillchar(buf[0],length(buf)*sizeOf(buf[0]),$0);
it:=tInputThread.create(pr,pt,len);
- assignfile(f,datNam);
+ assignFile(f,datNam);
rewrite(f,1);
while pr.running or (not it.fertig) or (pr.output.numBytesAvailable>0) do begin
rb:=min(length(buf),pr.output.numBytesAvailable);
if rb>0 then begin
rb:=pr.output.read(buf[0],rb);
- blockwrite(f,buf[0],rb);
+ blockWrite(f,buf[0],rb);
end
else
sleep(1); // nix zu Schreiben, nix zu Lesen, also warten wir
end;
pr.free;
it.free;
- closefile(f);
+ closeFile(f);
if name<>datNam then begin
deleteFile(name);
rename(f,name);
@@ -141,9 +141,9 @@ var
begin
assign(f,name);
reset(f,1);
- len:=filesize(f);
- getmem(pt,len);
- blockread(f,pt^,len);
+ len:=fileSize(f);
+ getMem(pt,len);
+ blockRead(f,pt^,len);
close(f);
end;
@@ -175,7 +175,7 @@ var
pLen,rb,br: longint;
begin
pLen:=minBufLen;
- getmem(pTmp,pLen);
+ getMem(pTmp,pLen);
br:=0;
pr.options:=pr.options + [poUsePipes];
pr.execute;
@@ -186,9 +186,9 @@ begin
pt:=pTmp;
len:=pLen;
pLen:=br+rb+minBufLen;
- getmem(pTmp,pLen);
+ getMem(pTmp,pLen);
move(pt^,pTmp^,len);
- freemem(pt);
+ freeMem(pt);
end;
rb:=pr.output.read((pTmp+br)^,rb);
br:=br+rb;
@@ -196,9 +196,9 @@ begin
else sleep(1);
end;
len:=br;
- getmem(pt,len);
+ getMem(pt,len);
move(pTmp^,pt^,len);
- freemem(pTmp);
+ freeMem(pTmp);
pr.free;
end;
@@ -233,7 +233,7 @@ begin
else
wb:=wb+cwb;
end;
- proc.CloseInput;
+ proc.closeInput;
fertig:=true;
end;