Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com X-Authentication-Warning: gamera.syr.edu: mdtaffet owned process doing -bs Date: Wed, 19 Sep 2001 14:51:16 -0400 (EDT) From: "Mary D. Taffet" X-Sender: mdtaffet AT gamera DOT syr DOT edu To: Cygwin Subject: How can I get rid of the extra lines that include only "NN"? Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Hello, This is my first message to this mailing list; I just subscribed this morning. I am trying to find a way to run some otherwise Unix/Linux only programs on a Windows machine. There are several programs; some are perl programs which I wrote myself -- they don't need cygwin to run. Other programs are C programs that I was able to compile using Cygwin, but was not able to compile without it. The last program I need to run is one for which I don't have the source. All I have is a previously existing executable which does run under Unix, but does not run under Linux. Some of the perl programs actually do real work, and others merely act as a front-end to the C program and the previously compiled program (i.e. they read through directories, picking out the files that need to be processed and then do system calls to run the other programs). All of these programs have previously been run successfully in a Unix environment, a Linux environment, and sometimes both. Running under Cygwin, I am now faced with a problem that I can't find a ready answer for. Some of my programs run just fine, but others have a problem with writing newlines to the output file. For example, the first program I am running is written entirely in Perl, and does not call another program; there is no problem with the output from this program. The second program I am running is another Perl program which is calling a C program that I compiled under Cygwin. It is calling that program with a system call, where the input file is supplied via an expected command-line argument, and the output file is created by means of redirection. It is the output file from this redirection where I begin to see the problem. In every case where the C program writes a newline to the file, what I see (via Textpad) is a newline, followed by a line consisting of "NN" (sometimes preceded by a space), followed by another newline. For example, what should be: line1 line2 line3 Is looking like: line1 NN line2 NN line3 NN .........Or: line1 NN line2 NN line3 NN Using Notepad, it looks even stranger. For the first instance, what Notepad sees is: line1[strange box character]NN line2[strange box character]NN line3[strange box character]NN If I then FTP the file to a Unix or Linux machine, I see: line1^M/NN line2^M/NN line3^M/NN [the program I am running is the Brill Tagger which applies part-of-speech tags to tokens -- in this case it seems that the Brill Tagger is trying to tag the ^M with a part-of-speech (/NN is a valid part-of-speech tag)....Hmmm.....] I have read a bit about text mode versus binary mode, and assume that my problem is related to this issue. So far, nothing in what I have read offers me a solution to my problem. Any suggestions? I am using Cygwin installed 6/15/2001 on a computer running Windows 2000 Professional. -- Thanks, Mary Taffet mdtaffet AT syr DOT edu -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/