summaryrefslogtreecommitdiff
path: root/src/htstools.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/htstools.h')
-rw-r--r--src/htstools.h61
1 files changed, 21 insertions, 40 deletions
diff --git a/src/htstools.h b/src/htstools.h
index 90d5d7b..f2dceb8 100644
--- a/src/htstools.h
+++ b/src/htstools.h
@@ -40,49 +40,25 @@ Please visit our Website: http://www.httrack.com
#define HTSTOOLS_DEFH
/* specific definitions */
-#include "htsbase.h"
-#include "htscore.h"
-
-#ifdef _WIN32
-#else
-#include <dirent.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#include <sys/stat.h>
-#endif
-
-#ifndef HTTRACK_DEFLIB
+#include "htsglobal.h"
-// Portable directory find functions
-#ifdef _WIN32
-typedef struct find_handle_struct {
- WIN32_FIND_DATAA hdata;
- HANDLE handle;
-} find_handle_struct;
-#else
-typedef struct find_handle_struct {
- DIR * hdir;
- struct dirent* dirp;
- struct stat filestat;
- char path[2048];
-} find_handle_struct;
+/* Forward definitions */
+#ifndef HTS_DEF_FWSTRUCT_httrackp
+#define HTS_DEF_FWSTRUCT_httrackp
+typedef struct httrackp httrackp;
#endif
+#ifndef HTS_DEF_FWSTRUCT_find_handle_struct
+#define HTS_DEF_FWSTRUCT_find_handle_struct
+typedef struct find_handle_struct find_handle_struct;
typedef find_handle_struct* find_handle;
-typedef struct topindex_chain {
- int level; /* sort level */
- char* category; /* category */
- char name[2048]; /* path */
- struct topindex_chain* next; /* next element */
-} topindex_chain ;
#endif
/* Library internal definictions */
#ifdef HTS_INTERNAL_BYTECODE
-int ident_url_relatif(char *lien,char* urladr,char* urlfil,char* adr,char* fil);
-int lienrelatif(char* s,char* link,char* curr);
-int link_has_authority(char* lien);
-int link_has_authorization(char* lien);
+int ident_url_relatif(const char *lien, const char* urladr, const char* urlfil, char* adr, char* fil);
+int lienrelatif(char* s,const char* link,const char* curr);
+int link_has_authority(const char* lien);
+int link_has_authorization(const char* lien);
void long_to_83(int mode,char* n83,char* save);
void longfile_to_83(int mode,char* n83,char* save);
HTS_INLINE int __rech_tageq(const char* adr,const char* s);
@@ -112,11 +88,11 @@ HTS_INLINE int rech_tageq_all(const char* adr, const char* s);
HTS_INLINE int rech_sampletag(const char* adr,const char* s);
HTS_INLINE int rech_endtoken(const char* adr, const char** start);
HTS_INLINE int check_tag(char* from,const char* tag);
-int verif_backblue(httrackp* opt,char* base);
-int verif_external(int nb,int test);
+int verif_backblue(httrackp* opt, const char* base);
+int verif_external(httrackp *opt,int nb,int test);
-int istoobig(LLint size,LLint maxhtml,LLint maxnhtml,char* type);
-HTSEXT_API int hts_buildtopindex(httrackp* opt,char* path,char* binpath);
+int istoobig(httrackp *opt,LLint size,LLint maxhtml,LLint maxnhtml,char* type);
+HTSEXT_API int hts_buildtopindex(httrackp* opt,const char* path,const char* binpath);
// Portable directory find functions
// Directory find functions
@@ -130,6 +106,11 @@ HTSEXT_API int hts_findisdir(find_handle find);
HTSEXT_API int hts_findisfile(find_handle find);
HTSEXT_API int hts_findissystem(find_handle find);
+#ifndef HTTRACK_DEFLIB
+HTSEXT_API char* hts_getcategory(const char* filename);
+HTSEXT_API char* hts_getcategories(char* path, int type);
+#endif
+
#endif
#endif