Commit d16bdea5 authored by IOhannes zmölnig's avatar IOhannes zmölnig

Added patch for Pd-0.49

parent fdc88e6b
Description: prepare for Pd-0.49
t_symbol->s_name became "const char*"
Author: IOhannes m zmölnig
Forwarded: not-needed
Last-Update: 2018-09-17
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- pd-gem.orig/src/Base/CPPExtern.cpp
+++ pd-gem/src/Base/CPPExtern.cpp
@@ -135,7 +135,7 @@
vsnprintf(buf, MAXPDSTRING-1, fmt, ap);
va_end(ap);
if(NULL!=m_objectname && NULL!=m_objectname->s_name && &s_ != m_objectname){
- char*objname=m_objectname->s_name;
+ const char*objname=m_objectname->s_name;
if(x_obj)
pd_error(x_obj, "[%s]: %s", objname, buf);
else if (m_holder)
--- pd-gem.orig/src/Base/TextBase.cpp
+++ pd-gem/src/Base/TextBase.cpp
@@ -400,7 +400,7 @@
line+=c;
}
} else {
- char*sp=atom_getsymbol(&argv[i])->s_name;
+ const char*sp=atom_getsymbol(&argv[i])->s_name;
try {
std::wstring ws=toWstring(sp);
line+=ws;
--- pd-gem.orig/src/Controls/gemwin.cpp
+++ pd-gem/src/Controls/gemwin.cpp
@@ -135,7 +135,7 @@
GemMan::pleaseDestroy=false;
if (s != &s_)
- disp = s->s_name;
+ disp = (char*)s->s_name;
if ( !GemMan::windowExists() ) {
GemMan::createContext(disp);
--- pd-gem.orig/src/Gem/Event.cpp
+++ pd-gem/src/Gem/Event.cpp
@@ -458,7 +458,7 @@
}
GEM_EXTERN void triggerKeyboardEvent(char *string, int value, int state)
{
- addEvent(KEYBOARD, gensym(string)->s_name, 0, 0, state, 0, value, 0);
+ addEvent(KEYBOARD, (char*)gensym(string)->s_name, 0, 0, state, 0, value, 0);
}
GEM_EXTERN void triggerResizeEvent(int xSize, int ySize)
{
--- pd-gem.orig/src/Gem/Setup.cpp
+++ pd-gem/src/Gem/Setup.cpp
@@ -110,7 +110,7 @@
return;
}
- char*mypath = 0;
+ const char*mypath = 0;
t_class *c = class_new(gensym("Gem"), 0, 0, 0, 0, A_NULL);
#ifdef HAVE_S_STUFF_H
mypath=c->c_externdir->s_name;
--- pd-gem.orig/src/Geos/multimodel.cpp
+++ pd-gem/src/Geos/multimodel.cpp
@@ -145,7 +145,7 @@
char postName[256];
int i = 0;
- char *strPtr = filename->s_name;
+ const char *strPtr = filename->s_name;
while (strPtr[i] && strPtr[i] != '*') {
preName[i] = strPtr[i];
i++;
--- pd-gem.orig/src/Geos/scopeXYZ~.cpp
+++ pd-gem/src/Geos/scopeXYZ~.cpp
@@ -185,7 +185,7 @@
/////////////////////////////////////////////////////////
void scopeXYZ :: typeMess(t_symbol *type)
{
- char*s=type->s_name;
+ const char*s=type->s_name;
char c=*s;
switch(c){
case 'd': // default
--- pd-gem.orig/src/Particles/part_source.cpp
+++ pd-gem/src/Particles/part_source.cpp
@@ -51,7 +51,7 @@
/////////////////////////////////////////////////////////
void part_source :: domainMess(t_symbol*s)
{
- char *str=s->s_name;
+ const char *str=s->s_name;
if (!strcmp(str,"point" ))m_domain=PDPoint;
else if (!strcmp(str,"line" ))m_domain=PDLine;
--- pd-gem.orig/src/Particles/part_velocity.cpp
+++ pd-gem/src/Particles/part_velocity.cpp
@@ -64,7 +64,7 @@
}
void part_velocity :: domainMess(t_symbol*s){
- char *str=s->s_name;
+ const char *str=s->s_name;
if (!strcmp(str,"point" ))m_domain=PDPoint;
else if (!strcmp(str,"line" ))m_domain=PDLine;
else if (!strcmp(str,"triangle" ))m_domain=PDTriangle;
--- pd-gem.orig/src/Pixes/pix_convert.cpp
+++ pd-gem/src/Pixes/pix_convert.cpp
@@ -86,7 +86,7 @@
}
void pix_convert :: colorMessCallback(void *data, t_symbol*s)
{
- int fo = getPixFormat(s->s_name);
+ int fo = getPixFormat((char*)s->s_name);
if(fo)GetMyClass(data)->m_image.setCsizeByFormat(fo);
GetMyClass(data)->setPixModified();
}
--- pd-gem.orig/src/Pixes/pix_film.cpp
+++ pd-gem/src/Pixes/pix_film.cpp
@@ -338,7 +338,7 @@
closeMess();
char buff[MAXPDSTRING];
- char*buf=buff;
+ const char*buf=buff;
// we first try to find the file-to-open with canvas_makefilename
// if this fails, we just pass the given filename (could be a stream)
canvas_makefilename(const_cast<t_canvas*>(getCanvas()), filename->s_name, buff, MAXPDSTRING);
--- pd-gem.orig/src/Pixes/pix_freeframe.cpp
+++ pd-gem/src/Pixes/pix_freeframe.cpp
@@ -753,7 +753,7 @@
m_canopen=true;
return;
}
- char *pluginname = s->s_name;
+ const char *pluginname = s->s_name;
m_plugin = new FFPlugin(pluginname, getCanvas());
m_image.setCsizeByFormat(m_plugin->GLformat());
@@ -919,7 +919,7 @@
v=atom_getfloat(value);
break;
case (A_SYMBOL):
- v=atom_getsymbol(value)->s_name;
+ v=(char*)atom_getsymbol(value)->s_name;
break;
default:
return;
@@ -947,9 +947,9 @@
::verbose(2, "freeframe_loader: %s",(s?(s->s_name):"<none>"));
try{ \
Obj_header *obj = new (pd_new(pix_freeframe_class),(void *)NULL) Obj_header;
- char*realname=s->s_name+offset_pix_; /* strip of the leading 'pix_' */
+ const char*realname=s->s_name+offset_pix_; /* strip of the leading 'pix_' */
CPPExtern::m_holder = &obj->pd_obj;
- CPPExtern::m_holdname=s->s_name;
+ CPPExtern::m_holdname=(char*)s->s_name;
obj->data = new pix_freeframe(gensym(realname));
CPPExtern::m_holder = NULL;
CPPExtern::m_holdname=NULL;
--- pd-gem.orig/src/Pixes/pix_frei0r.cpp
+++ pd-gem/src/Pixes/pix_frei0r.cpp
@@ -301,7 +301,7 @@
m_canopen=true;
return;
}
- char *pluginname = s->s_name;
+ const char *pluginname = s->s_name;
m_plugin = new F0RPlugin(pluginname, getCanvas());
@@ -495,9 +495,9 @@
::verbose(2, "frei0r_loader: %s",(s?(s->s_name):"<none>"));
try{ \
Obj_header *obj = new (pd_new(pix_frei0r_class),(void *)NULL) Obj_header;
- char*realname=s->s_name+offset_pix_; /* strip of the leading 'pix_' */
+ const char*realname=s->s_name+offset_pix_; /* strip of the leading 'pix_' */
CPPExtern::m_holder = &obj->pd_obj;
- CPPExtern::m_holdname=s->s_name;
+ CPPExtern::m_holdname=(char*)s->s_name;
obj->data = new pix_frei0r(gensym(realname));
CPPExtern::m_holder = NULL;
CPPExtern::m_holdname=NULL;
--- pd-gem.orig/src/Pixes/pix_multiimage.cpp
+++ pd-gem/src/Pixes/pix_multiimage.cpp
@@ -115,7 +115,7 @@
char postName[256];
int i = 0;
- char *strPtr = filename->s_name;
+ const char *strPtr = filename->s_name;
while (strPtr[i] && strPtr[i] != '*')
{
preName[i] = strPtr[i];
--- pd-gem.orig/src/Pixes/pix_record.cpp
+++ pd-gem/src/Pixes/pix_record.cpp
@@ -50,7 +50,7 @@
result=atom_getfloat(ap);
break;
case A_SYMBOL:
- result=atom_getsymbol(ap)->s_name;
+ result=(char*)atom_getsymbol(ap)->s_name;
break;
default:
result=ap->a_w.w_gpointer;
--- pd-gem.orig/src/Pixes/pix_sig2pix.cpp
+++ pd-gem/src/Pixes/pix_sig2pix.cpp
@@ -197,7 +197,7 @@
}
void pix_sig2pix ::csMessCallback(void *data, t_symbol*s)
{
- int cs = getPixFormat(s->s_name);
+ int cs = getPixFormat((char*)s->s_name);
if(cs>0)GetMyClass(data)->csMess(cs);
else GetMyClass(data)->error("colorspace must be Grey, YUV or RGBA");
}
--- pd-gem.orig/src/Pixes/pix_video.cpp
+++ pd-gem/src/Pixes/pix_video.cpp
@@ -471,7 +471,7 @@
result=atom_getfloat(ap);
break;
case A_SYMBOL:
- result=atom_getsymbol(ap)->s_name;
+ result=(char*)atom_getsymbol(ap)->s_name;
break;
default:
result=ap->a_w.w_gpointer;
--- pd-gem.orig/src/openGL/GEMglProgramStringARB.cpp
+++ pd-gem/src/openGL/GEMglProgramStringARB.cpp
@@ -30,7 +30,7 @@
switch (argc) {
default:
case 4:
- string = reinterpret_cast<GLvoid*>(atom_getsymbol(argv+3)->s_name);
+ string = (atom_getsymbol(argv+3)->s_name);
case 3:
len=atom_getint(argv+2);
case 2:
@@ -91,7 +91,7 @@
}
void GEMglProgramStringARB :: stringMess (t_symbol* arg1) { // FUN
- string = reinterpret_cast<GLvoid*>(arg1->s_name);
+ string = (arg1->s_name);
setModified();
}
--- pd-gem.orig/src/openGL/GEMglProgramStringARB.h
+++ pd-gem/src/openGL/GEMglProgramStringARB.h
@@ -50,7 +50,7 @@
GLsizei len; // VAR
virtual void lenMess(t_float); // FUN
- GLvoid *string; // VAR
+ const GLvoid *string; // VAR
virtual void stringMess(t_symbol*); // FUN
......@@ -11,3 +11,4 @@ reproducible.patch
searchpath.patch
urls.patch
spelling.patch
pd49.patch
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