From bug-request at octave dot org Tue Dec 13 21:12:36 2005 Subject: Re: Can I submit a ver.m and license.m? From: "John W. Eaton" To: William Poetra Yoga Hadisoeseno Cc: bug at octave dot org Date: Tue, 13 Dec 2005 22:12:28 -0500 On 11-Dec-2005, William Poetra Yoga Hadisoeseno wrote: | I've added the struct to ver.m (similar to the cell array in | license.m). The diff is attached. | + persistent __prodinfo__; | + | + if (isempty (__prodinfo__)) | + __prodinfo__ = struct (); Since this variable is local to the function, I don't see a need to use the __XXX__ variable naming. | + __prodinfo__.Name = "Octave"; | + __prodinfo__.Version = version (); | + __prodinfo__.Release = __get_api_ver__ (); Instead of this new function, I think we should just add the api version information directly to the octave_config_info struct. Since the source of Octave is available, we should not have to do heroic things like you've done in __get_api_ver__. That's the kind of thing you do when you are stuck with proprietary software that you can't change. | + __prodinfo__.Date = __expand_date__ (""); Should Octave include the release date for each version somewhere in the version info or as a separate variable? | + if (exist ("OCTAVE_FORGE_VERSION")) | + __prodinfo__(2).Name = "octave-forge"; | + __prodinfo__(2).Version = num2str(OCTAVE_FORGE_VERSION); | + __prodinfo__(2).Release = num2str(OCTAVE_FORGE_VERSION); | + __prodinfo__(2).Date = __expand_date__ (num2str (OCTAVE_FORGE_VERSION)); | + endif | endif Instead of embedding this information in Octave's ver function, maybe we should provide some mechanism for external packages to register their version info with Octave? This could be done in the PKG_ADD file for a package. jwe ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------