]> git.saurik.com Git - apt.git/blame - apt-pkg/version.cc
show only the basename of the running test
[apt.git] / apt-pkg / version.cc
CommitLineData
578bfd0a
AL
1// -*- mode: cpp; mode: fold -*-
2// Description /*{{{*/
b2e465d6 3// $Id: version.cc,v 1.10 2001/02/20 07:03:17 jgg Exp $
578bfd0a
AL
4/* ######################################################################
5
b2e465d6 6 Version - Versioning system..
578bfd0a
AL
7
8 ##################################################################### */
9 /*}}}*/
10// Include Files /*{{{*/
094a497d
AL
11#include <apt-pkg/version.h>
12#include <apt-pkg/pkgcache.h>
578bfd0a
AL
13
14#include <stdlib.h>
15 /*}}}*/
b2e465d6
AL
16
17static pkgVersioningSystem *VSList[10];
18pkgVersioningSystem **pkgVersioningSystem::GlobalList = VSList;
19unsigned long pkgVersioningSystem::GlobalListLen = 0;
578bfd0a 20
b2e465d6 21// pkgVS::pkgVersioningSystem - Constructor /*{{{*/
578bfd0a 22// ---------------------------------------------------------------------
b2e465d6
AL
23/* Link to the global list of versioning systems supported */
24pkgVersioningSystem::pkgVersioningSystem()
578bfd0a 25{
b2e465d6
AL
26 VSList[GlobalListLen] = this;
27 GlobalListLen++;
578bfd0a
AL
28}
29 /*}}}*/
b2e465d6 30// pkgVS::GetVS - Find a VS by name /*{{{*/
578bfd0a
AL
31// ---------------------------------------------------------------------
32/* */
b2e465d6 33pkgVersioningSystem *pkgVersioningSystem::GetVS(const char *Label)
1e4e52e0 34{
b2e465d6
AL
35 for (unsigned I = 0; I != GlobalListLen; I++)
36 if (strcmp(VSList[I]->Label,Label) == 0)
37 return VSList[I];
38 return 0;
fb0ee66e
AL
39}
40 /*}}}*/