Exemplo n.º 1
0
static int
needsReScan( int what, CfgDep *dep )
{
	int widx, idx;
	long mt;

	for (widx = 0; cfgMapT[widx] != what; widx++);
	idx = cfgMap[widx];
	if (checkDep( idx )) {
		if (!GetDeps())
			return -1;
		idx = cfgMap[widx];
	}
	mt = mTime( cfgFiles[idx].name->str );
	if (dep->name != cfgFiles[idx].name) {
		if (dep->name)
			delStr( dep->name );
		dep->name = cfgFiles[idx].name;
		dep->name->cnt++;
		dep->time = mt;
		return 1;
	} else if (dep->time != mt) {
		dep->time = mt;
		return 1;
	} else
		return 0;
}
Exemplo n.º 2
0
AddonVersion CAddon::GetDependencyVersion(const std::string &dependencyID) const
{
  const ADDON::ADDONDEPS &deps = GetDeps();
  ADDONDEPS::const_iterator it = deps.find(dependencyID);
  if (it != deps.end())
    return it->second.first;
  return AddonVersion("0.0.0");
}
Exemplo n.º 3
0
int
InitResources( char **argv )
{
	originalArgv = argv;
	cnftalk.pipe = &getter.pipe;
	if (Setjmp( cnftalk.errjmp ))
		return 0; /* may memleak */
	return GetDeps();
}