[PD] weird pdp code

IOhannes m zmölnig zmoelnig at iem.at
Sat Feb 20 20:36:41 CET 2016

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
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)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20160220/b8aa14b7/attachment.sig>

More information about the Pd-list mailing list