corinthia-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmke...@apache.org
Subject [79/92] [abbrv] incubator-corinthia git commit: Rename DFPackage to DFStorage
Date Wed, 17 Dec 2014 13:29:29 GMT
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/8337d187/DocFormats/filters/ooxml/src/word/WordPackage.c
----------------------------------------------------------------------
diff --git a/DocFormats/filters/ooxml/src/word/WordPackage.c b/DocFormats/filters/ooxml/src/word/WordPackage.c
index 22660d5..5d414a0 100644
--- a/DocFormats/filters/ooxml/src/word/WordPackage.c
+++ b/DocFormats/filters/ooxml/src/word/WordPackage.c
@@ -177,15 +177,15 @@ static void addMissingParts(WordPackage *package)
         package->endnotes = DFDocumentNewWithRoot(WORD_ENDNOTES);
 }
 
-WordPackage *WordPackageOpenNew(DFPackage *store, DFError **error)
+WordPackage *WordPackageOpenNew(DFStorage *storage, DFError **error)
 {
-    if (DFPackageFormat(store) != DFFileFormatDocx) {
+    if (DFStorageFormat(storage) != DFFileFormatDocx) {
         DFErrorFormat(error,"Incorrect format: Expected %s, got %s",
-                      DFFileFormatToExtension(DFFileFormatDocx),DFFileFormatToExtension(DFPackageFormat(store)));
+                      DFFileFormatToExtension(DFFileFormatDocx),DFFileFormatToExtension(DFStorageFormat(storage)));
         return NULL;
     }
 
-    OPCPackage *opc = OPCPackageOpenNew(store,error);
+    OPCPackage *opc = OPCPackageOpenNew(storage,error);
     if (opc == NULL)
         return NULL;
 
@@ -214,15 +214,15 @@ WordPackage *WordPackageOpenNew(DFPackage *store, DFError **error)
     return NULL;
 }
 
-WordPackage *WordPackageOpenFrom(DFPackage *store, DFError **error)
+WordPackage *WordPackageOpenFrom(DFStorage *storage, DFError **error)
 {
-    if (DFPackageFormat(store) != DFFileFormatDocx) {
+    if (DFStorageFormat(storage) != DFFileFormatDocx) {
         DFErrorFormat(error,"Incorrect format: Expected %s, got %s",
-                      DFFileFormatToExtension(DFFileFormatDocx),DFFileFormatToExtension(DFPackageFormat(store)));
+                      DFFileFormatToExtension(DFFileFormatDocx),DFFileFormatToExtension(DFStorageFormat(storage)));
         return NULL;
     }
 
-    OPCPackage *opc = OPCPackageOpenFrom(store,error);
+    OPCPackage *opc = OPCPackageOpenFrom(storage,error);
     if (opc == NULL)
         return NULL;
 
@@ -382,11 +382,11 @@ int WordPackageSave(WordPackage *package, DFError **error)
     return 1;
 }
 
