summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorandmarti1424 <andmarti@gmail.com>2015-08-18 10:06:03 -0300
committerandmarti1424 <andmarti@gmail.com>2015-08-18 10:06:03 -0300
commit27431e7b3f0b57e3a09256f855d151c5319ac1f7 (patch)
tree5a2177dc9e86847ad0b608c1e573d94ff3c7b2e4 /src
parentd82af9538a4a5d71a97a2874324659dd6d31f21c (diff)
scripting changes
Diffstat (limited to 'src')
-rw-r--r--src/main.c13
-rw-r--r--src/pipe.c8
2 files changed, 9 insertions, 12 deletions
diff --git a/src/main.c b/src/main.c
index 7d6e960..3160e5a 100644
--- a/src/main.c
+++ b/src/main.c
@@ -123,8 +123,6 @@ int main (int argc, char ** argv) {
read_argv(argc, argv);
// initiate NCURSES if that is what is wanted
- //freopen("/dev/tty", "rw", stdin);
- //initscr();
if (! atoi(get_conf_value("nocurses")))
start_screen();
@@ -211,6 +209,7 @@ int main (int argc, char ** argv) {
// esto habilitarlo para debug
// wtimeout(input_win, TIMEOUT_CURSES);
+ char nocurses_buffer[BUFFERSIZE];
while ( ! shall_quit && ! atoi(get_conf_value("quit_afterload"))) {
// if we are in ncurses
@@ -220,11 +219,9 @@ int main (int argc, char ** argv) {
// if we are not in ncurses
} else {
- char buffer[BUFFERSIZE];
- if (fgets(buffer, BUFFERSIZE, stdin) != NULL) {
- printf("We are in stdin loop-: %s\n", buffer);
- send_to_interp(buffer);
- //printf("back\n");
+ if (fgets(nocurses_buffer, BUFFERSIZE, stdin) != NULL) {
+ printf("Interp will receive: %s", nocurses_buffer);
+ send_to_interp(nocurses_buffer);
}
}
@@ -503,7 +500,7 @@ void scdebug(char * s, ...) {
fprintf(fdoutput, "%s\n", t);
} else {
printf("%s\n", t);
- getchar();
+ //printf("%s", t);
}
va_end(args);
return;
diff --git a/src/pipe.c b/src/pipe.c
index 175337d..ae86129 100644
--- a/src/pipe.c
+++ b/src/pipe.c
@@ -3,7 +3,7 @@
#include "conf.h"
#include "main.h"
-// TODO pass fd is not neccesary?
+// FIXME pass fd is not neccesary?
void getnum(int r0, int c0, int rn, int cn, FILE * fd) {
struct ent ** pp;
struct ent * p;
@@ -20,16 +20,16 @@ void getnum(int r0, int c0, int rn, int cn, FILE * fd) {
sprintf(line, "%.15g", p->v);
}
}
- if (c < cn) {
+ /*if (c < cn) {
strcat(line, "\t");
} else {
strcat(line, "\n");
- }
+ }*/
//if (get_conf_value("output") != NULL && fd != NULL)
// fprintf(fd, "%s\n", line);
//else
- scdebug("%s\n", line);
+ scdebug("resultado: %s", line);
//fwrite(fd, line, strlen(line));
if (brokenpipe) {