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/htsweb.c | |
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/htsweb.c')
-rw-r--r-- | src/htsweb.c | 603 |
1 files changed, 343 insertions, 260 deletions
diff --git a/src/htsweb.c b/src/htsweb.c index 577e77d..254d204 100644 --- a/src/htsweb.c +++ b/src/htsweb.c @@ -17,18 +17,15 @@ 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: webhttrack.c routines */ /* Author: Xavier Roche */ @@ -76,43 +73,44 @@ Please visit our Website: http://www.httrack.com #ifdef _WIN32 #ifndef __cplusplus // DOS -#include <process.h> /* _beginthread, _endthread */ +#include <process.h> /* _beginthread, _endthread */ #endif #else #endif static htsmutex refreshMutex = HTSMUTEX_INIT; -static int help_server(char* dest_path, int defaultPort); +static int help_server(char *dest_path, int defaultPort); extern int commandRunning; extern int commandEnd; extern int commandReturn; extern int commandEndRequested; -extern char* commandReturnMsg; -extern char* commandReturnCmdl; +extern char *commandReturnMsg; +extern char *commandReturnCmdl; -static void htsweb_sig_brpipe( int code ) { +static void htsweb_sig_brpipe(int code) { /* ignore */ } -int main(int argc, char* argv[]) -{ +int main(int argc, char *argv[]) { int i; int ret = 0; int defaultPort = 0; + printf("Initialzing the server..\n"); #ifdef _WIN32 { - WORD wVersionRequested; // requested version WinSock API + WORD wVersionRequested; // requested version WinSock API WSADATA wsadata; // Windows Sockets API data int stat; + wVersionRequested = 0x0101; - stat = WSAStartup( wVersionRequested, &wsadata ); + stat = WSAStartup(wVersionRequested, &wsadata); if (stat != 0) { fprintf(stderr, "Winsock not found!\n"); return -1; - } else if (LOBYTE(wsadata.wVersion) != 1 && HIBYTE(wsadata.wVersion) != 1) { + } else if (LOBYTE(wsadata.wVersion) != 1 && HIBYTE(wsadata.wVersion) != 1) { fprintf(stderr, "WINSOCK.DLL does not support version 1.1\n"); WSACleanup(); return -1; @@ -122,7 +120,9 @@ int main(int argc, char* argv[]) if (argc < 2 || (argc % 2) != 0) { fprintf(stderr, "** Warning: use the webhttrack frontend if available\n"); - fprintf(stderr, "usage: %s [--port <port>] <path-to-html-root-dir> [key value [key value]..]\n", argv[0]); + fprintf(stderr, + "usage: %s [--port <port>] <path-to-html-root-dir> [key value [key value]..]\n", + argv[0]); fprintf(stderr, "example: %s /usr/share/httrack/\n", argv[0]); return 1; } @@ -173,37 +173,40 @@ int main(int argc, char* argv[]) smallserver_setkey("HTTRACK_AFF_VERSION", HTTRACK_AFF_VERSION); { char tmp[32]; + sprintf(tmp, "%d", -1); smallserver_setkey("HTS_PLATFORM", tmp); } - smallserver_setkey("HTTRACK_WEB", HTTRACK_WEB); + smallserver_setkey("HTTRACK_WEB", HTTRACK_WEB); /* protected session-id */ { char buff[1024]; char digest[32 + 2]; - srand((unsigned int)time(NULL)); - sprintf(buff, "%d-%d", (int)time(NULL), (int)rand()); - domd5mem(buff,strlen(buff),digest,1); + + srand((unsigned int) time(NULL)); + sprintf(buff, "%d-%d", (int) time(NULL), (int) rand()); + domd5mem(buff, strlen(buff), digest, 1); smallserver_setkey("sid", digest); smallserver_setkey("_sid", digest); } /* set commandline keys */ - for(i = 2 ; i < argc ; i += 2) { - if (strcmp(argv[i], "--port") == 0) { - if (sscanf(argv[i + 1], "%d", &defaultPort) != 1 || defaultPort < 0 || defaultPort >= 65535 ) { - fprintf(stderr, "couldn't set the port number to %s\n", argv[i + 1]); - return -1; - } - } else { - smallserver_setkey(argv[i], argv[i + 1]); - } + for(i = 2; i < argc; i += 2) { + if (strcmp(argv[i], "--port") == 0) { + if (sscanf(argv[i + 1], "%d", &defaultPort) != 1 || defaultPort < 0 + || defaultPort >= 65535) { + fprintf(stderr, "couldn't set the port number to %s\n", argv[i + 1]); + return -1; + } + } else { + smallserver_setkey(argv[i], argv[i + 1]); + } } /* sigpipe */ #ifndef _WIN32 - signal( SIGPIPE , htsweb_sig_brpipe ); // broken pipe (write into non-opened socket) + signal(SIGPIPE, htsweb_sig_brpipe); // broken pipe (write into non-opened socket) #endif /* launch */ @@ -219,14 +222,15 @@ int main(int argc, char* argv[]) return ret; } -static int webhttrack_runmain(httrackp *opt, int argc, char** argv); -static void back_launch_cmd( void* pP ) { - char* cmd = (char*) pP; - char** argv = (char**) malloct(1024 * sizeof(char*)); +static int webhttrack_runmain(httrackp * opt, int argc, char **argv); +static void back_launch_cmd(void *pP) { + char *cmd = (char *) pP; + char **argv = (char **) malloct(1024 * sizeof(char *)); int argc = 0; int i = 0; int g = 0; - // + + // httrackp *opt; /* copy commandline */ @@ -235,9 +239,9 @@ static void back_launch_cmd( void* pP ) { commandReturnCmdl = strdup(cmd); /* split */ - argv[0]="webhttrack"; - argv[1]=cmd; - argc++; + argv[0] = "webhttrack"; + argv[1] = cmd; + argc++; i = 0; while(cmd[i]) { if (cmd[i] == '\t' || cmd[i] == '\r' || cmd[i] == '\n') { @@ -246,19 +250,20 @@ static void back_launch_cmd( void* pP ) { i++; } i = 0; - while(cmd[i]) { - if(cmd[i]=='\"') g=!g; - if(cmd[i]==' ') { - if(!g){ - cmd[i]='\0'; - argv[argc++]=cmd+i+1; + while(cmd[i]) { + if (cmd[i] == '\"') + g = !g; + if (cmd[i] == ' ') { + if (!g) { + cmd[i] = '\0'; + argv[argc++] = cmd + i + 1; } - } + } i++; } - /* init */ - hts_init(); + /* init */ + hts_init(); global_opt = opt = hts_create_opt(); /* run */ @@ -269,9 +274,9 @@ static void back_launch_cmd( void* pP ) { commandReturnMsg = strdup(hts_errmsg(opt)); } - /* free */ - global_opt = NULL; - hts_free_opt(opt); + /* free */ + global_opt = NULL; + hts_free_opt(opt); hts_uninit(); /* okay */ @@ -283,12 +288,12 @@ static void back_launch_cmd( void* pP ) { /* free */ free(cmd); freet(argv); - return ; + return; } -void webhttrack_main(char* cmd) { +void webhttrack_main(char *cmd) { commandRunning = 1; - hts_newthread(back_launch_cmd, (void*) strdup(cmd)); + hts_newthread(back_launch_cmd, (void *) strdup(cmd)); } void webhttrack_lock(void) { @@ -299,8 +304,8 @@ void webhttrack_release(void) { hts_mutexrelease(&refreshMutex); } -static int webhttrack_runmain(httrackp *opt, int argc, char** argv) { - int ret; +static int webhttrack_runmain(httrackp * opt, int argc, char **argv) { + int ret; CHAIN_FUNCTION(opt, init, htsshow_init, NULL); CHAIN_FUNCTION(opt, uninit, htsshow_uninit, NULL); @@ -326,37 +331,42 @@ static int webhttrack_runmain(httrackp *opt, int argc, char** argv) { CHAIN_FUNCTION(opt, sendhead, htsshow_sendheader, NULL); CHAIN_FUNCTION(opt, receivehead, htsshow_receiveheader, NULL); - ret = hts_main2(argc, argv, opt); + ret = hts_main2(argc, argv, opt); htsthread_wait_n(1); - - return ret; + + return ret; } -static int help_server(char* dest_path, int defaultPort) { +static int help_server(char *dest_path, int defaultPort) { int returncode = 0; - char adr_prox[HTS_URLMAXSIZE*2]; + char adr_prox[HTS_URLMAXSIZE * 2]; int port_prox; - T_SOC soc=smallserver_init_std(&port_prox, adr_prox, defaultPort); - if (soc!=INVALID_SOCKET) { - char url[HTS_URLMAXSIZE*2]; + T_SOC soc = smallserver_init_std(&port_prox, adr_prox, defaultPort); + + if (soc != INVALID_SOCKET) { + char url[HTS_URLMAXSIZE * 2]; char method[32]; char data[32768]; - url[0]=method[0]=data[0]='\0'; + + url[0] = method[0] = data[0] = '\0'; // printf("Okay, temporary server installed.\nThe URL is:\n"); printf("URL=http://%s:%d/\n", adr_prox, port_prox); #ifndef _WIN32 { pid_t pid = getpid(); - printf("PID=%d\n", (int)pid); + + printf("PID=%d\n", (int) pid); } #endif fflush(stdout); fflush(stderr); // - if (!smallserver(soc,url,method,data,dest_path)) { + if (!smallserver(soc, url, method, data, dest_path)) { int last_errno = errno; - fprintf(stderr, "Unable to create the server: %s\n", strerror(last_errno)); + + fprintf(stderr, "Unable to create the server: %s\n", + strerror(last_errno)); #ifdef _WIN32 closesocket(soc); #else @@ -368,7 +378,8 @@ static int help_server(char* dest_path, int defaultPort) { returncode = 0; } } else { - fprintf(stderr, "Unable to initialize a temporary server (no remaining port)\n"); + fprintf(stderr, + "Unable to initialize a temporary server (no remaining port)\n"); returncode = 1; } printf("EXITED\n"); @@ -377,50 +388,60 @@ static int help_server(char* dest_path, int defaultPort) { return returncode; } - /* CALLBACK FUNCTIONS */ /* Initialize the Winsock */ -void __cdecl htsshow_init(t_hts_callbackarg *carg) { +void __cdecl htsshow_init(t_hts_callbackarg * carg) { } -void __cdecl htsshow_uninit(t_hts_callbackarg *carg) { +void __cdecl htsshow_uninit(t_hts_callbackarg * carg) { } -int __cdecl htsshow_start(t_hts_callbackarg *carg, httrackp* opt) { - return 1; +int __cdecl htsshow_start(t_hts_callbackarg * carg, httrackp * opt) { + return 1; } -int __cdecl htsshow_chopt(t_hts_callbackarg *carg, httrackp* opt) { +int __cdecl htsshow_chopt(t_hts_callbackarg * carg, httrackp * opt) { return htsshow_start(carg, opt); } -int __cdecl htsshow_end(t_hts_callbackarg *carg, httrackp* opt) { - return 1; +int __cdecl htsshow_end(t_hts_callbackarg * carg, httrackp * opt) { + return 1; } -int __cdecl htsshow_preprocesshtml(t_hts_callbackarg *carg, httrackp *opt, char** html,int* len,const char* url_address,const char* url_file) { +int __cdecl htsshow_preprocesshtml(t_hts_callbackarg * carg, httrackp * opt, + char **html, int *len, + const char *url_address, + const char *url_file) { return 1; } -int __cdecl htsshow_postprocesshtml(t_hts_callbackarg *carg, httrackp *opt, char** html,int* len,const char* url_address,const char* url_file) { +int __cdecl htsshow_postprocesshtml(t_hts_callbackarg * carg, httrackp * opt, + char **html, int *len, + const char *url_address, + const char *url_file) { return 1; } -int __cdecl htsshow_checkhtml(t_hts_callbackarg *carg, httrackp *opt, char* html,int len,const char* url_address,const char* url_file) { +int __cdecl htsshow_checkhtml(t_hts_callbackarg * carg, httrackp * opt, + char *html, int len, const char *url_address, + const char *url_file) { return 1; } -int __cdecl htsshow_loop(t_hts_callbackarg *carg, httrackp *opt, lien_back* back,int back_max,int back_index,int lien_n,int lien_tot,int stat_time, hts_stat_struct* stats) { // appelé à chaque boucle de HTTrack - static TStamp prev_mytime=0; /* ok */ - static t_InpInfo SInfo; /* ok */ +int __cdecl htsshow_loop(t_hts_callbackarg * carg, httrackp * opt, lien_back * back, int back_max, int back_index, int lien_n, int lien_tot, int stat_time, hts_stat_struct * stats) { // appelé à chaque boucle de HTTrack + static TStamp prev_mytime = 0; /* ok */ + static t_InpInfo SInfo; /* ok */ + // TStamp mytime; - long int rate=0; + long int rate = 0; + // - int stat_written=-1; - int stat_updated=-1; - int stat_errors=-1; - int stat_warnings=-1; - int stat_infos=-1; - int nbk=-1; - LLint nb=-1; - int stat_nsocket=-1; - LLint stat_bytes=-1; - LLint stat_bytes_recv=-1; - int irate=-1; + int stat_written = -1; + int stat_updated = -1; + int stat_errors = -1; + int stat_warnings = -1; + int stat_infos = -1; + int nbk = -1; + LLint nb = -1; + int stat_nsocket = -1; + LLint stat_bytes = -1; + LLint stat_bytes_recv = -1; + int irate = -1; + // char st[256]; @@ -432,45 +453,57 @@ int __cdecl htsshow_loop(t_hts_callbackarg *carg, httrackp *opt, lien_back* back webhttrack_lock(); if (stats) { - stat_written=stats->stat_files; - stat_updated=stats->stat_updated_files; - stat_errors=stats->stat_errors; - stat_warnings=stats->stat_warnings; - stat_infos=stats->stat_infos; - nbk=stats->nbk; - stat_nsocket=stats->stat_nsocket; - irate=(int)stats->rate; - nb=stats->nb; - stat_bytes=stats->nb; - stat_bytes_recv=stats->HTS_TOTAL_RECV; + stat_written = stats->stat_files; + stat_updated = stats->stat_updated_files; + stat_errors = stats->stat_errors; + stat_warnings = stats->stat_warnings; + stat_infos = stats->stat_infos; + nbk = stats->nbk; + stat_nsocket = stats->stat_nsocket; + irate = (int) stats->rate; + nb = stats->nb; + stat_bytes = stats->nb; + stat_bytes_recv = stats->HTS_TOTAL_RECV; } - - mytime=mtime_local(); - if ((stat_time>0) && (stat_bytes_recv>0)) - rate=(int)(stat_bytes_recv/stat_time); + + mytime = mtime_local(); + if ((stat_time > 0) && (stat_bytes_recv > 0)) + rate = (int) (stat_bytes_recv / stat_time); else - rate=0; // pas d'infos - + rate = 0; // pas d'infos + /* Infos */ - if (stat_bytes>=0) SInfo.stat_bytes=stat_bytes; // bytes - if (stat_time>=0) SInfo.stat_time=stat_time; // time - if (lien_tot>=0) SInfo.lien_tot=lien_tot; // nb liens - if (lien_n>=0) SInfo.lien_n=lien_n; // scanned - SInfo.stat_nsocket=stat_nsocket; // socks - if (rate>0) SInfo.rate=rate; // rate - if (irate>=0) SInfo.irate=irate; // irate - if (SInfo.irate<0) SInfo.irate=SInfo.rate; - if (nbk>=0) SInfo.stat_back=nbk; - if (stat_written>=0) SInfo.stat_written=stat_written; - if (stat_updated>=0) SInfo.stat_updated=stat_updated; - if (stat_errors>=0) SInfo.stat_errors=stat_errors; - if (stat_warnings>=0) SInfo.stat_warnings=stat_warnings; - if (stat_infos>=0) SInfo.stat_infos=stat_infos; - - - st[0]='\0'; - qsec2str(st,stat_time); - + if (stat_bytes >= 0) + SInfo.stat_bytes = stat_bytes; // bytes + if (stat_time >= 0) + SInfo.stat_time = stat_time; // time + if (lien_tot >= 0) + SInfo.lien_tot = lien_tot; // nb liens + if (lien_n >= 0) + SInfo.lien_n = lien_n; // scanned + SInfo.stat_nsocket = stat_nsocket; // socks + if (rate > 0) + SInfo.rate = rate; // rate + if (irate >= 0) + SInfo.irate = irate; // irate + if (SInfo.irate < 0) + SInfo.irate = SInfo.rate; + if (nbk >= 0) + SInfo.stat_back = nbk; + if (stat_written >= 0) + SInfo.stat_written = stat_written; + if (stat_updated >= 0) + SInfo.stat_updated = stat_updated; + if (stat_errors >= 0) + SInfo.stat_errors = stat_errors; + if (stat_warnings >= 0) + SInfo.stat_warnings = stat_warnings; + if (stat_infos >= 0) + SInfo.stat_infos = stat_infos; + + st[0] = '\0'; + qsec2str(st, stat_time); + /* Set keys */ smallserver_setkeyint("info.stat_bytes", SInfo.stat_bytes); smallserver_setkeyint("info.stat_time", SInfo.stat_time); @@ -487,131 +520,148 @@ int __cdecl htsshow_loop(t_hts_callbackarg *carg, httrackp *opt, lien_back* back smallserver_setkeyint("info.stat_infos", SInfo.stat_infos); /* */ smallserver_setkey("info.stat_time_str", st); - - if ( ((mytime - prev_mytime)>100) || ((mytime - prev_mytime)<0) ) { - prev_mytime=mytime; - - + + if (((mytime - prev_mytime) > 100) || ((mytime - prev_mytime) < 0)) { + prev_mytime = mytime; + // parcourir registre des liens - if (back_index>=0 && back_max > 0) { // seulement si index passé - int j,k; - int index=0; - int ok=0; // idem - int l; // idem + if (back_index >= 0 && back_max > 0) { // seulement si index passé + int j, k; + int index = 0; + int ok = 0; // idem + int l; // idem + // t_StatsBuffer StatsBuffer[NStatsBuffer]; - + { int i; - for(i=0;i<NStatsBuffer;i++) { - strcpybuff(StatsBuffer[i].state,""); - strcpybuff(StatsBuffer[i].name,""); - strcpybuff(StatsBuffer[i].file,""); - strcpybuff(StatsBuffer[i].url_sav,""); - StatsBuffer[i].back=0; - StatsBuffer[i].size=0; - StatsBuffer[i].sizetot=0; + + for(i = 0; i < NStatsBuffer; i++) { + strcpybuff(StatsBuffer[i].state, ""); + strcpybuff(StatsBuffer[i].name, ""); + strcpybuff(StatsBuffer[i].file, ""); + strcpybuff(StatsBuffer[i].url_sav, ""); + StatsBuffer[i].back = 0; + StatsBuffer[i].size = 0; + StatsBuffer[i].sizetot = 0; } } - for(k=0;k<2;k++) { // 0: lien en cours 1: autres liens - for(j=0;(j<3) && (index<NStatsBuffer);j++) { // passe de priorité + for(k = 0; k < 2; k++) { // 0: lien en cours 1: autres liens + for(j = 0; (j < 3) && (index < NStatsBuffer); j++) { // passe de priorité int _i; - for(_i=0+k;(_i< max(back_max*k,1) ) && (index<NStatsBuffer);_i++) { // no lien - int i=(back_index+_i)%back_max; // commencer par le "premier" (l'actuel) - if (back[i].status>=0) { // signifie "lien actif" + + for(_i = 0 + k; (_i < max(back_max * k, 1)) && (index < NStatsBuffer); _i++) { // no lien + int i = (back_index + _i) % back_max; // commencer par le "premier" (l'actuel) + + if (back[i].status >= 0) { // signifie "lien actif" // int ok=0; // OPTI - ok=0; - switch(j) { - case 0: // prioritaire - if ((back[i].status>0) && (back[i].status<99)) { - strcpybuff(StatsBuffer[index].state,"receive"); ok=1; + ok = 0; + switch (j) { + case 0: // prioritaire + if ((back[i].status > 0) && (back[i].status < 99)) { + strcpybuff(StatsBuffer[index].state, "receive"); + ok = 1; } break; case 1: - if (back[i].status==STATUS_WAIT_HEADERS) { - strcpybuff(StatsBuffer[index].state,"request"); ok=1; - } - else if (back[i].status==STATUS_CONNECTING) { - strcpybuff(StatsBuffer[index].state,"connect"); ok=1; - } - else if (back[i].status==STATUS_WAIT_DNS) { - strcpybuff(StatsBuffer[index].state,"search"); ok=1; - } - else if (back[i].status==STATUS_FTP_TRANSFER) { // ohh le beau ftp - char proto[] = "ftp"; - if (back[i].url_adr[0]) { - char* ep = strchr(back[i].url_adr, ':'); - char* eps = strchr(back[i].url_adr, '/'); - int count; - if (ep != NULL && ep < eps && (count = (int) (ep - back[i].url_adr) ) < 4) { - proto[0] = '\0'; - strncat(proto, back[i].url_adr, count); - } - } - sprintf(StatsBuffer[index].state,"%s: %s",proto,back[i].info); ok=1; - } - break; - default: - if (back[i].status==STATUS_READY) { // prêt - if ((back[i].r.statuscode==HTTP_OK)) { - strcpybuff(StatsBuffer[index].state,"ready"); ok=1; + if (back[i].status == STATUS_WAIT_HEADERS) { + strcpybuff(StatsBuffer[index].state, "request"); + ok = 1; + } else if (back[i].status == STATUS_CONNECTING) { + strcpybuff(StatsBuffer[index].state, "connect"); + ok = 1; + } else if (back[i].status == STATUS_WAIT_DNS) { + strcpybuff(StatsBuffer[index].state, "search"); + ok = 1; + } else if (back[i].status == STATUS_FTP_TRANSFER) { // ohh le beau ftp + char proto[] = "ftp"; + + if (back[i].url_adr[0]) { + char *ep = strchr(back[i].url_adr, ':'); + char *eps = strchr(back[i].url_adr, '/'); + int count; + + if (ep != NULL && ep < eps + && (count = (int) (ep - back[i].url_adr)) < 4) { + proto[0] = '\0'; + strncat(proto, back[i].url_adr, count); + } } - else if ((back[i].r.statuscode>=100) && (back[i].r.statuscode<=599)) { - char tempo[256]; tempo[0]='\0'; - infostatuscode(tempo,back[i].r.statuscode); - strcpybuff(StatsBuffer[index].state,tempo); ok=1; - } - else { - strcpybuff(StatsBuffer[index].state,"error"); ok=1; + sprintf(StatsBuffer[index].state, "%s: %s", proto, + back[i].info); + ok = 1; + } + break; + default: + if (back[i].status == STATUS_READY) { // prêt + if ((back[i].r.statuscode == HTTP_OK)) { + strcpybuff(StatsBuffer[index].state, "ready"); + ok = 1; + } else if ((back[i].r.statuscode >= 100) + && (back[i].r.statuscode <= 599)) { + char tempo[256]; + + tempo[0] = '\0'; + infostatuscode(tempo, back[i].r.statuscode); + strcpybuff(StatsBuffer[index].state, tempo); + ok = 1; + } else { + strcpybuff(StatsBuffer[index].state, "error"); + ok = 1; } } break; } - + if (ok) { - char s[HTS_URLMAXSIZE*2]; + char s[HTS_URLMAXSIZE * 2]; + // - StatsBuffer[index].back=i; // index pour + d'infos + StatsBuffer[index].back = i; // index pour + d'infos // - s[0]='\0'; - strcpybuff(StatsBuffer[index].url_sav,back[i].url_sav); // pour cancel - if (strcmp(back[i].url_adr,"file://")) - strcatbuff(s,back[i].url_adr); + s[0] = '\0'; + strcpybuff(StatsBuffer[index].url_sav, back[i].url_sav); // pour cancel + if (strcmp(back[i].url_adr, "file://")) + strcatbuff(s, back[i].url_adr); else - strcatbuff(s,"localhost"); - if (back[i].url_fil[0]!='/') - strcatbuff(s,"/"); - strcatbuff(s,back[i].url_fil); - - StatsBuffer[index].file[0]='\0'; + strcatbuff(s, "localhost"); + if (back[i].url_fil[0] != '/') + strcatbuff(s, "/"); + strcatbuff(s, back[i].url_fil); + + StatsBuffer[index].file[0] = '\0'; { - char* a=strrchr(s,'/'); + char *a = strrchr(s, '/'); + if (a) { - strncatbuff(StatsBuffer[index].file,a,200); - *a='\0'; + strncatbuff(StatsBuffer[index].file, a, 200); + *a = '\0'; } } - - if ((l = (int) strlen(s))<MAX_LEN_INPROGRESS) - strcpybuff(StatsBuffer[index].name,s); + + if ((l = (int) strlen(s)) < MAX_LEN_INPROGRESS) + strcpybuff(StatsBuffer[index].name, s); else { // couper - StatsBuffer[index].name[0]='\0'; - strncatbuff(StatsBuffer[index].name,s,MAX_LEN_INPROGRESS/2-2); - strcatbuff(StatsBuffer[index].name,"..."); - strcatbuff(StatsBuffer[index].name,s+l-MAX_LEN_INPROGRESS/2+2); + StatsBuffer[index].name[0] = '\0'; + strncatbuff(StatsBuffer[index].name, s, + MAX_LEN_INPROGRESS / 2 - 2); + strcatbuff(StatsBuffer[index].name, "..."); + strcatbuff(StatsBuffer[index].name, + s + l - MAX_LEN_INPROGRESS / 2 + 2); } - - if (back[i].r.totalsize>0) { // taille prédéfinie - StatsBuffer[index].sizetot=back[i].r.totalsize; - StatsBuffer[index].size=back[i].r.size; - } else { // pas de taille prédéfinie - if (back[i].status==STATUS_READY) { // prêt - StatsBuffer[index].sizetot=back[i].r.size; - StatsBuffer[index].size=back[i].r.size; + + if (back[i].r.totalsize > 0) { // taille prédéfinie + StatsBuffer[index].sizetot = back[i].r.totalsize; + StatsBuffer[index].size = back[i].r.size; + } else { // pas de taille prédéfinie + if (back[i].status == STATUS_READY) { // prêt + StatsBuffer[index].sizetot = back[i].r.size; + StatsBuffer[index].size = back[i].r.size; } else { - StatsBuffer[index].sizetot=8192; - StatsBuffer[index].size=(back[i].r.size % 8192); + StatsBuffer[index].sizetot = 8192; + StatsBuffer[index].size = (back[i].r.size % 8192); } } index++; @@ -623,20 +673,23 @@ int __cdecl htsshow_loop(t_hts_callbackarg *carg, httrackp *opt, lien_back* back /* Display current job */ { - int parsing=0; + int parsing = 0; + if (commandEndRequested) - smallserver_setkey("info.currentjob", "finishing pending transfers - Select [Cancel] to stop now!"); - else if (!(parsing=hts_is_parsing(opt, -1))) + smallserver_setkey("info.currentjob", + "finishing pending transfers - Select [Cancel] to stop now!"); + else if (!(parsing = hts_is_parsing(opt, -1))) smallserver_setkey("info.currentjob", "receiving files"); else { char tmp[1024]; + tmp[0] = '\0'; - switch(hts_is_testing(opt)) { + switch (hts_is_testing(opt)) { case 0: - sprintf(tmp, "parsing HTML file (%d%%)",parsing); + sprintf(tmp, "parsing HTML file (%d%%)", parsing); break; case 1: - sprintf(tmp, "parsing HTML file: testing links (%d%%)",parsing); + sprintf(tmp, "parsing HTML file: testing links (%d%%)", parsing); break; case 2: sprintf(tmp, "purging files"); @@ -658,72 +711,102 @@ int __cdecl htsshow_loop(t_hts_callbackarg *carg, httrackp *opt, lien_back* back /* Display background jobs */ { int i; - for(i=0;i<NStatsBuffer;i++) { + + for(i = 0; i < NStatsBuffer; i++) { if (strnotempty(StatsBuffer[i].state)) { - strc_int2bytes2 strc; + strc_int2bytes2 strc; + smallserver_setkeyarr("info.state[", i, "]", StatsBuffer[i].state); smallserver_setkeyarr("info.name[", i, "]", StatsBuffer[i].name); smallserver_setkeyarr("info.file[", i, "]", StatsBuffer[i].file); - smallserver_setkeyarr("info.size[", i, "]", int2bytes(&strc,StatsBuffer[i].size)); - smallserver_setkeyarr("info.sizetot[", i, "]", int2bytes(&strc,StatsBuffer[i].sizetot)); - smallserver_setkeyarr("info.url_adr[", i, "]", StatsBuffer[i].url_adr); - smallserver_setkeyarr("info.url_fil[", i, "]", StatsBuffer[i].url_fil); - smallserver_setkeyarr("info.url_sav[", i, "]", StatsBuffer[i].url_sav); + smallserver_setkeyarr("info.size[", i, "]", + int2bytes(&strc, StatsBuffer[i].size)); + smallserver_setkeyarr("info.sizetot[", i, "]", + int2bytes(&strc, StatsBuffer[i].sizetot)); + smallserver_setkeyarr("info.url_adr[", i, "]", + StatsBuffer[i].url_adr); + smallserver_setkeyarr("info.url_fil[", i, "]", + StatsBuffer[i].url_fil); + smallserver_setkeyarr("info.url_sav[", i, "]", + StatsBuffer[i].url_sav); } } } + } - } - } - + /* UnLock */ webhttrack_release(); - + return 1; } -const char* __cdecl htsshow_query(t_hts_callbackarg *carg, httrackp *opt, const char* question) { - static char s[]=""; /* ok */ +const char *__cdecl htsshow_query(t_hts_callbackarg * carg, httrackp * opt, + const char *question) { + static char s[] = ""; /* ok */ + return s; } -const char* __cdecl htsshow_query2(t_hts_callbackarg *carg, httrackp *opt, const char* question) { - static char s[]=""; /* ok */ +const char *__cdecl htsshow_query2(t_hts_callbackarg * carg, httrackp * opt, + const char *question) { + static char s[] = ""; /* ok */ + return s; } -const char* __cdecl htsshow_query3(t_hts_callbackarg *carg, httrackp *opt, const char* question) { - static char s[]=""; /* ok */ +const char *__cdecl htsshow_query3(t_hts_callbackarg * carg, httrackp * opt, + const char *question) { + static char s[] = ""; /* ok */ + return s; } -int __cdecl htsshow_check(t_hts_callbackarg *carg, httrackp *opt, const char* adr,const char* fil,int status) { +int __cdecl htsshow_check(t_hts_callbackarg * carg, httrackp * opt, + const char *adr, const char *fil, int status) { return -1; } -int __cdecl htsshow_check_mime(t_hts_callbackarg *carg, httrackp *opt, const char* adr,const char* fil,const char* mime,int status) { +int __cdecl htsshow_check_mime(t_hts_callbackarg * carg, httrackp * opt, + const char *adr, const char *fil, + const char *mime, int status) { return -1; } -void __cdecl htsshow_pause(t_hts_callbackarg *carg, httrackp *opt, const char* lockfile) { +void __cdecl htsshow_pause(t_hts_callbackarg * carg, httrackp * opt, + const char *lockfile) { } -void __cdecl htsshow_filesave(t_hts_callbackarg *carg, httrackp *opt, const char* file) { +void __cdecl htsshow_filesave(t_hts_callbackarg * carg, httrackp * opt, + const char *file) { } -void __cdecl htsshow_filesave2(t_hts_callbackarg *carg, httrackp *opt, const char* adr, const char* fil, const char* save, int is_new, int is_modified,int not_updated) { +void __cdecl htsshow_filesave2(t_hts_callbackarg * carg, httrackp * opt, + const char *adr, const char *fil, + const char *save, int is_new, int is_modified, + int not_updated) { } -int __cdecl htsshow_linkdetected(t_hts_callbackarg *carg, httrackp *opt, char* link) { +int __cdecl htsshow_linkdetected(t_hts_callbackarg * carg, httrackp * opt, + char *link) { return 1; } -int __cdecl htsshow_linkdetected2(t_hts_callbackarg *carg, httrackp *opt, char* link, const char* start_tag) { +int __cdecl htsshow_linkdetected2(t_hts_callbackarg * carg, httrackp * opt, + char *link, const char *start_tag) { return 1; } -int __cdecl htsshow_xfrstatus(t_hts_callbackarg *carg, httrackp *opt, lien_back* back) { +int __cdecl htsshow_xfrstatus(t_hts_callbackarg * carg, httrackp * opt, + lien_back * back) { return 1; } -int __cdecl htsshow_savename(t_hts_callbackarg *carg, httrackp *opt, const char* adr_complete,const char* fil_complete,const char* referer_adr,const char* referer_fil,char* save) { +int __cdecl htsshow_savename(t_hts_callbackarg * carg, httrackp * opt, + const char *adr_complete, const char *fil_complete, + const char *referer_adr, const char *referer_fil, + char *save) { return 1; } -int __cdecl htsshow_sendheader(t_hts_callbackarg *carg, httrackp *opt, char* buff, const char* adr, const char* fil, const char* referer_adr, const char* referer_fil, htsblk* outgoing) { +int __cdecl htsshow_sendheader(t_hts_callbackarg * carg, httrackp * opt, + char *buff, const char *adr, const char *fil, + const char *referer_adr, const char *referer_fil, + htsblk * outgoing) { return 1; } -int __cdecl htsshow_receiveheader(t_hts_callbackarg *carg, httrackp *opt, char* buff, const char* adr, const char* fil, const char* referer_adr, const char* referer_fil, htsblk* incoming) { +int __cdecl htsshow_receiveheader(t_hts_callbackarg * carg, httrackp * opt, + char *buff, const char *adr, const char *fil, + const char *referer_adr, + const char *referer_fil, htsblk * incoming) { return 1; } - - |