]>
git.saurik.com Git - apt.git/blob - apt-pkg/version.cc
29bee46da0b396be0eb88acb5d6561dce7a62c58
1 // -*- mode: cpp; mode: fold -*-
3 // $Id: version.cc,v 1.10 2001/02/20 07:03:17 jgg Exp $
4 /* ######################################################################
6 Version - Versioning system..
8 ##################################################################### */
10 // Include Files /*{{{*/
13 #include <apt-pkg/version.h>
19 static pkgVersioningSystem
*VSList
[10];
20 pkgVersioningSystem
**pkgVersioningSystem::GlobalList
= VSList
;
21 unsigned long pkgVersioningSystem::GlobalListLen
= 0;
23 // pkgVS::pkgVersioningSystem - Constructor /*{{{*/
24 // ---------------------------------------------------------------------
25 /* Link to the global list of versioning systems supported */
26 pkgVersioningSystem::pkgVersioningSystem() : Label(NULL
)
28 VSList
[GlobalListLen
] = this;
32 // pkgVS::GetVS - Find a VS by name /*{{{*/
33 // ---------------------------------------------------------------------
35 pkgVersioningSystem
*pkgVersioningSystem::GetVS(const char *Label
)
37 for (unsigned I
= 0; I
!= GlobalListLen
; I
++)
38 if (strcmp(VSList
[I
]->Label
,Label
) == 0)