title: Unix text file to Windows text file using C with mks temp
body: <p>I want to implement a clean code using C that converts text file from a standard to other. That's how it works: I need to create a temporary file using mks temp function so that i can deal with the temp file. So I would open the file with fdopen and at the end of each line, i need to exchance from "\n" to "\r\n".</p>
  
  <p>Any idea or code snipet so that I can understan how to make that work? How to read any line? And how to make the original file to be a windows file if i am dealing with the temp file?</p>
  
  <p>Txs a lot!</p>