File: CheckVersion.cc

package info (click to toggle)
fastdep 0.16-7
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 596 kB
  • ctags: 323
  • sloc: cpp: 2,144; ansic: 814; sh: 208; makefile: 124
file content (13 lines) | stat: -rw-r--r-- 332 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include "CheckVersion.h"
#include <stdio.h>
#include <iostream>

int atLeastVersion(const std::string& aVersion)
{
	int major=0, minor=0;
	sscanf(aVersion.c_str(),"%d.%d",&major,&minor);
	if ( (FASTDEP_VERSION_MAJOR < major) ||
		 ((FASTDEP_VERSION_MAJOR == major) && (FASTDEP_VERSION_MINOR < minor)) )
		 return 99;
	return 42;
}