Csound Csound-dev Csound-tekno Search About

[Cs-dev] ifdef never

Date2012-12-07 05:19
FromAndres Cabrera
Subject[Cs-dev] ifdef never
Hi,

Why is this needed in csound.c?

#ifdef never
void PUBLIC sigcpy(MYFLT *dest, MYFLT *src, int size)
{                           /* Surely a memcpy*/
    memcpy(dest, src, size*sizeof(MYFLT));
}
#endif

I don't see the never macro defined anywhere...

Cheers,
Andrés

------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/lis

Date2012-12-07 09:46
Fromjpff@cs.bath.ac.uk
SubjectRe: [Cs-dev] ifdef never
> Hi,
>
> Why is this needed in csound.c?
>
> #ifdef never
> void PUBLIC sigcpy(MYFLT *dest, MYFLT *src, int size)
> {                           /* Surely a memcpy*/
>     memcpy(dest, src, size*sizeof(MYFLT));
> }
> #endif
>
> I don't see the never macro defined anywhere...
>


Precisely, never is never defined.

I use it to remove code that I do not want to lose.  Istvan used "#if 0"
for this must I like never and somefineday
==John ff


------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2012-12-07 11:29
FromRichard Dobson
SubjectRe: [Cs-dev] ifdef never
On 07/12/2012 09:46, jpff@cs.bath.ac.uk wrote:
>> Hi,
>>
>> Why is this needed in csound.c?
>>
>> #ifdef never
>> void PUBLIC sigcpy(MYFLT *dest, MYFLT *src, int size)
>> {                           /* Surely a memcpy*/
>>      memcpy(dest, src, size*sizeof(MYFLT));
>> }
>> #endif
>>
>> I don't see the never macro defined anywhere...
>>
>
>
> Precisely, never is never defined.
>
> I use it to remove code that I do not want to lose.  Istvan used "#if 0"
> for this must I like never and somefineday
> ==John ff
>
>

I still tend to use #ifdef NOTDEF, which I picked up decades ago from 
CDP's first system programmer Martin Atkins. Istvan's form is unarguably 
"logical", but it is not a symbol that one can really search for!

Richard Dobson



------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2012-12-07 13:17
FromFelipe Sateler
SubjectRe: [Cs-dev] ifdef never
On Fri, Dec 7, 2012 at 6:46 AM,  wrote:
>
> I use it to remove code that I do not want to lose.

Note that git (unlike cvs) is very good at looking for deleted code,
so there is no real need to #ifdef never.

git log -Ssigcpy will look for commits that touch a line containing sigcpy

You can use the --since and --until options if needed. After that you
can use git show to actually see what the commit did.


--

Saludos,
Felipe Sateler

------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2012-12-07 13:45
FromMichael Gogins
SubjectRe: [Cs-dev] ifdef never
I agree with Felipe, and I think it is a good idea to write code that
contains nothing that does not execute. The code should be as clear
and easy to read as possible, without distractions, and that means a
minimum of comments (also potentially confounding) also.

Regards,
Mike

On Fri, Dec 7, 2012 at 8:17 AM, Felipe Sateler  wrote:
> On Fri, Dec 7, 2012 at 6:46 AM,  wrote:
>>
>> I use it to remove code that I do not want to lose.
>
> Note that git (unlike cvs) is very good at looking for deleted code,
> so there is no real need to #ifdef never.
>
> git log -Ssigcpy will look for commits that touch a line containing sigcpy
>
> You can use the --since and --until options if needed. After that you
> can use git show to actually see what the commit did.
>
>
> --
>
> Saludos,
> Felipe Sateler
>
> ------------------------------------------------------------------------------
> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
> Remotely access PCs and mobile devices and provide instant support
> Improve your efficiency, and focus on delivering more value-add services
> Discover what IT Professionals Know. Rescue delivers
> http://p.sf.net/sfu/logmein_12329d2d
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel



-- 
Michael Gogins
Irreducible Productions
http://www.michael-gogins.com
Michael dot Gogins at gmail dot com

------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2012-12-07 13:51
Fromjpff@cs.bath.ac.uk
SubjectRe: [Cs-dev] ifdef never
In the case in question I was unsure that the function was not used and
restoring could be necessary.  My confidence in git is not that strong as
it screws up 3 or 4 times a week.

> I agree with Felipe, and I think it is a good idea to write code that
> contains nothing that does not execute. The code should be as clear
> and easy to read as possible, without distractions, and that means a
> minimum of comments (also potentially confounding) also.
>
> Regards,
> Mike
>
> On Fri, Dec 7, 2012 at 8:17 AM, Felipe Sateler  wrote:
>> On Fri, Dec 7, 2012 at 6:46 AM,  wrote:
>>>
>>> I use it to remove code that I do not want to lose.
>>
>> Note that git (unlike cvs) is very good at looking for deleted code,
>> so there is no real need to #ifdef never.
>>
>> git log -Ssigcpy will look for commits that touch a line containing
>> sigcpy
>>
>> You can use the --since and --until options if needed. After that you
>> can use git show to actually see what the commit did.
>>
>>
>> --
>>
>> Saludos,
>> Felipe Sateler
>>
>> ------------------------------------------------------------------------------
>> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
>> Remotely access PCs and mobile devices and provide instant support
>> Improve your efficiency, and focus on delivering more value-add services
>> Discover what IT Professionals Know. Rescue delivers
>> http://p.sf.net/sfu/logmein_12329d2d
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>
> --
> Michael Gogins
> Irreducible Productions
> http://www.michael-gogins.com
> Michael dot Gogins at gmail dot com
>
> ------------------------------------------------------------------------------
> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
> Remotely access PCs and mobile devices and provide instant support
> Improve your efficiency, and focus on delivering more value-add services
> Discover what IT Professionals Know. Rescue delivers
> http://p.sf.net/sfu/logmein_12329d2d
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>



------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net