Re: [Freedos-user] TEE truncates file

2005-04-09 Thread Jim Hall
Jose Antonio Senna wrote:
 I tested TEE with commands like 
 DIR C: |TEE CDIR
 MEM /d /f /x |TEE MAP
 and it always truncates the files,that is,some lines that appear last on
 screen do not appear in the file. I think this rules out the possibility
 of screen output being a mix of stdout and stderr.
 Can it be that TEE makes some copy mistake ?
 This happens under kernel 2035, kwc38616 and also under DrDOS.
 Regards
 JAS

Just getting back to this ... a month late.  My bad.
Ugh, I just looked at my TEE 1.0 source code, and it's fugly.  Sorry 
about that.  But at least it's easy to follow:

After TEE find the output file name, it calls outtee() like this:
  outtee (stdin, pFile, stdout);
Where 'pFile' is the file that you want to save a copy of stdin to.
I don't know why I write outtee() as a standalone function, cause it's 
so short and simple.  I wrote this when I was a student.  Anyway, the 
outtee() function just does this (brackets added for readability):

  while ((ch = fgetc (pIn)) != EOF) {
if ((fputc (ch, pSave) == EOF) || (fputc (ch, pOut) == EOF)) {
  return (FALSE);
}
  }
  return (TRUE);
That is, outtee() will keep reading a character at a time from stdin 
(passed as 'pIn') until it reaches EOF.  As it reads, it saves a copy of 
the input to 'pSave' and prints a copy to 'pOut' (this is written as 
saving a copy of the character to two output streams.)  If there's an 
I/O error while writing to 'pSave' (i.e. disk full) or if there's some 
problem writing to stdout, then it quits.

I/O buffering could get in the way of this, I suppose.
-jh

--
I'm sorry my president's an idiot. I didn't vote for him.
---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click
___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user


Re: [Freedos-user] Tee

2005-02-03 Thread Jim Hall
Jose Antonio Senna wrote:
 Would anybody provide a link to the FreeDOS tee utility ?
 There is no file by that name in ibiblio.org directory
 Regards
 JAS

I'll also make sure a copy is mirrored on ibiblio, but the original is here:
http://www.freedos.org/jhall/freedos/utils/
-jh
--
_
I'm sorry my president's an idiot. I didn't vote for him.
---
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag--drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user


Re: [Freedos-user] Tee

2005-02-03 Thread Jim Hall
Jim Hall wrote:
Jose Antonio Senna wrote:
 Would anybody provide a link to the FreeDOS tee utility ?
 There is no file by that name in ibiblio.org directory
 Regards
 JAS

I'll also make sure a copy is mirrored on ibiblio, but the original is 
here:

http://www.freedos.org/jhall/freedos/utils/

Mirrored on ibiblio:
http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/util/file/
--
_
I'm sorry my president's an idiot. I didn't vote for him.
---
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag--drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user


Re: [Freedos-user] Tee

2005-02-02 Thread Tom Lee Mullins
Jose Antonio Senna wrote:
Would anybody provide a link to the FreeDOS tee utility ?
There is no file by that name in ibiblio.org directory
Regards
JAS

http://rpmfind.net/linux/RPM/PLD/dists/ra/PLD/i386/PLD/RPMS/dosemu-freedos-util-beta7h01-3.i386.html
http://www.jpsdomain.org/windows/win-tools.html
Possible links?
TomLeeM/BDG

---
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag--drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user


Re: [Freedos-user] Tee

2005-02-01 Thread Bernd Blaauw
Jose Antonio Senna schreef:
Would anybody provide a link to the FreeDOS tee utility ?
There is no file by that name in ibiblio.org directory
Regards
JAS
 

http://www.freedos.org/freedos/software/lsm.cgi?q=va=util/tee.lsm
Bernd

---
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag--drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user