Show
Ignore:
Timestamp:
02/03/09 01:29:49 (9 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1233624589 +0000
git-parent:

[87de1cfcf05cd971deb05d13c0d1be988ac9d801]

git-author:
Theo Schlossnagle <jesus@omniti.com> 1233624589 +0000
Message:

closes #78

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/noit_defines.h

    r5a9b91b r84d6f13  
    7474#define HAVE_IPv6 
    7575 
     76static inline int noit_build_version(char *buff, int len) { 
     77  const char *v = NOIT_HEADURL; 
     78  const char *start, *end, *ns; 
     79  if(NULL != (start = strstr(v, "reconnoiter/"))) { 
     80    start += strlen("reconnoiter/"); 
     81    if(NULL != (end = strstr(start, "/src"))) { 
     82      ns = strchr(start, '/'); /* necessarily non-NULL */ 
     83      ns++; 
     84      if(!strncmp(start, "trunk/", 6)) 
     85        return snprintf(buff, len, "trunk.%s", NOIT_SVNVERSION); 
     86      if(!strncmp(start, "branches/", 9)) 
     87        return snprintf(buff, len, "b_%.*s.%s", end - ns, ns, NOIT_SVNVERSION); 
     88      if(!strncmp(start, "tags/", 5)) 
     89        return snprintf(buff, len, "%.*s.%s", end - ns, ns, NOIT_SVNVERSION); 
     90    } 
     91  } 
     92  return snprintf(buff, len, "unknown.%s", NOIT_SVNVERSION); 
     93} 
     94 
    7695#endif