[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] Appl_search cannot return APP_SHELL
On fr., 2014-12-26 at 07:42 +0000, WongCK wrote:
> The code fragment I used is this:
> ret = appl_search(0, parent_name, &stype, &parentid);
Just curious - what is this code for? The variable names suggests that y
you're looking for the parent of some process, is that correct? If so,
appl_search is probably not the way to go.
> printf("[%i] app =[%s] [%i] [%s] [%x=%i]\r\n", ret, parent_name,
> (short) parentid, stype&APP_SHELL ? "desktop": "app", stype, stype);
> while (ret) {
> ret = appl_search(1, parent_name, &stype, &parentid);
> if (ret)
> printf("[%i] app =[%s] [%i] [%s] [%x=%i]\r\n", ret, parent_name,
> (short) parentid, stype&APP_SHELL ? "desktop": "app", stype, stype);
> }
>
I can't see anything wrong with this code, although I think it would be
neater to do it like this:
more = appl_search(APP_FIRST....
while (more)
{
print("Put debug stuff here\n");
more = appl_search(APP_NEXT...
}
This way you avoid the extra printf and the if.
Also, is Teradesk really started by the SHELL command in xaaes.cnf?
Could it be started with a "run" command?
> Output is like this:
> [1] app =[DESKTOP ] [40] [app] [2=2]
Take a look in the XaAES Task Manager. Is the Teradesk line displayed in
brown/maroon? The shell is brown/maroon, accs are blue and applications
are red.
Jo Even