qbs* FUNC_FINDWORKINGTERMINAL(){
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 "data328.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{
if (_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_EXES[2]&2){
error(10);
}else{
static int64 alloc_new_desc[8];
static uint64 alloc_req_elems;
static uint64 alloc_req_bytes;
static uint64 alloc_dim_value;
static uint64 alloc_bytes_per_element;
if (_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_EXES[2]&1){
if (!error_occurred) error(10);
}else{
alloc_new_desc[4]= 0 ;
alloc_new_desc[5]=( 8 )-alloc_new_desc[4]+1;
if (alloc_new_desc[5]<=0) error(5);
alloc_new_desc[6]=1;
alloc_req_elems=1;
alloc_bytes_per_element=(uint64)(8);
if (!alloc_bytes_per_element) error(257);
if (((int64)((ptrszint)alloc_new_desc[4]))!=alloc_new_desc[4]) error(257);
if (alloc_new_desc[5]<0) error(257);
if (((int64)((ptrszint)alloc_new_desc[5]))!=alloc_new_desc[5]) error(257);
if (alloc_new_desc[6]<0) error(257);
if (((int64)((ptrszint)alloc_new_desc[6]))!=alloc_new_desc[6]) error(257);
alloc_dim_value=(uint64)alloc_new_desc[5];
if (alloc_dim_value){
if (alloc_req_elems>(18446744073709551615ull/alloc_dim_value)) error(257);
alloc_req_elems*=alloc_dim_value;
}
if (alloc_req_elems>(18446744073709551615ull/alloc_bytes_per_element)) error(257);
alloc_req_bytes=alloc_req_elems*alloc_bytes_per_element;
if (((uint64)((ptrszint)alloc_req_elems))!=alloc_req_elems) error(257);
if (((uint64)((size_t)alloc_req_bytes))!=alloc_req_bytes) error(257);
_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_EXES[0]=(ptrszint)malloc((size_t)alloc_req_bytes);
if (!_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_EXES[0]) error(257);
_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_EXES[2]|=1;
tmp_long=(ptrszint)alloc_req_elems;
if (_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_EXES[2]&4){
while(tmp_long--) ((uint64*)(_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_EXES[0]))[tmp_long]=(uint64)qbs_new_cmem(0,0);
}else{
while(tmp_long--) ((uint64*)(_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_EXES[0]))[tmp_long]=(uint64)qbs_new(0,0);
}
_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_EXES[4]=alloc_new_desc[4];
_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_EXES[5]=alloc_new_desc[5];
_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_EXES[6]=alloc_new_desc[6];
_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_EXES[7]=alloc_new_desc[7];
}
}
if (_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_FORMATS[2]&2){
error(10);
}else{
static int64 alloc_new_desc[8];
static uint64 alloc_req_elems;
static uint64 alloc_req_bytes;
static uint64 alloc_dim_value;
static uint64 alloc_bytes_per_element;
if (_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_FORMATS[2]&1){
if (!error_occurred) error(10);
}else{
alloc_new_desc[4]= 0 ;
alloc_new_desc[5]=( 8 )-alloc_new_desc[4]+1;
if (alloc_new_desc[5]<=0) error(5);
alloc_new_desc[6]=1;
alloc_req_elems=1;
alloc_bytes_per_element=(uint64)(8);
if (!alloc_bytes_per_element) error(257);
if (((int64)((ptrszint)alloc_new_desc[4]))!=alloc_new_desc[4]) error(257);
if (alloc_new_desc[5]<0) error(257);
if (((int64)((ptrszint)alloc_new_desc[5]))!=alloc_new_desc[5]) error(257);
if (alloc_new_desc[6]<0) error(257);
if (((int64)((ptrszint)alloc_new_desc[6]))!=alloc_new_desc[6]) error(257);
alloc_dim_value=(uint64)alloc_new_desc[5];
if (alloc_dim_value){
if (alloc_req_elems>(18446744073709551615ull/alloc_dim_value)) error(257);
alloc_req_elems*=alloc_dim_value;
}
if (alloc_req_elems>(18446744073709551615ull/alloc_bytes_per_element)) error(257);
alloc_req_bytes=alloc_req_elems*alloc_bytes_per_element;
if (((uint64)((ptrszint)alloc_req_elems))!=alloc_req_elems) error(257);
if (((uint64)((size_t)alloc_req_bytes))!=alloc_req_bytes) error(257);
_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_FORMATS[0]=(ptrszint)malloc((size_t)alloc_req_bytes);
if (!_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_FORMATS[0]) error(257);
_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_FORMATS[2]|=1;
tmp_long=(ptrszint)alloc_req_elems;
if (_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_FORMATS[2]&4){
while(tmp_long--) ((uint64*)(_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_FORMATS[0]))[tmp_long]=(uint64)qbs_new_cmem(0,0);
}else{
while(tmp_long--) ((uint64*)(_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_FORMATS[0]))[tmp_long]=(uint64)qbs_new(0,0);
}
_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_FORMATS[4]=alloc_new_desc[4];
_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_FORMATS[5]=alloc_new_desc[5];
_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_FORMATS[6]=alloc_new_desc[6];
_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_FORMATS[7]=alloc_new_desc[7];
}
}
if(!qbevent)break;evnt(28175,8,"terminal.bas");}while(r);
do{
tmp_long=array_check(( 1 )-_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_EXES[4],_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_EXES[5]);
if (!is_error_pending()) qbs_set( ((qbs*)(((uint64*)(_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_EXES[0]))[tmp_long])),qbs_new_txt_len("gnome-terminal",14));
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(28175,9,"terminal.bas");}while(r);
do{
tmp_long=array_check(( 1 )-_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_FORMATS[4],_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_FORMATS[5]);
if (!is_error_pending()) qbs_set( ((qbs*)(((uint64*)(_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_FORMATS[0]))[tmp_long])),qbs_new_txt_len("-- $$ $@",8));
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(28175,9,"terminal.bas");}while(r);
do{
tmp_long=array_check(( 2 )-_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_EXES[4],_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_EXES[5]);
if (!is_error_pending()) qbs_set( ((qbs*)(((uint64*)(_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_EXES[0]))[tmp_long])),qbs_new_txt_len("konsole",7));
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(28175,10,"terminal.bas");}while(r);
do{
tmp_long=array_check(( 2 )-_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_FORMATS[4],_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_FORMATS[5]);
if (!is_error_pending()) qbs_set( ((qbs*)(((uint64*)(_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_FORMATS[0]))[tmp_long])),qbs_new_txt_len("-e $$ $@",8));
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(28175,10,"terminal.bas");}while(r);
do{
tmp_long=array_check(( 3 )-_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_EXES[4],_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_EXES[5]);
if (!is_error_pending()) qbs_set( ((qbs*)(((uint64*)(_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_EXES[0]))[tmp_long])),qbs_new_txt_len("lxterminal",10));
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(28175,11,"terminal.bas");}while(r);
do{
tmp_long=array_check(( 3 )-_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_FORMATS[4],_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_FORMATS[5]);
if (!is_error_pending()) qbs_set( ((qbs*)(((uint64*)(_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_FORMATS[0]))[tmp_long])),qbs_new_txt_len("-e $$ $@",8));
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(28175,11,"terminal.bas");}while(r);
do{
tmp_long=array_check(( 4 )-_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_EXES[4],_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_EXES[5]);
if (!is_error_pending()) qbs_set( ((qbs*)(((uint64*)(_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_EXES[0]))[tmp_long])),qbs_new_txt_len("mate-terminal",13));
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(28175,12,"terminal.bas");}while(r);
do{
tmp_long=array_check(( 4 )-_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_FORMATS[4],_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_FORMATS[5]);
if (!is_error_pending()) qbs_set( ((qbs*)(((uint64*)(_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_FORMATS[0]))[tmp_long])),qbs_new_txt_len("-x $$ $@",8));
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(28175,12,"terminal.bas");}while(r);
do{
tmp_long=array_check(( 5 )-_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_EXES[4],_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_EXES[5]);
if (!is_error_pending()) qbs_set( ((qbs*)(((uint64*)(_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_EXES[0]))[tmp_long])),qbs_new_txt_len("xfce4-terminal",14));
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(28175,13,"terminal.bas");}while(r);
do{
tmp_long=array_check(( 5 )-_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_FORMATS[4],_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_FORMATS[5]);
if (!is_error_pending()) qbs_set( ((qbs*)(((uint64*)(_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_FORMATS[0]))[tmp_long])),qbs_new_txt_len("-x $$ $@",8));
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(28175,13,"terminal.bas");}while(r);
do{
tmp_long=array_check(( 6 )-_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_EXES[4],_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_EXES[5]);
if (!is_error_pending()) qbs_set( ((qbs*)(((uint64*)(_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_EXES[0]))[tmp_long])),qbs_new_txt_len("urxvt",5));
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(28175,14,"terminal.bas");}while(r);
do{
tmp_long=array_check(( 6 )-_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_FORMATS[4],_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_FORMATS[5]);
if (!is_error_pending()) qbs_set( ((qbs*)(((uint64*)(_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_FORMATS[0]))[tmp_long])),qbs_new_txt_len("-e $$ $@",8));
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(28175,14,"terminal.bas");}while(r);
do{
tmp_long=array_check(( 7 )-_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_EXES[4],_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_EXES[5]);
if (!is_error_pending()) qbs_set( ((qbs*)(((uint64*)(_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_EXES[0]))[tmp_long])),qbs_new_txt_len("xterm",5));
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(28175,15,"terminal.bas");}while(r);
do{
tmp_long=array_check(( 7 )-_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_FORMATS[4],_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_FORMATS[5]);
if (!is_error_pending()) qbs_set( ((qbs*)(((uint64*)(_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_FORMATS[0]))[tmp_long])),qbs_new_txt_len("-e $$ $@",8));
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(28175,15,"terminal.bas");}while(r);
do{
tmp_long=array_check(( 8 )-_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_EXES[4],_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_EXES[5]);
if (!is_error_pending()) qbs_set( ((qbs*)(((uint64*)(_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_EXES[0]))[tmp_long])),qbs_new_txt_len("ptyxis",6));
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(28175,16,"terminal.bas");}while(r);
do{
tmp_long=array_check(( 8 )-_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_FORMATS[4],_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_FORMATS[5]);
if (!is_error_pending()) qbs_set( ((qbs*)(((uint64*)(_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_FORMATS[0]))[tmp_long])),qbs_new_txt_len("-- $$ $@",8));
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(28175,16,"terminal.bas");}while(r);
S_43478:;
fornext_value5264= 1 ;
fornext_finalvalue5264=func_ubound(_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_EXES,1,1);
fornext_step5264= 1 ;
if (fornext_step5264<0) fornext_step_negative5264=1; else fornext_step_negative5264=0;
if (is_error_pending()) goto fornext_error5264;
goto fornext_entrylabel5264;
while(1){
fornext_value5264=fornext_step5264+(*_FUNC_FINDWORKINGTERMINAL_LONG_I);
fornext_entrylabel5264:
*_FUNC_FINDWORKINGTERMINAL_LONG_I=fornext_value5264;
qbs_cleanup(qbs_tmp_base,0);
if (fornext_step_negative5264){
if (fornext_value5264<fornext_finalvalue5264) break;
}else{
if (fornext_value5264>fornext_finalvalue5264) break;
}
fornext_error5264:;
if(qbevent){evnt(28175,18,"terminal.bas");if(r)goto S_43478;}
do{
*_FUNC_FINDWORKINGTERMINAL_LONG_RET=func_shell(qbs_add(qbs_add(qbs_add(qbs_add(qbs_new_txt_len("command -v ",11),func_chr( 34 )),((qbs*)(((uint64*)(_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_EXES[0]))[array_check((*_FUNC_FINDWORKINGTERMINAL_LONG_I)-_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_EXES[4],_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_EXES[5])]))),func_chr( 34 )),qbs_new_txt_len(" >/dev/null 2>&1",16)));
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(28175,19,"terminal.bas");}while(r);
S_43480:;
if ((-(*_FUNC_FINDWORKINGTERMINAL_LONG_RET== 0 ))||is_error_pending()){
if(qbevent){evnt(28175,21,"terminal.bas");if(r)goto S_43480;}
do{
qbs_set(_FUNC_FINDWORKINGTERMINAL_STRING_FINDWORKINGTERMINAL,qbs_add(qbs_add(((qbs*)(((uint64*)(_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_EXES[0]))[array_check((*_FUNC_FINDWORKINGTERMINAL_LONG_I)-_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_EXES[4],_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_EXES[5])])),qbs_new_txt_len(" ",1)),((qbs*)(((uint64*)(_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_FORMATS[0]))[array_check((*_FUNC_FINDWORKINGTERMINAL_LONG_I)-_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_FORMATS[4],_FUNC_FINDWORKINGTERMINAL_ARRAY_STRING_FORMATS[5])]))));
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(28175,22,"terminal.bas");}while(r);
do{
goto exit_subfunc;
if(!qbevent)break;evnt(28175,23,"terminal.bas");}while(r);
}
fornext_continue_5263:;
}
fornext_exit_5263:;
do{
qbs_set(_FUNC_FINDWORKINGTERMINAL_STRING_FINDWORKINGTERMINAL,qbs_new_txt_len("",0));
qbs_cleanup(qbs_tmp_base,0);
if(!qbevent)break;evnt(28175,27,"terminal.bas");}while(r);
exit_subfunc:;
free_mem_lock(sf_mem_lock);
#include "free328.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_FINDWORKINGTERMINAL_STRING_FINDWORKINGTERMINAL);return _FUNC_FINDWORKINGTERMINAL_STRING_FINDWORKINGTERMINAL;
}
