Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ xtty(3X10) — UTek 4.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

printf(3s)

xterm(1x10)

xtext(3x10)

curses(3t)

X(8x10)



XTTY(3X10)              COMMAND REFERENCE              XTTY(3X10)



NAME
     xtty - routines to provide terminal emulator windows

     For 4310, 4320, and 4330 series UTek products only.

     Public domain software distributed by M.I.T. Project Athena.
     Provided by Tektronix as is, without express or implied
     warranty.

     Not supported by Tektronix.

SYNOPSIS
     #include <X/Xlib.h>
     #include <X/Xtty.h>

     TTYWindow *CreateTTYWindow(cols, lines, x, y, normalFont,
     boldFont, bwidth, reverse)
     int cols, lines, x, y, bwidth, reverse;
     char *normalFont, *boldFont;

     DestroyTTYWindow(t);
     TTYWindow *t;

     TTYPutString(t, str);
     TTYWindow *t;
     char *str;

     TTYPutChar(t, ch);
     TTYWindow *t;
     char ch;

     TTYPrintf(t, format [ , arg ] ... )
     TTYWindow *t;
     char *format;

     char *TTYGetString(t, string, n)
     TTYWindow *t;
     char *string;
     int n;

     int TTYGetChar(t)
     TTYWindow *t;

     SetStdout(t)
     TTYWindow *t;

     ResetStdout()

DESCRIPTION
     These functions allow applications to create terminal
     emulator windows.  The windows are managed by creating a
     subprocess xterm(1x10) and communicating with it through a



X Version 10             28 January 1985                        1





XTTY(3X10)              COMMAND REFERENCE              XTTY(3X10)



     pty.  The TTYWindow data structure is defined in <X/Xtty.h>:

     typedef struct TTYWindow {
          Window w;      /* The window id */
          int pid;       /* The pid of the subprocess xterm */
          short file;         /* The file id to read and write characters
                            characters to/from */
     } TTYWindow;

     CreateTTYWindow creates a window that is cols characters
     wide and lines characters high.  It is located with its
     upper left hand corner located at the point x, y in the root
     window.  The border is bwidth pixels wide.  Normal text is
     displayed in normalFont and boldface text is displayed in
     boldFont. If boldFont is NULL, the normal font is used for
     both.  If reverse is non-zero, the window is created in
     reverse-video.

     The new window is created and mapped to the screen, and
     emulates a DEC VT102 terminal precisely as well as
     xterm(1x10) does.

     DestroyTTYWindow destroys the window described by its
     argument.  The window is also destroyed if the creating
     process terminates or is killed.  See the CAVEATS section.

     TTYPutString prints its string in its window.  An
     application may instead wish to use the file field of the
     TTYWindow directly.

     TTYPutChar is similar to TextPutString but only prints a
     single character.

     TTYPrintf is similar to the standard function printf except
     that it prints its result in the specified window.  The
     resulting string is passed to TTYPutString. See also the
     CAVEATS section.

     TTYGetString fills the array string with at most n
     characters.  TTYGetString will also return before n
     characters are read if a newline (\n) is encountered.  An
     application may instead wish to use the file field of the
     TTYWindow directly.

     TTYGetChar returns one character from the window.

     SetStdout sets things up so that the standard I/O routines
     which write to stdout will write to the window instead.
     This is particularly useful with the curses(3t) package
     since it always writes to stdout.





X Version 10             28 January 1985                        2





XTTY(3X10)              COMMAND REFERENCE              XTTY(3X10)



     ResetStdout resets stdout to its original value.

CAVEATS
     TTYPrintf truncates its output if the resulting string is
     more than 2048 characters long.

     It is impossible to make one implementation that works
     correctly for both monochrome and color displays since you
     cannot specify colors on a monochrome display and reverse-
     video doesn't make much sense on a color display.  This
     version works for monochrome displays.

SEE ALSO
     printf(3s), xterm(1x10), xtext(3x10), curses(3t), and
     X(8x10).








































X Version 10             28 January 1985                        3





































































%%index%%
na:312,347;
sy:659,5302;
de:5961,5582;
ca:11543,491;
se:12034,339;
%%index%%000000000100

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026