void SUB_GENERATEMACOSLOGSCRIPT(qbs*_SUB_GENERATEMACOSLOGSCRIPT_STRING_EXE,qbs*_SUB_GENERATEMACOSLOGSCRIPT_STRING_CMDSTR,qbs*_SUB_GENERATEMACOSLOGSCRIPT_STRING_SCRIPT){
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 "data267.txt"
mem_lock *sf_mem_lock;
new_mem_lock();
sf_mem_lock=mem_lock_tmp;
sf_mem_lock->type=3;
if (is_error_pending()) goto exit_subfunc;
do{
qbs_set(error_handler_history, qbs_add(qbs_add(qbs_str((int32)(error_goto_line)), qbs_new_txt_len("|", 1)), error_handler_history));
qbs_cleanup(qbs_tmp_base, 0);
error_goto_line=12;
if(!qbevent)break;evnt(25762,31,"terminal.bas");}while(r);
do{
sub_kill(_SUB_GENERATEMACOSLOGSCRIPT_STRING_SCRIPT);
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(25762,32,"terminal.bas");}while(r);
do{
error_goto_line = qbr(qbs_val<uint64_t>(error_handler_history));
qbs_set(error_handler_history, func_mid(error_handler_history, func_instr(NULL, error_handler_history, qbs_new_txt_len("|", 1), 0) + 1 , NULL, 0));
qbs_cleanup(qbs_tmp_base, 0);
if(!qbevent)break;evnt(25762,33,"terminal.bas");}while(r);
do{
sub__delay( 0.05E+0 );
if(!qbevent)break;evnt(25762,35,"terminal.bas");}while(r);
do{
*_SUB_GENERATEMACOSLOGSCRIPT_LONG_FF=func_freefile();
if(!qbevent)break;evnt(25762,37,"terminal.bas");}while(r);
do{
sub_open(_SUB_GENERATEMACOSLOGSCRIPT_STRING_SCRIPT, 4 ,NULL,NULL,*_SUB_GENERATEMACOSLOGSCRIPT_LONG_FF,NULL,0);
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(25762,38,"terminal.bas");}while(r);
S_39376:;
if ((*__BYTE_LOGGINGENABLED)||is_error_pending()){
if(qbevent){evnt(25762,40,"terminal.bas");if(r)goto S_39376;}
do{
tab_spc_cr_size=2;
tab_fileno=tmp_fileno=*_SUB_GENERATEMACOSLOGSCRIPT_LONG_FF;
if (is_error_pending()) goto skip4642;
sub_file_print(tmp_fileno,qbs_new_txt_len("export QB64PE_LOG_LEVEL=",24), 0, 0, 0);
if (is_error_pending()) goto skip4642;
sub_file_print(tmp_fileno,qbs_new_txt_len("\042",1), 0, 0, 0);
if (is_error_pending()) goto skip4642;
sub_file_print(tmp_fileno,__STRING_LOGMINLEVEL, 0, 0, 0);
if (is_error_pending()) goto skip4642;
sub_file_print(tmp_fileno,qbs_new_txt_len("\042",1), 0, 0, 0);
if (is_error_pending()) goto skip4642;
sub_file_print(tmp_fileno,qbs_new_txt_len("\012",1), 0, 0, 0);
if (is_error_pending()) goto skip4642;
skip4642:
qbs_cleanup(qbs_tmp_base,0);
tab_spc_cr_size=1;
if(!qbevent)break;evnt(25762,41,"terminal.bas");}while(r);
do{
tab_spc_cr_size=2;
tab_fileno=tmp_fileno=*_SUB_GENERATEMACOSLOGSCRIPT_LONG_FF;
if (is_error_pending()) goto skip4643;
sub_file_print(tmp_fileno,qbs_new_txt_len("export QB64PE_LOG_SCOPES=",25), 0, 0, 0);
if (is_error_pending()) goto skip4643;
sub_file_print(tmp_fileno,qbs_new_txt_len("\042",1), 0, 0, 0);
if (is_error_pending()) goto skip4643;
sub_file_print(tmp_fileno,__STRING_LOGSCOPES, 0, 0, 0);
if (is_error_pending()) goto skip4643;
sub_file_print(tmp_fileno,qbs_new_txt_len("\042",1), 0, 0, 0);
if (is_error_pending()) goto skip4643;
sub_file_print(tmp_fileno,qbs_new_txt_len("\012",1), 0, 0, 0);
if (is_error_pending()) goto skip4643;
skip4643:
qbs_cleanup(qbs_tmp_base,0);
tab_spc_cr_size=1;
if(!qbevent)break;evnt(25762,42,"terminal.bas");}while(r);
do{
tab_spc_cr_size=2;
tab_fileno=tmp_fileno=*_SUB_GENERATEMACOSLOGSCRIPT_LONG_FF;
if (is_error_pending()) goto skip4644;
sub_file_print(tmp_fileno,qbs_new_txt_len("export QB64PE_LOG_HANDLERS=",27), 0, 0, 0);
if (is_error_pending()) goto skip4644;
sub_file_print(tmp_fileno,qbs_new_txt_len("\042",1), 0, 0, 0);
if (is_error_pending()) goto skip4644;
sub_file_print(tmp_fileno,__STRING_LOGHANDLERS, 0, 0, 0);
if (is_error_pending()) goto skip4644;
sub_file_print(tmp_fileno,qbs_new_txt_len("\042",1), 0, 0, 0);
if (is_error_pending()) goto skip4644;
sub_file_print(tmp_fileno,qbs_new_txt_len("\012",1), 0, 0, 0);
if (is_error_pending()) goto skip4644;
skip4644:
qbs_cleanup(qbs_tmp_base,0);
tab_spc_cr_size=1;
if(!qbevent)break;evnt(25762,43,"terminal.bas");}while(r);
do{
tab_spc_cr_size=2;
tab_fileno=tmp_fileno=*_SUB_GENERATEMACOSLOGSCRIPT_LONG_FF;
if (is_error_pending()) goto skip4645;
sub_file_print(tmp_fileno,qbs_new_txt_len("export QB64PE_LOG_FILE_PATH=",28), 0, 0, 0);
if (is_error_pending()) goto skip4645;
sub_file_print(tmp_fileno,qbs_new_txt_len("\042",1), 0, 0, 0);
if (is_error_pending()) goto skip4645;
sub_file_print(tmp_fileno,__STRING_LOGFILENAME, 0, 0, 0);
if (is_error_pending()) goto skip4645;
sub_file_print(tmp_fileno,qbs_new_txt_len("\042",1), 0, 0, 0);
if (is_error_pending()) goto skip4645;
sub_file_print(tmp_fileno,qbs_new_txt_len("\012",1), 0, 0, 0);
if (is_error_pending()) goto skip4645;
skip4645:
qbs_cleanup(qbs_tmp_base,0);
tab_spc_cr_size=1;
if(!qbevent)break;evnt(25762,44,"terminal.bas");}while(r);
}else{
do{
tab_spc_cr_size=2;
tab_fileno=tmp_fileno=*_SUB_GENERATEMACOSLOGSCRIPT_LONG_FF;
if (is_error_pending()) goto skip4646;
sub_file_print(tmp_fileno,qbs_new_txt_len("export QB64PE_LOG_LEVEL=",24), 0, 0, 0);
if (is_error_pending()) goto skip4646;
sub_file_print(tmp_fileno,qbs_new_txt_len("\012",1), 0, 0, 0);
if (is_error_pending()) goto skip4646;
skip4646:
qbs_cleanup(qbs_tmp_base,0);
tab_spc_cr_size=1;
if(!qbevent)break;evnt(25762,46,"terminal.bas");}while(r);
do{
tab_spc_cr_size=2;
tab_fileno=tmp_fileno=*_SUB_GENERATEMACOSLOGSCRIPT_LONG_FF;
if (is_error_pending()) goto skip4647;
sub_file_print(tmp_fileno,qbs_new_txt_len("export QB64PE_LOG_SCOPES=",25), 0, 0, 0);
if (is_error_pending()) goto skip4647;
sub_file_print(tmp_fileno,qbs_new_txt_len("\012",1), 0, 0, 0);
if (is_error_pending()) goto skip4647;
skip4647:
qbs_cleanup(qbs_tmp_base,0);
tab_spc_cr_size=1;
if(!qbevent)break;evnt(25762,47,"terminal.bas");}while(r);
do{
tab_spc_cr_size=2;
tab_fileno=tmp_fileno=*_SUB_GENERATEMACOSLOGSCRIPT_LONG_FF;
if (is_error_pending()) goto skip4648;
sub_file_print(tmp_fileno,qbs_new_txt_len("export QB64PE_LOG_HANDLERS=",27), 0, 0, 0);
if (is_error_pending()) goto skip4648;
sub_file_print(tmp_fileno,qbs_new_txt_len("\012",1), 0, 0, 0);
if (is_error_pending()) goto skip4648;
skip4648:
qbs_cleanup(qbs_tmp_base,0);
tab_spc_cr_size=1;
if(!qbevent)break;evnt(25762,48,"terminal.bas");}while(r);
do{
tab_spc_cr_size=2;
tab_fileno=tmp_fileno=*_SUB_GENERATEMACOSLOGSCRIPT_LONG_FF;
if (is_error_pending()) goto skip4649;
sub_file_print(tmp_fileno,qbs_new_txt_len("export QB64PE_LOG_FILE_PATH=",28), 0, 0, 0);
if (is_error_pending()) goto skip4649;
sub_file_print(tmp_fileno,qbs_new_txt_len("\012",1), 0, 0, 0);
if (is_error_pending()) goto skip4649;
skip4649:
qbs_cleanup(qbs_tmp_base,0);
tab_spc_cr_size=1;
if(!qbevent)break;evnt(25762,49,"terminal.bas");}while(r);
}
do{
tab_spc_cr_size=2;
tab_fileno=tmp_fileno=*_SUB_GENERATEMACOSLOGSCRIPT_LONG_FF;
if (is_error_pending()) goto skip4650;
sub_file_print(tmp_fileno,qbs_new_txt_len("\042",1), 0, 0, 0);
if (is_error_pending()) goto skip4650;
sub_file_print(tmp_fileno,_SUB_GENERATEMACOSLOGSCRIPT_STRING_EXE, 0, 0, 0);
if (is_error_pending()) goto skip4650;
sub_file_print(tmp_fileno,qbs_new_txt_len("\042",1), 0, 0, 0);
if (is_error_pending()) goto skip4650;
sub_file_print(tmp_fileno,qbs_new_txt_len(" ",1), 0, 0, 0);
if (is_error_pending()) goto skip4650;
sub_file_print(tmp_fileno,_SUB_GENERATEMACOSLOGSCRIPT_STRING_CMDSTR, 0, 0, 0);
if (is_error_pending()) goto skip4650;
sub_file_print(tmp_fileno,qbs_new_txt_len("\012",1), 0, 0, 0);
if (is_error_pending()) goto skip4650;
skip4650:
qbs_cleanup(qbs_tmp_base,0);
tab_spc_cr_size=1;
if(!qbevent)break;evnt(25762,51,"terminal.bas");}while(r);
do{
sub_close(*_SUB_GENERATEMACOSLOGSCRIPT_LONG_FF,1);
if(!qbevent)break;evnt(25762,53,"terminal.bas");}while(r);
do{
sub_shell2(qbs_add(qbs_add(qbs_add(qbs_new_txt_len("chmod +x ",9),qbs_new_txt_len("\042",1)),_SUB_GENERATEMACOSLOGSCRIPT_STRING_SCRIPT),qbs_new_txt_len("\042",1)),2);
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(25762,55,"terminal.bas");}while(r);
exit_subfunc:;
free_mem_lock(sf_mem_lock);
#include "free267.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;
}
