pl->next = nxt;
}
-static void removeext (TCHAR *s, TCHAR *ext)
+static void removeext (TCHAR *s, const TCHAR *ext)
{
if (_tcslen (s) < _tcslen (ext))
return;
static uae_u8 exeheader[]={ 0x00,0x00,0x03,0xf3,0x00,0x00,0x00,0x00 };
-static TCHAR *diskimages[] = { _T("adf"), _T("adz"), _T("ipf"), _T("scp"), _T("fdi"), _T("dms"), _T("wrp"), _T("dsq"), _T("pkd"), _T("ima"), 0 };
+static const TCHAR *diskimages[] = { _T("adf"), _T("adz"), _T("ipf"), _T("scp"), _T("fdi"), _T("dms"), _T("wrp"), _T("dsq"), _T("pkd"), _T("ima"), 0 };
int zfile_gettype (struct zfile *z)
{
NULL
};
static const TCHAR *plugins_7z[] = { _T("7z"), _T("rar"), _T("zip"), _T("lha"), _T("lzh"), _T("lzx"), _T("adf"), _T("dsq"), _T("hdf"), _T("tar"), NULL };
+#if defined(ARCHIVEACCESS)
static const uae_char *plugins_7z_x[] = { "7z", "Rar!", "MK", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL };
+#endif
static const int plugins_7z_t[] = {
ArchiveFormat7Zip, ArchiveFormatRAR, ArchiveFormatZIP, ArchiveFormatLHA, ArchiveFormatLHA, ArchiveFormatLZX,
ArchiveFormatADF, ArchiveFormatADF, ArchiveFormatADF, ArchiveFormatTAR
ZFD_ADF, ZFD_ADF, ZFD_ADF, ZFD_ARCHIVE
};
-int iszip (struct zfile *z, int mask)
+static int iszip (struct zfile *z, int mask)
{
TCHAR *name = z->name;
TCHAR *ext = _tcsrchr (name, '.');
uae_u8 header[32];
- int i;
if (!ext)
return 0;
}
}
#if defined(ARCHIVEACCESS)
- for (i = 0; plugins_7z_x[i]; i++) {
+ for (int i = 0; plugins_7z_x[i]; i++) {
if ((plugins_7z_m[i] & mask) && plugins_7z_x[i] && !strcasecmp (ext + 1, plugins_7z[i]) &&
!memcmp (header, plugins_7z_x[i], strlen (plugins_7z_x[i])))
return plugins_7z_t[i];
TCHAR *name = z->name;
TCHAR *ext = NULL;
uae_u8 header[32];
- int i;
if (retcode)
*retcode = 0;
}
#if defined(ARCHIVEACCESS)
if (index == 0) {
- for (i = 0; plugins_7z_x[i]; i++) {
+ for (int i = 0; plugins_7z_x[i]; i++) {
if ((plugins_7z_t[i] & mask) && strcasecmp (ext, plugins_7z[i]) == 0)
return archive_access_arcacc_select (z, plugins_7z_t[i], retcode);
}
zn->parent = parent;
return zn;
}
+
static struct znode *znode_alloc_sibling (struct znode *sibling, const TCHAR *name)
{
struct znode *zn = znode_alloc (sibling->parent, name);
}
return zv;
}
+
struct zvolume *zvolume_alloc (struct zfile *z, unsigned int id, void *handle, const TCHAR *volumename)
{
return zvolume_alloc_2 (zfile_getname (z), z, id, handle, volumename);
}
-struct zvolume *zvolume_alloc_nofile (const TCHAR *name, unsigned int id, void *handle, const TCHAR *volumename)
+
+static struct zvolume *zvolume_alloc_nofile (const TCHAR *name, unsigned int id, void *handle, const TCHAR *volumename)
{
return zvolume_alloc_2 (name, NULL, id, handle, volumename);
}
+
struct zvolume *zvolume_alloc_empty (struct zvolume *prev, const TCHAR *name)
{
struct zvolume *zv = zvolume_alloc_2(name, 0, 0, 0, NULL);
struct znode *zvolume_addfile_abs (struct zvolume *zv, struct zarchive_info *zai)
{
- struct znode *zn, *zn2;
+ struct znode *zn = NULL, *zn2;
int i;
TCHAR *path = my_strdup (zai->name);
TCHAR *p, *p2;
return zn;
}
-struct zvolume *zfile_fopen_directory (const TCHAR *dirname)
+static struct zvolume *zfile_fopen_directory (const TCHAR *dirname)
{
struct zvolume *zv = NULL;
struct my_opendir_s *dir;
return 0;
if (zd->filenames == NULL) {
struct znode *n = zd->first;
- int cnt = 0, len = 0;
+ int cnt = 0;
while (n) {
cnt++;
n = n->sibling;