]> git.saurik.com Git - apt.git/blame - apt-pkg/version.cc
fix incorrect docstrings for AcqMetaBase::TransactionStageRemoval/AcqMetaBase::Transa...
[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 /*{{{*/
ea542140
DK
11#include<config.h>
12
094a497d 13#include <apt-pkg/version.h>
578bfd0a 14
453b82a3 15#include <string.h>
578bfd0a
AL
16#include <stdlib.h>
17 /*}}}*/
b2e465d6
AL
18
19static pkgVersioningSystem *VSList[10];
20pkgVersioningSystem **pkgVersioningSystem::GlobalList = VSList;
21unsigned long pkgVersioningSystem::GlobalListLen = 0;
578bfd0a 22
b2e465d6 23// pkgVS::pkgVersioningSystem - Constructor /*{{{*/
578bfd0a 24// ---------------------------------------------------------------------
b2e465d6 25/* Link to the global list of versioning systems supported */
dcaa1185 26pkgVersioningSystem::pkgVersioningSystem() : Label(NULL)
578bfd0a 27{
b2e465d6 28 VSList[GlobalListLen] = this;
dcaa1185 29 ++GlobalListLen;
578bfd0a
AL
30}
31 /*}}}*/
b2e465d6 32// pkgVS::GetVS - Find a VS by name /*{{{*/
578bfd0a
AL
33// ---------------------------------------------------------------------
34/* */
b2e465d6 35pkgVersioningSystem *pkgVersioningSystem::GetVS(const char *Label)
1e4e52e0 36{
b2e465d6
AL
37 for (unsigned I = 0; I != GlobalListLen; I++)
38 if (strcmp(VSList[I]->Label,Label) == 0)
39 return VSList[I];
40 return 0;
fb0ee66e
AL
41}
42 /*}}}*/