fputs

Richard Burnett-Godfree Richard at Tribune-IS.com
Wed May 26 09:03:34 PDT 2004


I am trying to port software currently running on hp-ux to freeBSD 4.9.

In the code the software use fputs to output chars to the terminal.

What seems to be happening is these are all buffered until the process
terminates and then they all come out rather than being sent to the terminal
during the program operation.  Do I need to change an environment setting ??
Should I swap to printf ??  What is the syntax ??

Regards
Richard

term = (char *) getenv("TERM");

if (strcmp(term, "wy50") == 0 || strcmp(term, "wy60") == 0)
   {fputs ("\033z(", stdout);
    if (argc == 1) {
       fputs (trmess, stdout);
       if (strlen(trmess) != 78)
          fputs ("\015", stdout);
    }
    else {
       strcpy (trmess, argv[1]);
       fputs (argv[1], stdout);
       if (strlen(trmess) != 78)
          fputs ("\015", stdout);
    }
   }




More information about the freebsd-questions mailing list