Page 1 of 1

Misc.cpp errors

Posted: Sat May 23, 2009 5:32 pm
by aergad
In Misc.cpp this starting at line 276

Code: Select all

bool alpha_check(unsigned char val){
	if((val >= 0x41 && val <=0x5A) || (val >= 0x61 && val <=0x7A))
		return true;
	else
		return false;
<<<<<<< .mine
}

=======
}

int GetItemNameCrc(string item_name){
	const char *src = item_name.c_str();
	uLong crc = crc32(0L, Z_NULL, 0);    
    crc = crc32(crc, (unsigned const char *)src,strlen(src)) + 1;
return sint32(crc) * -1;

}>>>>>>> .r679
needs to be changed to

Code: Select all

bool alpha_check(unsigned char val){
	if((val >= 0x41 && val <=0x5A) || (val >= 0x61 && val <=0x7A))
		return true;
	else
		return false;
}

int GetItemNameCrc(string item_name){
	const char *src = item_name.c_str();
	uLong crc = crc32(0L, Z_NULL, 0);    
    crc = crc32(crc, (unsigned const char *)src,strlen(src)) + 1;
return sint32(crc) * -1;

}
in order to compile on windows or linux with the latest svn revision available

Re: Misc.cpp errors

Posted: Sat May 23, 2009 7:01 pm
by John Adams
misc.cpp is not like that on SVN, in either the dev or public svn.

delete misc.cpp from your World folder and re-update. a fresh one will come down.

what that is telling you is there was a change to your misc.cpp that SVN tried to merge, and couldn't. So it commenting your code vs SVN's so your changes are not lost. If you made no changes, then shrug. Delete the file and re-update.

Re: Misc.cpp errors

Posted: Sun May 24, 2009 5:08 pm
by paulgh
Hi John,

I'm going to have to beg to differ, as I just check the sourceforge svn, both with viewvc and rechecking out the file. I remember seeing this back in April, but as it was minor and caused errors, I had assumed it had been a momentary glitch. I always use the compiled exe, so I forgot all about it.

BTW: misc.cpp is in common, not world. Just to be sure we're looking at the same file.

Re: Misc.cpp errors

Posted: Sun May 24, 2009 5:40 pm
by alfa
Hi,
I having trouble with Misc.cpp too (on linux compile)

Re: Misc.cpp errors

Posted: Sun May 24, 2009 6:03 pm
by John Adams
paulgh wrote:Hi John,

I'm going to have to beg to differ, as I just check the sourceforge svn, both with viewvc and rechecking out the file. I remember seeing this back in April, but as it was minor and caused errors, I had assumed it had been a momentary glitch. I always use the compiled exe, so I forgot all about it.

BTW: misc.cpp is in common, not world. Just to be sure we're looking at the same file.
Along with the thousands of other things that continue to mystify me, today I do see an issue with the April 25th checkin of misc.cpp. I'll clean it up and recommit. Should hit the public SVN tomorrow morning.

Sorry for the confusion -- and so I don't sound like an utter fool, I swear on the private (dev, which feeds public) SVN this is what it looks like:

Code: Select all

bool alpha_check(unsigned char val){
	if((val >= 0x41 && val <=0x5A) || (val >= 0x61 && val <=0x7A))
		return true;
	else
		return false;
}

int GetItemNameCrc(string item_name){
	const char *src = item_name.c_str();
	uLong crc = crc32(0L, Z_NULL, 0);    
    crc = crc32(crc, (unsigned const char *)src,strlen(src)) + 1;
return sint32(crc) * -1;

}
Looked ok to me. :roll: Not sure why going from one SVN to the other (automatically) would create that problem.

Re: Misc.cpp errors

Posted: Sun May 24, 2009 6:05 pm
by Zcoretri
Ha, thanks JA...I was just posting that in the public SVN it indeed was messed up somehow...looked like around ver 677 - 679?

Re: Misc.cpp errors

Posted: Mon May 25, 2009 10:24 am
by paulgh
Hi John,

Something has gone out of whack somewhere, as it's now even worse.

Code: Select all

 		return false;
 <<<<<<< .mine
 }
 
 =======
 }
 
 int GetItemNameCrc(string item_name){
 	const char *src = item_name.c_str();
 	uLong crc = crc32(0L, Z_NULL, 0);
     crc = crc32(crc, (unsigned const char *)src,strlen(src)) + 1;
 return sint32(crc) * -1;
 
 <<<<<<< .mine
 }>>>>>>> .r679
 =======
 }
 >>>>>>> .r706

Re: Misc.cpp errors

Posted: Mon May 25, 2009 12:01 pm
by John Adams
Awright, I tried to fix it by what I thought was a normal process, but apparently LE has some other magic going on between the two SVN's.

I do not have write access to public SVN, so we'll have to wait til he gets back from holiday to sort this out. Meanwhile, just remove those <<< >>> lines and any dupe code.

Sorry for making it worse. It still looks perfect on the Dev SVN :) Attaching the "clean" misc.cpp that goes in the Source/common folder, if you need it.

Once LE fixes this, I'll remove this attachment, since it'll be obsolete.

Re: Misc.cpp errors

Posted: Mon May 25, 2009 12:02 pm
by Zcoretri
This is fixed, you just might have to wait for it to be pushed to the public SVN

Or we do what JA says :)

Re: Misc.cpp errors

Posted: Mon May 25, 2009 12:12 pm
by LethalEncounter
Someone checked in some code with conflicts in it :P

Re: Misc.cpp errors

Posted: Mon May 25, 2009 12:30 pm
by John Adams
That's what I thought too, LE. Bion checked something in that day for ItemCRC's, and that's the block that's messed up... but, it's not messed up on our Dev SVN - only the public. And we do not have access to check stuff in to Public, far as I know.