PageRenderTime 31ms CodeModel.GetById 22ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 0ms

/gecko_api/include/jarfile.h

http://firefox-mac-pdf.googlecode.com/
C++ Header | 117 lines | 65 code | 9 blank | 43 comment | 0 complexity | 775c3d29678b620473614a665c3bbc6a MD5 | raw file
  1/* ***** BEGIN LICENSE BLOCK *****
  2 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  3 *
  4 * The contents of this file are subject to the Mozilla Public License Version
  5 * 1.1 (the "License"); you may not use this file except in compliance with
  6 * the License. You may obtain a copy of the License at
  7 * http://www.mozilla.org/MPL/
  8 *
  9 * Software distributed under the License is distributed on an "AS IS" basis,
 10 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 11 * for the specific language governing rights and limitations under the
 12 * License.
 13 *
 14 * The Original Code is the Netscape security libraries.
 15 *
 16 * The Initial Developer of the Original Code is
 17 * Netscape Communications Corporation.
 18 * Portions created by the Initial Developer are Copyright (C) 1994-2000
 19 * the Initial Developer. All Rights Reserved.
 20 *
 21 * Contributor(s):
 22 *
 23 * Alternatively, the contents of this file may be used under the terms of
 24 * either the GNU General Public License Version 2 or later (the "GPL"), or
 25 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
 26 * in which case the provisions of the GPL or the LGPL are applicable instead
 27 * of those above. If you wish to allow use of your version of this file only
 28 * under the terms of either the GPL or the LGPL, and not to allow others to
 29 * use your version of this file under the terms of the MPL, indicate your
 30 * decision by deleting the provisions above and replace them with the notice
 31 * and other provisions required by the GPL or the LGPL. If you do not delete
 32 * the provisions above, a recipient may use your version of this file under
 33 * the terms of any one of the MPL, the GPL or the LGPL.
 34 *
 35 * ***** END LICENSE BLOCK ***** */
 36
 37/*
 38 *  JARFILE.H
 39 * 
 40 *  Certain constants and structures for the archive format.
 41 *
 42 */
 43
 44/* ZIP */
 45
 46struct ZipLocal
 47  {
 48  char signature [4];
 49  char word [2];
 50  char bitflag [2];
 51  char method [2];
 52  char time [2];
 53  char date [2];
 54  char crc32 [4];
 55  char size [4];
 56  char orglen [4];
 57  char filename_len [2];
 58  char extrafield_len [2];
 59  };
 60
 61struct ZipCentral
 62  {
 63  char signature [4];
 64  char version_made_by [2];
 65  char version [2];
 66  char bitflag [2];
 67  char method [2];
 68  char time [2];
 69  char date [2];
 70  char crc32 [4];
 71  char size [4];
 72  char orglen [4];
 73  char filename_len [2];
 74  char extrafield_len [2];
 75  char commentfield_len [2];
 76  char diskstart_number [2];
 77  char internal_attributes [2];
 78  char external_attributes [4];
 79  char localhdr_offset [4];
 80  };
 81
 82struct ZipEnd
 83  {
 84  char signature [4];
 85  char disk_nr [2];
 86  char start_central_dir [2];
 87  char total_entries_disk [2];
 88  char total_entries_archive [2];
 89  char central_dir_size [4];
 90  char offset_central_dir [4];
 91  char commentfield_len [2];
 92  };
 93
 94#define LSIG 0x04034B50l
 95#define CSIG 0x02014B50l
 96#define ESIG 0x06054B50l
 97
 98/* TAR */
 99
100union TarEntry
101  {
102  struct header
103    {
104    char filename [100];
105    char mode [8];
106    char uid [8];
107    char gid [8];
108    char size [12];
109    char time [12];
110    char checksum [8];
111    char linkflag;
112    char linkname [100];
113    }
114  val;
115
116  char buffer [512];
117  };