diff options
author | Xavier Roche <xroche@users.noreply.github.com> | 2013-05-14 20:30:28 +0000 |
---|---|---|
committer | Xavier Roche <xroche@users.noreply.github.com> | 2013-05-14 20:30:28 +0000 |
commit | 07f4b003675260004c49755dde413944a16ca2d3 (patch) | |
tree | 11050b4c7fbe1d7c63a38f5f9a6b5ba6d8260ae1 /src/httrack-library.h | |
parent | b09def438c5e47305e4a5ab18d8a646a3b004fdc (diff) |
Indenting cleanup for all *.[ch] files, except htsparse.c (too ugly to be automatically indented for now) and /minizip/, /mmsrip/ (external files)
setup:
indent -l80 -lc80 -nhnl -nut -bad -bap -bbo -br -brf -bli2 -brs -bls -br -ss -sai -pmt -nsaw -nsaf -nprs -i2 -ce -npsl -npcs -cs -sob -cdw -nbc -lp
logs:
indent: ./src/htsback.c:157: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htsback.c:1417: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htsback.c:1826: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htsback.c:1833: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htsback.c:1981: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htsback.c:2685: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htsback.c:2747: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htsback.c:2861: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htsback.c:3128: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htsback.c:3512: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htswizard.c:140: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htswizard.c:597: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htswizard.c:598: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htswizard.c:611: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htscoremain.c:97: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htscoremain.c:106: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htscoremain.c:106: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htscoremain.c:256: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htscoremain.c:262: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htscoremain.c:935: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/httrack.c:271: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/httrack.c:272: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/httrack.c:273: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/httrack.c:274: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/httrack.c:275: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/httrack.c:276: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/httrack.c:277: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/httrack.c:278: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/httrack.c:279: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/httrack.c:280: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/httrack.c:281: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/httrack.c:662: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/httrack.c:752: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htsweb.c:413: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htsweb.c:414: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htsweb.c:415: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htsweb.c:416: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htsweb.c:417: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htsweb.c:418: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htsweb.c:419: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htsweb.c:420: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htsweb.c:421: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htsweb.c:422: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htsweb.c:423: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/proxy/proxytrack.c:188: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/proxy/proxytrack.c:507: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/proxy/proxytrack.c:508: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/proxy/proxytrack.c:509: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/proxy/proxytrack.c:510: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/proxy/proxytrack.c:511: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/proxy/proxytrack.c:512: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/proxy/proxytrack.c:580: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/proxy/proxytrack.c:581: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/proxy/proxytrack.h:115: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/proxy/proxytrack.h:246: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/proxy/proxytrack.h:247: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/proxy/proxytrack.h:248: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/proxy/proxytrack.h:249: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/proxy/proxytrack.h:250: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/proxy/proxytrack.h:251: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/proxy/proxytrack.h:314: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/proxy/proxytrack.h:315: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htstools.c:151: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htstools.c:158: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htstools.c:161: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htstools.c:166: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htstools.c:174: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htstools.c:177: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htstools.c:188: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htstools.c:243: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htstools.c:245: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htstools.c:248: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htstools.c:257: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htstools.c:647: Warning:old style assignment ambiguity in "=*". Assuming "= *"
indent: ./src/htsbauth.c:364: Warning:old style assignment ambiguity in "=&". Assuming "= &"
indent: ./src/htsbauth.c:387: Warning:old style assignment ambiguity in "=&". Assuming "= &"
indent: ./src/htscache.c:473: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htsserver.h:112: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htsserver.h:187: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htsjava.c:312: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htsjava.c:379: Warning:old style assignment ambiguity in "=&". Assuming "= &"
indent: ./src/htsjava.c:407: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htsjava.c:472: Warning:old style assignment ambiguity in "=&". Assuming "= &"
indent: ./src/htsjava.c:483: Warning:old style assignment ambiguity in "=*". Assuming "= *"
indent: ./src/htslib.c:593: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htslib.c:809: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htslib.c:1743: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htslib.c:1874: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htslib.c:1896: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htslib.c:1984: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htslib.c:2085: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htslib.c:2604: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htslib.c:2605: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htslib.c:2606: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htslib.c:2607: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htslib.c:2608: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htslib.c:2609: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htslib.c:2672: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htslib.c:2673: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htslib.c:2906: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htslib.c:2928: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htslib.c:2996: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htslib.c:4802: Warning:old style assignment ambiguity in "=&". Assuming "= &"
indent: ./src/htslib.c:5353: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htslib.c:5354: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htslib.c:5355: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htslib.c:5357: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htslib.c:5429: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htslib.c:5435: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htscore.c:208: Warning:old style assignment ambiguity in "=&". Assuming "= &"
indent: ./src/htscore.c:277: Warning:old style assignment ambiguity in "=&". Assuming "= &"
indent: ./src/htscore.c:279: Warning:old style assignment ambiguity in "=&". Assuming "= &"
indent: ./src/htscore.c:357: Warning:old style assignment ambiguity in "=*". Assuming "= *"
indent: ./src/htscore.c:394: Warning:old style assignment ambiguity in "=*". Assuming "= *"
indent: ./src/htscore.c:1544: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htscore.c:3330: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htscore.c:3361: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htshash.c:140: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htshash.c:217: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htsname.c:733: Warning:old style assignment ambiguity in "=*". Assuming "= *"
indent: ./src/htsname.c:749: Warning:old style assignment ambiguity in "=*". Assuming "= *"
indent: ./src/htsname.c:933: Warning:old style assignment ambiguity in "=*". Assuming "= *"
indent: ./src/htsname.c:1520: Warning:old style assignment ambiguity in "=*". Assuming "= *"
indent: ./src/htszlib.c:76: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htszlib.c:81: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htscatchurl.c:268: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htsinthash.c:156: Warning:old style assignment ambiguity in "=&". Assuming "= &"
indent: ./src/htsinthash.c:159: Warning:old style assignment ambiguity in "=&". Assuming "= &"
indent: ./src/htsinthash.c:176: Warning:old style assignment ambiguity in "=&". Assuming "= &"
indent: ./src/htsinthash.c:179: Warning:old style assignment ambiguity in "=&". Assuming "= &"
indent: ./src/htsinthash.c:226: Warning:old style assignment ambiguity in "=&". Assuming "= &"
indent: ./src/htsinthash.c:253: Warning:old style assignment ambiguity in "=&". Assuming "= &"
indent: ./src/htsftp.c:169: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htsftp.c:177: Warning:old style assignment ambiguity in "=-". Assuming "= -"
indent: ./src/htsfilters.c:67: Warning:old style assignment ambiguity in "=*". Assuming "= *"
indent: ./src/htsfilters.c:80: Warning:old style assignment ambiguity in "=*". Assuming "= *"
Diffstat (limited to 'src/httrack-library.h')
-rw-r--r-- | src/httrack-library.h | 198 |
1 files changed, 104 insertions, 94 deletions
diff --git a/src/httrack-library.h b/src/httrack-library.h index 031c7f2..f14aa2a 100644 --- a/src/httrack-library.h +++ b/src/httrack-library.h @@ -17,24 +17,20 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - Important notes: - We hereby ask people using this source NOT to use it in purpose of grabbing emails addresses, or collecting any other private information on persons. This would disgrace our work, and spoil the many hours we spent on it. - Please visit our Website: http://www.httrack.com */ - /* ------------------------------------------------------------ */ /* File: HTTrack definition file for library usage */ /* Author: Xavier Roche */ /* ------------------------------------------------------------ */ - #ifndef HTTRACK_DEFLIB #define HTTRACK_DEFLIB @@ -51,13 +47,13 @@ typedef struct strc_int2bytes2 strc_int2bytes2; #ifndef HTS_DEF_DEFSTRUCT_hts_log_type #define HTS_DEF_DEFSTRUCT_hts_log_type typedef enum hts_log_type { - LOG_DEBUG, - LOG_INFO, - LOG_NOTICE, - LOG_WARNING, - LOG_ERROR, - LOG_PANIC, - LOG_ERRNO = 1 << 8 + LOG_DEBUG, + LOG_INFO, + LOG_NOTICE, + LOG_WARNING, + LOG_ERROR, + LOG_PANIC, + LOG_ERRNO = 1 << 8 } hts_log_type; #endif @@ -98,104 +94,110 @@ HTSEXT_API void htsthread_wait(void); /* Main functions */ HTSEXT_API int hts_main(int argc, char **argv); -HTSEXT_API int hts_main2(int argc, char **argv, httrackp *opt); +HTSEXT_API int hts_main2(int argc, char **argv, httrackp * opt); /* Options handling */ -HTSEXT_API httrackp* hts_create_opt(void); -HTSEXT_API void hts_free_opt(httrackp *opt); -HTSEXT_API void set_wrappers(httrackp *opt); // DEPRECATED - DUMMY FUNCTION -HTSEXT_API int plug_wrapper(httrackp *opt, const char *moduleName, const char* argv); +HTSEXT_API httrackp *hts_create_opt(void); +HTSEXT_API void hts_free_opt(httrackp * opt); +HTSEXT_API void set_wrappers(httrackp * opt); // DEPRECATED - DUMMY FUNCTION +HTSEXT_API int plug_wrapper(httrackp * opt, const char *moduleName, + const char *argv); /* Logging */ -HTSEXT_API int hts_log(httrackp *opt, const char* prefix, const char *msg); -HTSEXT_API void hts_log_print(httrackp *opt, int type, const char *format, ...); +HTSEXT_API int hts_log(httrackp * opt, const char *prefix, const char *msg); +HTSEXT_API void hts_log_print(httrackp * opt, int type, const char *format, + ...); /* Infos */ -HTSEXT_API const char* hts_get_version_info(httrackp *opt); -HTSEXT_API const char* hts_is_available(void); +HTSEXT_API const char *hts_get_version_info(httrackp * opt); +HTSEXT_API const char *hts_is_available(void); /* Wrapper functions */ -HTSEXT_API int htswrap_init(void); // DEPRECATED - DUMMY FUNCTION -HTSEXT_API int htswrap_free(void); // DEPRECATED - DUMMY FUNCTION -HTSEXT_API int htswrap_add(httrackp *opt, const char* name, void* fct); -HTSEXT_API unsigned long int htswrap_read(httrackp *opt, const char* name); -HTSEXT_API int htswrap_set_userdef(httrackp *opt, void *userdef); -HTSEXT_API void* htswrap_get_userdef(httrackp *opt); +HTSEXT_API int htswrap_init(void); // DEPRECATED - DUMMY FUNCTION +HTSEXT_API int htswrap_free(void); // DEPRECATED - DUMMY FUNCTION +HTSEXT_API int htswrap_add(httrackp * opt, const char *name, void *fct); +HTSEXT_API unsigned long int htswrap_read(httrackp * opt, const char *name); +HTSEXT_API int htswrap_set_userdef(httrackp * opt, void *userdef); +HTSEXT_API void *htswrap_get_userdef(httrackp * opt); /* Internal library allocators, if a different libc is being used by the client */ -HTSEXT_API char* hts_strdup(const char* string); -HTSEXT_API void* hts_malloc(size_t size); -HTSEXT_API void* hts_realloc(void* data, size_t size); -HTSEXT_API void hts_free(void* data); +HTSEXT_API char *hts_strdup(const char *string); +HTSEXT_API void *hts_malloc(size_t size); +HTSEXT_API void *hts_realloc(void *data, size_t size); +HTSEXT_API void hts_free(void *data); /* Other functions */ -HTSEXT_API int hts_resetvar(void); // DEPRECATED - DUMMY FUNCTION -HTSEXT_API int hts_buildtopindex(httrackp* opt,const char* path,const char* binpath); -HTSEXT_API const char* hts_getcategories(const char* path, int type); -HTSEXT_API const char* hts_getcategory(const char* filename); +HTSEXT_API int hts_resetvar(void); // DEPRECATED - DUMMY FUNCTION +HTSEXT_API int hts_buildtopindex(httrackp * opt, const char *path, + const char *binpath); +HTSEXT_API const char *hts_getcategories(const char *path, int type); +HTSEXT_API const char *hts_getcategory(const char *filename); /* Catch-URL */ -HTSEXT_API T_SOC catch_url_init_std(int* port_prox,char* adr_prox); -HTSEXT_API T_SOC catch_url_init(int* port,char* adr); -HTSEXT_API int catch_url(T_SOC soc,char* url,char* method,char* data); +HTSEXT_API T_SOC catch_url_init_std(int *port_prox, char *adr_prox); +HTSEXT_API T_SOC catch_url_init(int *port, char *adr); +HTSEXT_API int catch_url(T_SOC soc, char *url, char *method, char *data); /* State */ -HTSEXT_API int hts_is_parsing(httrackp *opt, int flag); -HTSEXT_API int hts_is_testing(httrackp *opt); -HTSEXT_API int hts_is_exiting(httrackp *opt); +HTSEXT_API int hts_is_parsing(httrackp * opt, int flag); +HTSEXT_API int hts_is_testing(httrackp * opt); +HTSEXT_API int hts_is_exiting(httrackp * opt); + /*HTSEXT_API int hts_setopt(httrackp* opt); DEPRECATED ; see copy_htsopt() */ -HTSEXT_API int hts_addurl(httrackp *opt, char** url); -HTSEXT_API int hts_resetaddurl(httrackp *opt); -HTSEXT_API int copy_htsopt(httrackp* from, httrackp* to); -HTSEXT_API char* hts_errmsg(httrackp *opt); -HTSEXT_API int hts_setpause(httrackp *opt, int); // pause transfer -HTSEXT_API int hts_request_stop(httrackp* opt, int force); -HTSEXT_API int hts_cancel_file_push(httrackp *opt, const char *url); -HTSEXT_API void hts_cancel_test(httrackp *opt); -HTSEXT_API void hts_cancel_parsing(httrackp *opt); -HTSEXT_API void hts_cancel_test(httrackp *opt); -HTSEXT_API void hts_cancel_parsing(httrackp *opt); +HTSEXT_API int hts_addurl(httrackp * opt, char **url); +HTSEXT_API int hts_resetaddurl(httrackp * opt); +HTSEXT_API int copy_htsopt(httrackp * from, httrackp * to); +HTSEXT_API char *hts_errmsg(httrackp * opt); +HTSEXT_API int hts_setpause(httrackp * opt, int); // pause transfer +HTSEXT_API int hts_request_stop(httrackp * opt, int force); +HTSEXT_API int hts_cancel_file_push(httrackp * opt, const char *url); +HTSEXT_API void hts_cancel_test(httrackp * opt); +HTSEXT_API void hts_cancel_parsing(httrackp * opt); +HTSEXT_API void hts_cancel_test(httrackp * opt); +HTSEXT_API void hts_cancel_parsing(httrackp * opt); /* Tools */ -HTSEXT_API int structcheck(const char* path); -HTSEXT_API int dir_exists(const char* path); -HTSEXT_API void infostatuscode(char* msg,int statuscode); +HTSEXT_API int structcheck(const char *path); +HTSEXT_API int dir_exists(const char *path); +HTSEXT_API void infostatuscode(char *msg, int statuscode); HTSEXT_API HTS_INLINE TStamp mtime_local(void); -HTSEXT_API void qsec2str(char *st,TStamp t); -HTSEXT_API char* int2char(strc_int2bytes2* strc, int n); -HTSEXT_API char* int2bytes(strc_int2bytes2* strc, LLint n); -HTSEXT_API char* int2bytessec(strc_int2bytes2* strc, long int n); -HTSEXT_API char** int2bytes2(strc_int2bytes2* strc, LLint n); -HTSEXT_API char* jump_identification(char*); -HTSEXT_API char* jump_normalized(char*); -HTSEXT_API char* jump_toport(char*); -HTSEXT_API char* fil_normalized(char* source, char* dest); -HTSEXT_API char* adr_normalized(char* source, char* dest); -HTSEXT_API char* hts_rootdir(char* file); +HTSEXT_API void qsec2str(char *st, TStamp t); +HTSEXT_API char *int2char(strc_int2bytes2 * strc, int n); +HTSEXT_API char *int2bytes(strc_int2bytes2 * strc, LLint n); +HTSEXT_API char *int2bytessec(strc_int2bytes2 * strc, long int n); +HTSEXT_API char **int2bytes2(strc_int2bytes2 * strc, LLint n); +HTSEXT_API char *jump_identification(char *); +HTSEXT_API char *jump_normalized(char *); +HTSEXT_API char *jump_toport(char *); +HTSEXT_API char *fil_normalized(char *source, char *dest); +HTSEXT_API char *adr_normalized(char *source, char *dest); +HTSEXT_API char *hts_rootdir(char *file); /* Escaping URLs */ -HTSEXT_API void unescape_amp(char* s); -HTSEXT_API void escape_spc_url(char* s); -HTSEXT_API void escape_in_url(char* s); -HTSEXT_API void escape_uri(char* s); -HTSEXT_API void escape_uri_utf(char* s); -HTSEXT_API void escape_check_url(char* s); -HTSEXT_API char* escape_check_url_addr(char* s); -HTSEXT_API void x_escape_http(char* s,int mode); -HTSEXT_API char* unescape_http(char *catbuff, const char* s); -HTSEXT_API char* unescape_http_unharm(char *catbuff, const char* s, int no_high); -HTSEXT_API char* antislash_unescaped(char *catbuff, const char* s); -HTSEXT_API void escape_remove_control(char* s); -HTSEXT_API void get_httptype(httrackp *opt,char *s,const char *fil,int flag); -HTSEXT_API int is_knowntype(httrackp *opt,const char *fil); -HTSEXT_API int is_userknowntype(httrackp *opt,const char *fil); +HTSEXT_API void unescape_amp(char *s); +HTSEXT_API void escape_spc_url(char *s); +HTSEXT_API void escape_in_url(char *s); +HTSEXT_API void escape_uri(char *s); +HTSEXT_API void escape_uri_utf(char *s); +HTSEXT_API void escape_check_url(char *s); +HTSEXT_API char *escape_check_url_addr(char *s); +HTSEXT_API void x_escape_http(char *s, int mode); +HTSEXT_API char *unescape_http(char *catbuff, const char *s); +HTSEXT_API char *unescape_http_unharm(char *catbuff, const char *s, + int no_high); +HTSEXT_API char *antislash_unescaped(char *catbuff, const char *s); +HTSEXT_API void escape_remove_control(char *s); +HTSEXT_API void get_httptype(httrackp * opt, char *s, const char *fil, + int flag); +HTSEXT_API int is_knowntype(httrackp * opt, const char *fil); +HTSEXT_API int is_userknowntype(httrackp * opt, const char *fil); HTSEXT_API int is_dyntype(const char *fil); -HTSEXT_API char* get_ext(char *catbuff, const char *fil); +HTSEXT_API char *get_ext(char *catbuff, const char *fil); /* Ugly string tools */ -HTSEXT_API char* concat(char *catbuff,const char* a,const char* b) ; -HTSEXT_API char* fconcat(char *catbuff, const char* a, const char* b); -HTSEXT_API char* fconv(char *catbuff, const char* a); +HTSEXT_API char *concat(char *catbuff, const char *a, const char *b); +HTSEXT_API char *fconcat(char *catbuff, const char *a, const char *b); +HTSEXT_API char *fconv(char *catbuff, const char *a); /* Debugging */ HTSEXT_API void hts_debug(int level); @@ -205,7 +207,7 @@ HTSEXT_API void hts_debug(int level); #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 find_handle_struct *find_handle; #endif #ifndef HTS_DEF_FWSTRUCT_topindex_chain @@ -213,15 +215,15 @@ typedef find_handle_struct* find_handle; typedef struct topindex_chain topindex_chain; #endif struct topindex_chain { - int level; /* sort level */ - char* category; /* category */ - char name[2048]; /* path */ - struct topindex_chain* next; /* next element */ + int level; /* sort level */ + char *category; /* category */ + char name[2048]; /* path */ + struct topindex_chain *next; /* next element */ }; -HTSEXT_API find_handle hts_findfirst(char* path); +HTSEXT_API find_handle hts_findfirst(char *path); HTSEXT_API int hts_findnext(find_handle find); HTSEXT_API int hts_findclose(find_handle find); -HTSEXT_API char* hts_findgetname(find_handle find); +HTSEXT_API char *hts_findgetname(find_handle find); HTSEXT_API int hts_findgetsize(find_handle find); HTSEXT_API int hts_findisdir(find_handle find); HTSEXT_API int hts_findisfile(find_handle find); @@ -231,27 +233,35 @@ HTSEXT_API int hts_findissystem(find_handle find); #ifndef HTS_DEF_FILEAPI #ifdef _WIN32 #define FOPEN hts_fopen_utf8 -HTSEXT_API FILE* hts_fopen_utf8(const char *path, const char *mode); +HTSEXT_API FILE *hts_fopen_utf8(const char *path, const char *mode); + #define STAT hts_stat_utf8 typedef struct _stat STRUCT_STAT; -HTSEXT_API int hts_stat_utf8(const char *path, STRUCT_STAT *buf); +HTSEXT_API int hts_stat_utf8(const char *path, STRUCT_STAT * buf); + #define UNLINK hts_unlink_utf8 HTSEXT_API int hts_unlink_utf8(const char *pathname); + #define RENAME hts_rename_utf8 HTSEXT_API int hts_rename_utf8(const char *oldpath, const char *newpath); + #define MKDIR(F) hts_mkdir_utf8(F) HTSEXT_API int hts_mkdir_utf8(const char *pathname); + #define UTIME(A,B) hts_utime_utf8(A,B) typedef struct _utimbuf STRUCT_UTIMBUF; -HTSEXT_API int hts_utime_utf8(const char *filename, const STRUCT_UTIMBUF *times); +HTSEXT_API int hts_utime_utf8(const char *filename, + const STRUCT_UTIMBUF * times); #else #define FOPEN fopen #define STAT stat typedef struct stat STRUCT_STAT; + #define UNLINK unlink #define RENAME rename #define MKDIR(F) mkdir(F, HTS_ACCESS_FOLDER) typedef struct utimbuf STRUCT_UTIMBUF; + #define UTIME(A,B) utime(A,B) #endif #define HTS_DEF_FILEAPI |