On Fri, Aug 29, 2008 at 10:15:13AM +0200, Thomas Weber wrote:
> Package is 1.1.2, octave 3.0.1:
>
> octave:2> pkg install audio-1.1.2.tar.gz
> aurecord.cc: In function ‘int capture(int, short int*, int)’:
> aurecord.cc:335: warning: deprecated conversion from string constant to
> ‘char*’
> aurecord.cc:345: warning: deprecated conversion from string constant to
> ‘char*’
> aurecord.cc:365: warning: deprecated conversion from string constant to
> ‘char*’
> aurecord.cc:381: warning: deprecated conversion from string constant to
> ‘char*’
> aurecord.cc: In function ‘int capture(int, short int*, int)’:
> aurecord.cc:335: warning: deprecated conversion from string constant to
> ‘char*’
> aurecord.cc:345: warning: deprecated conversion from string constant to
> ‘char*’
> aurecord.cc:365: warning: deprecated conversion from string constant to
> ‘char*’
> aurecord.cc:381: warning: deprecated conversion from string constant to
> ‘char*’
>
>
> After unloading/uninstalling, it leaves a "sound_play_utility" global
> variable behind. Kids, didn't your parents tell you to clean the table
> before you go? :)
>
>
> That variable is set to
> octave:7> sound_play_utility
> sound_play_utility = ofsndplay -
>
>
> I don't think I'll have much luck looking for "ofsndplay" on this
> non-Mac system.
>
>
> Generally, I think packages should not use global variables at all
> themselves: if the user sets a variable, using it is okay, but don't
> export them yourself:
> So, if the user sets "sound_play_utility", that value should be used,
> but it should not be a global variable the package exports itself.[1]
>
> So, sound.m tries to set sound_play_utility again as global in line 89,
> which fails; according to "doc global":
> ======================================================================
> A global variable may only be initialized once in a `global'
> statement. For example, after executing the following code
>
> global gvar = 1
> global gvar = 2
>
> the value of the global variable `gvar' is 1, not 2.
> ======================================================================
>
> Mercurial changeset attached for all of these[2]. If you want single
> diffs for Subversion, just say so.
>
> I think clip.m needs an overhaul (checking for do_fortran_indexing --
> how long since that is in Octave?), but that's not part of the current
> patch.
>
> [1] My patch doesn't do that neither, but I don't see how to distinguish
> between a broken value by the user and the current broken value coming
> from the .oct/PKG_ADD file.
>
> [2] Additionally available via
> http://tw-math.de/~weber/audio.hg
Could someone please comment on the patch? I plan to include it into
Deban, if noone objects.
Thomas
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Octave-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/octave-dev