summaryrefslogtreecommitdiff
path: root/unrar
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@users.sourceforge.net>2009-10-24 17:11:22 +0200
committerTomas Bzatek <tbzatek@users.sourceforge.net>2009-10-24 17:11:22 +0200
commitc082fe2979d033f70152922da49fb6be17c594bf (patch)
tree03e4c7c79392fbc2f1a7a8bac3b80cc87e36a9ba /unrar
parentdb2ce1f3eb443926d496640fe1f8f1f42af431b0 (diff)
downloadtuxcmd-modules-c082fe2979d033f70152922da49fb6be17c594bf.tar.xz
Rename VFSCopyOut and VFSCopyIn functions
Diffstat (limited to 'unrar')
-rw-r--r--unrar/unrar.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/unrar/unrar.c b/unrar/unrar.c
index 7f6c1e4..c4870ea 100644
--- a/unrar/unrar.c
+++ b/unrar/unrar.c
@@ -659,18 +659,18 @@ int VFSTwoSameFiles(struct TVFSGlobs *globs, const char *Path1, const char *Path
////////////////////////
-TVFSResult VFSCopyOut(struct TVFSGlobs *globs, const char *sSrcName, const char *sDstName, int Append)
+TVFSResult VFSCopyToLocal(struct TVFSGlobs *globs, const char *sSrcName, const char *sDstName, int Append)
{
if ((sSrcName == NULL) || (sDstName == NULL) || (strlen(sSrcName) < 1) || (strlen(sDstName) < 1)) {
- printf("(EE) VFSCopyOut: The value of 'sSrcName' or 'sDstName' is NULL or empty\n");
+ printf("(EE) VFSCopyToLocal: The value of 'sSrcName' or 'sDstName' is NULL or empty\n");
return cVFS_Failed;
}
- printf("(II) VFSCopyOut: copying file '%s' out to '%s'\n", sSrcName, sDstName);
+ printf("(II) VFSCopyToLocal: copying file '%s' out to '%s'\n", sSrcName, sDstName);
struct PathTree *node = filelist_tree_find_node_by_path(globs->files, sSrcName);
if (! node) {
- fprintf(stderr, "(EE) VFSCopyOut: cannot find file '%s'\n", sSrcName);
+ fprintf(stderr, "(EE) VFSCopyToLocal: cannot find file '%s'\n", sSrcName);
return cVFS_ReadErr;
}
@@ -679,11 +679,11 @@ TVFSResult VFSCopyOut(struct TVFSGlobs *globs, const char *sSrcName, const char
char *src = node->original_pathstr;
if (! src) {
- fprintf(stderr, "(WW) VFSCopyOut: cannot determine original filename\n");
+ fprintf(stderr, "(WW) VFSCopyToLocal: cannot determine original filename\n");
src = (char *)sSrcName;
}
- printf("(II) VFSCopyOut: new src path: '%s'\n", src);
+ printf("(II) VFSCopyToLocal: new src path: '%s'\n", src);
HANDLE PASCAL handle;
struct RAROpenArchiveDataEx *archive_data;
@@ -711,7 +711,7 @@ TVFSResult VFSCopyOut(struct TVFSGlobs *globs, const char *sSrcName, const char
// RARSetProcessDataProc(handle, unrar_process_data_proc);
if (globs->password) {
- printf("(II) VFSCopyOut: Setting password... \n");
+ printf("(II) VFSCopyToLocal: Setting password... \n");
RARSetPassword(handle, globs->password);
}
@@ -729,7 +729,7 @@ TVFSResult VFSCopyOut(struct TVFSGlobs *globs, const char *sSrcName, const char
if (IS_DIR_SEP(*ssrc)) ssrc++;
if (IS_DIR_SEP(*asrc)) asrc++;
if (strcmp(ssrc, asrc) == 0) {
-// fprintf(stderr, "(II) VFSCopyOut: extract_file_path(sDstName) = '%s', extract_file_name(sDstName) = '%s' \n", extract_file_path(sDstName), extract_file_name(sDstName));
+// fprintf(stderr, "(II) VFSCopyToLocal: extract_file_path(sDstName) = '%s', extract_file_name(sDstName) = '%s' \n", extract_file_path(sDstName), extract_file_name(sDstName));
globs->extract_done = 0;
globs->extract_file_size = (int64_t)((int64_t)(header->UnpSizeHigh * 0x100000000) + (int64_t)header->UnpSize);
globs->extract_cancelled = FALSE;
@@ -738,19 +738,19 @@ TVFSResult VFSCopyOut(struct TVFSGlobs *globs, const char *sSrcName, const char
int res2 = RARProcessFile(handle, RAR_EXTRACT, NULL, (char *)sDstName);
if (globs->extract_cancelled) {
- fprintf(stderr, "(WW) VFSCopyOut: cancelled !\n");
+ fprintf(stderr, "(WW) VFSCopyToLocal: cancelled !\n");
Result = cVFS_Cancelled;
}
else
if (res2) {
- fprintf(stderr, "(EE) VFSCopyOut: RARProcessFile result = %d\n", res2);
+ fprintf(stderr, "(EE) VFSCopyToLocal: RARProcessFile result = %d\n", res2);
Result = cVFS_ReadErr;
}
break;
} else {
int res2 = RARProcessFile(handle, RAR_SKIP, NULL, NULL);
if (res2) {
- fprintf(stderr, "(EE) VFSCopyOut: RARProcessFile result = %d\n", res2);
+ fprintf(stderr, "(EE) VFSCopyToLocal: RARProcessFile result = %d\n", res2);
Result = cVFS_ReadErr;
}
}
@@ -758,11 +758,11 @@ TVFSResult VFSCopyOut(struct TVFSGlobs *globs, const char *sSrcName, const char
if ((res != ERAR_END_ARCHIVE) && (res)) {
if (globs->extract_cancelled) {
- fprintf(stderr, "(WW) VFSCopyOut: cancelled !\n");
+ fprintf(stderr, "(WW) VFSCopyToLocal: cancelled !\n");
Result = cVFS_Cancelled;
}
else {
- fprintf(stderr, "(EE) VFSCopyOut: RARReadHeader result = %d\n", res);
+ fprintf(stderr, "(EE) VFSCopyToLocal: RARReadHeader result = %d\n", res);
switch (res) {
case ERAR_NO_MEMORY:
case ERAR_SMALL_BUF:
@@ -799,28 +799,28 @@ TVFSResult VFSCopyOut(struct TVFSGlobs *globs, const char *sSrcName, const char
res = RARCloseArchive(handle);
if (res) {
- fprintf(stderr, "(EE) VFSCopyOut: RARCloseArchive result = %d\n", res);
+ fprintf(stderr, "(EE) VFSCopyToLocal: RARCloseArchive result = %d\n", res);
Result = cVFS_ReadErr;
}
} else {
- fprintf(stderr, "(EE) VFSCopyOut: error occured when opening archive: OpenResult = %d\n", archive_data->OpenResult);
+ fprintf(stderr, "(EE) VFSCopyToLocal: error occured when opening archive: OpenResult = %d\n", archive_data->OpenResult);
Result = cVFS_ReadErr;
}
free(archive_data);
if ((! found) && Result == cVFS_OK) {
- fprintf(stderr, "(EE) VFSCopyOut: file not found in archive.\n");
+ fprintf(stderr, "(EE) VFSCopyToLocal: file not found in archive.\n");
Result = cVFS_ReadErr;
}
- fprintf(stderr, "(II) VFSCopyOut: finished. \n");
+ fprintf(stderr, "(II) VFSCopyToLocal: finished. \n");
return Result;
}
-TVFSResult VFSCopyIn(struct TVFSGlobs *globs, const char *sSrcName, const char *sDstName, int Append)
+TVFSResult VFSCopyFromLocal(struct TVFSGlobs *globs, const char *sSrcName, const char *sDstName, int Append)
{
- printf("(WW) VFSCopyIn: Not supported in UNRAR plugin.\n");
+ printf("(WW) VFSCopyFromLocal: Not supported in UNRAR plugin.\n");
return cVFS_Not_Supported;
}