Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Telix/SALT v3.15 & RS-232, Hayes - <b>terminal</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  TERMINAL

  .  Summary

  terminal();

  .  Description

  The terminal function when called allows Telix to process characters
  coming in from the serial port and print them on the terminal
  screen, and process user keystrokes. If a function has nothing to do
  (for example while using the track function), it can call terminal
  to make sure characters and user keystrokes are processed. Note that
  if a user script wants to process every incoming character (e.g.,
  with the cgetc function, the terminal function should never be
  called).

  .  Return Value

  None.

  .  Example

  // This will wait forever for either of two strings
  // to come in from the comm port, and then stop.

  int t1, t2, stat;

  t1 = track("hello", 0);
  t2 = track("good-bye", 0);

  while (1)           // loop forever
   {
    terminal();       // The call to terminal() lets any characters
                      // that come in be looked at by Telix's
                      // internal routines for a match with.
                      // Incoming chars are also printed on the
                      // terminal screen and user keystrokes are
                      // handled

    stat = track_hit(0);
    if (stat == t1 || stat == t2)   // exit if one of the strings
     break;                         // came in
   }

  track_free(t1);     // stop Telix for looking for more matches
  track_free(t2);

See Also: track track_addchr

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson