changeset 48:ed6c21dde840

* use correct format (%p) for pointers
author thib
date Wed, 15 Apr 2009 20:28:19 +0000
parents 5f548e5957a8
children 6581f7eccd26
files music2/wavfile.cc scn2k/scn2k_grp.cc system/system_config.cc window/event.cc window/picture.cc
diffstat 5 files changed, 15 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/music2/wavfile.cc
+++ b/music2/wavfile.cc
@@ -750,7 +750,7 @@ struct MP3FILE_impl {
 MP3FILE_impl::MP3FILE_impl(FILE* _stream) {
 	stream = _stream;
 	info = SMPEG_new_descr(fileno(stream), NULL, 0);
-fprintf(stderr,"mp3 %x\n",info);
+fprintf(stderr,"mp3 %p\n",info);
 	if (info && SMPEG_error(info) ) info = 0;
 	SMPEG_enableaudio(info, 0);
 	SMPEG_enableaudio(info, 1);
--- a/scn2k/scn2k_grp.cc
+++ b/scn2k/scn2k_grp.cc
@@ -1377,21 +1377,21 @@ bool GrpImpl::Wait(unsigned int current_
 	if (grpdump_req) {
 		grpdump_req = 0;
 		std::map<int,GrpObj>::iterator it;
-		fprintf(stderr,"front %08x(%d) / %08x(%d)\n",screen,screen->IsHidden(),screen_front,screen_front->IsHidden());
+		fprintf(stderr,"front %p(%d) / %p(%d)\n",screen,screen->IsHidden(),screen_front,screen_front->IsHidden());
 		for (it=grpobj.begin(); it != grpobj.end(); it++) {
 			GrpObj& obj = it->second;
 			GrpObj& parent_obj = grpobj[ ((it->first)/1000) * 1000];
 			if (obj.picture) {
 				if (!obj.name.empty()) {
-					fprintf(stderr,"obj %06d(%08x): name %10s  pos %d,%d alpha %d (%d/%d/%d)\n",
+					fprintf(stderr,"obj %06d(%p): name %10s  pos %d,%d alpha %d (%d/%d/%d)\n",
 					it->first,obj.picture,obj.name.c_str(),
 					obj.PosX(),obj.PosY(),obj.alpha,obj.attr&GrpObj::HIDDEN ? 1 : 0,parent_obj.attr&GrpObj::HIDDEN_GROUP ? 1 : 0,obj.picture->IsHidden());
 				} else if (!obj.print_moji.empty()) {
-					fprintf(stderr,"obj %06d(%08x): name %10s  pos %d,%d alpha %d (%d/%d/%d)\n",
+					fprintf(stderr,"obj %06d(%p): name %10s  pos %d,%d alpha %d (%d/%d/%d)\n",
 					it->first,obj.picture,obj.print_moji.c_str(),
 					obj.PosX(),obj.PosY(),obj.alpha,obj.attr&GrpObj::HIDDEN ? 1 : 0,parent_obj.attr&GrpObj::HIDDEN_GROUP ? 1 : 0,obj.picture->IsHidden());
 				} else {
-					fprintf(stderr,"obj %06d(%08x): name %10s  pos %d,%d alpha %d (%d/%d/%d)\n",
+					fprintf(stderr,"obj %06d(%p): name %10s  pos %d,%d alpha %d (%d/%d/%d)\n",
 					it->first,obj.picture,"<EMPTY>",
 					obj.PosX(),obj.PosY(),obj.alpha,obj.attr&GrpObj::HIDDEN ? 1 : 0,parent_obj.attr&GrpObj::HIDDEN_GROUP ? 1 : 0,obj.picture->IsHidden());
 				}
@@ -1399,7 +1399,7 @@ bool GrpImpl::Wait(unsigned int current_
 		}
 		std::list<PicBase*>::iterator it2;
 		for (it2=parent.children.begin(); it2!=parent.children.end();it2++) {
-			fprintf(stderr,"%08x(%d)\n",*it2,(*it2)->IsHidden());
+			fprintf(stderr,"%p(%d)\n",*it2,(*it2)->IsHidden());
 		}
 		RefreshObj();
 
--- a/system/system_config.cc
+++ b/system/system_config.cc
@@ -367,14 +367,14 @@ public:
 			fprintf(f, ") ");
 		}
 		if (old_data) {
-			fprintf(f, "old %08x(%d", (unsigned int)(old_data), old_data[0]);
+			fprintf(f, "old %p(%d", old_data, old_data[0]);
 			int i;for (i=1; i<item_deal; i++) {
 				fprintf(f, ",%d",old_data[i]);
 			}
 			fprintf(f, ") ");
 		}
 		if (new_data) {
-			fprintf(f, "new %08x(%d", (unsigned int)(new_data), new_data[0]);
+			fprintf(f, "new %p(%d", new_data, new_data[0]);
 			int i;for (i=1; i<item_deal; i++) {
 				fprintf(f, ",%d",new_data[i]);
 			}
--- a/window/event.cc
+++ b/window/event.cc
@@ -254,11 +254,11 @@ void ContainerImplVideo::Delete(Video* d
 		SetChanged();
 	} else {
 		fprintf(stderr,"\nXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n");
-		fprintf(stderr,"X  ContainerImplVideo: Cannot delete node %x\n",delete_event);
+		fprintf(stderr,"X  ContainerImplVideo: Cannot delete node %p\n",delete_event);
 		fprintf(stderr,"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n\n");
 		fprintf(stderr,"vector from:\n");
 		for(it=begin(); it!=end(); it++) {
-			fprintf(stderr,"%x, ",*it);
+			fprintf(stderr,"%p, ",*it);
 		}
 		fprintf(stderr,"\n");
 	}
--- a/window/picture.cc
+++ b/window/picture.cc
@@ -130,7 +130,7 @@ void PicBase::Blit(const Rect& rpos_orig
 			Rect clip(surface_x, surface_y, surface_x+surface_w, surface_y+surface_h);
 			rpos.intersect(clip);
 		}
-//if (apos.ty < 200) fprintf(stderr,"Blit: %08x : (%d,%d,%d,%d) -> (%d,%d,%d,%d)\n",surface_own,rpos_orig.lx,rpos_orig.ty,rpos_orig.rx,rpos_orig.by,apos.lx,apos.ty,apos.rx,apos.by);
+//if (apos.ty < 200) fprintf(stderr,"Blit: %p : (%d,%d,%d,%d) -> (%d,%d,%d,%d)\n",surface_own,rpos_orig.lx,rpos_orig.ty,rpos_orig.rx,rpos_orig.by,apos.lx,apos.ty,apos.rx,apos.by);
 		root->BlitSurface(surface_own, rpos, surface_alpha, surface_alpha_rect, root->surface, apos, attribute);
 		rpos.rmove(-surface_x, -surface_y);
 	} else if (parent == 0) { // 親がいないなら背景消去の責任をもつ
@@ -151,7 +151,7 @@ void PicBase::SimpleBlit(Surface* screen
 		Rect clip(surface_x, surface_y, surface_x+surface_w, surface_y+surface_h);
 		rpos.intersect(clip);
 	}
-//if (apos.ty < 200) fprintf(stderr,"S-Blit: %08x : (%d,%d,%d,%d) -> (%d,%d,%d,%d)\n",surface_own,rel_pos.lx,rel_pos.ty,rel_pos.rx,rel_pos.by,apos.lx,apos.ty,apos.rx,apos.by);
+//if (apos.ty < 200) fprintf(stderr,"S-Blit: %p : (%d,%d,%d,%d) -> (%d,%d,%d,%d)\n",surface_own,rel_pos.lx,rel_pos.ty,rel_pos.rx,rel_pos.by,apos.lx,apos.ty,apos.rx,apos.by);
 	root->BlitSurface(surface_own, rpos, surface_alpha, surface_alpha_rect, screen, apos, attribute);
 }
 
@@ -540,7 +540,7 @@ void PicContainer::BlitChildren(Rect rpo
 if (print_blit) fprintf(stderr,"bc.");
 	iterator end = children.end();
 	for (iterator it = children.begin(); it != end; it++) {
-if ( (*it)->is_hidden_now) if(print_blit) fprintf(stderr,"bch %08x;",*it);
+if ( (*it)->is_hidden_now) if(print_blit) fprintf(stderr,"bch %p;",*it);
 		if ( (*it)->is_hidden_now) continue;
 		if ( (*it)->rel_pos.is_crossed(rpos)) {
 			Rect cpos = child_pos(rpos, *it);
@@ -886,7 +886,7 @@ if(print_blit){
 		UpdateItem& item = update_rects[i];
 		Rect& ur = item.apos;
 		if (ur.width() == 0) continue;
-if(print_blit)fprintf(stderr,"%08x: %d,%d,%d,%d",item.pic, item.apos.lx, item.apos.ty, item.apos.rx, item.apos.by);
+if(print_blit)fprintf(stderr,"%p: %d,%d,%d,%d",item.pic, item.apos.lx, item.apos.ty, item.apos.rx, item.apos.by);
 
 		item.pic->ExecReBlit(item.rpos);
 if(print_blit)fprintf(stderr,"\n");
@@ -955,7 +955,7 @@ inline SDL_Rect SDLed(const Rect& rect) 
 #define ALPHA_MAX 255
 #endif
 void PicRoot::BlitSurface(Surface* src, const Rect& src_r, const unsigned char* alpha, const Rect& alpha_r, Surface* dest, const Rect& dest_r, int attribute) const {
-if (print_blit) fprintf(stderr," s %08x %d:%d:%d:%d;",src, dest_r.lx, dest_r.ty, dest_r.rx, dest_r.by);
+if (print_blit) fprintf(stderr," s %p %d:%d:%d:%d;",src, dest_r.lx, dest_r.ty, dest_r.rx, dest_r.by);
 	SDL_Rect sr = SDLed(src_r); SDL_Rect dr = SDLed(dest_r);
 
 	if (attribute & PicBase::BLIT_MULTIPLY) {