Re: [BLAST_ANAWARE] emacs/C/C++ question

From: Tancredi Botto (tancredi@lns.mit.edu)
Date: Tue Feb 17 2004 - 17:28:38 EST


>
> does anyone know what a printed "^M" means in emacs? this is a special
> character (like tab or linebreak) that emacs treats as one character, not
> as a textual "^" followed by an "M".

isn't that just the DOS/microsoft carriage return after conversion in unix ?
Like, somebody open your file in notepad and gave back to you ? Then you
need vi to fix it....

:%s/\r//g

'http://www.google.com/search?hl=en&lr=&ie=UTF-8&oe=UTF-8&q=%5EM+dos+vi&btnG=Google+Search'
 
> i am trying to write a C program that will read in the blast.geom file and
> alter only those lines for which Karen's surveys give new values. as
> such, most of the lines read in are just simply written to a new output
> file. however, for some reason unknown to me, when i try to combine
> fprintf statements with strings and non-strings, the new outputted file
> has each string line ending with a "^M".
>
> for example:
>
> fprintf(outFile,"%s",someString);
> fprintf(outFile,"%d %f\n",someInt,someFloat);
>
> produces an output file where the first line ends with a "^M"; the second
> line would not have the "^M" at the end.
>
> i have tried to make this subroutine using C streams (i.e. stdio.h) as
> well as with C++ streams (i.e. fstream), and both independently give me
> the "^M" at the end of each line.
>
> does anyone know why?
>
> thanks,
>
> aaron
>



This archive was generated by hypermail 2.1.2 : Mon Feb 24 2014 - 14:07:30 EST