summaryrefslogtreecommitdiff
path: root/src/htslib.h
diff options
context:
space:
mode:
authorXavier Roche <xroche@users.noreply.github.com>2012-03-19 13:00:51 +0000
committerXavier Roche <xroche@users.noreply.github.com>2012-03-19 13:00:51 +0000
commit1ecdfbe3b855b1f13bcddccc20135f7e35f171a6 (patch)
tree253b431bc06ce806ee47aa7b7c4285da8c5503d6 /src/htslib.h
parent4aec03f2cbabc19cf31e7d6f9fdcd6c84cfa861e (diff)
httrack 3.43.12
Diffstat (limited to 'src/htslib.h')
-rw-r--r--src/htslib.h38
1 files changed, 35 insertions, 3 deletions
diff --git a/src/htslib.h b/src/htslib.h
index ae5fde7..19d7adc 100644
--- a/src/htslib.h
+++ b/src/htslib.h
@@ -62,6 +62,12 @@ typedef struct t_dnscache t_dnscache;
#include "htsnet.h"
#include "htsdefines.h"
+/* readdir() */
+#ifndef _WIN32
+#include <sys/types.h>
+#include <dirent.h>
+#endif
+
/* cookies et auth */
#include "htsbauth.h"
@@ -349,6 +355,8 @@ HTSEXT_API int is_dyntype(const char *fil);
HTSEXT_API char* get_ext(char *catbuff, const char *fil);
#endif
int may_unknown(httrackp *opt,const char* st);
+int may_bogus_multiple(httrackp *opt, const char* mime, const char *filename);
+int may_unknown2(httrackp *opt,const char* mime, const char *filename);
#ifndef HTTRACK_DEFLIB
HTSEXT_API char* jump_identification(const char*);
HTSEXT_API char* jump_normalized(const char*);
@@ -546,8 +554,14 @@ HTS_STATIC int strcmpnocase(char* a,char* b) {
#else
#define OPT_MMS(a) (0)
#endif
-#define is_hypertext_mime__(a) \
+
+#define is_html_mime_type(a) \
( (strfield2((a),"text/html")!=0)\
+ || (strfield2((a),"application/xhtml+xml")!=0) \
+ )
+#define is_hypertext_mime__(a) \
+ ( \
+ is_html_mime_type(a)\
|| (strfield2((a),"application/x-javascript")!=0) \
|| (strfield2((a),"text/css")!=0) \
/*|| (strfield2((a),"text/vnd.wap.wml")!=0)*/ \
@@ -564,7 +578,6 @@ HTS_STATIC int strcmpnocase(char* a,char* b) {
|| OPT_MMS(a) \
)
-
/* Library internal definictions */
#ifdef HTS_INTERNAL_BYTECODE
@@ -634,6 +647,25 @@ HTS_STATIC char *getcwd_ce(char *buffer, int maxlen) {
#define getcwd getcwd_ce
#endif
+/* dirent() compatibility */
+#ifdef _WIN32
+#define HTS_DIRENT_SIZE 256
+struct dirent {
+ ino_t d_ino; /* ignored */
+ off_t d_off; /* ignored */
+ unsigned short d_reclen; /* ignored */
+ unsigned char d_type; /* ignored */
+ char d_name[HTS_DIRENT_SIZE]; /* filename */
+};
+typedef struct DIR DIR;
+struct DIR {
+ HANDLE h;
+ struct dirent entry;
+ char *name;
+};
+DIR *opendir(const char *name);
+struct dirent *readdir(DIR *dir);
+int closedir(DIR *dir);
#endif
-
+#endif