[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Common gripe for unavailable functions when library does not exist
From: |
Andreas Weber |
Subject: |
Re: Common gripe for unavailable functions when library does not exist |
Date: |
Sun, 17 Jan 2016 17:23:14 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.7.0 |
Am 16.01.2016 um 23:38 schrieb Rik:
> On 01/15/2016 12:32 PM, Andreas Weber wrote:
>> Am 15.01.2016 um 20:42 schrieb Rik:
>>
>>> Strategy 3) Declare macro that expands to error message and use that in
>>> place of error or gripe.
>>>
>>> See audiodevinfo.cc which has
>>>
>>> #define NO_PORTAUDIO_MSG \
>>> error ("portaudio not found on your system and thus audio functionality
>>> is not present"); \
>>> (void) args; /* silence compiler warning "unused parameter" */
>> That was my change during code sprint. I tried to minimize the redundant
>> code for better readability and silence the warnings. I'll change this
>> as soon as we have a decision how to proceed, okay?
> Andy,
>
> I changed the function gripe_disabled_feature to
>
> gripe_disabled_feature (const std::string& fcn, const std::string& feature,
> const std::string& pkg /*="Octave"*/)
> {
> error ("%s: support for %s was unavailable or disabled when %s was built",
> fcn.c_str (), feature.c_str (), pkg.c_str ());
> }
> ...
>
> I think you can do a search and replace for NO_PORTAUDIO_MSG and replace it
> with gripe_disabled_feature()
Done, also for sndfile:
http://hg.savannah.gnu.org/hgweb/octave/rev/a1529d24beff
Thanks, Andy