Because my internet connection being on one computer and my development platform on another, I am forced to find a binary version of perl for win32 (Win 2000). I have tried downloading the source and was going to install it that way, but I have no way of getting the download from one computer to another at the moment. There were a few links to download but they had the olderversion 5.04 and I want the newest version.
Does anybody have a binary version of perl for win32 that I could download from you or know of another alternative to my problem? I would greatly appreciate the help in any way.
The deal is, I am compiling my homemade operating system with gcc and it gives me this: (warning: no newline at end of file). One solution is to write a perl scrip to show the newline character in the textfile or use <perldoc -f seek> to jump to the last character in file and then have it check if its a newline. If it is, figure out somehow to erase it.
I suppose I could maybe do this with a hex editor.
Any suggestions?
Help with perl
Re:Help with perl
Oh holy great gosh a'mighty in a buzzsaw...
You'd rather *insert* a newline or two at the end of the file in question instead of removing the newline. The compiler expects a newline to be there at the end of the file be it *.c file, be it *.h file.
stay safe
You'd rather *insert* a newline or two at the end of the file in question instead of removing the newline. The compiler expects a newline to be there at the end of the file be it *.c file, be it *.h file.
stay safe
Re:Help with perl
As Beyond Infinity pointed out, the compiler is actually warnig you that there isn't a newline where it expected one to be, not that there was one where one shouldn't be. The warning is meant to detect incomplete files; it is primarily for users who are downloading source code over flaky, text-only FTP connectiions.
keep in mind that it is only a warning; while ignoring them is usually a Bad Thing, since you know the cause of it, and know it is harmless, technically you don't need to pay attention to it - the code should have compiled correctly, assuming that this was the only error. The best solution, though, is to add a couple extra lines at the end of each file, which will get rid of the problem once and for all - though while you are doing that, you might want to check to make sure that the files really didn't get truncated.
keep in mind that it is only a warning; while ignoring them is usually a Bad Thing, since you know the cause of it, and know it is harmless, technically you don't need to pay attention to it - the code should have compiled correctly, assuming that this was the only error. The best solution, though, is to add a couple extra lines at the end of each file, which will get rid of the problem once and for all - though while you are doing that, you might want to check to make sure that the files really didn't get truncated.
Re:Help with perl
@Schol-R-LEA:
As usual, Oh mighty Master Yoda, thee words are filled with sweet elegance and the joy of expression. could it be that you're kinda connaisseur?
stay safe ];->
As usual, Oh mighty Master Yoda, thee words are filled with sweet elegance and the joy of expression. could it be that you're kinda connaisseur?
stay safe ];->
Re:Help with perl
what do you mena by checking to make sure that the files didint get runcated?The best solution, though, is to add a couple extra lines at the end of each file, which will get rid of the problem once and for all - though while you are doing that, you might want to check to make sure that the files really didn't get truncated.
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Help with perl
There's one in the DJGPP distribution ...beyondsociety wrote:
Does anybody have a binary version of perl for win32 that I could download from you or know of another alternative to my problem? I would greatly appreciate the help in any way.
Re:Help with perl
I don't know if it's just for checking if a file is truncated though..
I found when i was putting together the AGI compiler, that the preprocessor commands usually end with a new line character and if you don't have one at the end of the file, it might not properly parse the line as a preprocessor.
So I had to rewrite the file reader code to add a newline as the last character in the buffer.
So really, it makes it easier to write a compiler if you assume there's a new line character at the end. GCC has extra code to take care of it and prints a warning.. but other "lesser" compilers might not take this into account.
- Nick
I found when i was putting together the AGI compiler, that the preprocessor commands usually end with a new line character and if you don't have one at the end of the file, it might not properly parse the line as a preprocessor.
So I had to rewrite the file reader code to add a newline as the last character in the buffer.
So really, it makes it easier to write a compiler if you assume there's a new line character at the end. GCC has extra code to take care of it and prints a warning.. but other "lesser" compilers might not take this into account.
- Nick