Hi, maybe I missed it, but is there an option to save files strictly in UNIX format, not DOS? Whenever I edit some code via ecoder then swap to a terminal and re-compile it I get warnings that the file has no newline ending.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
@ goffmt - sorry, I'm not sure I can help - ecoder was written on linux and for me I have no issues with the formatting of the files that it makes or saves - but there have been a number of other comments - perhaps you need to check into the UTF-8 / file-encoding question and make sure that this is saving correctly.
good luck
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2010-02-03
Thanks for the fast reply. What distro of Linux was this built on? I am using Debian stable on the web server I am having problems with. My ecoder dir shows 0.4.5 when I browse to it, but I re-downloaded the 0.4.7 release to ensure I had the latest (so maybe a minor version display bug?) and still experience this problem.
I edit a ".c" file for a c/cpp program, go to compile it with "make" via shell later, and get "Compiling o/rom246b.o … rom246b.c:9:12: warning: no newline at end of file" for any file I edit with ecoder. I don't get this when editing the same files in shell via nano/pico/vi/etc, so I'm not sure what ecoder is/is not appending to the file end. I can reproduce this every time and would be happy to provide testing space on my server to replicate this if necessary.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2010-02-03
Some further googling after posting my previous reply tells me this is due to the C/CPP standards requiring a blank line at the end of a source code file. Perhaps nano/pico/etc know to do this already? It would be nice if you could consider this for inclusion in any future versions (as I had to add my own file types into tree/types.php to begin with); to recognize source code and append a blank line.
I'll go hunt for where ecoder's write routines are now and just fix my own copy for now though :)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
as I never use this file type I'm sorry to say it's not made it in as a standard feature - if you make a stable fix I'd be happy to include it in future releases - thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Is the solution I dropped in around line 25 in code/save/edit.php. You could always filter it on file ext if needed to only apply a newline to c/cpp/h/hpp files, but that's more tinkering than I want to do (not too good at PHP ;)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2010-02-03
Wow, the BB code mangled that post…Retry below, sorry for the repost.
// correct line-endings ##
$save = $save."\n";
Is the solution I dropped in around line 25 in code/save/edit.php. You could always filter it on file ext if needed to only apply a newline to c/cpp/h/hpp files, but that's more tinkering than I want to do (not too good at PHP ;)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, maybe I missed it, but is there an option to save files strictly in UNIX format, not DOS? Whenever I edit some code via ecoder then swap to a terminal and re-compile it I get warnings that the file has no newline ending.
@ goffmt - sorry, I'm not sure I can help - ecoder was written on linux and for me I have no issues with the formatting of the files that it makes or saves - but there have been a number of other comments - perhaps you need to check into the UTF-8 / file-encoding question and make sure that this is saving correctly.
good luck
Thanks for the fast reply. What distro of Linux was this built on? I am using Debian stable on the web server I am having problems with. My ecoder dir shows 0.4.5 when I browse to it, but I re-downloaded the 0.4.7 release to ensure I had the latest (so maybe a minor version display bug?) and still experience this problem.
I edit a ".c" file for a c/cpp program, go to compile it with "make" via shell later, and get "Compiling o/rom246b.o … rom246b.c:9:12: warning: no newline at end of file" for any file I edit with ecoder. I don't get this when editing the same files in shell via nano/pico/vi/etc, so I'm not sure what ecoder is/is not appending to the file end. I can reproduce this every time and would be happy to provide testing space on my server to replicate this if necessary.
Some further googling after posting my previous reply tells me this is due to the C/CPP standards requiring a blank line at the end of a source code file. Perhaps nano/pico/etc know to do this already? It would be nice if you could consider this for inclusion in any future versions (as I had to add my own file types into tree/types.php to begin with); to recognize source code and append a blank line.
I'll go hunt for where ecoder's write routines are now and just fix my own copy for now though :)
I use Ubuntu - currently 8.04 + xampp for a local server.
I've taken some advice and the best suggestion is that you need to add a small patch to the saving code ( code/save/edit.php ):
add something around line 25:
// correct line-endings ##
$save = str_replace ( "\r\n", "\n", $save );
I hope that helps.
ok.. yes - that sounds like a good solution.
as I never use this file type I'm sorry to say it's not made it in as a standard feature - if you make a stable fix I'd be happy to include it in future releases - thanks
// corrent line-endings ##
$save['content'] = $save['content']."\n";
Is the solution I dropped in around line 25 in code/save/edit.php. You could always filter it on file ext if needed to only apply a newline to c/cpp/h/hpp files, but that's more tinkering than I want to do (not too good at PHP ;)
Wow, the BB code mangled that post…Retry below, sorry for the repost.
// correct line-endings ##
$save = $save."\n";
Is the solution I dropped in around line 25 in code/save/edit.php. You could always filter it on file ext if needed to only apply a newline to c/cpp/h/hpp files, but that's more tinkering than I want to do (not too good at PHP ;)