From: <ny...@us...> - 2007-01-27 09:10:54
|
Revision: 291 http://svn.sourceforge.net/pmplib/?rev=291&view=rev Author: nyaochi Date: 2007-01-27 01:10:52 -0800 (Sat, 27 Jan 2007) Log Message: ----------- Removed redundant compare_version() function in pmp_portalplayer1: http://nyaochi.sakura.ne.jp/pmplib/index.php?topic=210.msg910#msg910 Modified Paths: -------------- trunk/pmplib/lib/pmp_portalplayer1/hdr_template.c trunk/pmplib/lib/pmp_portalplayer1/hdr_template.h Modified: trunk/pmplib/lib/pmp_portalplayer1/hdr_template.c =================================================================== --- trunk/pmplib/lib/pmp_portalplayer1/hdr_template.c 2007-01-27 09:03:05 UTC (rev 290) +++ trunk/pmplib/lib/pmp_portalplayer1/hdr_template.c 2007-01-27 09:10:52 UTC (rev 291) @@ -90,24 +90,3 @@ memset(hdr, 0, sizeof(*hdr)); return -1; } - -#define COMP(a, b) ((a)>(b))-((a)<(b)) - -int compare_version(const char *x, const char *y) -{ - char *p = NULL, *q = NULL; - - for (;;) { - long a = strtol(x, &p, 10); - long b = strtol(y, &q, 10); - int value = COMP(a, b); - if (value != 0) { - return value; - } - if (!*p || !*q || *p != *q) { - return COMP(*p, *q); - } - x = p+1; - y = q+1; - } -} Modified: trunk/pmplib/lib/pmp_portalplayer1/hdr_template.h =================================================================== --- trunk/pmplib/lib/pmp_portalplayer1/hdr_template.h 2007-01-27 09:03:05 UTC (rev 290) +++ trunk/pmplib/lib/pmp_portalplayer1/hdr_template.h 2007-01-27 09:10:52 UTC (rev 291) @@ -57,7 +57,6 @@ } hdr_template_t; int apply_template(hdr_t* hdr, const hdr_template_t* tmpl); -int compare_version(const char *x, const char *y); int hdr_init_h10_5gb_ums_0205_0253(hdr_t* hdr); int hdr_init_h10_5gb_mtp_0203_0210(hdr_t* hdr); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |