Geomview For Windows?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Update REQ 5162]: question
> I have only one problem that I can not use "printf" and "scanf" in my program > because one connects with geomview using "printf". > Is their any other way to connect with geomview ? Yes. When you start an external module from geomview, although the module's standard-input and standard-output are attached to pipes from geomview, the module still has access to the terminal via standard error (file descriptor 2). So, you can use fprintf(stderr, "Hi %d", n); Also, if your module doesn't only sends commands to geomview but doesn't need to read any responses from it, you can cause its standard input to be left attached to the terminal with an appropriate emodule-define command. In particular, if instead of saying (emodule-define "Your Module" yourprogram) say this: (emodule-define "Your Module" "yourprogram <&2") The /bin/sh shell (which runs all modules) interprets the "<&2" and redirects yourprogram's standard input to its standard error, i.e. the terminal. Then, your program can contain things like fprintf(stderr, "What now? "); scanf("%s", what); It'd also be possible to allow reading both from geomview and from the terminal; I'll describe that if you need it.
Home | Overview | FAQ | Documentation | Support | Download | Mailing List
Windows? | Development | Bug Reporting | Contributing | Contact Us | Sponsors
site hosted by