[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Problem with ns (fwd)



Hey, don't tell me, tell the mailing list. Anyone got a handle on
Windows file calls?

thanks,

L.

but the tracefile is text - don't tell me this is a CR/LF thing.

<[email protected]>PGP<http://www.ee.surrey.ac.uk/Personal/L.Wood/>

From: John Perry <[email protected]>
To: Lloyd Wood <[email protected]>
Subject: RE: Problem with ns
Date: Fri, 30 Jul 1999 17:33:32 -0500

Here's the bug:

In the Windows executable version, The fopen() in the setup method of
traffictrace.cc opens a file by default in text mode rather than binary. I
have been unable to get ns to read any trace file, even the example-trace
file included with ns.

The following code is the source of the problem:
		if ((fp = fopen(name_, "r")) == NULL) {
			printf("can't open file %s\n", name_);
			return -1;
		}

If the "r" is changed to "rb" the file will open in binary mode should be
able to be read correctly.

John