Inside vi, you can use the :set ff=??? to change between formats:

`set ff=unix` to convert to Unix; use `:set ff=dos`