[EMAIL PROTECTED] wrote on 09/28/2007 11:46:40
AM:
> I noticed different hpi client programs use different format to print
> HPI and openhpi strings. For example hpitree prints the following which
> is a decimal notation of the saHpiVersionGet() returned version number.
>
> hpitree ver 0.2 HPI-B
> Hpi Version 131585 Implemented.
>
> hpitop does the same. hpiel does a good job of printing the version
> strings in the following format:
>
> hpiel - This program came with OpenHPI 2.10.0 (6418)
> HPI Version is b.02.01
Yes, I added that code to hpiel with the intent of propagating it to the
other clients.
http://sourceforge.net/tracker/index.php?func=detail&aid=1493787&group_id=71730&atid=532254
The feature above, which has stood there for a while, is intended to cover
that plus also making the command-line options have a uniform format based
on hpiel.
>
> I took the version string generation code from hpiel.c: main() and
> turned it into a common routine all clients can call. I had to add a
> new .c and .h to define the routine and its prototype. Changed hpiel.c,
> hpitree.c, and hpitop.c to use the hpiversion() routine defined in the
> new hpiversion.c file. Here are the changes in this patch:
>
> - New files hpiversion.c and hpiversion.h
> - Makefile.am changes to add new file to hpitree, hpiel, hpitop
> - Changes to hpitree.c, hpitop.c, and hpiel.c to call the new
> hpiversion() and include hpiversion.h. Also removed version strings code
> from these files.
For something like this, I'd prefer if this was made into a macro and added
to utils/oh_utils.h, instead of adding a .c/.h file pair.
Also, the revision string ($Revision$) should be generated in the actual
client program. This will then say the latest subversion revision in which
the client was modified. So I'm thinking a macro called from the client, in
which you pass the revision string would be best in this case.
--Renier
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Openhpi-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openhpi-devel