]>
git.saurik.com Git - apt-legacy.git/blob - apt-pkg/version.cc
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 /*{{{*/
12 #pragma implementation "apt-pkg/version.h"
15 #include <apt-pkg/version.h>
16 #include <apt-pkg/pkgcache.h>
21 static pkgVersioningSystem
*VSList
[10];
22 pkgVersioningSystem
**pkgVersioningSystem::GlobalList
= VSList
;
23 unsigned long pkgVersioningSystem::GlobalListLen
= 0;
25 // pkgVS::pkgVersioningSystem - Constructor /*{{{*/
26 // ---------------------------------------------------------------------
27 /* Link to the global list of versioning systems supported */
28 pkgVersioningSystem::pkgVersioningSystem()
30 VSList
[GlobalListLen
] = this;
34 // pkgVS::GetVS - Find a VS by name /*{{{*/
35 // ---------------------------------------------------------------------
37 pkgVersioningSystem
*pkgVersioningSystem::GetVS(const char *Label
)
39 for (unsigned I
= 0; I
!= GlobalListLen
; I
++)
40 if (strcmp(VSList
[I
]->Label
,Label
) == 0)