[Autosec-devel] sonar/src sonar.c,1.45,1.46
Brought to you by:
red0x
From: red0x <re...@us...> - 2004-06-08 23:12:35
|
Update of /cvsroot/autosec/sonar/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10159/src Modified Files: sonar.c Log Message: Fixed some broken version numbering code Index: sonar.c =================================================================== RCS file: /cvsroot/autosec/sonar/src/sonar.c,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** sonar.c 19 May 2004 08:17:25 -0000 1.45 --- sonar.c 8 Jun 2004 23:11:50 -0000 1.46 *************** *** 73,93 **** pv = (char *) Malloc(strlen(PACKAGE_VERSION)); strncpy(pv, PACKAGE_VERSION, strlen(PACKAGE_VERSION)); ! temp = strpbrk(pv, "."); ! while(pv != NULL) { if(temp) *temp++ = 0x00; ! if(mthat->ver_major == 0) ! mthat->ver_major = atoi(pv); ! else if(mthat->ver_minor == 0) ! mthat->ver_minor = atoi(pv); ! else if(mthat->revision == 0) ! mthat->revision = atoi(pv); ! else ! pv = NULL; ! pv = temp; ! if(!pv) ! break; ! temp = strpbrk(pv, "."); } free(pv); --- 73,93 ---- pv = (char *) Malloc(strlen(PACKAGE_VERSION)); strncpy(pv, PACKAGE_VERSION, strlen(PACKAGE_VERSION)); ! mthat->ver_major = atoi(pv); ! temp = strchr(pv, '.'); ! if(temp) { + *temp++ = 0x00; + mthat->ver_minor = atoi(temp); + temp = strchr(temp, '.'); if(temp) + { *temp++ = 0x00; ! mthat->revision = atoi(temp); ! } ! } ! else ! { ! mthat->ver_minor = 0; ! mthat->revision = 0; } free(pv); |