PageRenderTime 51ms CodeModel.GetById 24ms RepoModel.GetById 0ms 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. * JARFILE.H
  38. *
  39. * Certain constants and structures for the archive format.
  40. *
  41. */
  42. /* ZIP */
  43. struct ZipLocal
  44. {
  45. char signature [4];
  46. char word [2];
  47. char bitflag [2];
  48. char method [2];
  49. char time [2];
  50. char date [2];
  51. char crc32 [4];
  52. char size [4];
  53. char orglen [4];
  54. char filename_len [2];
  55. char extrafield_len [2];
  56. };
  57. struct ZipCentral
  58. {
  59. char signature [4];
  60. char version_made_by [2];
  61. char version [2];
  62. char bitflag [2];
  63. char method [2];
  64. char time [2];
  65. char date [2];
  66. char crc32 [4];
  67. char size [4];
  68. char orglen [4];
  69. char filename_len [2];
  70. char extrafield_len [2];
  71. char commentfield_len [2];
  72. char diskstart_number [2];
  73. char internal_attributes [2];
  74. char external_attributes [4];
  75. char localhdr_offset [4];
  76. };
  77. struct ZipEnd
  78. {
  79. char signature [4];
  80. char disk_nr [2];
  81. char start_central_dir [2];
  82. char total_entries_disk [2];
  83. char total_entries_archive [2];
  84. char central_dir_size [4];
  85. char offset_central_dir [4];
  86. char commentfield_len [2];
  87. };
  88. #define LSIG 0x04034B50l
  89. #define CSIG 0x02014B50l
  90. #define ESIG 0x06054B50l
  91. /* TAR */
  92. union TarEntry
  93. {
  94. struct header
  95. {
  96. char filename [100];
  97. char mode [8];
  98. char uid [8];
  99. char gid [8];
  100. char size [12];
  101. char time [12];
  102. char checksum [8];
  103. char linkflag;
  104. char linkname [100];
  105. }
  106. val;
  107. char buffer [512];
  108. };