summaryrefslogtreecommitdiff
path: root/src/htshelp.c
diff options
context:
space:
mode:
authorXavier Roche <xroche@users.noreply.github.com>2013-05-14 20:30:28 +0000
committerXavier Roche <xroche@users.noreply.github.com>2013-05-14 20:30:28 +0000
commit07f4b003675260004c49755dde413944a16ca2d3 (patch)
tree11050b4c7fbe1d7c63a38f5f9a6b5ba6d8260ae1 /src/htshelp.c
parentb09def438c5e47305e4a5ab18d8a646a3b004fdc (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/htshelp.c')
-rw-r--r--src/htshelp.c585
1 files changed, 348 insertions, 237 deletions
diff --git a/src/htshelp.c b/src/htshelp.c
index 37aee84..c6e91d8 100644
--- a/src/htshelp.c
+++ b/src/htshelp.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: httrack.c subroutines: */
/* command-line help system */
@@ -56,50 +53,53 @@ Please visit our Website: http://www.httrack.com
/* END specific definitions */
#define waitkey if (more) { char s[4]; printf("\nMORE.. q to quit\n"); linput(stdin,s,4); if (strcmp(s,"q")==0) quit=1; else printf("Page %d\n\n",++m); }
-void infomsg(char* msg) {
- int l=0;
- int m=0;
- int more=0;
- int quit=0;
- int done=0;
+void infomsg(char *msg) {
+ int l = 0;
+ int m = 0;
+ int more = 0;
+ int quit = 0;
+ int done = 0;
+
//
- if (msg==NULL)
- quit=0;
+ if (msg == NULL)
+ quit = 0;
if (msg) {
if (!quit) {
- if (strlen(msg)==1) {
- if (msg[0]=='1') {
- more=1;
+ if (strlen(msg) == 1) {
+ if (msg[0] == '1') {
+ more = 1;
return;
}
}
/* afficher alias? */
- if (((int)strlen(msg)) > 4) {
- if (msg[0]==' ') {
- if (msg[2]!=' ') {
- if ((msg[3]==' ') || (msg[4]==' ')) {
- char cmd[32]="-";
- int p=0;
- while(cmd[p]==' ') p++;
- sscanf(msg+p,"%s",cmd+strlen(cmd));
+ if (((int) strlen(msg)) > 4) {
+ if (msg[0] == ' ') {
+ if (msg[2] != ' ') {
+ if ((msg[3] == ' ') || (msg[4] == ' ')) {
+ char cmd[32] = "-";
+ int p = 0;
+
+ while(cmd[p] == ' ')
+ p++;
+ sscanf(msg + p, "%s", cmd + strlen(cmd));
/* clears cN -> c */
- if ((p = (int) strlen(cmd))>2)
- if (cmd[p-1]=='N')
- cmd[p-1]='\0';
+ if ((p = (int) strlen(cmd)) > 2)
+ if (cmd[p - 1] == 'N')
+ cmd[p - 1] = '\0';
/* finds alias (if any) */
- p=optreal_find(cmd);
- if (p>=0) {
+ p = optreal_find(cmd);
+ if (p >= 0) {
/* fings type of parameter: number,param,param concatenated,single cmd */
- if (strcmp(opttype_value(p),"param") == 0)
- printf("%s (--%s[=N])\n",msg,optalias_value(p));
- else if (strcmp(opttype_value(p),"param1") == 0)
- printf("%s (--%s <param>)\n",msg,optalias_value(p));
- else if (strcmp(opttype_value(p),"param0") == 0)
- printf("%s (--%s<param>)\n",msg,optalias_value(p));
+ if (strcmp(opttype_value(p), "param") == 0)
+ printf("%s (--%s[=N])\n", msg, optalias_value(p));
+ else if (strcmp(opttype_value(p), "param1") == 0)
+ printf("%s (--%s <param>)\n", msg, optalias_value(p));
+ else if (strcmp(opttype_value(p), "param0") == 0)
+ printf("%s (--%s<param>)\n", msg, optalias_value(p));
else
- printf("%s (--%s)\n",msg,optalias_value(p));
- done=1;
+ printf("%s (--%s)\n", msg, optalias_value(p));
+ done = 1;
}
}
}
@@ -108,182 +108,214 @@ void infomsg(char* msg) {
/* sinon */
if (!done)
- printf("%s\n",msg);
+ printf("%s\n", msg);
l++;
- if (l>20) {
- l=0;
+ if (l > 20) {
+ l = 0;
waitkey;
}
}
}
}
-void help_wizard(httrackp* opt) {
- char* urls = (char*) malloct(HTS_URLMAXSIZE*2);
- char* mainpath = (char*) malloct(256);
- char* projname = (char*) malloct(256);
- char* stropt = (char*) malloct(2048); // options
- char* stropt2 = (char*) malloct(2048); // options longues
- char* strwild = (char*) malloct(2048); // wildcards
- char* cmd = (char*) malloct(4096);
- char* str = (char*) malloct(256);
- char** argv = (char**) malloct(256 * sizeof(char*));
+void help_wizard(httrackp * opt) {
+ char *urls = (char *) malloct(HTS_URLMAXSIZE * 2);
+ char *mainpath = (char *) malloct(256);
+ char *projname = (char *) malloct(256);
+ char *stropt = (char *) malloct(2048); // options
+ char *stropt2 = (char *) malloct(2048); // options longues
+ char *strwild = (char *) malloct(2048); // wildcards
+ char *cmd = (char *) malloct(4096);
+ char *str = (char *) malloct(256);
+ char **argv = (char **) malloct(256 * sizeof(char *));
+
//
- char* a;
+ char *a;
+
//
- if (urls == NULL || mainpath == NULL || projname == NULL || stropt == NULL
- || stropt2 == NULL || strwild == NULL || cmd == NULL || str == NULL || argv == NULL) {
+ if (urls == NULL || mainpath == NULL || projname == NULL || stropt == NULL
+ || stropt2 == NULL || strwild == NULL || cmd == NULL || str == NULL
+ || argv == NULL) {
fprintf(stderr, "* memory exhausted in %s, line %d\n", __FILE__, __LINE__);
return;
}
- urls[0] = mainpath[0] = projname[0] = stropt[0] = stropt2[0] = strwild[0] = cmd[0] = str[0] = '\0';
+ urls[0] = mainpath[0] = projname[0] = stropt[0] = stropt2[0] = strwild[0] =
+ cmd[0] = str[0] = '\0';
//
- strcpybuff(stropt,"-");
- mainpath[0]=projname[0]=stropt2[0]=strwild[0]='\0';
+ strcpybuff(stropt, "-");
+ mainpath[0] = projname[0] = stropt2[0] = strwild[0] = '\0';
//
-
+
printf("\n");
- printf("Welcome to HTTrack Website Copier (Offline Browser) "HTTRACK_VERSION"%s\n", hts_get_version_info(opt));
+ printf("Welcome to HTTrack Website Copier (Offline Browser) " HTTRACK_VERSION
+ "%s\n", hts_get_version_info(opt));
printf("Copyright (C) Xavier Roche and other contributors\n");
#ifdef _WIN32
printf("Note: You are running the commandline version,\n");
printf("run 'WinHTTrack.exe' to get the GUI version.\n");
#endif
#ifdef HTTRACK_AFF_WARNING
- printf("NOTE: "HTTRACK_AFF_WARNING"\n");
+ printf("NOTE: " HTTRACK_AFF_WARNING "\n");
#endif
#ifdef HTS_PLATFORM_NAME
#if USE_BEGINTHREAD
- printf("[compiled: "HTS_PLATFORM_NAME" - MT]\n");
+ printf("[compiled: " HTS_PLATFORM_NAME " - MT]\n");
#else
- printf("[compiled: "HTS_PLATFORM_NAME"]\n");
+ printf("[compiled: " HTS_PLATFORM_NAME "]\n");
#endif
#endif
printf("To see the option list, enter a blank line or try httrack --help\n");
//
// Project name
- while(strnotempty(projname)==0) {
+ while(strnotempty(projname) == 0) {
printf("\n");
printf("Enter project name :");
fflush(stdout);
- linput(stdin,projname,250);
- if (strnotempty(projname)==0)
- help("httrack",1);
+ linput(stdin, projname, 250);
+ if (strnotempty(projname) == 0)
+ help("httrack", 1);
}
//
// Path
if (strnotempty(hts_gethome()))
- printf("\nBase path (return=%s/websites/) :",hts_gethome());
+ printf("\nBase path (return=%s/websites/) :", hts_gethome());
else
printf("\nBase path (return=current directory) :");
- linput(stdin,str,250);
+ linput(stdin, str, 250);
if (!strnotempty(str)) {
- strcatbuff(str,hts_gethome());
- strcatbuff(str,"/websites/");
+ strcatbuff(str, hts_gethome());
+ strcatbuff(str, "/websites/");
}
if (strnotempty(str))
- if ((str[strlen(str)-1]!='/') && (str[strlen(str)-1]!='\\'))
- strcatbuff(str,"/");
- strcatbuff(stropt2,"-O \""); strcatbuff(stropt2,str); strcatbuff(stropt2,projname); strcatbuff(stropt2,"\" ");
+ if ((str[strlen(str) - 1] != '/') && (str[strlen(str) - 1] != '\\'))
+ strcatbuff(str, "/");
+ strcatbuff(stropt2, "-O \"");
+ strcatbuff(stropt2, str);
+ strcatbuff(stropt2, projname);
+ strcatbuff(stropt2, "\" ");
// Créer si ce n'est fait un index.html 1er niveau
make_empty_index(str);
//
printf("\n");
printf("Enter URLs (separated by commas or blank spaces) :");
fflush(stdout);
- linput(stdin,urls,250);
+ linput(stdin, urls, 250);
if (strnotempty(urls)) {
- while( (a=strchr(urls,',')) ) *a=' ';
- while( (a=strchr(urls,'\t')) ) *a=' ';
-
+ while((a = strchr(urls, ',')))
+ *a = ' ';
+ while((a = strchr(urls, '\t')))
+ *a = ' ';
+
// Action
printf("\nAction:\n");
- switch(help_query("Mirror Web Site(s)|Mirror Web Site(s) with Wizard|Just Get Files Indicated|Mirror ALL links in URLs (Multiple Mirror)|Test Links In URLs (Bookmark Test)|Update/Continue a Mirror",1)) {
- case 1: break;
- case 2: strcatbuff(stropt,"W"); break;
- case 3: strcatbuff(stropt2,"--get "); break;
- case 4: strcatbuff(stropt2,"--mirrorlinks "); break;
- case 5: strcatbuff(stropt2,"--testlinks "); break;
- case 6: strcatbuff(stropt2,"--update "); break;
- case 0: return; break;
+ switch (help_query
+ ("Mirror Web Site(s)|Mirror Web Site(s) with Wizard|Just Get Files Indicated|Mirror ALL links in URLs (Multiple Mirror)|Test Links In URLs (Bookmark Test)|Update/Continue a Mirror",
+ 1)) {
+ case 1:
+ break;
+ case 2:
+ strcatbuff(stropt, "W");
+ break;
+ case 3:
+ strcatbuff(stropt2, "--get ");
+ break;
+ case 4:
+ strcatbuff(stropt2, "--mirrorlinks ");
+ break;
+ case 5:
+ strcatbuff(stropt2, "--testlinks ");
+ break;
+ case 6:
+ strcatbuff(stropt2, "--update ");
+ break;
+ case 0:
+ return;
+ break;
}
-
+
// Proxy
printf("\nProxy (return=none) :");
- linput(stdin,str,250);
+ linput(stdin, str, 250);
if (strnotempty(str)) {
- while( (a=strchr(str,' ')) ) *a=':'; // port
- if (!strchr(jump_identification(str),':')) {
+ while((a = strchr(str, ' ')))
+ *a = ':'; // port
+ if (!strchr(jump_identification(str), ':')) {
char str2[256];
+
printf("\nProxy port (return=8080) :");
- linput(stdin,str2,250);
- strcatbuff(str,":");
- if (strnotempty(str2)==0)
- strcatbuff(str,"8080");
+ linput(stdin, str2, 250);
+ strcatbuff(str, ":");
+ if (strnotempty(str2) == 0)
+ strcatbuff(str, "8080");
else
- strcatbuff(str,str2);
+ strcatbuff(str, str2);
}
- strcatbuff(stropt2,"-P "); strcatbuff(stropt2,str); strcatbuff(stropt2," ");
+ strcatbuff(stropt2, "-P ");
+ strcatbuff(stropt2, str);
+ strcatbuff(stropt2, " ");
}
-
// Display
- strcatbuff(stropt2," -%v ");
+ strcatbuff(stropt2, " -%v ");
// Wildcards
- printf("\nYou can define wildcards, like: -*.gif +www.*.com/*.zip -*img_*.zip\n");
+ printf
+ ("\nYou can define wildcards, like: -*.gif +www.*.com/*.zip -*img_*.zip\n");
printf("Wildcards (return=none) :");
- linput(stdin,strwild,250);
-
+ linput(stdin, strwild, 250);
+
// Options
do {
- printf("\nYou can define additional options, such as recurse level (-r<number>), separed by blank spaces\n");
+ printf
+ ("\nYou can define additional options, such as recurse level (-r<number>), separed by blank spaces\n");
printf("To see the option list, type help\n");
printf("Additional options (return=none) :");
- linput(stdin,str,250);
- if (strfield2(str,"help")) {
- help("httrack",2);
+ linput(stdin, str, 250);
+ if (strfield2(str, "help")) {
+ help("httrack", 2);
} else if (strnotempty(str)) {
- strcatbuff(stropt2,str);
- strcatbuff(stropt2," ");
+ strcatbuff(stropt2, str);
+ strcatbuff(stropt2, " ");
}
- } while(strfield2(str,"help"));
-
+ } while(strfield2(str, "help"));
+
{
- int argc=1;
- int g=0;
- int i=0;
+ int argc = 1;
+ int g = 0;
+ int i = 0;
+
//
printf("\n");
- if (strlen(stropt)==1)
- stropt[0]='\0'; // aucune
- sprintf(cmd,"%s %s %s %s",urls,stropt,stropt2,strwild);
- printf("---> Wizard command line: httrack %s\n\n",cmd);
+ if (strlen(stropt) == 1)
+ stropt[0] = '\0'; // aucune
+ sprintf(cmd, "%s %s %s %s", urls, stropt, stropt2, strwild);
+ printf("---> Wizard command line: httrack %s\n\n", cmd);
printf("Ready to launch the mirror? (Y/n) :");
fflush(stdout);
- linput(stdin,str,250);
+ linput(stdin, str, 250);
if (strnotempty(str)) {
- if (!((str[0]=='y') || (str[0]=='Y')))
- return ;
+ if (!((str[0] == 'y') || (str[0] == 'Y')))
+ return;
}
printf("\n");
// couper en morceaux
- argv[0]="winhttrack";
- argv[1]=cmd;
- argc++;
- while(cmd[i]) {
- if(cmd[i]=='\"') g=!g;
- if(cmd[i]==' '){
- if(!g){
- cmd[i]='\0';
- argv[argc++]=cmd+i+1;
+ argv[0] = "winhttrack";
+ argv[1] = cmd;
+ argc++;
+ while(cmd[i]) {
+ if (cmd[i] == '\"')
+ g = !g;
+ if (cmd[i] == ' ') {
+ if (!g) {
+ cmd[i] = '\0';
+ argv[argc++] = cmd + i + 1;
}
- }
+ }
i++;
}
- hts_main(argc,argv);
+ hts_main(argc, argv);
}
- //} else {
- // help("httrack",1);
+ //} else {
+ // help("httrack",1);
}
/* Free buffers */
@@ -296,33 +328,36 @@ void help_wizard(httrackp* opt) {
freet(cmd);
freet(str);
}
-int help_query(char* list,int def) {
+int help_query(char *list, int def) {
char s[256];
- char* a;
+ char *a;
int opt;
- int n=1;
- a=list;
+ int n = 1;
+
+ a = list;
while(strnotempty(a)) {
- char* b = strchr(a,'|');
+ char *b = strchr(a, '|');
+
if (b) {
char str[256];
- str[0]='\0';
+
+ str[0] = '\0';
//
- strncatbuff(str,a,(int) (b - a));
- if (n==def)
- printf("(enter)\t%d\t%s\n",n++,str);
+ strncatbuff(str, a, (int) (b - a));
+ if (n == def)
+ printf("(enter)\t%d\t%s\n", n++, str);
else
- printf("\t%d\t%s\n",n++,str);
- a=b+1;
+ printf("\t%d\t%s\n", n++, str);
+ a = b + 1;
} else
- a=list+strlen(list);
+ a = list + strlen(list);
}
printf("\t0\tQuit");
do {
printf("\n: ");
fflush(stdout);
- linput(stdin,s,250);
- } while ((strnotempty(s)!=0) && (sscanf(s,"%d",&opt)!=1));
+ linput(stdin, s, 250);
+ } while((strnotempty(s) != 0) && (sscanf(s, "%d", &opt) != 1));
if (strnotempty(s))
return opt;
else
@@ -330,40 +365,47 @@ int help_query(char* list,int def) {
}
// Capture d'URL
-void help_catchurl(const char* dest_path) {
- char BIGSTK adr_prox[HTS_URLMAXSIZE*2];
+void help_catchurl(const char *dest_path) {
+ char BIGSTK adr_prox[HTS_URLMAXSIZE * 2];
int port_prox;
- T_SOC soc=catch_url_init_std(&port_prox,adr_prox);
- if (soc!=INVALID_SOCKET) {
- char BIGSTK url[HTS_URLMAXSIZE*2];
+ T_SOC soc = catch_url_init_std(&port_prox, adr_prox);
+
+ if (soc != INVALID_SOCKET) {
+ char BIGSTK url[HTS_URLMAXSIZE * 2];
char method[32];
char BIGSTK data[32768];
- url[0]=method[0]=data[0]='\0';
+
+ url[0] = method[0] = data[0] = '\0';
//
- printf("Okay, temporary proxy installed.\nSet your browser's preferences to:\n\n");
- printf("\tProxy's address: \t%s\n\tProxy's port: \t%d\n",adr_prox,port_prox);
+ printf
+ ("Okay, temporary proxy installed.\nSet your browser's preferences to:\n\n");
+ printf("\tProxy's address: \t%s\n\tProxy's port: \t%d\n", adr_prox,
+ port_prox);
//
- if (catch_url(soc,url,method,data)) {
- char BIGSTK dest[HTS_URLMAXSIZE*2];
- int i=0;
+ if (catch_url(soc, url, method, data)) {
+ char BIGSTK dest[HTS_URLMAXSIZE * 2];
+ int i = 0;
+
do {
- sprintf(dest,"%s%s%d",dest_path,"hts-post",i);
+ sprintf(dest, "%s%s%d", dest_path, "hts-post", i);
i++;
} while(fexist(dest));
{
- FILE* fp=fopen(dest,"wb");
+ FILE *fp = fopen(dest, "wb");
+
if (fp) {
- fwrite(data,strlen(data),1,fp);
+ fwrite(data, strlen(data), 1, fp);
fclose(fp);
}
}
// former URL!
{
- char BIGSTK finalurl[HTS_URLMAXSIZE*2];
+ char BIGSTK finalurl[HTS_URLMAXSIZE * 2];
+
escape_check_url(dest);
- sprintf(finalurl,"%s"POSTTOK"file:%s",url,dest);
- printf("\nThe URL is: \"%s\"\n",finalurl);
- printf("You can capture it through: httrack \"%s\"\n",finalurl);
+ sprintf(finalurl, "%s" POSTTOK "file:%s", url, dest);
+ printf("\nThe URL is: \"%s\"\n", finalurl);
+ printf("You can capture it through: httrack \"%s\"\n", finalurl);
}
} else
printf("Unable to analyse the URL\n");
@@ -377,13 +419,16 @@ void help_catchurl(const char* dest_path) {
}
// Créer un index.html vide
-void make_empty_index(char* str) {
+void make_empty_index(char *str) {
#if 0
- if (!fexist(fconcat(str,"index.html"))) {
- FILE* fp=fopen(fconcat(str,"index.html"),"wb");
+ if (!fexist(fconcat(str, "index.html"))) {
+ FILE *fp = fopen(fconcat(str, "index.html"), "wb");
+
if (fp) {
- fprintf(fp,"<!-- "HTS_TOPINDEX" -->"CRLF);
- fprintf(fp,"<HTML><BODY>Index is empty!<BR>(File used to index all HTTrack projects)</BODY></HTML>"CRLF);
+ fprintf(fp, "<!-- " HTS_TOPINDEX " -->" CRLF);
+ fprintf(fp,
+ "<HTML><BODY>Index is empty!<BR>(File used to index all HTTrack projects)</BODY></HTML>"
+ CRLF);
fclose(fp);
}
}
@@ -392,24 +437,30 @@ void make_empty_index(char* str) {
// mini-aide (h: help)
// y
-void help(char* app,int more) {
+void help(char *app, int more) {
char info[2048];
+
infomsg("");
if (more)
infomsg("1");
if (more != 2) {
- sprintf(info, "HTTrack version "HTTRACK_VERSION"%s (compiled "__DATE__")", hts_is_available());
+ sprintf(info,
+ "HTTrack version " HTTRACK_VERSION "%s (compiled " __DATE__ ")",
+ hts_is_available());
infomsg(info);
#ifdef HTTRACK_AFF_WARNING
- infomsg("NOTE: "HTTRACK_AFF_WARNING);
+ infomsg("NOTE: " HTTRACK_AFF_WARNING);
#endif
- sprintf(info,"\tusage: %s <URLs> [-option] [+<URL_FILTER>] [-<URL_FILTER>] [+<mime:MIME_FILTER>] [-<mime:MIME_FILTER>]",app);
+ sprintf(info,
+ "\tusage: %s <URLs> [-option] [+<URL_FILTER>] [-<URL_FILTER>] [+<mime:MIME_FILTER>] [-<mime:MIME_FILTER>]",
+ app);
infomsg(info);
infomsg("\twith options listed below: (* is the default value)");
infomsg("");
}
infomsg("General options:");
- infomsg(" O path for mirror/logfiles+cache (-O path_mirror[,path_cache_and_logfiles])");
+ infomsg
+ (" O path for mirror/logfiles+cache (-O path_mirror[,path_cache_and_logfiles])");
#ifndef _WIN32
infomsg(" %O chroot path to, must be r00t (-%O root_path)");
#endif
@@ -419,7 +470,8 @@ void help(char* app,int more) {
infomsg(" W mirror web sites, semi-automatic (asks questions)");
infomsg(" g just get files (saved in the current directory)");
infomsg(" i continue an interrupted mirror using the cache");
- infomsg(" Y mirror ALL links located in the first level pages (mirror links)");
+ infomsg
+ (" Y mirror ALL links located in the first level pages (mirror links)");
infomsg("");
infomsg("Proxy options:");
infomsg(" P proxy use (-P proxy:port or -P user:pass@proxy:port)");
@@ -435,69 +487,103 @@ void help(char* app,int more) {
infomsg(" EN maximum mirror time in seconds (60=1 minute, 3600=1 hour)");
infomsg(" AN maximum transfer rate in bytes/seconds (1000=1KB/s max)");
infomsg(" %cN maximum number of connections/seconds (*%c10)");
- infomsg(" GN pause transfer if N bytes reached, and wait until lock file is deleted");
+ infomsg
+ (" GN pause transfer if N bytes reached, and wait until lock file is deleted");
#if HTS_USEMMS
- infomsg(" %mN maximum mms stream download time in seconds (60=1 minute, 3600=1 hour)");
+ infomsg
+ (" %mN maximum mms stream download time in seconds (60=1 minute, 3600=1 hour)");
#endif
infomsg("");
infomsg("Flow control:");
infomsg(" cN number of multiple connections (*c8)");
- infomsg(" TN timeout, number of seconds after a non-responding link is shutdown");
- infomsg(" RN number of retries, in case of timeout or non-fatal errors (*R1)");
- infomsg(" JN traffic jam control, minimum transfert rate (bytes/seconds) tolerated for a link");
- infomsg(" HN host is abandonned if: 0=never, 1=timeout, 2=slow, 3=timeout or slow");
+ infomsg
+ (" TN timeout, number of seconds after a non-responding link is shutdown");
+ infomsg
+ (" RN number of retries, in case of timeout or non-fatal errors (*R1)");
+ infomsg
+ (" JN traffic jam control, minimum transfert rate (bytes/seconds) tolerated for a link");
+ infomsg
+ (" HN host is abandonned if: 0=never, 1=timeout, 2=slow, 3=timeout or slow");
infomsg("");
infomsg("Links options:");
- infomsg(" %P *extended parsing, attempt to parse all links, even in unknown tags or Javascript (%P0 don't use)");
- infomsg(" n get non-html files 'near' an html file (ex: an image located outside)");
+ infomsg
+ (" %P *extended parsing, attempt to parse all links, even in unknown tags or Javascript (%P0 don't use)");
+ infomsg
+ (" n get non-html files 'near' an html file (ex: an image located outside)");
infomsg(" t test all URLs (even forbidden ones)");
- infomsg(" %L <file> add all URL located in this text file (one URL per line)");
- infomsg(" %S <file> add all scan rules located in this text file (one scan rule per line)");
+ infomsg
+ (" %L <file> add all URL located in this text file (one URL per line)");
+ infomsg
+ (" %S <file> add all scan rules located in this text file (one scan rule per line)");
infomsg("");
infomsg("Build options:");
infomsg(" NN structure type (0 *original structure, 1+: see below)");
infomsg(" or user defined structure (-N \"%h%p/%n%q.%t\")");
- infomsg(" %N delayed type check, don't make any link test but wait for files download to start instead (experimental) (%N0 don't use, %N1 use for unknown extensions, * %N2 always use)");
- infomsg(" %D cached delayed type check, don't wait for remote type during updates, to speedup them (%D0 wait, * %D1 don't wait)");
+ infomsg
+ (" %N delayed type check, don't make any link test but wait for files download to start instead (experimental) (%N0 don't use, %N1 use for unknown extensions, * %N2 always use)");
+ infomsg
+ (" %D cached delayed type check, don't wait for remote type during updates, to speedup them (%D0 wait, * %D1 don't wait)");
infomsg(" %M generate a RFC MIME-encapsulated full-archive (.mht)");
- infomsg(" LN long names (L1 *long names / L0 8-3 conversion / L2 ISO9660 compatible)");
- infomsg(" KN keep original links (e.g. http://www.adr/link) (K0 *relative link, K absolute links, K4 original links, K3 absolute URI links, K5 transparent proxy link)");
+ infomsg
+ (" LN long names (L1 *long names / L0 8-3 conversion / L2 ISO9660 compatible)");
+ infomsg
+ (" KN keep original links (e.g. http://www.adr/link) (K0 *relative link, K absolute links, K4 original links, K3 absolute URI links, K5 transparent proxy link)");
infomsg(" x replace external html links by error pages");
- infomsg(" %x do not include any password for external password protected websites (%x0 include)");
- infomsg(" %q *include query string for local files (useless, for information purpose only) (%q0 don't include)");
- infomsg(" o *generate output html file in case of error (404..) (o0 don't generate)");
+ infomsg
+ (" %x do not include any password for external password protected websites (%x0 include)");
+ infomsg
+ (" %q *include query string for local files (useless, for information purpose only) (%q0 don't include)");
+ infomsg
+ (" o *generate output html file in case of error (404..) (o0 don't generate)");
infomsg(" X *purge old files after update (X0 keep delete)");
infomsg(" %p preserve html files 'as is' (identical to '-K4 -%F \"\"')");
infomsg(" %T links conversion to UTF-8");
infomsg("");
infomsg("Spider options:");
infomsg(" bN accept cookies in cookies.txt (0=do not accept,* 1=accept)");
- infomsg(" u check document type if unknown (cgi,asp..) (u0 don't check, * u1 check but /, u2 check always)");
- infomsg(" j *parse Java Classes (j0 don't parse, bitmask: |1 parse default, |2 don't parse .class |4 don't parse .js |8 don't be aggressive)");
- infomsg(" sN follow robots.txt and meta robots tags (0=never,1=sometimes,* 2=always, 3=always (even strict rules))");
- infomsg(" %h force HTTP/1.0 requests (reduce update features, only for old servers or proxies)");
- infomsg(" %k use keep-alive if possible, greately reducing latency for small files and test requests (%k0 don't use)");
- infomsg(" %B tolerant requests (accept bogus responses on some servers, but not standard!)");
- infomsg(" %s update hacks: various hacks to limit re-transfers when updating (identical size, bogus response..)");
- infomsg(" %u url hacks: various hacks to limit duplicate URLs (strip //, www.foo.com==foo.com..)");
- infomsg(" %A assume that a type (cgi,asp..) is always linked with a mime type (-%A php3,cgi=text/html;dat,bin=application/x-zip)");
- infomsg(" shortcut: '--assume standard' is equivalent to -%A "HTS_ASSUME_STANDARD);
- infomsg(" can also be used to force a specific file type: --assume foo.cgi=text/html");
- infomsg(" @iN internet protocol (0=both ipv6+ipv4, 4=ipv4 only, 6=ipv6 only)");
- infomsg(" %w disable a specific external mime module (-%w htsswf -%w htsjava)");
+ infomsg
+ (" u check document type if unknown (cgi,asp..) (u0 don't check, * u1 check but /, u2 check always)");
+ infomsg
+ (" j *parse Java Classes (j0 don't parse, bitmask: |1 parse default, |2 don't parse .class |4 don't parse .js |8 don't be aggressive)");
+ infomsg
+ (" sN follow robots.txt and meta robots tags (0=never,1=sometimes,* 2=always, 3=always (even strict rules))");
+ infomsg
+ (" %h force HTTP/1.0 requests (reduce update features, only for old servers or proxies)");
+ infomsg
+ (" %k use keep-alive if possible, greately reducing latency for small files and test requests (%k0 don't use)");
+ infomsg
+ (" %B tolerant requests (accept bogus responses on some servers, but not standard!)");
+ infomsg
+ (" %s update hacks: various hacks to limit re-transfers when updating (identical size, bogus response..)");
+ infomsg
+ (" %u url hacks: various hacks to limit duplicate URLs (strip //, www.foo.com==foo.com..)");
+ infomsg
+ (" %A assume that a type (cgi,asp..) is always linked with a mime type (-%A php3,cgi=text/html;dat,bin=application/x-zip)");
+ infomsg(" shortcut: '--assume standard' is equivalent to -%A "
+ HTS_ASSUME_STANDARD);
+ infomsg
+ (" can also be used to force a specific file type: --assume foo.cgi=text/html");
+ infomsg
+ (" @iN internet protocol (0=both ipv6+ipv4, 4=ipv4 only, 6=ipv6 only)");
+ infomsg
+ (" %w disable a specific external mime module (-%w htsswf -%w htsjava)");
infomsg("");
infomsg("Browser ID:");
- infomsg(" F user-agent field sent in HTTP headers (-F \"user-agent name\")");
+ infomsg
+ (" F user-agent field sent in HTTP headers (-F \"user-agent name\")");
infomsg(" %R default referer field sent in HTTP headers");
infomsg(" %E from email address sent in HTTP headers");
- infomsg(" %F footer string in Html code (-%F \"Mirrored [from host %s [file %s [at %s]]]\"");
+ infomsg
+ (" %F footer string in Html code (-%F \"Mirrored [from host %s [file %s [at %s]]]\"");
infomsg(" %l preffered language (-%l \"fr, en, jp, *\"");
infomsg("");
infomsg("Log, index, cache");
- infomsg(" C create/use a cache for updates and retries (C0 no cache,C1 cache is prioritary,* C2 test update before)");
+ infomsg
+ (" C create/use a cache for updates and retries (C0 no cache,C1 cache is prioritary,* C2 test update before)");
infomsg(" k store all files in cache (not useful if files on disk)");
infomsg(" %n do not re-download locally erased files");
- infomsg(" %v display on screen filenames downloaded (in realtime) - * %v1 short version - %v2 full animation");
+ infomsg
+ (" %v display on screen filenames downloaded (in realtime) - * %v1 short version - %v2 full animation");
infomsg(" Q no log - quiet mode");
infomsg(" q no questions - quiet mode");
infomsg(" z log - extra infos");
@@ -517,7 +603,7 @@ void help(char* app,int more) {
infomsg(" *p3 save all files");
infomsg(" p7 get html files before, then treat other files");
infomsg(" S stay on the same directory");
- infomsg(" D *can only go down into subdirs");
+ infomsg(" D *can only go down into subdirs");
infomsg(" U can only go to upper directories");
infomsg(" B can both go up&down into the directory structure");
infomsg(" a *stay on the same address");
@@ -548,15 +634,19 @@ void help(char* app,int more) {
infomsg(" #Z generate transfer rate statictics every minutes");
infomsg(" #! execute a shell command (-#! \"echo hello\")");
infomsg("");
- infomsg("Dangerous options: (do NOT use unless you exactly know what you are doing)");
- infomsg(" %! bypass built-in security limits aimed to avoid bandwith abuses (bandwidth, simultaneous connections)");
+ infomsg
+ ("Dangerous options: (do NOT use unless you exactly know what you are doing)");
+ infomsg
+ (" %! bypass built-in security limits aimed to avoid bandwith abuses (bandwidth, simultaneous connections)");
infomsg(" IMPORTANT NOTE: DANGEROUS OPTION, ONLY SUITABLE FOR EXPERTS");
infomsg(" USE IT WITH EXTREME CARE");
infomsg("");
infomsg("Command-line specific options:");
- infomsg(" V execute system command after each files ($0 is the filename: -V \"rm \\$0\")");
+ infomsg
+ (" V execute system command after each files ($0 is the filename: -V \"rm \\$0\")");
infomsg(" %U run the engine with another id when called as root (-%U smith)");
- infomsg(" %W use an external library function as a wrapper (-%W myfoo.so[,myparameters])");
+ infomsg
+ (" %W use an external library function as a wrapper (-%W myfoo.so[,myparameters])");
/* infomsg(" %O do a chroot before setuid"); */
infomsg("");
infomsg("Details: Option N");
@@ -564,19 +654,27 @@ void help(char* app,int more) {
infomsg(" N1 HTML in web/, images/other files in web/images/");
infomsg(" N2 HTML in web/HTML, images/other in web/images");
infomsg(" N3 HTML in web/, images/other in web/");
- infomsg(" N4 HTML in web/, images/other in web/xxx, where xxx is the file extension (all gif will be placed onto web/gif, for example)");
+ infomsg
+ (" N4 HTML in web/, images/other in web/xxx, where xxx is the file extension (all gif will be placed onto web/gif, for example)");
infomsg(" N5 Images/other in web/xxx and HTML in web/HTML");
infomsg(" N99 All files in web/, with random names (gadget !)");
infomsg(" N100 Site-structure, without www.domain.xxx/");
- infomsg(" N101 Identical to N1 exept that \"web\" is replaced by the site's name");
- infomsg(" N102 Identical to N2 exept that \"web\" is replaced by the site's name");
- infomsg(" N103 Identical to N3 exept that \"web\" is replaced by the site's name");
- infomsg(" N104 Identical to N4 exept that \"web\" is replaced by the site's name");
- infomsg(" N105 Identical to N5 exept that \"web\" is replaced by the site's name");
- infomsg(" N199 Identical to N99 exept that \"web\" is replaced by the site's name");
+ infomsg
+ (" N101 Identical to N1 exept that \"web\" is replaced by the site's name");
+ infomsg
+ (" N102 Identical to N2 exept that \"web\" is replaced by the site's name");
+ infomsg
+ (" N103 Identical to N3 exept that \"web\" is replaced by the site's name");
+ infomsg
+ (" N104 Identical to N4 exept that \"web\" is replaced by the site's name");
+ infomsg
+ (" N105 Identical to N5 exept that \"web\" is replaced by the site's name");
+ infomsg
+ (" N199 Identical to N99 exept that \"web\" is replaced by the site's name");
infomsg(" N1001 Identical to N1 exept that there is no \"web\" directory");
infomsg(" N1002 Identical to N2 exept that there is no \"web\" directory");
- infomsg(" N1003 Identical to N3 exept that there is no \"web\" directory (option set for g option)");
+ infomsg
+ (" N1003 Identical to N3 exept that there is no \"web\" directory (option set for g option)");
infomsg(" N1004 Identical to N4 exept that there is no \"web\" directory");
infomsg(" N1005 Identical to N5 exept that there is no \"web\" directory");
infomsg(" N1099 Identical to N99 exept that there is no \"web\" directory");
@@ -593,36 +691,46 @@ void help(char* app,int more) {
infomsg(" '%q' small query string MD5 (16 bits, 4 ascii bytes)");
infomsg(" '%s?' Short name version (ex: %sN)");
infomsg(" '%[param]' param variable in query string");
- infomsg(" '%[param:before:after:empty:notfound]' advanced variable extraction");
+ infomsg
+ (" '%[param:before:after:empty:notfound]' advanced variable extraction");
infomsg("Details: User-defined option N and advanced variable extraction");
- infomsg(" %[param:before:after:empty:notfound]");
+ infomsg(" %[param:before:after:empty:notfound]");
infomsg(" param : parameter name");
infomsg(" before : string to prepend if the parameter was found");
infomsg(" after : string to append if the parameter was found");
- infomsg(" notfound : string replacement if the parameter could not be found");
+ infomsg
+ (" notfound : string replacement if the parameter could not be found");
infomsg(" empty : string replacement if the parameter was empty");
- infomsg(" all fields, except the first one (the parameter name), can be empty");
+ infomsg
+ (" all fields, except the first one (the parameter name), can be empty");
infomsg("");
infomsg("Details: Option K");
infomsg(" K0 foo.cgi?q=45 -> foo4B54.html?q=45 (relative URI, default)");
- infomsg(" K -> http://www.foobar.com/folder/foo.cgi?q=45 (absolute URL)");
+ infomsg
+ (" K -> http://www.foobar.com/folder/foo.cgi?q=45 (absolute URL)");
infomsg(" K3 -> /folder/foo.cgi?q=45 (absolute URI)");
infomsg(" K4 -> foo.cgi?q=45 (original URL)");
- infomsg(" K5 -> http://www.foobar.com/folder/foo4B54.html?q=45 (transparent proxy URL)");
+ infomsg
+ (" K5 -> http://www.foobar.com/folder/foo4B54.html?q=45 (transparent proxy URL)");
infomsg("");
infomsg("Shortcuts:");
infomsg("--mirror <URLs> *make a mirror of site(s) (default)");
- infomsg("--get <URLs> get the files indicated, do not seek other URLs (-qg)");
+ infomsg
+ ("--get <URLs> get the files indicated, do not seek other URLs (-qg)");
infomsg("--list <text file> add all URL located in this text file (-%L)");
infomsg("--mirrorlinks <URLs> mirror all links in 1st level pages (-Y)");
infomsg("--testlinks <URLs> test links in pages (-r1p0C0I0t)");
- infomsg("--spider <URLs> spider site(s), to test links: reports Errors & Warnings (-p0C0I0t)");
+ infomsg
+ ("--spider <URLs> spider site(s), to test links: reports Errors & Warnings (-p0C0I0t)");
infomsg("--testsite <URLs> identical to --spider");
- infomsg("--skeleton <URLs> make a mirror, but gets only html files (-p1)");
+ infomsg
+ ("--skeleton <URLs> make a mirror, but gets only html files (-p1)");
infomsg("--update update a mirror, without confirmation (-iC2)");
- infomsg("--continue continue a mirror, without confirmation (-iC1)");
+ infomsg
+ ("--continue continue a mirror, without confirmation (-iC1)");
infomsg("");
- infomsg("--catchurl create a temporary proxy to capture an URL or a form post URL");
+ infomsg
+ ("--catchurl create a temporary proxy to capture an URL or a form post URL");
infomsg("--clean erase cache & log files");
infomsg("");
infomsg("--http10 force http/1.0 requests (-%h)");
@@ -633,13 +741,17 @@ void help(char* app,int more) {
infomsg("example: httrack www.someweb.com/bob/");
infomsg("means: mirror site www.someweb.com/bob/ and only this site");
infomsg("");
- infomsg("example: httrack www.someweb.com/bob/ www.anothertest.com/mike/ +*.com/*.jpg -mime:application/*");
- infomsg("means: mirror the two sites together (with shared links) and accept any .jpg files on .com sites");
+ infomsg
+ ("example: httrack www.someweb.com/bob/ www.anothertest.com/mike/ +*.com/*.jpg -mime:application/*");
+ infomsg
+ ("means: mirror the two sites together (with shared links) and accept any .jpg files on .com sites");
infomsg("");
infomsg("example: httrack www.someweb.com/bob/bobby.html +* -r6");
- infomsg("means get all files starting from bobby.html, with 6 link-depth, and possibility of going everywhere on the web");
+ infomsg
+ ("means get all files starting from bobby.html, with 6 link-depth, and possibility of going everywhere on the web");
infomsg("");
- infomsg("example: httrack www.someweb.com/bob/bobby.html --spider -P proxy.myhost.com:8080");
+ infomsg
+ ("example: httrack www.someweb.com/bob/bobby.html --spider -P proxy.myhost.com:8080");
infomsg("runs the spider on www.someweb.com/bob/bobby.html using a proxy");
infomsg("");
infomsg("example: httrack --update");
@@ -651,16 +763,15 @@ void help(char* app,int more) {
infomsg("example: httrack --continue");
infomsg("continues a mirror in the current folder");
infomsg("");
- sprintf(info, "HTTrack version "HTTRACK_VERSION"%s (compiled "__DATE__")", hts_is_available());
+ sprintf(info, "HTTrack version " HTTRACK_VERSION "%s (compiled " __DATE__ ")",
+ hts_is_available());
infomsg(info);
infomsg("Copyright (C) Xavier Roche and other contributors");
#ifdef HTS_PLATFORM_NAME
- infomsg("[compiled: "HTS_PLATFORM_NAME"]");
+ infomsg("[compiled: " HTS_PLATFORM_NAME "]");
#endif
infomsg(NULL);
// infomsg(" R *relative links (e.g ../link)\n");
// infomsg(" A absolute links (e.g /www.adr/link)\n");
}
-
-