~ubuntu-branches/ubuntu/maverick/apt/maverick-security

« back to all changes in this revision

Viewing changes to apt-inst/contrib/arfile.h

  • Committer: Bazaar Package Importer
  • Author(s): Jason Gunthorpe
  • Date: 2001-08-18 17:21:59 UTC
  • Revision ID: james.westby@ubuntu.com-20010818172159-85f7g43wdzi9dwb5
Tags: 0.5.4
* M68k config.guess patch. Closes: #88913
* Bi-yearly test on OpenBSD and Solaris
* Doc updates. Closes: #89121, #89854, #99671, #98353, #95823, #93057,
        #97520, #102867, #101071, #102421, #101565, #98272, #106914,
        #105606, #105377
* Various cosmetic code updates. Closes: #89066, #89066, #89152
* Add "pre-auto" as an option for DSelect::Clean (run autoclean after
  update).
* More patches from Alfredo for Vendors and more SHA-1 stuff
* Fix for AJ's 'desire to remove perl-5.005' and possibly other
  similar situations. Closes: #56708, #59432
* no_proxy and ftp. Closes: #89671
* Philippe Batailler's man page patches.
* Fix for display bug. Closes: #92033, #93652, #98468
* Use more than 16bits for the dep ID. Some people ran out..
  Closes: #103020, #97809, #102951, #99974, #107362, #107395, #107362,
          #106911, #107395, #108968
* Reordered some things to make dante and FTP happier. Closes: #92757
* James R. Van Zandt's guide.sgml updates. Closes: #90027
* apt-ftparchive copes with no uncompressed package files + contents.
* French man pages from philippe batailler - well sort of. They 
  don't build yet..
* run-parts. Closes: #94286
* 'apt-cache policy' preferences debug tool.
* Whatever. Closes: #89762
* libstdc++ and HURD. Closes: #92025
* More apt-utils verbage. Closes: #86954
* Fliped comparision operator. Closes: #94618
* Used the right copyright file. Closes: #65691
* Randolph's G++3 patches. 
* Fixed no_proxy tokanizing. Closes: #100046
* Strip Config-Version when copying status to available. Closes: #97520
* Segfault with missing source files. Closes: #100325
* EINTR check. Closes: #102293
* Various changes to the locking metholodgy for --print-uris. 
  Closes: #100590
* Lame LD_LIBRARY_PATH thing. Closes: #98928
* apt-cache search searchs provide names too now. Closes: #98695
* Checksum and long lines problem. Closes: #106591
* .aptignr and empty files are just a warning. Closes: #97364  

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// -*- mode: cpp; mode: fold -*-
 
2
// Description                                                          /*{{{*/
 
3
// $Id: arfile.h,v 1.2 2001/02/20 07:03:16 jgg Exp $
 
4
/* ######################################################################
 
5
 
 
6
   AR File - Handle an 'AR' archive
 
7
   
 
8
   This is a reader for the usual 4.4 BSD AR format. It allows raw
 
9
   stream access to a single member at a time. Basically all this class
 
10
   provides is header parsing and verification. It is up to the client
 
11
   to correctly make use of the stream start/stop points.
 
12
   
 
13
   ##################################################################### */
 
14
                                                                        /*}}}*/
 
15
#ifndef PKGLIB_ARFILE_H
 
16
#define PKGLIB_ARFILE_H
 
17
 
 
18
#ifdef __GNUG__
 
19
#pragma interface "apt-pkg/arfile.h"
 
20
#endif
 
21
 
 
22
#include <string>
 
23
#include <apt-pkg/fileutl.h>
 
24
 
 
25
class ARArchive
 
26
{
 
27
   struct MemberHeader;
 
28
   public:
 
29
   struct Member;
 
30
   
 
31
   protected:
 
32
 
 
33
   // Linked list of members
 
34
   Member *List;
 
35
   
 
36
   bool LoadHeaders();
 
37
 
 
38
   public:
 
39
   
 
40
   // The stream file
 
41
   FileFd &File;
 
42
 
 
43
   // Locate a member by name
 
44
   const Member *FindMember(const char *Name) const;
 
45
   
 
46
   ARArchive(FileFd &File);
 
47
   ~ARArchive();
 
48
};
 
49
 
 
50
// A member of the archive
 
51
struct ARArchive::Member
 
52
{
 
53
   // Fields from the header
 
54
   string Name;
 
55
   unsigned long MTime;
 
56
   unsigned long UID;
 
57
   unsigned long GID;
 
58
   unsigned long Mode;
 
59
   unsigned long Size;
 
60
   
 
61
   // Location of the data.
 
62
   unsigned long Start;
 
63
   Member *Next;
 
64
   
 
65
   Member() : Start(0), Next(0) {};
 
66
};
 
67
 
 
68
#endif