#include <zlib.h> /* crc32 */
#include <zzip/memdisk.h>
+#include <zzip/__fnmatch.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
-#ifdef ZZIP_HAVE_FNMATCH_H
-#include <fnmatch.h>
-#else
-#define fnmatch(x,y,z) strcmp(x,y)
-#endif
-
#define ___ {
#define ____ }
char* name = zzip_entry_strdup_name (entry);
DBG3(".. check '%s' to zip '%s'", argv[argn], name);
if (! _zzip_fnmatch (argv[argn], name,
- FNM_NOESCAPE|FNM_PATHNAME|FNM_PERIOD))
+ _zzip_FNM_NOESCAPE|_zzip_FNM_PATHNAME|_zzip_FNM_PERIOD))
{
FILE* out = stdout;
if (extract) out = create_fopen(name, "wb", 1);
{
char* name = zzip_mem_entry_to_name (entry);
if (! _zzip_fnmatch (argv[argn], name,
- FNM_NOESCAPE|FNM_PATHNAME|FNM_PERIOD))
+ _zzip_FNM_NOESCAPE|_zzip_FNM_PATHNAME|_zzip_FNM_PERIOD))
{
FILE* out = stdout;
if (extract) out = create_fopen(name, "wb", 1);
for (argn=1; argn < argc; argn++)
{
if (! _zzip_fnmatch (argv[argn], name,
- FNM_NOESCAPE|FNM_PATHNAME|FNM_PERIOD))
+ _zzip_FNM_NOESCAPE|_zzip_FNM_PATHNAME|_zzip_FNM_PERIOD))
{
FILE* out = stdout;
char* zip_name = argv[1];
for (argn=1; argn < argc; argn++)
{
if (! _zzip_fnmatch (argv[argn], name,
- FNM_NOESCAPE|FNM_PATHNAME|FNM_PERIOD))
+ _zzip_FNM_NOESCAPE|_zzip_FNM_PATHNAME|_zzip_FNM_PERIOD))
{
FILE* out = stdout;
if (extract) out = create_fopen(name, "wb", 1);
#include <zzip/fseeko.h>
#include <zzip/fetch.h>
+#include <zzip/__fnmatch.h>
#include <stdlib.h>
#include <string.h>
#include "unzzipdir-zip.h"
#include "unzzip-states.h"
-#ifdef ZZIP_HAVE_FNMATCH_H
-#include <fnmatch.h>
-#else
-#define fnmatch(x,y,z) strcmp(x,y)
-#endif
-
static const char* comprlevel[] = {
"stored", "shrunk", "redu:1", "redu:2", "redu:3", "redu:4",
"impl:N", "toknze", "defl:N", "defl:B", "impl:B" };
#include <zzip/memdisk.h>
#include <zzip/__debug.h>
+#include <zzip/__fnmatch.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <io.h>
#endif
-#ifdef ZZIP_HAVE_FNMATCH_H
-#include <fnmatch.h>
-#else
-#define fnmatch(x,y,z) strcmp(x,y)
-#endif
-
static const char* comprlevel[] = {
"stored", "shrunk", "redu:1", "redu:2", "redu:3", "redu:4",
"impl:N", "toknze", "defl:N", "defl:B", "impl:B" };
for (argn=1; argn < argc; argn++)
{
if (! fnmatch (argv[argn], name,
- FNM_NOESCAPE|FNM_PATHNAME|FNM_PERIOD))
+ _zzip_FNM_NOESCAPE|_zzip_FNM_PATHNAME|_zzip_FNM_PERIOD))
{
char* name = zzip_mem_entry_to_name (entry);
long long usize = entry->zz_usize;
#include <zzip/lib.h>
#include <zzip/__debug.h>
+#include <zzip/__fnmatch.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <io.h>
#endif
-#ifdef ZZIP_HAVE_FNMATCH_H
-#include <fnmatch.h>
-#else
-#define fnmatch(x,y,z) strcmp(x,y)
-#endif
-
static const char* comprlevel[] = {
"stored", "shrunk", "redu:1", "redu:2", "redu:3", "redu:4",
"impl:N", "toknze", "defl:N", "defl:B", "impl:B" };
for (argn=1; argn < argc; argn++)
{
if (! fnmatch (argv[argn], name,
- FNM_NOESCAPE|FNM_PATHNAME|FNM_PERIOD))
+ _zzip_FNM_NOESCAPE|_zzip_FNM_PATHNAME|_zzip_FNM_PERIOD))
{
long long usize = entry->st_size;
if (!verbose)
*/
#include <zzip/lib.h>
+#include <zzip/__fnmatch.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <io.h>
#endif
-#ifdef ZZIP_HAVE_FNMATCH_H
-#include <fnmatch.h>
-#else
-#define fnmatch(x,y,z) strcmp(x,y)
-#endif
-
static const char* comprlevel[] = {
"stored", "shrunk", "redu:1", "redu:2", "redu:3", "redu:4",
"impl:N", "toknze", "defl:N", "defl:B", "impl:B" };
for (argn=1; argn < argc; argn++)
{
if (! fnmatch (argv[argn], name,
- FNM_NOESCAPE|FNM_PATHNAME|FNM_PERIOD))
+ _zzip_FNM_NOESCAPE|_zzip_FNM_PATHNAME|_zzip_FNM_PERIOD))
{
long long usize = entry.st_size;
if (!verbose)
*/
#include <zzip/fseeko.h>
+#include <zzip/__fnmatch.h>
#include <stdlib.h>
#include <string.h>
-#ifdef ZZIP_HAVE_FNMATCH_H
-#include <fnmatch.h>
-#else
-#define fnmatch(x,y,z) strcmp(x,y)
-#endif
-
static const char usage[] =
{
"unzzipshow <zip> [names].. \n"
{
char* name = zzip_entry_strdup_name (entry);
if (! fnmatch (argv[argn], name,
- FNM_NOESCAPE|FNM_PATHNAME|FNM_PERIOD))
+ _zzip_FNM_NOESCAPE|_zzip_FNM_PATHNAME|_zzip_FNM_PERIOD))
zzip_cat_file (disk, name, stdout);
free (name);
}