Also fixes mismatching "tarextract" declaration vs definition issue.
}
}
-
+#if 0
// Like strcmp, but for strings
static int stringCompare(const void *string1, const void *string2)
{
// Compare name first, and then index.
return strcmp(s1->c_str(), s2->c_str());
}
-
+#endif
void FGAdminUI::update_install_box() {
set<string> file_list;
dirent *ent = list[i];
strncpy( base, ent->d_name, FL_PATH_MAX );
const char *p = fl_filename_ext( base );
- int offset, expected_length = 0;
+ int offset;
+ string::size_type expected_length = 0;
if ( strcmp( p, ".gz" ) == 0 ) {
offset = p - base;
base[offset] = '\0';
# endif
#endif
+#include "untarka.h"
+
static void error OF((const char *msg));
static unsigned long total_read;
exit(1);
}
+#ifdef DOSISH
/* This will give a benign warning */
-
static char *TGZprefix[] = { "\0", ".tgz", ".tar.gz", ".tar.bz2", ".tar.Z", ".tar", NULL };
/* Return the real name of the TGZ archive */
/* or NULL if it does not exist. */
-
static char *TGZfname OF((const char *fname))
{
static char buffer[1024];
TGZprefix[i]);
exit(1);
}
+#endif
/* help functions */
int remaining = 0;
FILE *outfile = NULL;
char fname[BLOCKSIZE];
- time_t tartime;
+ time_t tartime = 0;
unsigned long last_read;
#if 0
}
+#ifdef DOSISH
/* =========================================================== */
static void help(int exitval)
/* ====================================================================== */
-#ifdef DOSISH
extern int _CRT_glob;
int _CRT_glob = 0; /* disable globbing of the arguments */
#endif
#endif
void
-tarextract(char *TGZfile,char *dest,int verbose, void (*step)(void *), void *data)
+tarextract(char *TGZfile,char *dest,int verbose, void (*step)(void *,int), void *data)
{
Readable r;
if (xOpen4Read(&r,TGZfile) == 0)
-#include <string>
-
-using std::string;
-
// list the contents of the specified tar file
// bool tarlist( char *tarfile, char *destdir, bool verbose );
// extract the specified tar file into the specified destination
// directory
-extern "C" void tarextract( char *tarfile, char *destdir, int verbose, void (*step)(void*,int), void *data );
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void tarextract( char *tarfile, char *destdir, int verbose, void (*step)(void*,int), void *data );
+
+#ifdef __cplusplus
+}
+#endif
+