On Sunday 14 May 2006 11.12, Michael Van Canneyt wrote:
> > Suggestion:
> > On win32 switch automatic output writeln flush only off by regular files
> > (FILE_TYPE_DISK) but not by pipes (FILE_TYPE_PIPE):
> >
> > rtl/win32/sysfile.inc
> >
> > function do_isdevice(handle:thandle):boolean;
> > begin
> >   do_isdevice:=(getfiletype(handle)=2);
> > end;
> >
> > change to:
> >
> > function do_isdevice(handle:thandle):boolean;
> > var
> >   wo1: dword;
> > begin
> >   wo1:= getfiletype(handle);
> >   do_isdevice:= (wo1 = FILE_TYPE_CHAR) or (wo1 = FILE_TYPE_PIPE);
> > end;
>
> I would at least make it
>
>    do_isdevice:=(getfiletype(handle)<>FILE_TYPE_DISK);
>
> so it includes 'unknown' file types and future file types.
>

I thought also this way but I didn't dare...

Martin
> Michael.
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to