+ fclose(f);
+ return r;
+}
+
+static int ttyprocess(struct declaracao *dec)
+{
+ char *line = NULL;
+ int r;
+ using_history();
+ while ((line = readline("declara> ")) != NULL) {
+ if (*line)
+ add_history(line);
+ r = cmd_run(dec, line);
+ if (r < 0) {
+ fprintf(stderr, "Não foi possível executar comando: %s\n",
+ dec->error ?: strerror(-r));
+ }
+ free(line);
+ }