Path: utzoo!utgpu!water!watmath!clyde!rutgers!mit-eddie!husc6!think!ames!pasteur!ucbvax!lucy.wellesley.EDU!sshurr From: sshurr@lucy.wellesley.EDU (Scott) Newsgroups: comp.os.vms Subject: C printf and PHOTO Message-ID: <8801232216.AA06909@ucbvax.Berkeley.EDU> Date: 21 Jan 88 15:31:44 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 43 We are having the following problem with the PHOTO program running on VMS 4.5: I write a C program that does printf's, such as the following: #include stdio main() { printf("Here is a line followed by two returns.\n\n"); printf("Here is another line.\n"); } When I run it normally, it does what I would expect, as in: $ RUN TEST Here is a line followed by two returns. Here is another line. $ But when I start up PHOTO, run the program, and exit PHOTO, I see: $ TYPE PHOTO.LOG Here is a line followed by two returns. Here is another line. So, where did that second \n go to? Is there something special I must put into my c programs to make PHOTO capture their output correctly? Or is this a bug in PHOTO itself or in the pseudo-terminal driver it uses? Just out of curiosity, I tried running this program after doing: $ SET HOST 0/LOG With the following result: $ TYPE SETHOST.LOG Here is a line followed by two returns. Here is another line. That's right, the log had an EXTRA blank line! Can anyone explain this behavior and/or suggest a solution? Thanks, --Scott Shurr sshurr@lucy.wellesley.edu