]> git.saurik.com Git - apt.git/blame_incremental - apt-pkg/version.cc
Don't download "optional" files not in Release :/.
[apt.git] / apt-pkg / version.cc
... / ...
CommitLineData
1// -*- mode: cpp; mode: fold -*-
2// Description /*{{{*/
3// $Id: version.cc,v 1.10 2001/02/20 07:03:17 jgg Exp $
4/* ######################################################################
5
6 Version - Versioning system..
7
8 ##################################################################### */
9 /*}}}*/
10// Include Files /*{{{*/
11#include<config.h>
12
13#include <apt-pkg/version.h>
14
15#include <string.h>
16#include <stdlib.h>
17 /*}}}*/
18
19static pkgVersioningSystem *VSList[10];
20pkgVersioningSystem **pkgVersioningSystem::GlobalList = VSList;
21unsigned long pkgVersioningSystem::GlobalListLen = 0;
22
23// pkgVS::pkgVersioningSystem - Constructor /*{{{*/
24// ---------------------------------------------------------------------
25/* Link to the global list of versioning systems supported */
26pkgVersioningSystem::pkgVersioningSystem() : Label(NULL)
27{
28 VSList[GlobalListLen] = this;
29 ++GlobalListLen;
30}
31 /*}}}*/
32// pkgVS::GetVS - Find a VS by name /*{{{*/
33// ---------------------------------------------------------------------
34/* */
35pkgVersioningSystem *pkgVersioningSystem::GetVS(const char *Label)
36{
37 for (unsigned I = 0; I != GlobalListLen; I++)
38 if (strcmp(VSList[I]->Label,Label) == 0)
39 return VSList[I];
40 return 0;
41}
42 /*}}}*/
43
44
45pkgVersioningSystem::~pkgVersioningSystem() {}