-DFDocument *WordPackageGenerateHTML(WordPackage *package, DFPackage *abstractPackage, const
char *idPrefix,
+DFDocument *WordPackageGenerateHTML(WordPackage *package, DFStorage *abstractStorage, const
char *idPrefix,
                                     DFError **error, DFBuffer *warnings)
 {
     DFDocument *html = DFDocumentNew();
-    WordConverter *converter = WordConverterNew(html,abstractPackage,idPrefix,package,warnings);
+    WordConverter *converter = WordConverterNew(html,abstractStorage,idPrefix,package,warnings);
     int ok = WordConverterConvertToHTML(converter,error);
     WordConverterFree(converter);
     if (!ok)
@@ -394,12 +394,12 @@ DFDocument *WordPackageGenerateHTML(WordPackage *package, DFPackage
*abstractPac
     return html;
 }
 
-int WordPackageUpdateFromHTML(WordPackage *package, DFDocument *input, DFPackage *abstractPackage,
+int WordPackageUpdateFromHTML(WordPackage *package, DFDocument *input, DFStorage *abstractStorage,
                               const char *idPrefix, DFError **error, DFBuffer *warnings)
 {
     HTML_normalizeDocument(input);
     HTML_pushDownInlineProperties(input->docNode);
-    WordConverter *converter = WordConverterNew(input,abstractPackage,idPrefix,package,warnings);
+    WordConverter *converter = WordConverterNew(input,abstractStorage,idPrefix,package,warnings);
     int ok = WordConverterUpdateFromHTML(converter,error);
     WordConverterFree(converter);
     if (!ok)

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/8337d187/DocFormats/filters/ooxml/src/word/WordPackage.h
----------------------------------------------------------------------
diff --git a/DocFormats/filters/ooxml/src/word/WordPackage.h b/DocFormats/filters/ooxml/src/word/WordPackage.h
index 07528ab..9862861 100644
--- a/DocFormats/filters/ooxml/src/word/WordPackage.h
+++ b/DocFormats/filters/ooxml/src/word/WordPackage.h
@@ -17,7 +17,7 @@
 
 #include "DFXMLForward.h"
 #include "OPC.h"
-#include "DFPackage.h"
+#include "DFStorage.h"
 #include "OOXMLTypedefs.h"
 
 ////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -55,12 +55,12 @@ int WordPackageSimplifyFields(WordPackage *package);
 void WordPackageCollapseBookmarks(WordPackage *package);
 void WordPackageExpandBookmarks(WordPackage *package);
 
-WordPackage *WordPackageOpenNew(DFPackage *store, DFError **error);
-WordPackage *WordPackageOpenFrom(DFPackage *store, DFError **error);
+WordPackage *WordPackageOpenNew(DFStorage *storage, DFError **error);
+WordPackage *WordPackageOpenFrom(DFStorage *storage, DFError **error);
 int WordPackageSave(WordPackage *package, DFError **error);
-DFDocument *WordPackageGenerateHTML(WordPackage *package, DFPackage *abstractPackage, const
char *idPrefix,
+DFDocument *WordPackageGenerateHTML(WordPackage *package, DFStorage *abstractStorage, const
char *idPrefix,
                                     DFError **error, DFBuffer *warnings);
-int WordPackageUpdateFromHTML(WordPackage *package, DFDocument *input, DFPackage *abstractPackage,
+int WordPackageUpdateFromHTML(WordPackage *package, DFDocument *input, DFStorage *abstractStorage,
                               const char *idPrefix, DFError **error, DFBuffer *warnings);
 
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/8337d187/DocFormats/filters/ooxml/src/word/lenses/WordDrawing.c
----------------------------------------------------------------------
diff --git a/DocFormats/filters/ooxml/src/word/lenses/WordDrawing.c b/DocFormats/filters/ooxml/src/word/lenses/WordDrawing.c
index 9952343..f48f5a3 100644
--- a/DocFormats/filters/ooxml/src/word/lenses/WordDrawing.c
+++ b/DocFormats/filters/ooxml/src/word/lenses/WordDrawing.c
@@ -189,14 +189,14 @@ static DFNode *imageWithFilename(WordGetData *get, const char *filename,
double
     DFError *error = NULL;
     DFNode *imageNode = NULL;
 
-    content = DFBufferReadFromPackage(get->conv->package->opc->store,filename,&error);
+    content = DFBufferReadFromStorage(get->conv->package->opc->storage,filename,&error);
     if (content == NULL) {
         WordConverterWarning(get->conv,"Copy %s to %s: %s",filename,relImagePath,DFErrorMessage(&error));
         DFErrorRelease(error);
         goto end;
     }
 
-    if (!DFBufferWriteToPackage(content,get->conv->abstractPackage,relImagePath,&error))
{
+    if (!DFBufferWriteToStorage(content,get->conv->abstractStorage,relImagePath,&error))
{
         WordConverterWarning(get->conv,"Copy %s to %s: %s",filename,relImagePath,DFErrorMessage(&error));
         DFErrorRelease(error);
         goto end;
@@ -328,9 +328,9 @@ int WordDrawingIsVisible(WordPutData *put, DFNode *concrete)
     return 1;
 }
 
-static char *genImageFilename(DFPackage *package, const char *mediaRelDir, const char *extension,
DFError **error)
+static char *genImageFilename(DFStorage *storage, const char *mediaRelDir, const char *extension,
DFError **error)
 {
-    const char **paths = DFPackageList(package,error);
+    const char **paths = DFStorageList(storage,error);
     if (paths == NULL)
         return NULL;;
 
@@ -366,11 +366,11 @@ static char *genImageFilename(DFPackage *package, const char *mediaRelDir,
const
 
 static OPCRelationship *addImageRelationship(WordConverter *converter, const char *unescapedSrc,
DFError **error)
 {
-    DFPackage *package = converter->package->opc->store;
+    DFStorage *storage = converter->package->opc->storage;
     const char *mediaDir = "word/media";
 
     char *ext = DFPathExtension(unescapedSrc);
-    char *filename = genImageFilename(package,mediaDir,ext,error);
+    char *filename = genImageFilename(storage,mediaDir,ext,error);
     free(ext);
     if (filename == NULL)
         return NULL;
@@ -378,8 +378,8 @@ static OPCRelationship *addImageRelationship(WordConverter *converter,
const cha
     char *destPath = DFAppendPathComponent(mediaDir,filename);
 
     OPCRelationship *result = NULL;
-    DFBuffer *content = DFBufferReadFromPackage(converter->abstractPackage,unescapedSrc,error);
-    if ((content != NULL) && DFBufferWriteToPackage(content,package,destPath,error))
{
+    DFBuffer *content = DFBufferReadFromStorage(converter->abstractStorage,unescapedSrc,error);
+    if ((content != NULL) && DFBufferWriteToStorage(content,storage,destPath,error))
{
         OPCRelationshipSet *rels = converter->package->documentPart->relationships;
         char *relPath = DFFormatString("/word/media/%s",filename);
         result = OPCRelationshipSetAddType(rels,WORDREL_IMAGE,relPath,0);
@@ -400,7 +400,7 @@ static int getImageFile(WordConverter *converter, const char *unescapedSrc,
Pixe
     char *ext = DFPathExtension(unescapedSrc);
     int ok = 0;
 
-    DFBuffer *imageData = DFBufferReadFromPackage(converter->abstractPackage,unescapedSrc,error);
+    DFBuffer *imageData = DFBufferReadFromStorage(converter->abstractStorage,unescapedSrc,error);
     if (imageData == NULL)
         goto end;
 
@@ -498,7 +498,7 @@ static int internalPut2(WordPutData *put, DFNode *abstract, DFNode *concrete,
in
     int imageChanged = 0;
     int sizeChanged = 0;
 
-    if (!DFPackageExists(put->conv->abstractPackage,htmlFilename)) {
+    if (!DFStorageExists(put->conv->abstractStorage,htmlFilename)) {
         WordConverterWarning(put->conv,"HTML image %s does not exist",htmlFilename);
         return 0;
     }
@@ -528,16 +528,16 @@ static int internalPut2(WordPutData *put, DFNode *abstract, DFNode *concrete,
in
 
         if ((wordInfo != NULL) && (wordInfo->widthPts > 0) && (wordInfo->heightPts
> 0) && (rel != NULL)) {
             const char *wordSrc = rel->target;
-            DFPackage *package = put->conv->package->opc->store;
+            DFStorage *storage = put->conv->package->opc->storage;
 
-            if (!DFPackageExists(package,wordSrc)) {
+            if (!DFStorageExists(storage,wordSrc)) {
                 WordConverterWarning(put->conv,"Word image %s does not exist",wordSrc);
                 ImageInfoFree(wordInfo);
                 return 0;
             }
 
-            DFBuffer *content1 = DFBufferReadFromPackage(put->conv->abstractPackage,htmlFilename,NULL);
-            DFBuffer *content2 = DFBufferReadFromPackage(package,wordSrc,NULL);
+            DFBuffer *content1 = DFBufferReadFromStorage(put->conv->abstractStorage,htmlFilename,NULL);
+            DFBuffer *content2 = DFBufferReadFromStorage(storage,wordSrc,NULL);
             int contentsEqual = ((content1 != NULL) && (content2 != NULL) &&
                                  (content1->len == content2->len) &&
                                  !memcmp(content1->data,content2->data,content1->len));

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/8337d187/consumers/dfutil/src/Commands.c
----------------------------------------------------------------------
diff --git a/consumers/dfutil/src/Commands.c b/consumers/dfutil/src/Commands.c
index 0da466d..6c9e04c 100644
--- a/consumers/dfutil/src/Commands.c
+++ b/consumers/dfutil/src/Commands.c
@@ -110,18 +110,18 @@ static int prettyPrintWordFile(const char *filename, DFError **error)
     int ok = 0;
     char *wordTempPath = DFAppendPathComponent(tempPath,"word");
     char *plain = NULL;
-    DFPackage *rawPackage = NULL;
+    DFStorage *storage = NULL;
 
     if (!DFEmptyDirectory(wordTempPath,error))
         goto end;
 
-    rawPackage = DFPackageOpenZip(filename,error);
-    if (rawPackage == NULL) {
+    storage = DFStorageOpenZip(filename,error);
+    if (storage == NULL) {
         DFErrorFormat(error,"%s: %s",filename,DFErrorMessage(error));
         goto end;
     }
 
-    plain = Word_toPlain(rawPackage,NULL);
+    plain = Word_toPlain(storage,NULL);
     printf("%s",plain);
 
     ok = 1;
@@ -130,7 +130,7 @@ end:
     free(tempPath);
     free(wordTempPath);
     free(plain);
-    DFPackageRelease(rawPackage);
+    DFStorageRelease(storage);
     DFDeleteFile(tempPath,NULL);
     return ok;
 }
@@ -165,14 +165,14 @@ static int fromPlain2(const char *tempPath, const char *inStr, const
char *inPat
         goto end;
     }
 
-    DFPackage *rawPackage = NULL;
+    DFStorage *storage = NULL;
 
-    rawPackage = Word_fromPlain(inStr,inPath,error);
-    if (rawPackage == NULL)
+    storage = Word_fromPlain(inStr,inPath,error);
+    if (storage == NULL)
         goto end;
 
-    ok = DFZip(outFilename,rawPackage,error);
-    DFPackageRelease(rawPackage);
+    ok = DFZip(outFilename,storage,error);
+    DFStorageRelease(storage);
 
     return ok;
 end:

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/8337d187/consumers/dfutil/src/Plain.c
----------------------------------------------------------------------
diff --git a/consumers/dfutil/src/Plain.c b/consumers/dfutil/src/Plain.c
index 8cb42e6..777148d 100644
--- a/consumers/dfutil/src/Plain.c
+++ b/consumers/dfutil/src/Plain.c
@@ -60,13 +60,13 @@ static void addSerializedBinary(DFBuffer *result, DFBuffer *data, const
char *fi
     }
 }
 
-static char *findDocumentPath(DFPackage *package, DFError **error)
+static char *findDocumentPath(DFStorage *storage, DFError **error)
 {
     int ok = 0;
     DFDocument *relsDoc = NULL;
     char *result = NULL;
 
-    relsDoc = DFParseXMLPackage(package,"/_rels/.rels",error);
+    relsDoc = DFParseXMLStorage(storage,"/_rels/.rels",error);
     if (relsDoc == NULL) {
         DFErrorFormat(error,"_rels/.rels: %s",DFErrorMessage(error));
         goto end;
@@ -124,13 +124,13 @@ static void parseDocumentRels(DFDocument *relsDoc, DFHashTable *rels,
DFError **
 }
 
 static int addRelatedDoc(DFHashTable *parts, DFHashTable *documentRels, const char *relName,
const char *filename,
-                         DFBuffer *output, DFHashTable *includeTypes, DFPackage *package,
DFError **error)
+                         DFBuffer *output, DFHashTable *includeTypes, DFStorage *storage,
DFError **error)
 {
     const char *relPath = DFHashTableLookup(documentRels,relName);
     if (relPath == NULL)
         return 1;;
 
-    DFDocument *doc = DFParseXMLPackage(package,relPath,error);
+    DFDocument *doc = DFParseXMLStorage(storage,relPath,error);
     if (doc == NULL) {
         DFErrorFormat(error,"%s: %s",relPath,DFErrorMessage(error));
         return 0;
@@ -147,7 +147,7 @@ static int addRelatedDoc(DFHashTable *parts, DFHashTable *documentRels,
const ch
 
 static int processParts(DFHashTable *parts, const char *documentPath, DFDocument *relsDoc,
                         DFHashTable *documentRels,
-                        DFBuffer *output, DFPackage *package, DFError **error)
+                        DFBuffer *output, DFStorage *storage, DFError **error)
 {
     int ok = 0;
     DFHashTable *includeTypes = DFHashTableNew((DFCopyFunction)strdup,free);
@@ -155,7 +155,7 @@ static int processParts(DFHashTable *parts, const char *documentPath,
DFDocument
     DFHashTableAdd(includeTypes,WORDREL_IMAGE,"");
 
     if ((parts == NULL) || (DFHashTableLookup(parts,"document") != NULL)) {
-        DFDocument *doc = DFParseXMLPackage(package,documentPath,error);
+        DFDocument *doc = DFParseXMLStorage(storage,documentPath,error);
         if (doc == NULL)
             goto end;
         addStrippedSerializedDoc(output,doc,"document.xml");
@@ -163,27 +163,27 @@ static int processParts(DFHashTable *parts, const char *documentPath,
DFDocument
     }
 
     if ((parts == NULL) || (DFHashTableLookup(parts,"styles") != NULL)) {
-        if (!addRelatedDoc(parts,documentRels,WORDREL_STYLES,"styles.xml",output,includeTypes,package,error))
+        if (!addRelatedDoc(parts,documentRels,WORDREL_STYLES,"styles.xml",output,includeTypes,storage,error))
             goto end;
     }
     if ((parts == NULL) || (DFHashTableLookup(parts,"numbering") != NULL)) {
-        if (!addRelatedDoc(parts,documentRels,WORDREL_NUMBERING,"numbering.xml",output,includeTypes,package,error))
+        if (!addRelatedDoc(parts,documentRels,WORDREL_NUMBERING,"numbering.xml",output,includeTypes,storage,error))
             goto end;
     }
     if ((parts == NULL) || (DFHashTableLookup(parts,"footnotes") != NULL)) {
-        if (!addRelatedDoc(parts,documentRels,WORDREL_FOOTNOTES,"footnotes.xml",output,includeTypes,package,error))
+        if (!addRelatedDoc(parts,documentRels,WORDREL_FOOTNOTES,"footnotes.xml",output,includeTypes,storage,error))
             goto end;
     }
     if ((parts == NULL) || (DFHashTableLookup(parts,"endnotes") != NULL)) {
-        if (!addRelatedDoc(parts,documentRels,WORDREL_ENDNOTES,"endnotes.xml",output,includeTypes,package,error))
+        if (!addRelatedDoc(parts,documentRels,WORDREL_ENDNOTES,"endnotes.xml",output,includeTypes,storage,error))
             goto end;
     }
     if ((parts != NULL) && (DFHashTableLookup(parts,"settings") != NULL)) {
-        if (!addRelatedDoc(parts,documentRels,WORDREL_SETTINGS,"settings.xml",output,includeTypes,package,error))
+        if (!addRelatedDoc(parts,documentRels,WORDREL_SETTINGS,"settings.xml",output,includeTypes,storage,error))
             goto end;
     }
     if ((parts != NULL) && (DFHashTableLookup(parts,"theme") != NULL)) {
-        if (!addRelatedDoc(parts,documentRels,WORDREL_THEME,"theme.xml",output,includeTypes,package,error))
+        if (!addRelatedDoc(parts,documentRels,WORDREL_THEME,"theme.xml",output,includeTypes,storage,error))
             goto end;
     }
 
@@ -207,7 +207,7 @@ static int processParts(DFHashTable *parts, const char *documentPath,
DFDocument
         addSerializedDoc(output,relsDoc,"document.xml.rels");
     }
 
-    const char **entries = DFPackageList(package,NULL);
+    const char **entries = DFStorageList(storage,NULL);
     if (entries != NULL) { // FIXME: Should really report an error if this is not the case
         for (int i = 0; entries[i]; i++) {
             const char *filename = entries[i];
@@ -218,7 +218,7 @@ static int processParts(DFHashTable *parts, const char *documentPath,
DFDocument
                     absFilename = DFFormatString("/%s",filename);
                 else
                     absFilename = strdup(filename);
-                DFBuffer *data = DFBufferReadFromPackage(package,absFilename,NULL);
+                DFBuffer *data = DFBufferReadFromStorage(storage,absFilename,NULL);
                 addSerializedBinary(output,data,absFilename);
                 DFBufferRelease(data);
                 free(absFilename);
@@ -235,7 +235,7 @@ end:
     return ok;
 }
 
-static char *Word_toPlainFromDir(DFPackage *package, DFHashTable *parts, DFError **error)
+static char *Word_toPlainFromDir(DFStorage *storage, DFHashTable *parts, DFError **error)
 {
     char *documentPath = NULL;
     DFHashTable *rels = DFHashTableNew((DFCopyFunction)strdup,(DFFreeFunction)free);
@@ -245,21 +245,21 @@ static char *Word_toPlainFromDir(DFPackage *package, DFHashTable *parts,
DFError
     int ok = 0;
 
 
-    documentPath = findDocumentPath(package,error);
+    documentPath = findDocumentPath(storage,error);
     if (documentPath == NULL) {
         DFErrorFormat(error,"findDocumentPath: %s",DFErrorMessage(error));
         goto end;
     }
 
     relsPathRel = computeDocumentRelsPath(documentPath);
-    if (DFPackageExists(package,relsPathRel) && ((relsDoc = DFParseXMLPackage(package,relsPathRel,error))
== NULL)) {
+    if (DFStorageExists(storage,relsPathRel) && ((relsDoc = DFParseXMLStorage(storage,relsPathRel,error))
== NULL)) {
         DFErrorFormat(error,"%s: %s",relsPathRel,DFErrorMessage(error));
         goto end;
     }
 
     parseDocumentRels(relsDoc,rels,error);
 
-    if (!processParts(parts,documentPath,relsDoc,rels,output,package,error))
+    if (!processParts(parts,documentPath,relsDoc,rels,output,storage,error))
         goto end;
 
     ok = 1;
@@ -280,10 +280,10 @@ end:
     }
 }
 
-char *Word_toPlain(DFPackage *rawPackage, DFHashTable *parts)
+char *Word_toPlain(DFStorage *rawStorage, DFHashTable *parts)
 {
     DFError *error = NULL;
-    char *result = Word_toPlainFromDir(rawPackage,parts,&error);
+    char *result = Word_toPlainFromDir(rawStorage,parts,&error);
     if (result == NULL) {
         result = DFFormatString("%s\n",DFErrorMessage(&error));
         DFErrorRelease(error);
@@ -291,12 +291,12 @@ char *Word_toPlain(DFPackage *rawPackage, DFHashTable *parts)
     return result;
 }
 
-static int saveXMLDocument(DFPackage *package, const char *filename, DFDocument *doc, NamespaceID
defaultNS, DFError **error)
+static int saveXMLDocument(DFStorage *storage, const char *filename, DFDocument *doc, NamespaceID
defaultNS, DFError **error)
 {
     char *parentPath = DFPathDirName(filename);
     int ok = 0;
 
-    if (!DFSerializeXMLPackage(doc,defaultNS,0,package,filename,error)) {
+    if (!DFSerializeXMLStorage(doc,defaultNS,0,storage,filename,error)) {
         DFErrorFormat(error,"serialize %s: %s",filename,DFErrorMessage(error));
         goto end;
     }
@@ -308,14 +308,14 @@ end:
     return ok;
 }
 
-static int saveStrippedXMLText(DFPackage *package, const char *filename,
+static int saveStrippedXMLText(DFStorage *storage, const char *filename,
                                const char *input, NamespaceID defaultNS, DFError **error)
 {
     DFDocument *doc = DFParseXMLString(input,error);
     if (doc == NULL)
         return 0;
     DFStripWhitespace(doc->docNode);
-    int ok = saveXMLDocument(package,filename,doc,defaultNS,error);
+    int ok = saveXMLDocument(storage,filename,doc,defaultNS,error);
     DFDocumentRelease(doc);
     return ok;
 }
@@ -327,7 +327,7 @@ typedef struct PartInfo {
     const char *type;
 } PartInfo;
 
-static int saveContentTypes(DFPackage *package, DFHashTable *ctDefaults, DFHashTable *ctOverrides,
DFError **error)
+static int saveContentTypes(DFStorage *storage, DFHashTable *ctDefaults, DFHashTable *ctOverrides,
DFError **error)
 {
     DFDocument *doc = DFDocumentNewWithRoot(CT_TYPES);
 
@@ -352,12 +352,12 @@ static int saveContentTypes(DFPackage *package, DFHashTable *ctDefaults,
DFHashT
     }
     free(keys);
 
-    int ok = saveXMLDocument(package,"[Content_Types].xml",doc,NAMESPACE_CT,error);
+    int ok = saveXMLDocument(storage,"[Content_Types].xml",doc,NAMESPACE_CT,error);
     DFDocumentRelease(doc);
     return ok;
 }
 
-static int saveDocRels(DFPackage *package,
+static int saveDocRels(DFStorage *storage,
                        DFHashTable *docRelURIs,
                        DFHashTable *docRelTypes,
                        DFHashTable *docRelModes,
@@ -383,24 +383,24 @@ static int saveDocRels(DFPackage *package,
     }
     free(sortedIds);
 
-    int ok = saveXMLDocument(package,"/word/_rels/document.xml.rels",doc,NAMESPACE_REL,error);
+    int ok = saveXMLDocument(storage,"/word/_rels/document.xml.rels",doc,NAMESPACE_REL,error);
     DFDocumentRelease(doc);
     return ok;
 }
 
-static int saveRootRels(DFPackage *package, DFError **error)
+static int saveRootRels(DFStorage *storage, DFError **error)
 {
     DFDocument *doc = DFDocumentNewWithRoot(REL_RELATIONSHIPS);
     DFNode *rel = DFCreateChildElement(doc->root,REL_RELATIONSHIP);
     DFSetAttribute(rel,NULL_Id,"rId1");
     DFSetAttribute(rel,NULL_Type,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument");
     DFSetAttribute(rel,NULL_TARGET,"/word/document.xml");
-    int ok = saveXMLDocument(package,"/_rels/.rels",doc,NAMESPACE_REL,error);
+    int ok = saveXMLDocument(storage,"/_rels/.rels",doc,NAMESPACE_REL,error);
     DFDocumentRelease(doc);
     return ok;
 }
 
-static int Word_fromPackage(TextPackage *tp, DFPackage *store, DFError **error)
+static int Word_fromStorage(TextPackage *tp, DFStorage *storage, DFError **error)
 {
     PartInfo parts[7] = {
         { "numbering.xml", "/word/numbering.xml", WORDREL_NUMBERING, WORDTYPE_NUMBERING },
@@ -434,7 +434,7 @@ static int Word_fromPackage(TextPackage *tp, DFPackage *store, DFError
**error)
 
 
     if (documentStr != NULL) {
-        if (!saveStrippedXMLText(store,"/word/document.xml",documentStr,NAMESPACE_NULL,error))
+        if (!saveStrippedXMLText(storage,"/word/document.xml",documentStr,NAMESPACE_NULL,error))
             goto end;
     }
 
@@ -444,7 +444,7 @@ static int Word_fromPackage(TextPackage *tp, DFPackage *store, DFError
**error)
         if (content == NULL)
             continue;
 
-        if (!saveStrippedXMLText(store,parts[i].path,content,NAMESPACE_NULL,error))
+        if (!saveStrippedXMLText(storage,parts[i].path,content,NAMESPACE_NULL,error))
             goto end;
 
         char rIdStr[100];
@@ -484,7 +484,7 @@ static int Word_fromPackage(TextPackage *tp, DFPackage *store, DFError
**error)
             int fileok = 1;
 
             DFBuffer *data = stringToBinary(str);
-            if (!DFBufferWriteToPackage(data,store,curFilename,error)) {
+            if (!DFBufferWriteToStorage(data,storage,curFilename,error)) {
                 DFErrorFormat(error,"%s: %s",curFilename,DFErrorMessage(error));
                 fileok = 0;
             }
@@ -497,7 +497,7 @@ static int Word_fromPackage(TextPackage *tp, DFPackage *store, DFError
**error)
         }
     }
 
-    if (!saveContentTypes(store,ctDefaults,ctOverrides,error)) {
+    if (!saveContentTypes(storage,ctDefaults,ctOverrides,error)) {
         DFErrorFormat(error,"saveContentTypes: %s",DFErrorMessage(error));
         goto end;
     }
@@ -534,12 +534,12 @@ static int Word_fromPackage(TextPackage *tp, DFPackage *store, DFError
**error)
         DFDocumentRelease(doc);
     }
 
-    if (!saveDocRels(store,docRelURIs,docRelTypes,docRelModes,error)) {
+    if (!saveDocRels(storage,docRelURIs,docRelTypes,docRelModes,error)) {
         DFErrorFormat(error,"saveDocRels: %s",DFErrorMessage(error));
         goto end;
     }
 
-    if (!saveRootRels(store,error)) {
+    if (!saveRootRels(storage,error)) {
         DFErrorFormat(error,"saveRootRels: %s",DFErrorMessage(error));
         goto end;
     }
@@ -556,25 +556,25 @@ end:
     return ok;
 }
 
-DFPackage *Word_fromPlain(const char *plain, const char *plainPath, DFError **error)
+DFStorage *Word_fromPlain(const char *plain, const char *plainPath, DFError **error)
 {
     int ok = 0;
-    DFPackage *concretePackage = NULL;
+    DFStorage *concreteStorage = NULL;
     TextPackage *textPackage = NULL;
 
     textPackage = TextPackageNewWithString(plain,plainPath,error);
     if (textPackage == NULL)
         goto end;
 
-    concretePackage = DFPackageNewMemory(DFFileFormatDocx);
+    concreteStorage = DFStorageNewMemory(DFFileFormatDocx);
 
-    if (!Word_fromPackage(textPackage,concretePackage,error)) {
-        DFErrorFormat(error,"Word_fromPackage: %s",DFErrorMessage(error));
+    if (!Word_fromStorage(textPackage,concreteStorage,error)) {
+        DFErrorFormat(error,"Word_fromStorage: %s",DFErrorMessage(error));
         printf("%s\n",DFErrorMessage(error));
         goto end;
     }
 
-    if (!DFPackageSave(concretePackage,error))
+    if (!DFStorageSave(concreteStorage,error))
         goto end;
 
     ok = 1;
@@ -582,10 +582,10 @@ DFPackage *Word_fromPlain(const char *plain, const char *plainPath,
DFError **er
 end:
     TextPackageRelease(textPackage);
     if (ok) {
-        return concretePackage;
+        return concreteStorage;
     }
     else {
-        DFPackageRelease(concretePackage);
+        DFStorageRelease(concreteStorage);
         return NULL;
     }
 }
@@ -611,7 +611,7 @@ static const char **HTML_getImageSources(DFDocument *doc)
     return result;
 }
 
-char *HTML_toPlain(DFDocument *doc, DFPackage *package, DFError **error)
+char *HTML_toPlain(DFDocument *doc, DFStorage *storage, DFError **error)
 {
     DFBuffer *output = DFBufferNew();
     char *docStr = DFSerializeXMLString(doc,0,0);
@@ -625,7 +625,7 @@ char *HTML_toPlain(DFDocument *doc, DFPackage *package, DFError **error)
             DFBufferFormat(output,"#item %s\n",src);
         else
             DFBufferFormat(output,"#item images/%s\n",src);
-        DFBuffer *imageData = DFBufferReadFromPackage(package,src,error);
+        DFBuffer *imageData = DFBufferReadFromStorage(storage,src,error);
         if (imageData == NULL) {
             DFErrorFormat(error,"%s: %s",src,DFErrorMessage(error));
             return NULL;
@@ -642,7 +642,7 @@ char *HTML_toPlain(DFDocument *doc, DFPackage *package, DFError **error)
     return str;
 }
 
-static DFDocument *HTML_fromTextPackage(TextPackage *textPackage, DFPackage *htmlPackage,
DFError **error)
+static DFDocument *HTML_fromTextPackage(TextPackage *textPackage, DFStorage *htmlStorage,
DFError **error)
 {
     const char *html = DFHashTableLookup(textPackage->items,"");
     if (html == NULL) {
@@ -663,7 +663,7 @@ static DFDocument *HTML_fromTextPackage(TextPackage *textPackage, DFPackage
*htm
 
         const char *str = DFHashTableLookup(textPackage->items,key);
         DFBuffer *data = stringToBinary(str);
-        if (!DFBufferWriteToPackage(data,htmlPackage,key,error)) {
+        if (!DFBufferWriteToStorage(data,htmlStorage,key,error)) {
             DFErrorFormat(error,"%s: %s",key,DFErrorMessage(error));
             DFDocumentRelease(doc);
             ok = 0;
@@ -678,12 +678,12 @@ static DFDocument *HTML_fromTextPackage(TextPackage *textPackage, DFPackage
*htm
     return doc;
 }
 
-DFDocument *HTML_fromPlain(const char *plain, const char *path, DFPackage *htmlPackage, DFError
**error)
+DFDocument *HTML_fromPlain(const char *plain, const char *path, DFStorage *htmlStorage, DFError
**error)
 {
     TextPackage *textPackage = TextPackageNewWithString(plain,path,error);
     if (textPackage == NULL)
         return NULL;;
-    DFDocument *result = HTML_fromTextPackage(textPackage,htmlPackage,error);
+    DFDocument *result = HTML_fromTextPackage(textPackage,htmlStorage,error);
     TextPackageRelease(textPackage);
     return result;
 }

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/8337d187/consumers/dfutil/src/Plain.h
----------------------------------------------------------------------
diff --git a/consumers/dfutil/src/Plain.h b/consumers/dfutil/src/Plain.h
index f81e809..8e73560 100644
--- a/consumers/dfutil/src/Plain.h
+++ b/consumers/dfutil/src/Plain.h
@@ -18,11 +18,11 @@
 #include "DFError.h"
 #include "DFHashTable.h"
 #include "DFDOM.h"
-#include "DFPackage.h"
+#include "DFStorage.h"
 
-char *Word_toPlain(DFPackage *rawPackage, DFHashTable *parts);
-DFPackage *Word_fromPlain(const char *plain, const char *plainPath, DFError **error);
-char *HTML_toPlain(DFDocument *doc, DFPackage *package, DFError **error);
-DFDocument *HTML_fromPlain(const char *plain, const char *path, DFPackage *htmlPackage, DFError
**error);
+char *Word_toPlain(DFStorage *rawStorage, DFHashTable *parts);
+DFStorage *Word_fromPlain(const char *plain, const char *plainPath, DFError **error);
+char *HTML_toPlain(DFDocument *doc, DFStorage *storage, DFError **error);
+DFDocument *HTML_fromPlain(const char *plain, const char *path, DFStorage *htmlStorage, DFError
**error);
 
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/8337d187/consumers/dfutil/src/TestCase.c
----------------------------------------------------------------------
diff --git a/consumers/dfutil/src/TestCase.c b/consumers/dfutil/src/TestCase.c
index 65d3924..be2794d 100644
--- a/consumers/dfutil/src/TestCase.c
+++ b/consumers/dfutil/src/TestCase.c
@@ -44,7 +44,7 @@ void TestCaseFree(TestCase *tc)
     free(tc);
 }
 
-DFPackage *TestCaseOpenPackage(TestCase *tc, DFError **error)
+DFStorage *TestCaseOpenPackage(TestCase *tc, DFError **error)
 {
     const char *inputDocx = DFHashTableLookup(tc->input,"input.docx");
     if (inputDocx == NULL) {
@@ -55,12 +55,12 @@ DFPackage *TestCaseOpenPackage(TestCase *tc, DFError **error)
     return Word_fromPlain(inputDocx,tc->path,error);
 }
 
-DFDocument *TestCaseGetHTML(TestCase *tc, DFPackage *htmlPackage, DFError **error)
+DFDocument *TestCaseGetHTML(TestCase *tc, DFStorage *htmlStorage, DFError **error)
 {
     const char *inputHtml = DFHashTableLookup(tc->input,"input.html");
     if (inputHtml == NULL) {
         DFErrorFormat(error,"input.html not defined");
         return NULL;
     }
-    return HTML_fromPlain(inputHtml,tc->path,htmlPackage,error);
+    return HTML_fromPlain(inputHtml,tc->path,htmlStorage,error);
 }

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/8337d187/consumers/dfutil/src/TestCase.h
----------------------------------------------------------------------
diff --git a/consumers/dfutil/src/TestCase.h b/consumers/dfutil/src/TestCase.h
index 1721373..f9dfd8e 100644
--- a/consumers/dfutil/src/TestCase.h
+++ b/consumers/dfutil/src/TestCase.h
@@ -17,7 +17,7 @@
 
 #include "DFHashTable.h"
 #include "DFBuffer.h"
-#include "DFPackage.h"
+#include "DFStorage.h"
 #include "DFXMLForward.h"
 
 ////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -36,7 +36,7 @@ struct TestCase {
 
 TestCase *TestCaseNew(const char *path, DFHashTable *input);
 void TestCaseFree(TestCase *tc);
-DFPackage *TestCaseOpenPackage(TestCase *tc, DFError **error);
-DFDocument *TestCaseGetHTML(TestCase *tc, DFPackage *htmlPackage, DFError **error);
+DFStorage *TestCaseOpenPackage(TestCase *tc, DFError **error);
+DFDocument *TestCaseGetHTML(TestCase *tc, DFStorage *htmlStorage, DFError **error);
 
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/8337d187/consumers/dfutil/src/TestFunctions.c
----------------------------------------------------------------------
diff --git a/consumers/dfutil/src/TestFunctions.c b/consumers/dfutil/src/TestFunctions.c
index 91f5af5..7c7a3f8 100644
--- a/consumers/dfutil/src/TestFunctions.c
+++ b/consumers/dfutil/src/TestFunctions.c
@@ -93,17 +93,17 @@ static void CSS_setHeadingNumbering(TestCase *script, int argc, const
char **arg
 static void Word_testCollapseBookmarks(TestCase *script, int argc, const char **argv)
 {
     DFError *error = NULL;
-    DFPackage *rawPackage = TestCaseOpenPackage(script,&error);
-    if (rawPackage == NULL) {
+    DFStorage *storage = TestCaseOpenPackage(script,&error);
+    if (storage == NULL) {
         DFBufferFormat(script->output,"%s\n",DFErrorMessage(&error));
         DFErrorRelease(error);
         return;
     }
 
-    if (!WordCollapseBookmarks(rawPackage,&error)) {
+    if (!WordCollapseBookmarks(storage,&error)) {
         DFBufferFormat(script->output,"%s\n",DFErrorMessage(&error));
         DFErrorRelease(error);
-        DFPackageRelease(rawPackage);
+        DFStorageRelease(storage);
         return;
     }
 
@@ -111,28 +111,28 @@ static void Word_testCollapseBookmarks(TestCase *script, int argc, const
char **
     DFHashTableAdd(parts,"document","");
 
     // Output the docx file
-    char *plain = Word_toPlain(rawPackage,parts);
+    char *plain = Word_toPlain(storage,parts);
     DFBufferFormat(script->output,"%s",plain);
     free(plain);
     DFHashTableRelease(parts);
-    DFPackageRelease(rawPackage);
+    DFStorageRelease(storage);
 }
 
 
 static void Word_testExpandBookmarks(TestCase *script, int argc, const char **argv)
 {
     DFError *error = NULL;
-    DFPackage *rawPackage = TestCaseOpenPackage(script,&error);
-    if (rawPackage == NULL) {
+    DFStorage *storage = TestCaseOpenPackage(script,&error);
+    if (storage == NULL) {
         DFBufferFormat(script->output,"%s\n",DFErrorMessage(&error));
         DFErrorRelease(error);
         return;
     }
 
-    if (!WordExpandBookmarks(rawPackage,&error)) {
+    if (!WordExpandBookmarks(storage,&error)) {
         DFBufferFormat(script->output,"%s\n",DFErrorMessage(&error));
         DFErrorRelease(error);
-        DFPackageRelease(rawPackage);
+        DFStorageRelease(storage);
         return;
     }
 
@@ -140,29 +140,29 @@ static void Word_testExpandBookmarks(TestCase *script, int argc, const
char **ar
     DFHashTableAdd(parts,"document","");
 
     // Output the docx file
-    char *plain = Word_toPlain(rawPackage,parts);
+    char *plain = Word_toPlain(storage,parts);
     DFBufferFormat(script->output,"%s",plain);
     free(plain);
     DFHashTableRelease(parts);
-    DFPackageRelease(rawPackage);
+    DFStorageRelease(storage);
 }
 
 static void Word_testGet(TestCase *script, int argc, const char **argv)
 {
     DFError *error = NULL;
-    DFPackage *abstractPackage = NULL;
-    DFPackage *concretePackage = NULL;
+    DFStorage *abstractStorage = NULL;
+    DFStorage *concreteStorage = NULL;
     DFAbstractDocument *abstractDoc = NULL;
     DFConcreteDocument *concreteDoc = NULL;
     char *htmlPlain = NULL;
 
-    concretePackage = TestCaseOpenPackage(script,&error);
-    if (concretePackage == NULL)
+    concreteStorage = TestCaseOpenPackage(script,&error);
+    if (concreteStorage == NULL)
         goto end;
 
-    concreteDoc = DFConcreteDocumentNew(concretePackage);
-    abstractPackage = DFPackageNewMemory(DFFileFormatHTML);
-    abstractDoc = DFAbstractDocumentNew(abstractPackage);
+    concreteDoc = DFConcreteDocumentNew(concreteStorage);
+    abstractStorage = DFStorageNewMemory(DFFileFormatHTML);
+    abstractDoc = DFAbstractDocumentNew(abstractStorage);
 
     if (!DFGet(concreteDoc,abstractDoc,&error))
         goto end;;
@@ -173,7 +173,7 @@ static void Word_testGet(TestCase *script, int argc, const char **argv)
         goto end;
     }
 
-    htmlPlain = HTML_toPlain(htmlDoc,abstractPackage,&error);
+    htmlPlain = HTML_toPlain(htmlDoc,abstractStorage,&error);
 
 end:
     if (htmlPlain != NULL)
@@ -182,8 +182,8 @@ end:
         DFBufferFormat(script->output,"%s\n",DFErrorMessage(&error));
 
     DFErrorRelease(error);
-    DFPackageRelease(abstractPackage);
-    DFPackageRelease(concretePackage);
+    DFStorageRelease(abstractStorage);
+    DFStorageRelease(concreteStorage);
     DFAbstractDocumentRelease(abstractDoc);
     DFConcreteDocumentRelease(concreteDoc);
     free(htmlPlain);
@@ -218,15 +218,15 @@ static void Word_testCreate(TestCase *script, int argc, const char **argv)
 {
     DFError *error = NULL;
     DFDocument *htmlDoc = NULL;
-    DFPackage *abstractPackage = DFPackageNewMemory(DFFileFormatHTML);
-    DFPackage *concretePackage = DFPackageNewMemory(DFFileFormatDocx);
-    DFAbstractDocument *abstractDoc = DFAbstractDocumentNew(abstractPackage);
-    DFConcreteDocument *concreteDoc = DFConcreteDocumentNew(concretePackage);
+    DFStorage *abstractStorage = DFStorageNewMemory(DFFileFormatHTML);
+    DFStorage *concreteStorage = DFStorageNewMemory(DFFileFormatDocx);
+    DFAbstractDocument *abstractDoc = DFAbstractDocumentNew(abstractStorage);
+    DFConcreteDocument *concreteDoc = DFConcreteDocumentNew(concreteStorage);
     DFHashTable *parts = NULL;
     char *wordPlain = NULL;
 
     // Read input.html
-    htmlDoc = TestCaseGetHTML(script,abstractPackage,&error);
+    htmlDoc = TestCaseGetHTML(script,abstractStorage,&error);
     if (htmlDoc == NULL)
         goto end;
 
@@ -236,7 +236,7 @@ static void Word_testCreate(TestCase *script, int argc, const char **argv)
         goto end;
 
     parts = getFlags(argc,argv);
-    wordPlain = Word_toPlain(concretePackage,parts);
+    wordPlain = Word_toPlain(concreteStorage,parts);
 
 end:
     if (wordPlain != NULL)
@@ -246,8 +246,8 @@ end:
 
     DFErrorRelease(error);
     DFDocumentRelease(htmlDoc);
-    DFPackageRelease(abstractPackage);
-    DFPackageRelease(concretePackage);
+    DFStorageRelease(abstractStorage);
+    DFStorageRelease(concreteStorage);
     DFAbstractDocumentRelease(abstractDoc);
     DFConcreteDocumentRelease(concreteDoc);
     DFHashTableRelease(parts);
@@ -258,23 +258,23 @@ static void Word_testUpdate(TestCase *script, int argc, const char **argv)
 {
     DFError *error = NULL;
     DFDocument *htmlDoc = NULL;
-    DFPackage *abstractPackage = NULL;
-    DFPackage *concretePackage = NULL;
+    DFStorage *abstractStorage = NULL;
+    DFStorage *concreteStorage = NULL;
     DFAbstractDocument *abstractDoc = NULL;
     DFConcreteDocument *concreteDoc = NULL;
     DFHashTable *parts = NULL;
     char *wordPlain = NULL;
 
-    concretePackage = TestCaseOpenPackage(script,&error);
-    if (concretePackage == NULL)
+    concreteStorage = TestCaseOpenPackage(script,&error);
+    if (concreteStorage == NULL)
         goto end;
 
-    abstractPackage = DFPackageNewMemory(DFFileFormatHTML);
-    abstractDoc = DFAbstractDocumentNew(abstractPackage);
-    concreteDoc = DFConcreteDocumentNew(concretePackage);
+    abstractStorage = DFStorageNewMemory(DFFileFormatHTML);
+    abstractDoc = DFAbstractDocumentNew(abstractStorage);
+    concreteDoc = DFConcreteDocumentNew(concreteStorage);
 
     // Read input.html
-    htmlDoc = TestCaseGetHTML(script,abstractPackage,&error);
+    htmlDoc = TestCaseGetHTML(script,abstractStorage,&error);
     if (htmlDoc == NULL)
         goto end;
 
@@ -286,7 +286,7 @@ static void Word_testUpdate(TestCase *script, int argc, const char **argv)
 
     // Output the updated docx file
     parts = getFlags(argc,argv);
-    wordPlain = Word_toPlain(concretePackage,parts);
+    wordPlain = Word_toPlain(concreteStorage,parts);
 
 end:
     if (wordPlain != NULL)
@@ -296,8 +296,8 @@ end:
 
     DFErrorRelease(error);
     DFDocumentRelease(htmlDoc);
-    DFPackageRelease(abstractPackage);
-    DFPackageRelease(concretePackage);
+    DFStorageRelease(abstractStorage);
+    DFStorageRelease(concreteStorage);
     DFAbstractDocumentRelease(abstractDoc);
     DFConcreteDocumentRelease(concreteDoc);
     DFHashTableRelease(parts);
@@ -307,9 +307,9 @@ end:
 static void LaTeX_testCreate(TestCase *script, int argc, const char **argv)
 {
     DFError *error = NULL;
-    DFPackage *htmlPackage = DFPackageNewMemory(DFFileFormatHTML);
-    DFDocument *htmlDoc = TestCaseGetHTML(script,htmlPackage,&error);
-    DFPackageRelease(htmlPackage);
+    DFStorage *htmlStorage = DFStorageNewMemory(DFFileFormatHTML);
+    DFDocument *htmlDoc = TestCaseGetHTML(script,htmlStorage,&error);
+    DFStorageRelease(htmlStorage);
     if (htmlDoc == NULL) {
         DFBufferFormat(script->output,"%s\n",DFErrorMessage(&error));
         DFErrorRelease(error);

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/8337d187/consumers/dfutil/src/main.c
----------------------------------------------------------------------
diff --git a/consumers/dfutil/src/main.c b/consumers/dfutil/src/main.c
index 16bb2a7..57a36ea 100644
--- a/consumers/dfutil/src/main.c
+++ b/consumers/dfutil/src/main.c
@@ -93,15 +93,15 @@ static int runCommand(int argc, const char **argv, DFError **dferr)
     }
 #endif
     else if ((argc == 4) && !strcmp(argv[1],"-zip")) {
-        DFPackage *package = DFPackageNewFilesystem(argv[3],DFFileFormatUnknown);
-        int r = DFZip(argv[2],package,dferr);
-        DFPackageRelease(package);
+        DFStorage *storage = DFStorageNewFilesystem(argv[3],DFFileFormatUnknown);
+        int r = DFZip(argv[2],storage,dferr);
+        DFStorageRelease(storage);
         return r;
     }
     else if ((argc == 4) && !strcmp(argv[1],"-unzip")) {
-        DFPackage *package = DFPackageNewFilesystem(argv[3],DFFileFormatUnknown);
-        int r = DFUnzip(argv[2],package,dferr);
-        DFPackageRelease(package);
+        DFStorage *storage = DFStorageNewFilesystem(argv[3],DFFileFormatUnknown);
+        int r = DFUnzip(argv[2],storage,dferr);
+        DFStorageRelease(storage);
         return r;
     }
     else if ((argc == 4) && !strcmp(argv[1],"get")) {


Mime
View raw message