Sjoerd Mullender a écrit :
in = ((stream **) arg)[0]; out = ((stream **) arg)[1]; free(arg); snprintf(buf, sizeof(buf), "in := \"" PTRFMT "\":streams;\n" "out := \"" PTRFMT "\":streams;\n" "mapi.malclient(in, out);\n", PTRFMTCAST in, PTRFMTCAST out); callString(mal_clients, buf, 0);
I'm specifically interested in the 'in' stream since it is the one I would like to write to.
Could someone enlighten me here?
All the best,
It's a bit of a hack. The problem is, we have a C pointer to a stream and we want to give that to the MAL layer. So what happens is, a MAL command is constructed which looks something like in := "0x123456":streams; The string value "0x123456" is cast to a MAL streams type, and in doing so, the string is interpreted as a number and the numeric value is then used.
OK. You probably do that for the reason that the libraries compiled out of mal_mapi.mx are dynamically loaded, and beause of that, you cannot just use the symbols they provide in your code. Am I wrong? But then, concerning the administrator: he can communicate through stdin and stdout as I've read somewhere. Where can I find the hardcoded equivalent of the above call to mapi.malclient, when it comes to streams for the admin? All the best, -- Guillaume Yziquel http://yziquel.homelinux.org/