corinthia-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject [09/19] incubator-corinthia git commit: work
Date Thu, 01 Jan 2015 10:10:31 GMT
work


Project: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/commit/f92c3112
Tree: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/tree/f92c3112
Diff: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/diff/f92c3112

Branch: refs/heads/RTC_platform
Commit: f92c3112e8364478ba14c74bbbb750217496fcc2
Parents: 3686a74
Author: jani <jani@apache.org>
Authored: Mon Dec 29 22:08:31 2014 +0100
Committer: jani <jani@apache.org>
Committed: Mon Dec 29 22:08:31 2014 +0100

----------------------------------------------------------------------
 DocFormats/core/src/lib/DFZipFile.c      | 25 +++++++------------------
 DocFormats/core/tests/names/NamesTests.c |  2 +-
 2 files changed, 8 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/f92c3112/DocFormats/core/src/lib/DFZipFile.c
----------------------------------------------------------------------
diff --git a/DocFormats/core/src/lib/DFZipFile.c b/DocFormats/core/src/lib/DFZipFile.c
index b916794..7a4ff43 100644
--- a/DocFormats/core/src/lib/DFZipFile.c
+++ b/DocFormats/core/src/lib/DFZipFile.c
@@ -72,33 +72,21 @@ int DFUnzip(const char *zipFilename, DFStorage *storage, DFError **error)
     return 1;
 }
 
-#if 0
-static int zipAddFile(zipFile zip, const char *dest, DFBuffer *content, DFError **error)
+static int zipAddFile(const char *dest, DFBuffer *content, DFError **error)
 {
-    zip_fileinfo fileinfo;
-    bzero(&fileinfo,sizeof(fileinfo));
-
-    if (ZIP_OK != zipOpenNewFileInZip(zip,
-                                      dest,
-                                      &fileinfo,
-                                      NULL,0,
-                                      NULL,0,
-                                      NULL,
-                                      Z_DEFLATED,
-                                      Z_DEFAULT_COMPRESSION)) {
+    if (DFextZipOpenNextFile(dest, 0) < 0)
         return zipError(error,"%s: Cannot create entry in zip file",dest);
-    }
 
+#if 0
     if (ZIP_OK != zipWriteInFileInZip(zip,content->data,(unsigned int)content->len))
         return zipError(error,"%s: Error writing to entry in zip file",dest);
 
 
-    if (ZIP_OK != zipCloseFileInZip(zip))
+#endif
+    if (DFextZipCloseFile() <0)
         return zipError(error,"%s: Error closing entry in zip file",dest);
-
     return 1;
 }
-#endif
 
 
 
@@ -125,13 +113,14 @@ int DFZip(const char *zipFilename, DFStorage *storage, DFError **error)
               goto end;
           }
 
-          if (!zipAddFile(zip,path,content,error))
+          if (!zipAddFile(path,content,error))
               goto end;
       }
 
       ok = 1;
     }
 
+end:
     DFBufferRelease(content);
     free(allPaths);
     DFextZipClose();

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/f92c3112/DocFormats/core/tests/names/NamesTests.c
----------------------------------------------------------------------
diff --git a/DocFormats/core/tests/names/NamesTests.c b/DocFormats/core/tests/names/NamesTests.c
index cbf3bc7..2e94015 100644
--- a/DocFormats/core/tests/names/NamesTests.c
+++ b/DocFormats/core/tests/names/NamesTests.c
@@ -19,7 +19,7 @@ static void test_sample(void)
 {
 }
 
-TestGroup LibTests = {
+TestGroup NamesTests = {
     "core.lib", {
         { "sample", PlainTest, test_sample },
         { NULL, PlainTest, NULL }


Mime
View raw message