Browse Source

Comment touch ups

Author: jgg
Date: 1998-07-19 21:24:11 GMT
Comment touch ups
debian/1.8.y
Arch Librarian 18 years ago
parent
commit
6fc33863f3
  1. 4
      apt-pkg/algorithms.h
  2. 4
      apt-pkg/packagemanager.h
  3. 9
      apt-pkg/pkgcachegen.h
  4. 9
      apt-pkg/sourcelist.h
  5. 4
      apt-pkg/tagfile.h
  6. 35
      apt-pkg/version.cc
  7. 28
      apt-pkg/version.h

4
apt-pkg/algorithms.h

@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
// $Id: algorithms.h,v 1.2 1998/07/12 23:58:22 jgg Exp $
// $Id: algorithms.h,v 1.3 1998/07/19 21:24:11 jgg Exp $
/* ######################################################################
Algorithms - A set of misc algorithms
@ -14,6 +14,8 @@
pkgApplyStatus sets the target state based on the content of the status
field in the status file. It is important to get proper crash recovery.
pkgFixBroken corrects a broken system so that it is in a sane state.
##################################################################### */
/*}}}*/

4
apt-pkg/packagemanager.h

@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
// $Id: packagemanager.h,v 1.3 1998/07/12 23:58:31 jgg Exp $
// $Id: packagemanager.h,v 1.4 1998/07/19 21:24:13 jgg Exp $
/* ######################################################################
Package Manager - Abstacts the package manager
@ -8,7 +8,7 @@
Three steps are
- Aquiration of archives (stores the list of final file names)
- Sorting of operations
- Inokation of package manager
- Invokation of package manager
This is the final stage when the package cache entities get converted
into file names and the state stored in a DepCache is transformed

9
apt-pkg/pkgcachegen.h

@ -1,11 +1,18 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
// $Id: pkgcachegen.h,v 1.6 1998/07/19 04:22:03 jgg Exp $
// $Id: pkgcachegen.h,v 1.7 1998/07/19 21:24:14 jgg Exp $
/* ######################################################################
Package Cache Generator - Generator for the cache structure.
This builds the cache structure from the abstract package list parser.
Each archive source has it's own list parser that is instantiated by
the caller to provide data for the generator.
Parts of the cache are created by this generator class while other
parts are created by the list parser. The list parser is responsible
for creating version, depends and provides structures, and some of
their contents
##################################################################### */
/*}}}*/

9
apt-pkg/sourcelist.h

@ -1,12 +1,17 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
// $Id: sourcelist.h,v 1.4 1998/07/19 04:22:05 jgg Exp $
// $Id: sourcelist.h,v 1.5 1998/07/19 21:24:15 jgg Exp $
/* ######################################################################
SourceList - Manage a list of sources
The Source List class provides access to a list of sources. It
can read them from a file and generate a list of all the permutations.
can read them from a file and generate a list of all the distinct
sources.
All sources have a type associated with them that defines the layout
of the archive. The exact format of the file is documented in
files.sgml.
##################################################################### */
/*}}}*/

4
apt-pkg/tagfile.h

@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
// $Id: tagfile.h,v 1.7 1998/07/19 04:42:11 jgg Exp $
// $Id: tagfile.h,v 1.8 1998/07/19 21:24:17 jgg Exp $
/* ######################################################################
Fast scanner for RFC-822 type header information
@ -8,7 +8,7 @@
This parser handles Debian package files (and others). Their form is
RFC-822 type header fields in groups seperated by a blank line.
The parser reads the and provides methods to step linearly
The parser reads the file and provides methods to step linearly
over it or to jump to a pre-recorded start point and read that record.
A second class is used to perform pre-parsing of the record. It works

35
apt-pkg/version.cc

@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
// $Id: version.cc,v 1.4 1998/07/12 23:58:42 jgg Exp $
// $Id: version.cc,v 1.5 1998/07/19 21:24:18 jgg Exp $
/* ######################################################################
Version - Version string
@ -27,39 +27,6 @@
#include <stdlib.h>
/*}}}*/
// Version::pkgVersion - Default Constructor /*{{{*/
// ---------------------------------------------------------------------
/* */
pkgVersion::pkgVersion()
{
}
/*}}}*/
// Version::operator == - Checks if two versions are equal /*{{{*/
// ---------------------------------------------------------------------
/* We can't simply perform a string compare because of epochs. */
bool pkgVersion::operator ==(const pkgVersion &Vrhs) const
{
if (pkgVersionCompare(Value.begin(),Value.end(),
Vrhs.Value.begin(),Vrhs.Value.end()) == 0)
return true;
return false;
}
/*}}}*/
// Version::operator < - Checks if this is less than another version /*{{{*/
// ---------------------------------------------------------------------
/* All other forms of comparision can be built up from this single function.
a > b -> b < a
a <= b -> !(a > b) -> !(b < a)
a >= b -> !(a < b)
*/
bool pkgVersion::operator <(const pkgVersion &Vrhs) const
{
if (pkgVersionCompare(Value.begin(),Value.end(),
Vrhs.Value.begin(),Vrhs.Value.end()) == -1)
return true;
return false;
}
/*}}}*/
// StrToLong - Convert the string between two iterators to a long /*{{{*/
// ---------------------------------------------------------------------
/* */

28
apt-pkg/version.h

@ -1,13 +1,12 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
// $Id: version.h,v 1.3 1998/07/12 23:58:43 jgg Exp $
// $Id: version.h,v 1.4 1998/07/19 21:24:19 jgg Exp $
/* ######################################################################
Version - Version string
Version - Version comparison routines
This class implements storage and operators for version strings.
The client is responsible for stripping epochs should it be desired.
These routines provide some means to compare versions and check
dependencies.
##################################################################### */
/*}}}*/
@ -21,25 +20,6 @@
#include <string>
class pkgVersion
{
string Value;
public:
inline operator string () const {return Value;};
// Assignmnet
void operator =(string rhs) {Value = rhs;};
// Comparitors. STL will provide the rest
bool operator ==(const pkgVersion &rhs) const;
bool operator <(const pkgVersion &rhs) const;
pkgVersion();
pkgVersion(string Version) : Value(Version) {};
};
int pkgVersionCompare(const char *A, const char *B);
int pkgVersionCompare(const char *A, const char *AEnd, const char *B,
const char *BEnd);

Loading…
Cancel
Save