qbs* FUNC_WIKIDLPAGE(qbs*_FUNC_WIKIDLPAGE_STRING_URL,double*_FUNC_WIKIDLPAGE_DOUBLE_TIMEOUT){
qbs *tqbs;
ptrszint tmp_long;
int32 tmp_fileno;
uint32 qbs_tmp_base=qbs_tmp_list_nexti;
uint8 *tmp_mem_static_pointer=mem_static_pointer;
uint32 tmp_cmem_sp=cmem_sp;
#include "data458.txt"
mem_lock *sf_mem_lock;
new_mem_lock();
sf_mem_lock=mem_lock_tmp;
sf_mem_lock->type=3;
libqb_check_stack();
if (is_error_pending()) goto exit_subfunc;
do{
qbs_set(_FUNC_WIKIDLPAGE_STRING_WIKIDLPAGE,qbs_new_txt_len("",0));
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(28182,1157,"wiki_methods.bas");}while(r);
do{
qbs_set(_FUNC_WIKIDLPAGE_STRING_WIK,_FUNC_WIKIDLPAGE_STRING_URL);
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(28182,1158,"wiki_methods.bas");}while(r);
do{
*_FUNC_WIKIDLPAGE_DOUBLE_TIO=*_FUNC_WIKIDLPAGE_DOUBLE_TIMEOUT;
if(!qbevent)break;evnt(28182,1158,"wiki_methods.bas");}while(r);
do{
qbs_set(_FUNC_WIKIDLPAGE_STRING_REDIRDEV,qbs_new_txt_len("/dev/null",9));
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(28182,1159,"wiki_methods.bas");}while(r);
S_69175:;
if ((qbs_cleanup(qbs_tmp_base,-(func_instr(NULL,func__os(),qbs_new_txt_len("WIN",3),0)> 0 )))||is_error_pending()){
if(qbevent){evnt(28182,1159,"wiki_methods.bas");if(r)goto S_69175;}
do{
qbs_set(_FUNC_WIKIDLPAGE_STRING_REDIRDEV,qbs_new_txt_len("NUL",3));
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(28182,1159,"wiki_methods.bas");}while(r);
}
do{
if(!qbevent)break;evnt(28182,1161,"wiki_methods.bas");}while(r);
S_69179:;
while((-(((float)(FUNC_TIMEELAPSEDSINCE(_FUNC_WIKIDLPAGE_DOUBLE_LASTCALL)))<((float)( 0.5E+0 ))))||is_error_pending()){
if(qbevent){evnt(28182,1162,"wiki_methods.bas");if(r)goto S_69179;}
do{
sub__delay( 0.1E+0 );
if(!qbevent)break;evnt(28182,1162,"wiki_methods.bas");}while(r);
ww_continue_8031:;
}
ww_exit_8031:;
do{
*_FUNC_WIKIDLPAGE_DOUBLE_LASTCALL=func_timer( 0.001E+0 ,0|1);
if(!qbevent)break;evnt(28182,1163,"wiki_methods.bas");}while(r);
LABEL_RETRY:;
if(qbevent){evnt(28182,1165,"wiki_methods.bas");r=0;}
S_69183:;
fornext_value8033= 1 ;
fornext_finalvalue8033= 3 ;
fornext_step8033= 1 ;
if (fornext_step8033<0) fornext_step_negative8033=1; else fornext_step_negative8033=0;
if (is_error_pending()) goto fornext_error8033;
goto fornext_entrylabel8033;
while(1){
fornext_value8033=fornext_step8033+(*_FUNC_WIKIDLPAGE_INTEGER_R);
fornext_entrylabel8033:
*_FUNC_WIKIDLPAGE_INTEGER_R=fornext_value8033;
if (fornext_step_negative8033){
if (fornext_value8033<fornext_finalvalue8033) break;
}else{
if (fornext_value8033>fornext_finalvalue8033) break;
}
fornext_error8033:;
if(qbevent){evnt(28182,1166,"wiki_methods.bas");if(r)goto S_69183;}
do{
*_FUNC_WIKIDLPAGE_LONG_CH=func__openclient(_FUNC_WIKIDLPAGE_STRING_WIK);
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(28182,1167,"wiki_methods.bas");}while(r);
S_69185:;
if ((-(*_FUNC_WIKIDLPAGE_LONG_CH== 0 ))||is_error_pending()){
if(qbevent){evnt(28182,1168,"wiki_methods.bas");if(r)goto S_69185;}
do{
sub__delay( 3.33E+0 );
if(!qbevent)break;evnt(28182,1168,"wiki_methods.bas");}while(r);
}else{
do{
goto fornext_exit_8032;
if(!qbevent)break;evnt(28182,1168,"wiki_methods.bas");}while(r);
}
fornext_continue_8032:;
}
fornext_exit_8032:;
S_69191:;
if ((-(*__LONG_HELP_RECACHING< 2 ))||is_error_pending()){
if(qbevent){evnt(28182,1170,"wiki_methods.bas");if(r)goto S_69191;}
S_69192:;
if ((qbs_cleanup(qbs_tmp_base,(-(*_FUNC_WIKIDLPAGE_LONG_CH== 0 ))&(qbs_equal(qbs_lcase(qbs_left(_FUNC_WIKIDLPAGE_STRING_WIK, 8 )),qbs_new_txt_len("https://",8)))))||is_error_pending()){
if(qbevent){evnt(28182,1171,"wiki_methods.bas");if(r)goto S_69192;}
S_69193:;
if ((qbs_cleanup(qbs_tmp_base,-(func__shellhide(qbs_add(qbs_new_txt_len("curl --version >",16),_FUNC_WIKIDLPAGE_STRING_REDIRDEV))!= 0 )))||is_error_pending()){
if(qbevent){evnt(28182,1172,"wiki_methods.bas");if(r)goto S_69193;}
S_69194:;
if ((qbs_cleanup(qbs_tmp_base,-(func__guiMessageBox(qbs_new_txt_len("QB64-PE Help",12),qbs_new_txt_len("Can't make secure connection (https:) to Wiki, shall the IDE use unsecure (http:) instead?",90),qbs_new_txt_len("yesno",5),qbs_new_txt_len("warning",7),NULL,0|1|2|4|8)== 1 )))||is_error_pending()){
if(qbevent){evnt(28182,1174,"wiki_methods.bas");if(r)goto S_69194;}
S_69195:;
if ((qbs_cleanup(qbs_tmp_base,-(func__guiMessageBox(qbs_new_txt_len("QB64-PE Help",12),qbs_new_txt_len("Do you wanna save your choice permanently for the future?",57),qbs_new_txt_len("yesno",5),qbs_new_txt_len("question",8),NULL,0|1|2|4|8)== 1 )))||is_error_pending()){
if(qbevent){evnt(28182,1175,"wiki_methods.bas");if(r)goto S_69195;}
do{
qbs_set(__STRING_WIKIBASEADDRESS,qbs_add(qbs_new_txt_len("http://",7),func_mid(__STRING_WIKIBASEADDRESS, 9 ,NULL,0)));
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(28182,1176,"wiki_methods.bas");}while(r);
do{
SUB_WRITECONFIGSETTING(__STRING_GENERALSETTINGSSECTION,qbs_new_txt_len("WikiBaseAddress",15),__STRING_WIKIBASEADDRESS);
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(28182,1177,"wiki_methods.bas");}while(r);
}
do{
qbs_set(_FUNC_WIKIDLPAGE_STRING_WIK,qbs_add(qbs_new_txt_len("http://",7),func_mid(_FUNC_WIKIDLPAGE_STRING_WIK, 9 ,NULL,0)));
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(28182,1179,"wiki_methods.bas");}while(r);
do{
goto LABEL_RETRY;
if(!qbevent)break;evnt(28182,1179,"wiki_methods.bas");}while(r);
}
}
}
}
S_69205:;
if ((-(*_FUNC_WIKIDLPAGE_LONG_CH== 0 ))||is_error_pending()){
if(qbevent){evnt(28182,1184,"wiki_methods.bas");if(r)goto S_69205;}
do{
goto LABEL_ONELASTCHANCE;
if(!qbevent)break;evnt(28182,1184,"wiki_methods.bas");}while(r);
}
S_69208:;
if ((-(func__statusCode(*_FUNC_WIKIDLPAGE_LONG_CH)== 200 ))||is_error_pending()){
if(qbevent){evnt(28182,1186,"wiki_methods.bas");if(r)goto S_69208;}
do{
qbs_set(_FUNC_WIKIDLPAGE_STRING_RES,qbs_new_txt_len("",0));
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(28182,1187,"wiki_methods.bas");}while(r);
do{
*_FUNC_WIKIDLPAGE_DOUBLE_ST=func_timer( 0.001E+0 ,0|1);
if(!qbevent)break;evnt(28182,1187,"wiki_methods.bas");}while(r);
S_69211:;
do{
if(qbevent){evnt(28182,1188,"wiki_methods.bas");if(r)goto S_69211;}
do{
sub__delay( 0.05E+0 );
if(!qbevent)break;evnt(28182,1189,"wiki_methods.bas");}while(r);
do{
sub_get2(*_FUNC_WIKIDLPAGE_LONG_CH,NULL,_FUNC_WIKIDLPAGE_STRING_REC,0);
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(28182,1190,"wiki_methods.bas");}while(r);
S_69214:;
if ((qbs_cleanup(qbs_tmp_base,-(_FUNC_WIKIDLPAGE_STRING_REC->len> 0 )))||is_error_pending()){
if(qbevent){evnt(28182,1191,"wiki_methods.bas");if(r)goto S_69214;}
do{
*_FUNC_WIKIDLPAGE_DOUBLE_ST=func_timer( 0.001E+0 ,0|1);
if(!qbevent)break;evnt(28182,1191,"wiki_methods.bas");}while(r);
}
do{
qbs_set(_FUNC_WIKIDLPAGE_STRING_RES,qbs_add(_FUNC_WIKIDLPAGE_STRING_RES,_FUNC_WIKIDLPAGE_STRING_REC));
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(28182,1192,"wiki_methods.bas");}while(r);
S_69218:;
if ((func_eof(*_FUNC_WIKIDLPAGE_LONG_CH))||is_error_pending()){
if(qbevent){evnt(28182,1193,"wiki_methods.bas");if(r)goto S_69218;}
do{
qbs_set(_FUNC_WIKIDLPAGE_STRING_WIKIDLPAGE,_FUNC_WIKIDLPAGE_STRING_RES);
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(28182,1194,"wiki_methods.bas");}while(r);
do{
goto dl_exit_8034;
if(!qbevent)break;evnt(28182,1194,"wiki_methods.bas");}while(r);
}
S_69222:;
if ((-((*_FUNC_WIKIDLPAGE_DOUBLE_ST+*_FUNC_WIKIDLPAGE_DOUBLE_TIO)>=( 86400 )))||is_error_pending()){
if(qbevent){evnt(28182,1196,"wiki_methods.bas");if(r)goto S_69222;}
do{
*_FUNC_WIKIDLPAGE_DOUBLE_ST=*_FUNC_WIKIDLPAGE_DOUBLE_ST- 86400 ;
if(!qbevent)break;evnt(28182,1196,"wiki_methods.bas");}while(r);
}
S_69225:;
dl_continue_8034:;
}while((!(-(((float)((func_timer( 0.001E+0 ,0|1))))>((float)((*_FUNC_WIKIDLPAGE_DOUBLE_ST+*_FUNC_WIKIDLPAGE_DOUBLE_TIO))))))&&(!is_error_pending()));
dl_exit_8034:;
if(qbevent){evnt(28182,1197,"wiki_methods.bas");if(r)goto S_69225;}
}
do{
sub_close(*_FUNC_WIKIDLPAGE_LONG_CH,1);
if(!qbevent)break;evnt(28182,1199,"wiki_methods.bas");}while(r);
do{
goto exit_subfunc;
if(!qbevent)break;evnt(28182,1200,"wiki_methods.bas");}while(r);
LABEL_ONELASTCHANCE:;
if(qbevent){evnt(28182,1202,"wiki_methods.bas");r=0;}
S_69229:;
if ((-(*__LONG_HELP_RECACHING< 2 ))||is_error_pending()){
if(qbevent){evnt(28182,1215,"wiki_methods.bas");if(r)goto S_69229;}
S_69230:;
if ((qbs_cleanup(qbs_tmp_base,-(func__shellhide(qbs_add(qbs_new_txt_len("curl --version >",16),_FUNC_WIKIDLPAGE_STRING_REDIRDEV))== 0 )))||is_error_pending()){
if(qbevent){evnt(28182,1216,"wiki_methods.bas");if(r)goto S_69230;}
S_69231:;
if ((qbs_cleanup(qbs_tmp_base,qbs_equal(qbs_lcase(qbs_left(_FUNC_WIKIDLPAGE_STRING_WIK, 7 )),qbs_new_txt_len("http://",7))))||is_error_pending()){
if(qbevent){evnt(28182,1218,"wiki_methods.bas");if(r)goto S_69231;}
do{
qbs_set(_FUNC_WIKIDLPAGE_STRING_WIK,qbs_add(qbs_new_txt_len("https://",8),func_mid(_FUNC_WIKIDLPAGE_STRING_WIK, 8 ,NULL,0)));
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(28182,1218,"wiki_methods.bas");}while(r);
}
do{
qbs_set(_FUNC_WIKIDLPAGE_STRING_RESPONSEFILE,qbs_add(__STRING_CACHE_FOLDER,qbs_new_txt_len("/curlResponse.txt",17)));
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(28182,1220,"wiki_methods.bas");}while(r);
do{
sub_shell2(qbs_add(qbs_add(qbs_add(qbs_add(qbs_add(qbs_add(qbs_add(qbs_new_txt_len("curl --silent --retry 3 -o ",27),func_chr( 34 )),_FUNC_WIKIDLPAGE_STRING_RESPONSEFILE),func_chr( 34 )),qbs_new_txt_len(" ",1)),func_chr( 34 )),_FUNC_WIKIDLPAGE_STRING_WIK),func_chr( 34 )),2);
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(28182,1221,"wiki_methods.bas");}while(r);
S_69236:;
if ((qbs_cleanup(qbs_tmp_base,func__fileexists(_FUNC_WIKIDLPAGE_STRING_RESPONSEFILE)))||is_error_pending()){
if(qbevent){evnt(28182,1222,"wiki_methods.bas");if(r)goto S_69236;}
do{
qbs_set(_FUNC_WIKIDLPAGE_STRING_WIKIDLPAGE,func__readfile(_FUNC_WIKIDLPAGE_STRING_RESPONSEFILE));
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(28182,1224,"wiki_methods.bas");}while(r);
do{
sub_kill(_FUNC_WIKIDLPAGE_STRING_RESPONSEFILE);
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(28182,1225,"wiki_methods.bas");}while(r);
}
}
}
exit_subfunc:;
free_mem_lock(sf_mem_lock);
#include "free458.txt"
if ((tmp_mem_static_pointer>=mem_static)&&(tmp_mem_static_pointer<=mem_static_limit)) mem_static_pointer=tmp_mem_static_pointer; else mem_static_pointer=mem_static;
cmem_sp=tmp_cmem_sp;
qbs_maketmp(_FUNC_WIKIDLPAGE_STRING_WIKIDLPAGE);return _FUNC_WIKIDLPAGE_STRING_WIKIDLPAGE;
}
