Commit d9479b0c authored by IOhannes m zmölnig's avatar IOhannes m zmölnig
Browse files

use %p for printing pointers

parent 35a3996c
......@@ -65,7 +65,7 @@ t_gemreceive_proxy*gemreceive::add_key(t_symbol*key)
bind_list->elements=0;
bind_list->next=0;
debug_post("binding %x to %s", bind_list, key->s_name);
debug_post("binding %p to %s", bind_list, key->s_name);
pd_bind(&bind_list->p_obj.ob_pd, key);
t_gemreceive_proxy*last=proxy_list;
......@@ -90,7 +90,7 @@ void gemreceive::add_element(t_gemreceive_proxy*bind_list,
*/
t_float priority=element->priority;
t_bind_element*elements=bind_list->elements, *last=0;
debug_post("priority insert of %x:%g", element, priority);
debug_post("priority insert of %p:%g", element, priority);
if(!elements || elements->priority >= priority) {
bind_list->elements = element;
......@@ -100,17 +100,17 @@ void gemreceive::add_element(t_gemreceive_proxy*bind_list,
}
debug_post("trying %x:%g", elements, elements->priority);
debug_post("trying %p:%g", elements, elements->priority);
while(elements && elements->priority < priority) {
debug_post("skipping %x:%g to %x", elements, elements->priority,
debug_post("skipping %p:%g to %p", elements, elements->priority,
elements->next);
last=elements;
elements=elements->next;
}
debug_post("inserting after %x:%g", last,
debug_post("inserting after %p:%g", last,
(last ? (last->priority):0));
debug_post("inserting before %x:%g", elements,
debug_post("inserting before %p:%g", elements,
(elements?(elements->priority):0));
element->next=elements;
......@@ -126,7 +126,7 @@ void gemreceive::bind(gemreceive*x, t_symbol*key, t_float priority)
{
t_gemreceive_proxy*bind_list=0;
t_bind_element*element=0;
debug_post("trying to bind 0x%X:: '%s':%g via %x", x, key->s_name,
debug_post("trying to bind %p:: '%s':%g via %p", x, key->s_name,
priority, proxy_list);
bind_list=find_key(key);
......@@ -153,7 +153,7 @@ void gemreceive::unbind(gemreceive*x, t_symbol*key)
t_gemreceive_proxy*list=0, *last=0;
t_bind_element*elements=0, *lastlmn=0;
debug_post("trying to unbind 0x%X:: '%s' from %x", x, key->s_name,
debug_post("trying to unbind %p:: '%s' from %p", x, key->s_name,
proxy_list);
for(list=proxy_list; list && list->key!=key; list=list->next) {
......@@ -222,8 +222,7 @@ gemreceive :: gemreceive(t_symbol*s,t_floatarg f) :
m_name(s), m_priority(f),
m_outlet(NULL), m_fltin(NULL)
{
debug_post("hi, i am gemreceive 0x%X", this);
debug_post("hi, i am gemreceive %p", this);
m_fltin = inlet_new(this->x_obj, &this->x_obj->ob_pd, &s_float,
gensym(""));
......@@ -258,7 +257,7 @@ gemreceive :: ~gemreceive()
/////////////////////////////////////////////////////////
void gemreceive :: receive(t_symbol*s, int argc, t_atom*argv)
{
debug_post("receiveing....%x", m_outlet);
debug_post("receiveing....%p", m_outlet);
outlet_anything(m_outlet, s, argc, argv);
}
......@@ -303,12 +302,12 @@ void gemreceive :: proxyCallback(t_gemreceive_proxy*p, t_symbol*s,
{
t_bind_element*elements=p->elements;
debug_post("proxy anything: %x", p);
debug_post("proxy anything: %p", p);
while(elements) {
gemreceive*o=elements->object;
elements=elements->next;
debug_post("proxy for 0x%X", o);
debug_post("proxy for %p", o);
if(o) {
o->receive(s, argc, argv);
}
......
......@@ -290,13 +290,13 @@ PBuffer::PBuffer(int width, int height, int flag) : width(width),
data = new PBuffer_data;
data->old_context = CGLGetCurrentContext();
err = CGLGetVirtualScreen(data->old_context, &vs);
verbose (2, "Target Context (0x%X) Renderer: %s\n",data->old_context,
verbose (2, "Target Context (%p) Renderer: %s\n",data->old_context,
glGetString (GL_RENDERER));
cglReportError(CGLChoosePixelFormat (attrib, &data->pixfmt, &npf));
cglReportError(CGLCreateContext (data->pixfmt, data->old_context,
&(data->context)));
verbose (2, "pBuffer Context (0x%X) Renderer: %s\n",data->context,
verbose (2, "pBuffer Context (%p) Renderer: %s\n",data->context,
glGetString (GL_RENDERER));
/* if (float_buffer)
......@@ -308,7 +308,7 @@ PBuffer::PBuffer(int width, int height, int flag) : width(width),
cglReportError( CGLSetCurrentContext( data->context ) );
cglReportError( CGLGetVirtualScreen(data->old_context, &vs) );
cglReportError( CGLSetPBuffer(data->context, data->pbuffer, 0, 0, vs) );
verbose (2, "pbuffer (0x%X) Renderer: %s\n",data->pbuffer,
verbose (2, "pbuffer (%p) Renderer: %s\n",data->pbuffer,
glGetString (GL_RENDERER));
}
......@@ -339,9 +339,9 @@ void PBuffer::enable()
cglReportError (CGLSetCurrentContext (data->context));
cglReportError (CGLGetVirtualScreen ( data->old_context, &vs ));
cglReportError( CGLSetPBuffer( data->context, data->pbuffer, 0, 0, vs) );
debug ("enable Context (0x%X) Renderer: %s\n",CGLGetCurrentContext(),
debug ("enable Context (%p) Renderer: %s\n",CGLGetCurrentContext(),
glGetString (GL_RENDERER));
debug ("pBuffer Context (0x%X) Renderer: %s\n",data->context,
debug ("pBuffer Context (%p) Renderer: %s\n",data->context,
glGetString (GL_RENDERER));
return;
......
......@@ -191,7 +191,7 @@ bool pix_record :: addHandle( std::vector<std::string>available,
m_ids.push_back(key);
m_allhandles.push_back(handle);
count++;
verbose(2, "added backend#%d '%s' @ 0x%x", m_allhandles.size()-1,
verbose(2, "added backend#%d '%s' @ %p", m_allhandles.size()-1,
key.c_str(), handle);
}
}
......
......@@ -134,7 +134,7 @@ void pix_share_write :: freeShm()
#else
if(shm_addr) {
if (shmdt(shm_addr) == -1) {
error("shmdt failed at %x", shm_addr);
error("shmdt failed at %p", shm_addr);
}
}
shm_addr=NULL;
......@@ -363,7 +363,7 @@ int pix_share_write :: getShm(int argc,t_atom*argv)
t_pixshare_header *h=(t_pixshare_header *)shm_addr;
h->size = (shm_desc.shm_segsz-sizeof(t_pixshare_header));
verbose(1, "shm:: id(%d) segsz(%d) cpid (%d) mem(0x%X)",
verbose(1, "shm:: id(%d) segsz(%d) cpid (%d) mem(%p)",
shm_id,shm_desc.shm_segsz,shm_desc.shm_cpid, shm_addr);
} else {
error("couldn't get shm_id: error %d", errno);
......
......@@ -223,7 +223,7 @@ bool pix_video :: addHandle( std::vector<std::string>available,
m_videoHandles.push_back(handle);
count++;
MARK;
verbose(2, "added backend#%d '%s' @ 0x%x", m_videoHandles.size()-1,
verbose(2, "added backend#%d '%s' @ %p", m_videoHandles.size()-1,
key.c_str(), handle);
MARK;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment