Permalink
Browse files

updates for submodules instead of inclusion

  • Loading branch information...
1 parent 0216275 commit cbb91e7a42020d44d96be5b9b5504ff83e9e4279 @incanus incanus committed Aug 8, 2012
Showing with 210 additions and 18,863 deletions.
  1. +6 −0 .gitmodules
  2. +0 −34 Objective-Zip/LICENSE.txt
  3. +0 −132 Objective-Zip/MiniZip/crypt.h
  4. +0 −177 Objective-Zip/MiniZip/ioapi.c
  5. +0 −75 Objective-Zip/MiniZip/ioapi.h
  6. +0 −281 Objective-Zip/MiniZip/mztools.c
  7. +0 −31 Objective-Zip/MiniZip/mztools.h
  8. +0 −1,598 Objective-Zip/MiniZip/unzip.c
  9. +0 −354 Objective-Zip/MiniZip/unzip.h
  10. +0 −1,219 Objective-Zip/MiniZip/zip.c
  11. +0 −235 Objective-Zip/MiniZip/zip.h
  12. +0 −60 Objective-Zip/Objective-Zip/FileInZipInfo.h
  13. +0 −67 Objective-Zip/Objective-Zip/FileInZipInfo.m
  14. +0 −48 Objective-Zip/Objective-Zip/ZipException.h
  15. +0 −57 Objective-Zip/Objective-Zip/ZipException.m
  16. +0 −85 Objective-Zip/Objective-Zip/ZipFile.h
  17. +0 −388 Objective-Zip/Objective-Zip/ZipFile.m
  18. +0 −51 Objective-Zip/Objective-Zip/ZipReadStream.h
  19. +0 −71 Objective-Zip/Objective-Zip/ZipReadStream.m
  20. +0 −51 Objective-Zip/Objective-Zip/ZipWriteStream.h
  21. +0 −69 Objective-Zip/Objective-Zip/ZipWriteStream.m
  22. +0 −149 Objective-Zip/ZLib/adler32.c
  23. +0 −79 Objective-Zip/ZLib/compress.c
  24. +0 −423 Objective-Zip/ZLib/crc32.c
  25. +0 −441 Objective-Zip/ZLib/crc32.h
  26. +0 −1,736 Objective-Zip/ZLib/deflate.c
  27. +0 −331 Objective-Zip/ZLib/deflate.h
  28. +0 −1,026 Objective-Zip/ZLib/gzio.c
  29. +0 −623 Objective-Zip/ZLib/infback.c
  30. +0 −318 Objective-Zip/ZLib/inffast.c
  31. +0 −11 Objective-Zip/ZLib/inffast.h
  32. +0 −94 Objective-Zip/ZLib/inffixed.h
  33. +0 −1,368 Objective-Zip/ZLib/inflate.c
  34. +0 −115 Objective-Zip/ZLib/inflate.h
  35. +0 −329 Objective-Zip/ZLib/inftrees.c
  36. +0 −55 Objective-Zip/ZLib/inftrees.h
  37. +0 −1,219 Objective-Zip/ZLib/trees.c
  38. +0 −128 Objective-Zip/ZLib/trees.h
  39. +0 −61 Objective-Zip/ZLib/uncompr.c
  40. +0 −332 Objective-Zip/ZLib/zconf.h
  41. +0 −1,357 Objective-Zip/ZLib/zlib.h
  42. +0 −318 Objective-Zip/ZLib/zutil.c
  43. +0 −269 Objective-Zip/ZLib/zutil.h
  44. +3 −1 README.md
  45. +0 −42 TouchXML/CXHTMLDocument.h
  46. +0 −163 TouchXML/CXHTMLDocument.m
  47. +0 −69 TouchXML/CXMLDocument.h
  48. +0 −255 TouchXML/CXMLDocument.m
  49. +0 −42 TouchXML/CXMLDocument_PrivateExtensions.h
  50. +0 −54 TouchXML/CXMLDocument_PrivateExtensions.m
  51. +0 −52 TouchXML/CXMLElement.h
  52. +0 −291 TouchXML/CXMLElement.m
  53. +0 −40 TouchXML/CXMLElement_CreationExtensions.h
  54. +0 −59 TouchXML/CXMLElement_CreationExtensions.m
  55. +0 −39 TouchXML/CXMLElement_ElementTreeExtensions.h
  56. +0 −46 TouchXML/CXMLElement_ElementTreeExtensions.m
  57. +0 −45 TouchXML/CXMLNamespaceNode.h
  58. +0 −172 TouchXML/CXMLNamespaceNode.m
  59. +0 −85 TouchXML/CXMLNode.h
  60. +0 −365 TouchXML/CXMLNode.m
  61. +0 −44 TouchXML/CXMLNode_PrivateExtensions.h
  62. +0 −119 TouchXML/CXMLNode_PrivateExtensions.m
  63. +0 −39 TouchXML/CXMLNode_XPathExtensions.h
  64. +0 −91 TouchXML/CXMLNode_XPathExtensions.m
  65. +0 −49 TouchXML/Creation/CXMLDocument_CreationExtensions.h
  66. +0 −55 TouchXML/Creation/CXMLDocument_CreationExtensions.m
  67. +0 −56 TouchXML/Creation/CXMLNode_CreationExtensions.h
  68. +0 −105 TouchXML/Creation/CXMLNode_CreationExtensions.m
  69. +0 −22 TouchXML/LICENSE.txt
  70. +0 −55 TouchXML/Tidy/CTidy.h
  71. +0 −236 TouchXML/Tidy/CTidy.m
  72. +0 −39 TouchXML/TouchXML.h
  73. +197 −264 sample/Simple KML Example.xcodeproj/project.pbxproj
  74. +2 −4 source/SimpleKML.m
  75. +1 −0 vendor/TouchXML
  76. +1 −0 vendor/objective-zip
View
@@ -0,0 +1,6 @@
+[submodule "vendor/Objective-Zip"]
+ path = vendor/Objective-Zip
+ url = https://github.com/AgileBits/Objective-Zip.git
+[submodule "vendor/TouchXML"]
+ path = vendor/TouchXML
+ url = https://github.com/TouchCode/TouchXML
View
@@ -1,34 +0,0 @@
-Copyright (c) 2010 Flying Dolphin Studio
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- * Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- * Neither the name of the Flying Dolphin Studio nor the names of its
- contributors may be used to endorse or promote products derived from this
- software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Please note that ZLib [1] and MiniZip [2] are included here only to provide a
-complete and self-contained package, but they are copyrighted by their
-respective authors and redistributed on respect of their software license.
-Please refer to their websites for more informations.
-
-[1] http://www.zlib.net/
-[2] http://www.winimage.com/zLibDll/minizip.html
@@ -1,132 +0,0 @@
-/* crypt.h -- base code for crypt/uncrypt ZIPfile
-
-
- Version 1.01e, February 12th, 2005
-
- Copyright (C) 1998-2005 Gilles Vollant
-
- This code is a modified version of crypting code in Infozip distribution
-
- The encryption/decryption parts of this source code (as opposed to the
- non-echoing password parts) were originally written in Europe. The
- whole source package can be freely distributed, including from the USA.
- (Prior to January 2000, re-export from the US was a violation of US law.)
-
- This encryption code is a direct transcription of the algorithm from
- Roger Schlafly, described by Phil Katz in the file appnote.txt. This
- file (appnote.txt) is distributed with the PKZIP program (even in the
- version without encryption capabilities).
-
- If you don't need crypting in your application, just define symbols
- NOCRYPT and NOUNCRYPT.
-
- This code support the "Traditional PKWARE Encryption".
-
- The new AES encryption added on Zip format by Winzip (see the page
- http://www.winzip.com/aes_info.htm ) and PKWare PKZip 5.x Strong
- Encryption is not supported.
-*/
-
-#define CRC32(c, b) ((*(pcrc_32_tab+(((int)(c) ^ (b)) & 0xff))) ^ ((c) >> 8))
-
-/***********************************************************************
- * Return the next byte in the pseudo-random sequence
- */
-static int decrypt_byte(unsigned long* pkeys, const unsigned long* pcrc_32_tab)
-{
- unsigned temp; /* POTENTIAL BUG: temp*(temp^1) may overflow in an
- * unpredictable manner on 16-bit systems; not a problem
- * with any known compiler so far, though */
-
- temp = ((unsigned)(*(pkeys+2)) & 0xffff) | 2;
- return (int)(((temp * (temp ^ 1)) >> 8) & 0xff);
-}
-
-/***********************************************************************
- * Update the encryption keys with the next byte of plain text
- */
-static int update_keys(unsigned long* pkeys,const unsigned long* pcrc_32_tab,int c)
-{
- (*(pkeys+0)) = CRC32((*(pkeys+0)), c);
- (*(pkeys+1)) += (*(pkeys+0)) & 0xff;
- (*(pkeys+1)) = (*(pkeys+1)) * 134775813L + 1;
- {
- register int keyshift = (int)((*(pkeys+1)) >> 24);
- (*(pkeys+2)) = CRC32((*(pkeys+2)), keyshift);
- }
- return c;
-}
-
-
-/***********************************************************************
- * Initialize the encryption keys and the random header according to
- * the given password.
- */
-static void init_keys(const char* passwd,unsigned long* pkeys,const unsigned long* pcrc_32_tab)
-{
- *(pkeys+0) = 305419896L;
- *(pkeys+1) = 591751049L;
- *(pkeys+2) = 878082192L;
- while (*passwd != '\0') {
- update_keys(pkeys,pcrc_32_tab,(int)*passwd);
- passwd++;
- }
-}
-
-#define zdecode(pkeys,pcrc_32_tab,c) \
- (update_keys(pkeys,pcrc_32_tab,c ^= decrypt_byte(pkeys,pcrc_32_tab)))
-
-#define zencode(pkeys,pcrc_32_tab,c,t) \
- (t=decrypt_byte(pkeys,pcrc_32_tab), update_keys(pkeys,pcrc_32_tab,c), t^(c))
-
-#ifdef INCLUDECRYPTINGCODE_IFCRYPTALLOWED
-
-#define RAND_HEAD_LEN 12
- /* "last resort" source for second part of crypt seed pattern */
-# ifndef ZCR_SEED2
-# define ZCR_SEED2 3141592654UL /* use PI as default pattern */
-# endif
-
-static int crypthead(passwd, buf, bufSize, pkeys, pcrc_32_tab, crcForCrypting)
- const char *passwd; /* password string */
- unsigned char *buf; /* where to write header */
- int bufSize;
- unsigned long* pkeys;
- const unsigned long* pcrc_32_tab;
- unsigned long crcForCrypting;
-{
- int n; /* index in random header */
- int t; /* temporary */
- int c; /* random byte */
- unsigned char header[RAND_HEAD_LEN-2]; /* random header */
- static unsigned calls = 0; /* ensure different random header each time */
-
- if (bufSize<RAND_HEAD_LEN)
- return 0;
-
- /* First generate RAND_HEAD_LEN-2 random bytes. We encrypt the
- * output of rand() to get less predictability, since rand() is
- * often poorly implemented.
- */
- if (++calls == 1)
- {
- srand((unsigned)(time(NULL) ^ ZCR_SEED2));
- }
- init_keys(passwd, pkeys, pcrc_32_tab);
- for (n = 0; n < RAND_HEAD_LEN-2; n++)
- {
- c = (rand() >> 7) & 0xff;
- header[n] = (unsigned char)zencode(pkeys, pcrc_32_tab, c, t);
- }
- /* Encrypt random header (last two bytes is high word of crc) */
- init_keys(passwd, pkeys, pcrc_32_tab);
- for (n = 0; n < RAND_HEAD_LEN-2; n++)
- {
- buf[n] = (unsigned char)zencode(pkeys, pcrc_32_tab, header[n], t);
- }
- buf[n++] = zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 16) & 0xff, t);
- buf[n++] = zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 24) & 0xff, t);
- return n;
-}
-
-#endif
@@ -1,177 +0,0 @@
-/* ioapi.c -- IO base function header for compress/uncompress .zip
- files using zlib + zip or unzip API
-
- Version 1.01e, February 12th, 2005
-
- Copyright (C) 1998-2005 Gilles Vollant
-*/
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "zlib.h"
-#include "ioapi.h"
-
-
-
-/* I've found an old Unix (a SunOS 4.1.3_U1) without all SEEK_* defined.... */
-
-#ifndef SEEK_CUR
-#define SEEK_CUR 1
-#endif
-
-#ifndef SEEK_END
-#define SEEK_END 2
-#endif
-
-#ifndef SEEK_SET
-#define SEEK_SET 0
-#endif
-
-voidpf ZCALLBACK fopen_file_func OF((
- voidpf opaque,
- const char* filename,
- int mode));
-
-uLong ZCALLBACK fread_file_func OF((
- voidpf opaque,
- voidpf stream,
- void* buf,
- uLong size));
-
-uLong ZCALLBACK fwrite_file_func OF((
- voidpf opaque,
- voidpf stream,
- const void* buf,
- uLong size));
-
-long ZCALLBACK ftell_file_func OF((
- voidpf opaque,
- voidpf stream));
-
-long ZCALLBACK fseek_file_func OF((
- voidpf opaque,
- voidpf stream,
- uLong offset,
- int origin));
-
-int ZCALLBACK fclose_file_func OF((
- voidpf opaque,
- voidpf stream));
-
-int ZCALLBACK ferror_file_func OF((
- voidpf opaque,
- voidpf stream));
-
-
-voidpf ZCALLBACK fopen_file_func (opaque, filename, mode)
- voidpf opaque;
- const char* filename;
- int mode;
-{
- FILE* file = NULL;
- const char* mode_fopen = NULL;
- if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER)==ZLIB_FILEFUNC_MODE_READ)
- mode_fopen = "rb";
- else
- if (mode & ZLIB_FILEFUNC_MODE_EXISTING)
- mode_fopen = "r+b";
- else
- if (mode & ZLIB_FILEFUNC_MODE_CREATE)
- mode_fopen = "wb";
-
- if ((filename!=NULL) && (mode_fopen != NULL))
- file = fopen(filename, mode_fopen);
- return file;
-}
-
-
-uLong ZCALLBACK fread_file_func (opaque, stream, buf, size)
- voidpf opaque;
- voidpf stream;
- void* buf;
- uLong size;
-{
- uLong ret;
- ret = (uLong)fread(buf, 1, (size_t)size, (FILE *)stream);
- return ret;
-}
-
-
-uLong ZCALLBACK fwrite_file_func (opaque, stream, buf, size)
- voidpf opaque;
- voidpf stream;
- const void* buf;
- uLong size;
-{
- uLong ret;
- ret = (uLong)fwrite(buf, 1, (size_t)size, (FILE *)stream);
- return ret;
-}
-
-long ZCALLBACK ftell_file_func (opaque, stream)
- voidpf opaque;
- voidpf stream;
-{
- long ret;
- ret = ftell((FILE *)stream);
- return ret;
-}
-
-long ZCALLBACK fseek_file_func (opaque, stream, offset, origin)
- voidpf opaque;
- voidpf stream;
- uLong offset;
- int origin;
-{
- int fseek_origin=0;
- long ret;
- switch (origin)
- {
- case ZLIB_FILEFUNC_SEEK_CUR :
- fseek_origin = SEEK_CUR;
- break;
- case ZLIB_FILEFUNC_SEEK_END :
- fseek_origin = SEEK_END;
- break;
- case ZLIB_FILEFUNC_SEEK_SET :
- fseek_origin = SEEK_SET;
- break;
- default: return -1;
- }
- ret = 0;
- fseek((FILE *)stream, offset, fseek_origin);
- return ret;
-}
-
-int ZCALLBACK fclose_file_func (opaque, stream)
- voidpf opaque;
- voidpf stream;
-{
- int ret;
- ret = fclose((FILE *)stream);
- return ret;
-}
-
-int ZCALLBACK ferror_file_func (opaque, stream)
- voidpf opaque;
- voidpf stream;
-{
- int ret;
- ret = ferror((FILE *)stream);
- return ret;
-}
-
-void fill_fopen_filefunc (pzlib_filefunc_def)
- zlib_filefunc_def* pzlib_filefunc_def;
-{
- pzlib_filefunc_def->zopen_file = fopen_file_func;
- pzlib_filefunc_def->zread_file = fread_file_func;
- pzlib_filefunc_def->zwrite_file = fwrite_file_func;
- pzlib_filefunc_def->ztell_file = ftell_file_func;
- pzlib_filefunc_def->zseek_file = fseek_file_func;
- pzlib_filefunc_def->zclose_file = fclose_file_func;
- pzlib_filefunc_def->zerror_file = ferror_file_func;
- pzlib_filefunc_def->opaque = NULL;
-}
Oops, something went wrong.

0 comments on commit cbb91e7

Please sign in to comment.