Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14853
Modified Files:
Tag: impd_0_37
g_all_guis.c g_array.c g_bang.c g_canvas.c g_editor.c
g_hslider.c g_io.c g_mycanvas.c g_readwrite.c g_text.c
Log Message:
a bit more ansi-conformant + less warnings
Index: g_array.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_array.c,v
retrieving revision 1.1.1.3.2.2.2.3
retrieving revision 1.1.1.3.2.2.2.4
diff -C2 -d -r1.1.1.3.2.2.2.3 -r1.1.1.3.2.2.2.4
*** g_array.c 1 Apr 2004 23:22:01 -0000 1.1.1.3.2.2.2.3
--- g_array.c 2 Apr 2004 00:16:42 -0000 1.1.1.3.2.2.2.4
***************
*** 10,13 ****
--- 10,16 ----
#include <math.h>
+ /* fabsf is ISO C 1999 actually */
+ /* #define fabsf(x) ((float)fabs(x)) */
+
/* see also the "plot" object in g_scalar.c which deals with graphing
arrays which are fields in scalars. Someday we should unify the
Index: g_text.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_text.c,v
retrieving revision 1.1.1.4.2.2.2.7
retrieving revision 1.1.1.4.2.2.2.8
diff -C2 -d -r1.1.1.4.2.2.2.7 -r1.1.1.4.2.2.2.8
*** g_text.c 1 Apr 2004 23:22:02 -0000 1.1.1.4.2.2.2.7
--- g_text.c 2 Apr 2004 00:16:43 -0000 1.1.1.4.2.2.2.8
***************
*** 817,821 ****
return "objectbox";
}
! // case T_OBJECT: return "objectbox";
case T_MESSAGE: return "message";
case T_ATOM: return "atom";
--- 817,821 ----
return "objectbox";
}
! /* case T_OBJECT: return "objectbox"; */
case T_MESSAGE: return "message";
case T_ATOM: return "atom";
Index: g_readwrite.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_readwrite.c,v
retrieving revision 1.1.1.3.2.1
retrieving revision 1.1.1.3.2.1.2.1
diff -C2 -d -r1.1.1.3.2.1 -r1.1.1.3.2.1.2.1
*** g_readwrite.c 23 Sep 2003 00:44:54 -0000 1.1.1.3.2.1
--- g_readwrite.c 2 Apr 2004 00:16:43 -0000 1.1.1.3.2.1.2.1
***************
*** 20,24 ****
int *p_next)
{
! int i, j;
int indexwas = *p_next;
*p_indexout = indexwas;
--- 20,24 ----
int *p_next)
{
! int i;
int indexwas = *p_next;
*p_indexout = indexwas;
***************
*** 50,54 ****
int *p_nextmsg, t_symbol *templatesym, t_word *w, int argc, t_atom *argv)
{
! int message, nline, n, i;
t_template *template = template_findbyname(templatesym);
--- 50,54 ----
int *p_nextmsg, t_symbol *templatesym, t_word *w, int argc, t_atom *argv)
{
! int message, n, i;
t_template *template = template_findbyname(templatesym);
***************
*** 65,69 ****
if (template->t_vec[i].ds_type == DT_ARRAY)
{
- int j;
t_array *a = w[i].w_array;
int elemsize = a->a_elemsize, nitems = 0;
--- 65,68 ----
***************
*** 105,109 ****
int *p_nextmsg, int selectit)
{
! int message, i, j, nline;
t_template *template;
t_symbol *templatesym;
--- 104,108 ----
int *p_nextmsg, int selectit)
{
! int message, nline;
t_template *template;
t_symbol *templatesym;
***************
*** 160,173 ****
void glist_readfrombinbuf(t_glist *x, t_binbuf *b, char *filename, int selectem)
{
! t_canvas *canvas = glist_getcanvas(x);
! int cr = 0, natoms, nline, message, nextmsg = 0, i, j, nitems;
t_atom *vec;
- t_gobj *gobj;
-
natoms = binbuf_getnatom(b);
vec = binbuf_getvec(b);
!
!
! /* check for file type */
nline = canvas_scanbinbuf(natoms, vec, &message, &nextmsg);
if (nline != 1 && vec[message].a_type != A_SYMBOL &&
--- 159,167 ----
void glist_readfrombinbuf(t_glist *x, t_binbuf *b, char *filename, int selectem)
{
! int natoms, nline, message, nextmsg = 0;
t_atom *vec;
natoms = binbuf_getnatom(b);
vec = binbuf_getvec(b);
! /* check for file type */
nline = canvas_scanbinbuf(natoms, vec, &message, &nextmsg);
if (nline != 1 && vec[message].a_type != A_SYMBOL &&
***************
*** 245,250 ****
t_canvas *canvas = glist_getcanvas(x);
int wasvis = glist_isvisible(canvas);
! int cr = 0, natoms, nline, message, nextmsg = 0, i, j;
! t_atom *vec;
if (!strcmp(format->s_name, "cr"))
--- 239,243 ----
t_canvas *canvas = glist_getcanvas(x);
int wasvis = glist_isvisible(canvas);
! int cr = 0;
if (!strcmp(format->s_name, "cr"))
***************
*** 361,365 ****
int amarrayelement)
{
- t_dataslot *ds;
t_template *template = template_findbyname(templatesym);
t_atom *a = (t_atom *)t_getbytes(0);
--- 354,357 ----
***************
*** 533,542 ****
static void glist_write(t_glist *x, t_symbol *filename, t_symbol *format)
{
! int cr = 0, i;
t_binbuf *b;
char buf[MAXPDSTRING];
! t_symbol **templatevec = getbytes(0);
! int ntemplates = 0;
! t_gobj *y;
t_canvas *canvas = glist_getcanvas(x);
canvas_makefilename(canvas, filename->s_name, buf, MAXPDSTRING);
--- 525,532 ----
static void glist_write(t_glist *x, t_symbol *filename, t_symbol *format)
{
! int cr = 0;
t_binbuf *b;
char buf[MAXPDSTRING];
! /*t_symbol **templatevec = getbytes(0);*/
t_canvas *canvas = glist_getcanvas(x);
canvas_makefilename(canvas, filename->s_name, buf, MAXPDSTRING);
***************
*** 630,634 ****
t_symbol **templatevec = getbytes(0);
int i, ntemplates = 0;
- t_gobj *y;
canvas_collecttemplatesfor(x, &ntemplates, &templatevec, wholething);
for (i = 0; i < ntemplates; i++)
--- 620,623 ----
Index: g_io.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_io.c,v
retrieving revision 1.1.1.1.16.2.2.3
retrieving revision 1.1.1.1.16.2.2.4
diff -C2 -d -r1.1.1.1.16.2.2.3 -r1.1.1.1.16.2.2.4
*** g_io.c 1 Apr 2004 23:22:01 -0000 1.1.1.1.16.2.2.3
--- g_io.c 2 Apr 2004 00:16:43 -0000 1.1.1.1.16.2.2.4
***************
*** 97,101 ****
}
! //static int tot;
t_int *vinlet_perform(t_int *w)
--- 97,101 ----
}
! /*static int tot;*/
t_int *vinlet_perform(t_int *w)
***************
*** 234,238 ****
}
- //static void *vinlet_newsig(void)
static void *vinlet_newsig(t_symbol *s)
{
--- 234,237 ----
***************
*** 393,397 ****
{
t_voutlet *x = (t_voutlet *)(w[1]);
! // t_float *dummy = (t_float *)(w[2]);
int n = (int)(w[2]);
t_float *in = x->x_empty;
--- 392,396 ----
{
t_voutlet *x = (t_voutlet *)(w[1]);
! /* t_float *dummy (t_float *)(w[2]); */
int n = (int)(w[2]);
t_float *in = x->x_empty;
***************
*** 477,486 ****
re_parentvecsize = 1;
}
! // bigperiod = (downsample * myvecsize)/(upsample * parentvecsize); /* IOhannes */
bigperiod = myvecsize/re_parentvecsize; /* IOhannes */
if (!bigperiod) bigperiod = 1;
epilogphase = phase & (bigperiod - 1);
blockphase = (phase + period - 1) & (bigperiod - 1) & (- period);
! // bufsize = parentvecsize * upsample; /* IOhannes */
bufsize = re_parentvecsize; /* IOhannes */
if (bufsize < myvecsize) bufsize = myvecsize;
--- 476,485 ----
re_parentvecsize = 1;
}
! /*bigperiod = (downsample * myvecsize)/(upsample * parentvecsize); IOhannes */
bigperiod = myvecsize/re_parentvecsize; /* IOhannes */
if (!bigperiod) bigperiod = 1;
epilogphase = phase & (bigperiod - 1);
blockphase = (phase + period - 1) & (bigperiod - 1) & (- period);
! /*bufsize = parentvecsize * upsample; IOhannes */
bufsize = re_parentvecsize; /* IOhannes */
if (bufsize < myvecsize) bufsize = myvecsize;
Index: g_all_guis.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_all_guis.c,v
retrieving revision 1.1.1.4.2.4.2.13
retrieving revision 1.1.1.4.2.4.2.14
diff -C2 -d -r1.1.1.4.2.4.2.13 -r1.1.1.4.2.4.2.14
*** g_all_guis.c 30 Mar 2004 01:54:08 -0000 1.1.1.4.2.4.2.13
--- g_all_guis.c 2 Apr 2004 00:16:42 -0000 1.1.1.4.2.4.2.14
***************
*** 604,608 ****
break1:
for (i=0; i<argc; i++) {
! //fprintf(stderr,"i=%d fmt[i]=%c\n",i,fmt[i]);
switch (fmt[i]) {
case '*': case ';': goto break2;
--- 604,608 ----
break1:
for (i=0; i<argc; i++) {
! /*fprintf(stderr,"i=%d fmt[i]=%c\n",i,fmt[i]);*/
switch (fmt[i]) {
case '*': case ';': goto break2;
***************
*** 611,630 ****
double *p = va_arg(val,double*);
*p = atom_getfloatarg(i,argc,argv);
! //fprintf(stderr," getting double*=0x%08x, *=%f\n",p,*p);
} break;
case 'f': {
float *p = va_arg(val,float*);
*p = atom_getfloatarg(i,argc,argv);
! //fprintf(stderr," getting float*=0x%08x, *=%f\n",p,*p);
} break;
case 'i': {
int *p = va_arg(val, int*);
*p = atom_getintarg(i,argc,argv);
! //fprintf(stderr," getting int*=0x%08x, *=%d\n",p,*p);
} break;
case 's': {
t_symbol **p = va_arg(val,t_symbol**);
*p = atom_getsymbolarg(i,argc,argv);
! //fprintf(stderr," getting t_symbol**=0x%08x, *=%s\n",p, (*p)->s_name);
} break;
case 'a': {
--- 611,630 ----
double *p = va_arg(val,double*);
*p = atom_getfloatarg(i,argc,argv);
! /*fprintf(stderr," getting double*=0x%08x, *=%f\n",p,*p);*/
} break;
case 'f': {
float *p = va_arg(val,float*);
*p = atom_getfloatarg(i,argc,argv);
! /*fprintf(stderr," getting float*=0x%08x, *=%f\n",p,*p);*/
} break;
case 'i': {
int *p = va_arg(val, int*);
*p = atom_getintarg(i,argc,argv);
! /*fprintf(stderr," getting int*=0x%08x, *=%d\n",p,*p);*/
} break;
case 's': {
t_symbol **p = va_arg(val,t_symbol**);
*p = atom_getsymbolarg(i,argc,argv);
! /*fprintf(stderr," getting t_symbol**=0x%08x, *=%s\n",p, (*p)->s_name);*/
} break;
case 'a': {
***************
*** 646,650 ****
return 1;
err:
! //post("WARNING: pd_scanargs failed; fmt=%s, i=%d",fmt,i);
return 0;
}
--- 646,650 ----
return 1;
err:
! /*post("WARNING: pd_scanargs failed; fmt=%s, i=%d",fmt,i);*/
return 0;
}
Index: g_mycanvas.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_mycanvas.c,v
retrieving revision 1.1.1.3.2.2.2.3
retrieving revision 1.1.1.3.2.2.2.4
diff -C2 -d -r1.1.1.3.2.2.2.3 -r1.1.1.3.2.2.2.4
*** g_mycanvas.c 30 Mar 2004 01:35:09 -0000 1.1.1.3.2.2.2.3
--- g_mycanvas.c 2 Apr 2004 00:16:43 -0000 1.1.1.3.2.2.2.4
***************
*** 182,186 ****
int w = (int)atom_getintarg(2, argc, argv);
int h = (int)atom_getintarg(3, argc, argv);
! int sr_flags = iemgui_dialog(&x->x_gui, srl, argc, argv);
x->x_gui.x_isa.x_loadinit = 0;
--- 182,186 ----
int w = (int)atom_getintarg(2, argc, argv);
int h = (int)atom_getintarg(3, argc, argv);
! /* int sr_flags = */ iemgui_dialog(&x->x_gui, srl, argc, argv);
x->x_gui.x_isa.x_loadinit = 0;
***************
*** 253,257 ****
int bflcol[]={-233017, -1, -66577};
int a=IEM_GUI_DEFAULTSIZE, w=100, h=60;
! int ldx=20, ldy=12, f=2, i=0;
int fs=14;
--- 253,257 ----
int bflcol[]={-233017, -1, -66577};
int a=IEM_GUI_DEFAULTSIZE, w=100, h=60;
! int ldx=20, ldy=12, i=0;
int fs=14;
Index: g_editor.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_editor.c,v
retrieving revision 1.1.1.4.2.3.2.8
retrieving revision 1.1.1.4.2.3.2.9
diff -C2 -d -r1.1.1.4.2.3.2.8 -r1.1.1.4.2.3.2.9
*** g_editor.c 1 Apr 2004 23:22:01 -0000 1.1.1.4.2.3.2.8
--- g_editor.c 2 Apr 2004 00:16:42 -0000 1.1.1.4.2.3.2.9
***************
*** 885,889 ****
t_linetraverser t;
t_glist *g = glist_getcanvas(self);
! if (sscanf(linesym->s_name,"l%x",oc)<1) {
bug("%s:%d BERSERK!\n",__FILE__,__LINE__);
}
--- 885,889 ----
t_linetraverser t;
t_glist *g = glist_getcanvas(self);
! if (sscanf(linesym->s_name,"l%x",(unsigned*)&oc)<1) {
bug("%s:%d BERSERK!\n",__FILE__,__LINE__);
}
***************
*** 905,909 ****
post("canvas_click_on_wire: 0x%08x %s %f %f %f %f",
(unsigned)self, linesym->s_name, x, y, b, f);
! //post("shiftmod=%d runmode=%d altmod=%d rightclick=%d b=%f f=%f",shiftmod,runmode,altmod,rightclick,b,f);
if (!runmode && !altmod && !shiftmod && !rightclick) {
t_outconnect *oc;
--- 905,909 ----
post("canvas_click_on_wire: 0x%08x %s %f %f %f %f",
(unsigned)self, linesym->s_name, x, y, b, f);
! /*post("shiftmod=%d runmode=%d altmod=%d rightclick=%d b=%f f=%f",shiftmod,runmode,altmod,rightclick,b,f);*/
if (!runmode && !altmod && !shiftmod && !rightclick) {
t_outconnect *oc;
***************
*** 924,928 ****
post("canvas_click_on_object: 0x%08x %s %f %f %f %f",
(unsigned)self, linesym->s_name, x, y, b, f);
! //post("shiftmod=%d runmode=%d altmod=%d rightclick=%d b=%f f=%f",shiftmod,runmode,altmod,rightclick,b,f);
if (!runmode && !altmod && !shiftmod && !rightclick) {
}
--- 924,928 ----
post("canvas_click_on_object: 0x%08x %s %f %f %f %f",
(unsigned)self, linesym->s_name, x, y, b, f);
! /*post("shiftmod=%d runmode=%d altmod=%d rightclick=%d b=%f f=%f",shiftmod,runmode,altmod,rightclick,b,f);*/
if (!runmode && !altmod && !shiftmod && !rightclick) {
}
***************
*** 1055,1059 ****
t_rtext *rt;
/* check if the box is being text edited */
! nooutletafterall:
if (ob && (rt = x->gl_editor->e_textedfor) &&
rt == glist_findrtext(x, ob))
--- 1055,1059 ----
t_rtext *rt;
/* check if the box is being text edited */
! /* nooutletafterall:*/
if (ob && (rt = x->gl_editor->e_textedfor) &&
rt == glist_findrtext(x, ob))
Index: g_hslider.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_hslider.c,v
retrieving revision 1.1.1.3.2.2.2.10
retrieving revision 1.1.1.3.2.2.2.11
diff -C2 -d -r1.1.1.3.2.2.2.10 -r1.1.1.3.2.2.2.11
*** g_hslider.c 30 Mar 2004 01:35:09 -0000 1.1.1.3.2.2.2.10
--- g_hslider.c 2 Apr 2004 00:16:43 -0000 1.1.1.3.2.2.2.11
***************
*** 376,385 ****
iem_inttofstyle(&x->x_gui.x_fsf, 0);
! //post("vslider before min=%f max=%f &min=%08x &max=%08x",min,max,&min,&max);
if(pd_scanargs(argc,argv,"iiddiiaaaiiiiiiii;?",
&w,&h,&min,&max,&lilo,&isa,&srl[0],&srl[1],&srl[2],
&ldx,&ldy,&fstyle,&fs,&bflcol[0],&bflcol[1],&bflcol[2],&v))
{
! //post("vslider after min=%f max=%f",min,max);
iem_inttosymargs(&x->x_gui.x_isa, isa);
iemgui_new_getnames2(&x->x_gui, 6, srl[0], srl[1], srl[2]);
--- 376,385 ----
iem_inttofstyle(&x->x_gui.x_fsf, 0);
! /*post("vslider before min=%f max=%f &min=%08x &max=%08x",min,max,&min,&max);*/
if(pd_scanargs(argc,argv,"iiddiiaaaiiiiiiii;?",
&w,&h,&min,&max,&lilo,&isa,&srl[0],&srl[1],&srl[2],
&ldx,&ldy,&fstyle,&fs,&bflcol[0],&bflcol[1],&bflcol[2],&v))
{
! /*post("vslider after min=%f max=%f",min,max);*/
iem_inttosymargs(&x->x_gui.x_isa, isa);
iemgui_new_getnames2(&x->x_gui, 6, srl[0], srl[1], srl[2]);
Index: g_canvas.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_canvas.c,v
retrieving revision 1.1.1.4.2.7.2.9
retrieving revision 1.1.1.4.2.7.2.10
diff -C2 -d -r1.1.1.4.2.7.2.9 -r1.1.1.4.2.7.2.10
*** g_canvas.c 1 Apr 2004 23:22:01 -0000 1.1.1.4.2.7.2.9
--- g_canvas.c 2 Apr 2004 00:16:42 -0000 1.1.1.4.2.7.2.10
***************
*** 1322,1326 ****
DECL(canvas_symbolatom)
DECL(glist_scalar)
! //DECL(canvas_guiext)
void canvas_click_on_object(t_canvas *self, t_symbol linesym,
--- 1322,1326 ----
DECL(canvas_symbolatom)
DECL(glist_scalar)
! /*DECL(canvas_guiext)*/
void canvas_click_on_object(t_canvas *self, t_symbol linesym,
***************
*** 1367,1371 ****
DEF(canvas_mycnv,"mycnv");
DEF(canvas_numbox,"numbox");
! // DEF(canvas_guiext,"guiext");
/* ------------------------ gui stuff --------------------------- */
--- 1367,1371 ----
DEF(canvas_mycnv,"mycnv");
DEF(canvas_numbox,"numbox");
! /* DEF(canvas_guiext,"guiext");*/
/* ------------------------ gui stuff --------------------------- */
Index: g_bang.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_bang.c,v
retrieving revision 1.1.1.3.2.2.2.10
retrieving revision 1.1.1.3.2.2.2.11
diff -C2 -d -r1.1.1.3.2.2.2.10 -r1.1.1.3.2.2.2.11
*** g_bang.c 30 Mar 2004 01:35:09 -0000 1.1.1.3.2.2.2.10
--- g_bang.c 2 Apr 2004 00:16:42 -0000 1.1.1.3.2.2.2.11
***************
*** 144,148 ****
int fthold = (int)atom_getintarg(2, argc, argv);
int ftbreak = (int)atom_getintarg(3, argc, argv);
! int sr_flags = iemgui_dialog(&x->x_gui, srl, argc, argv);
x->x_gui.x_h = x->x_gui.x_w = iemgui_clip_size(a);
bng_check_minmax(x, ftbreak, fthold);
--- 144,148 ----
int fthold = (int)atom_getintarg(2, argc, argv);
int ftbreak = (int)atom_getintarg(3, argc, argv);
! /* int sr_flags = */ iemgui_dialog(&x->x_gui, srl, argc, argv);
x->x_gui.x_h = x->x_gui.x_w = iemgui_clip_size(a);
bng_check_minmax(x, ftbreak, fthold);