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 /*{{{*/
11 #include <apt-pkg/version.h>
12 #include <apt-pkg/pkgcache.h>
17 static pkgVersioningSystem
*VSList
[10];
18 pkgVersioningSystem
**pkgVersioningSystem::GlobalList
= VSList
;
19 unsigned long pkgVersioningSystem::GlobalListLen
= 0;
21 // pkgVS::pkgVersioningSystem - Constructor /*{{{*/
22 // ---------------------------------------------------------------------
23 /* Link to the global list of versioning systems supported */
24 pkgVersioningSystem::pkgVersioningSystem()
26 VSList
[GlobalListLen
] = this;
30 // pkgVS::GetVS - Find a VS by name /*{{{*/
31 // ---------------------------------------------------------------------
33 pkgVersioningSystem
*pkgVersioningSystem::GetVS(const char *Label
)
35 for (unsigned I
= 0; I
!= GlobalListLen
; I
++)
36 if (strcmp(VSList
[I
]->Label
,Label
) == 0)