filename : the filename of the file where date/time must be modified
dosdate : the new date at the MSDos format (4 bytes)
tmu_date : the SAME new date at the tm_unz format */
-void change_file_date(filename,dosdate,tmu_date)
+static void change_file_date(filename,dosdate,tmu_date)
const char *filename;
uLong dosdate;
tm_unz tmu_date;
/* mymkdir and change_file_date are not 100 % portable
As I don't know well Unix, I wait feedback for the unix portion */
-int mymkdir(dirname)
+static int mymkdir(dirname)
const char* dirname;
{
int ret=0;
return ret;
}
-int makedir (newdir)
+static int makedir (newdir)
const char *newdir;
{
char *buffer ;
char *p;
- int len = (int)strlen(newdir);
+ size_t len = strlen(newdir);
- if (len <= 0)
+ if (len == 0)
return 0;
buffer = (char*)malloc(len+1);
return 1;
}
-void do_banner()
+static void do_banner()
{
printf("MiniUnz 1.01b, demo of zLib + Unz package written by Gilles Vollant\n");
printf("more info at http://www.winimage.com/zLibDll/unzip.html\n\n");
}
-void do_help()
+static void do_help()
{
printf("Usage : miniunz [-e] [-x] [-v] [-l] [-o] [-p password] file.zip [file_to_extr.] [-d extractdir]\n\n" \
" -e Extract without pathname (junk paths)\n" \
" -p extract crypted file using password\n\n");
}
-void Display64BitsSize(ZPOS64_T n, int size_char)
+static void Display64BitsSize(ZPOS64_T n, int size_char)
{
/* to avoid compatibility problem , we do here the conversion */
char number[21];
printf("%s",&number[pos_string]);
}
-int do_list(uf)
+static int do_list(uf)
unzFile uf;
{
uLong i;
}
-int do_extract_currentfile(uf,popt_extract_without_path,popt_overwrite,password)
+static int do_extract_currentfile(uf,popt_extract_without_path,popt_overwrite,password)
unzFile uf;
const int* popt_extract_without_path;
int* popt_overwrite;
break;
}
if (err>0)
- if (fwrite(buf,err,1,fout)!=1)
+ if (fwrite(buf,(unsigned)err,1,fout)!=1)
{
printf("error in writing extracted file\n");
err=UNZ_ERRNO;
}
-int do_extract(uf,opt_extract_without_path,opt_overwrite,password)
+static int do_extract(uf,opt_extract_without_path,opt_overwrite,password)
unzFile uf;
int opt_extract_without_path;
int opt_overwrite;
return 0;
}
-int do_extract_onefile(uf,filename,opt_extract_without_path,opt_overwrite,password)
+static int do_extract_onefile(uf,filename,opt_extract_without_path,opt_overwrite,password)
unzFile uf;
const char* filename;
int opt_extract_without_path;