Re: [PD] weird pdp code

2016-02-20 Thread Jonathan Wilkes via Pd-list
Some OSX details:OS X El CapitanVersion 10.11.2
Samples of the errors using /usr/bin/gcc or usr/bin/clang are:
pdp_imageproc_portable.c:594:38: error: function definition is not allowed here
  double mapx(double _x, double _y){return cx + izx * ( c * (_x-cx) + ...
pdp_imageproc_portable.c:595:38: error: function definition is not allowed here 
 double mapy(double _x, double _y){return cy + izy * (-s * (_x-cx) + ...


I found this while getting the GUI port up and running on OSX.  If anybody 
still uses PDP and wants to update this code to compile on OSX, let me know and 
I'll apply the patch(es).
-Jonathan   

 On Saturday, February 20, 2016 3:05 PM, Jonathan Wilkes via Pd-list 
 wrote:
 

 > (i remember having troubles with those functions on other
compilers...but it's been years :-))
Presently it fails to compile under OSX.  It's a fairly recent mac air-- I 
don't have the specs atm but I'll check and post later.
-Jonathan 

On Saturday, February 20, 2016 2:36 PM, IOhannes m zmölnig 
 wrote:
 

 On 02/19/2016 09:37 PM, Jonathan Wilkes via Pd-list wrote:
> Hi List,
> Line 593 of pdp_imageproc_portable.c:    /* affine x, y mappings in screen 
> coordinates */    double mapx(double _x, double _y){return cx + izx * ( c * 
> (_x-cx) + s * (_y-cy));}    double mapy(double _x, double _y){return cy + izy 
> * (-s * (_x-cx) + c * (_y-cy));}
> 
> These lines are found _inside_ a function called 
> pdp_imageproc_resample_affinemap_process.

there's nothing (much) wrong with it: nested functions are a gcc extension.
(i remember having troubles with those functions on other
compilers...but it's been years :-))


> It's fun to focus on the substring "portable.c", and just read these lines a 
> few times. :)

"portable" means different things to different people.

for you it seems to refer to usability on multiple operating-systems and
compilers.
it could also have referred to the file-size (pdp_imageproc_portable.c
easily fits on a floppy).
knowing tom a bit, it's most likely that this is about portability
between multiple architectures all running linux (and looking at the
other files nearby this is very much the case - as the "portable" code
is opposed to code explictely using i586 instructions)

gmasrd
IOhannes

___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


   
___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


  ___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] weird pdp code

2016-02-20 Thread Jonathan Wilkes via Pd-list
> (i remember having troubles with those functions on other
compilers...but it's been years :-))
Presently it fails to compile under OSX.  It's a fairly recent mac air-- I 
don't have the specs atm but I'll check and post later.
-Jonathan 

On Saturday, February 20, 2016 2:36 PM, IOhannes m zmölnig 
 wrote:
 

 On 02/19/2016 09:37 PM, Jonathan Wilkes via Pd-list wrote:
> Hi List,
> Line 593 of pdp_imageproc_portable.c:    /* affine x, y mappings in screen 
> coordinates */    double mapx(double _x, double _y){return cx + izx * ( c * 
> (_x-cx) + s * (_y-cy));}    double mapy(double _x, double _y){return cy + izy 
> * (-s * (_x-cx) + c * (_y-cy));}
> 
> These lines are found _inside_ a function called 
> pdp_imageproc_resample_affinemap_process.

there's nothing (much) wrong with it: nested functions are a gcc extension.
(i remember having troubles with those functions on other
compilers...but it's been years :-))


> It's fun to focus on the substring "portable.c", and just read these lines a 
> few times. :)

"portable" means different things to different people.

for you it seems to refer to usability on multiple operating-systems and
compilers.
it could also have referred to the file-size (pdp_imageproc_portable.c
easily fits on a floppy).
knowing tom a bit, it's most likely that this is about portability
between multiple architectures all running linux (and looking at the
other files nearby this is very much the case - as the "portable" code
is opposed to code explictely using i586 instructions)

gmasrd
IOhannes

___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


  ___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] weird pdp code

2016-02-20 Thread IOhannes m zmölnig
On 02/19/2016 09:37 PM, Jonathan Wilkes via Pd-list wrote:
> Hi List,
> Line 593 of pdp_imageproc_portable.c:/* affine x, y mappings in screen 
> coordinates */double mapx(double _x, double _y){return cx + izx * ( c * 
> (_x-cx) + s * (_y-cy));}double mapy(double _x, double _y){return cy + izy 
> * (-s * (_x-cx) + c * (_y-cy));}
> 
> These lines are found _inside_ a function called 
> pdp_imageproc_resample_affinemap_process.

there's nothing (much) wrong with it: nested functions are a gcc extension.
(i remember having troubles with those functions on other
compilers...but it's been years :-))


> It's fun to focus on the substring "portable.c", and just read these lines a 
> few times. :)

"portable" means different things to different people.

for you it seems to refer to usability on multiple operating-systems and
compilers.
it could also have referred to the file-size (pdp_imageproc_portable.c
easily fits on a floppy).
knowing tom a bit, it's most likely that this is about portability
between multiple architectures all running linux (and looking at the
other files nearby this is very much the case - as the "portable" code
is opposed to code explictely using i586 instructions)

gmasrd
IOhannes



signature.asc
Description: OpenPGP digital signature
___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list