if the below comment was aimed at me it was missplaced since if you read the post i alread agreed with you.
Apparently there's some part of my suggested code that you think is broken or incorrect; I assure you it's not.
With all due respect:
It's clear you're not familiar with the "ins and outs" of the C++ language. You'll end up writing a lot of code with good intentions, and then running into a lot of problems that, to more experienced developers, are simple mistakes simply fixed. I make no claims to speak for the official Code::Blocks developers, but I imagine it may be somewhat annoying to see the Code::Blocks Development forum filled with posts that have less to do with getting serious work done on C::B and more to do with you figuring out how C++ works.
This comment was towards Alturin and if you look lower you will see why.
and the only reason why i made the below comment is because of the crappy,
undocumented Code Completion that tweaked my brain. the code asumes
everything is correct it has functions that can used for error checking
but are not. some areas it should not be since if its to flexible on
now it parses things you wont know whats causing the corrupted data
but in other areas it needs it.
i found each compiler handles certain things differently.
bool hello = true;
wxFile f("myfile");
i know the MS compiler if you do a if statement if(!hello && f.write(_("2"),2) > 0)
since the hello is true it f.write does not get ran..
but the other day with the g++ for some reason there was a if statement that was like that and the code still got ran.
I dont know why and maybe i did something wronge but im pretty sure it was because how g++ compiled it.
so if f.write gets ran and it should not it might error.
but then again i might be wronge.. i will try to reproduce the probem i was running into and post it here.
How about this:
if(mark_length && f.Write(mark, mark_length) != mark_length)
return false;
This way it won't write anything when there's nothing to write?
in most cases Alturin code would work fine. the only time that it would mess up is if for one you ran
out of hard drive space, the file is trying to get larger then the OS's / FileSystems
allows or if the file is not locked and someone deletes it. and finally stream or cpu glitch.
these are mostly not common but can happen.
the likely hood of it returning -1 or less when the documentation says it returns bytes written
it cant write negative values. the only way that would even be possible is if something
was accessing memory it should not be, but then again better safe then sorry.
@devil....
Please don't fill up the Developer forum with your crappy patches. I've tested some of your patches and they break more than they fix.
IMO, you are trying to show that Code::Blocks's 0.25 million lines of code is mere crap and is broken.
The problem is you are reading few lines of code and making 100 lines of comments. Try to understand why that piece of code is there and if you remove it what will happen to the remaining code.
I'm sorry if my reply seems harsh. But I can't stop writing this. I'm sick of your posts.
My suggestion, if you find any bugs, report it in Berlios. If you have fixed that, post it in Berlios. We'll test it and apply.
Don't use this forum to post each and every piece of code you write.
In short, Please Don't Pollute the Forum.
you are correct about my original patches. even said my self i was unsure.
and that why i have not posted another patch. everything else was tracing code down and pointing out the area.
but since i dont know the code as well as you who have been working on it for so long i was hoping for replies
in more detail so i could understand the coders intentions so that i would not fuck up like i did on the first
patches.
as for the other stuff i was just trying to be personalble and most of it i was asking for input.