Blues76 Posted November 30, 2020 Share Posted November 30, 2020 Hi, I'm trying to convert the following listing from Atari Roots https://www.atariarchives.org/roots/chapter_7.php, The first two in the chapter (maybe the only two) to use in in Eclipse editor compiling with MADS. I know I will have to make some changes. My problem is adding the new line (CR) to the file. I could do it by hand, which I think I will do for now, or I could write a small program to do it. However, there has to be something easier. I searched the forum but I couldn't find how to do this. I don't think the files were saved in Linux because Sublime will open them fine. However, sublime and other editors just see it as a one line. I'm using Windows right now. Maybe they were saved as atari text files? Thanks, Quote Link to comment Share on other sites More sharing options...
Blues76 Posted November 30, 2020 Author Share Posted November 30, 2020 7 minutes ago, Blues76 said: Hi, I'm trying to convert the following listing from Atari Roots https://www.atariarchives.org/roots/chapter_7.php, The first two in the chapter (maybe the only two) to use in in Eclipse editor compiling with MADS. I know I will have to make some changes. My problem is adding the new line (CR) to the file. I could do it by hand, which I think I will do for now, or I could write a small program to do it. However, there has to be something easier. I searched the forum but I couldn't find how to do this. I don't think the files were saved in Linux because Sublime will open them fine. However, sublime and other editors just see it as a one line. I'm using Windows right now. Maybe they were saved as atari text files? Thanks, I think it has to be ATARI text. It seems to be ">" character as EOL (at least it seems when I pasted) into Eclipse. I could write a program to replace that, remove the line numbers and clean the file. Before I do, if there is anything done, I would rather use that. Quote Link to comment Share on other sites More sharing options...
+DjayBee Posted November 30, 2020 Share Posted November 30, 2020 1 Quote Link to comment Share on other sites More sharing options...
Wrathchild Posted November 30, 2020 Share Posted November 30, 2020 The value of the Atari newline character is 155 (or hex $9B) and so a simple way in a (decent) text editor is simple to select the character and 'copy' is and then paste it into the 'find' of the search/replace dialog and have it replaced with a CR/LF 1 Quote Link to comment Share on other sites More sharing options...
TGB1718 Posted November 30, 2020 Share Posted November 30, 2020 As @DjayBee posted MemoPad is a fix for all line endings Literally saved me many hours of typing (although I usually use Linux to to do any large cut/paste options) Makes having a Raspberry Pi all the more worth while (also Cygwin64 is a good tool too) 1 1 Quote Link to comment Share on other sites More sharing options...
fenrock Posted November 30, 2020 Share Posted November 30, 2020 (edited) A couple of one liners for any unix variant. On Windows, I always install Cygwin to get these functions. I've never been able to get on with powershell. With "tr": tr '\233' '\n' < ~/Downloads/PRNTSC1.SRC Equivalent in sed (the king of all line editors) sed 's#\x9b#\n#g' < ~/Downloads/PRNTSC1.SRC Edited November 30, 2020 by fenrock 1 1 Quote Link to comment Share on other sites More sharing options...
Blues76 Posted November 30, 2020 Author Share Posted November 30, 2020 11 hours ago, DjayBee said: very nice. Quote Link to comment Share on other sites More sharing options...
Blues76 Posted November 30, 2020 Author Share Posted November 30, 2020 1 hour ago, fenrock said: A couple of one liners for any unix variant. On Windows, I always install Cygwin to get these functions. I've never been able to get on with powershell. With "tr": tr '\233' '\n' < ~/Downloads/PRNTSC1.SRC Equivalent in sed (the king of all line editors) sed 's#\x9b#\n#g' < ~/Downloads/PRNTSC1.SRC Great. I find using git-bash provides many of the functionalities (maybe not all of them) than Cygwin. I have used Cygwin. That's great to know. I have a linux server at the university that I use and my mac (which is in my office right now). But it is great to have this for Windows as well, as I used it a lot. Thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.