Message Board
Message Board > Fenix / Bennu / Gemix / DIV > say() into command line |
October 21, 2006, 23:48 | |
DTM
Earthling! 821 posts |
Hi, Can I get it so say() etc.. is output to the command line rather than stdout.txt ? ____________ :o |
# |
October 22, 2006, 12:28 | |
Sandman
F3n!x0r 1194 posts |
You mean you want to execute something in the terminal? You can accomplish this by using the system() command in C, so you could make a DLL, though Fenix programmers disadvise the use of system() in DLLs, but I forgot why. Code: static int SYSTEM(INSTANCE * my, int * params) { int r = system(string_get(params[0])); string_discard(params[0]); return r; } For documentation, see this page. ____________ BennuWiki Yes, my avatar has grey borders in IE (so get a decent browser) ROOFLEZ ROOFLEZ |
# |
October 22, 2006, 14:04 | |
yonni
None 420 posts |
Doesn't fenix have the system() command? I know DIV did. Quoting DIV manual: System(<"external command">)
Description: Executes the operating system's command passed as a perameter. ____________ |
# |
October 23, 2006, 13:10 | |
DTM
Earthling! 821 posts |
No... hmm what do I mean? Just the display of it. Like if I use printf in C. It prints to the command line. But with Fenix it is printed to "stdout.txt". Also if I use printf in a DLL it is output to the text file not the command line as I would like. I want to see it real time rather than checking the text file after it finishes. [Edited on October 23, 2006 by DTM] ____________ :o |
# |
October 23, 2006, 15:07 | |
Dennis
どこかにいる 2092 posts |
I used a batch. I'll look at it at home. I think Eckolin gave it to me once.
____________ Kwakkel |
# |
October 23, 2006, 15:11 | |
Moogle
Enterprise Edition 239 posts |
I don't know what you are doing or using, but say() does exactly that. To make my point even stronger, TAKE THIS! Quoting Fenix code: static int fxi_say (INSTANCE * my, int * params) { /* Show debugging info also in stdout */ printf ("%s\n", string_get(params[0])); gr_con_printf("%s\n", string_get(params[0])) ; string_discard(params[0]) ; return 1 ; } I have it in my commandline in realtime, and if not you can always check the console. [Edited on October 23, 2006 by Moogle] ____________ I am Moogle and I approve this message. Quoting (. )( .) in the Bugs topic: Everytime I login the threads with new posts are by Dennis.
|
# |
October 23, 2006, 16:11 | |
DTM
Earthling! 821 posts |
stdout in my case seems to be "stdout.txt". It's fine on linux.
____________ :o |
# |
October 23, 2006, 16:52 | |
g105b
None 86 posts |
DTM, I don't think we understand what you are asking. If you want Fenix to display text in the command line, just use the say(); command. Then if you run your Fenix program from CMD or from a batch file, you will see your beautiful words appearing in the sexy black screen. If, however, you want to execute the output, like the system(); command in DIV, you will need to use C because Fenix does not have that command (yet). By the way, the say(); command also adds a line of text into the stdout.txt file, as I'm sure you are aware. - Greg. ____________ .g105b'' |
# |
October 23, 2006, 18:54 | |
PEader
お前はもう死んでいる 1486 posts |
Quoting DTM: No... hmm what do I mean? Just the display of it. Like if I use printf in C. It prints to the command line. But with Fenix it is printed to "stdout.txt". Also if I use printf in a DLL it is output to the text file not the command line as I would like. I want to see it real time rather than checking the text file after it finishes. Are you using an old version of SDL perhaps? This is a problem with the SDL binaries. There is a nice helpful thread on GameDev.net. I am sure there is other information there about this "problem" also. ____________ I see 57,005 people. |
# |
October 23, 2006, 21:09 | |
Sandman
F3n!x0r 1194 posts |
Quoting DTM: I want to see it real time rather than checking the text file after it finishes. Alt-C opens the Fenix console, where all say() commands output their text. The Fenix console is accessible when compiled with the option -g. ____________ BennuWiki Yes, my avatar has grey borders in IE (so get a decent browser) ROOFLEZ ROOFLEZ |
# |
October 23, 2006, 22:37 | |
DTM
Earthling! 821 posts |
The fenix console will be usefull for say(). Quoting PEader: Are you using an old version of SDL perhaps? This is a problem with the SDL binaries. There is a nice helpful thread on GameDev.net. I am sure there is other information there about this "problem" also. Yeah that sounds like the problem. Thanks [Edited on October 23, 2006 by DTM] ____________ :o |
# |
Message Board > Fenix / Bennu / Gemix / DIV > say() into command line