Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: heid_james@lanl.gov (James L. Heid)
Subject: DEC C Weirdness
Date: 1996/07/12	[thread overview]
Message-ID: <heid_james.67.00110427@lanl.gov> (raw)


This happened to me on OpenVMS VAX V6.1 running DEC C V5.0-003

There is a real application behind all this, but I will post the results of a 
test in the hope that someone can explain what is happening.
 
I have a file that has non-printable characters in it. Using the dump utility 
I can tell that one particular 3 byte sequence looks like this (after putting 
it in left-to-right format) 00ff7f.

I wrote a program that opens the input file and an output file and does the 
following:

while ((c = fgetc(fp) != EOF)
          putc(c, outfile);

That's all... just that. I expected, therefore, that I would create an 
identical file and I would still find this 3-byte sequence where it was 
before. However, what I found instead in place of this sequence was the 
linefeed byte, 0a. This sequence occurs 2 times in the file, and both times 
this happens.

Can someone explain this to me? 

Jim Heid
Los Alamos National Laboratory



             reply	other threads:[~1996-07-12  4:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-07-12  4:00 James L. Heid [this message]
1996-07-16  4:00 ` DEC C Weirdness Duane Smith
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox