XCEPT(1)

NAME
xcept - a Bildschirmtext-decoder for the X-Window system

SYNOPSIS
xcept [-h host] [-p port] [-l file] [-t file] [-r file] [-c] [-j count] [-x] [-X] [-b] [-2] [-m] [-S pathlist] [-s file [parameter]]

DESCRIPTION
xcept is a Bildschirmtext terminal for the CEPT-service of the Deutsche Bundespost Telekom. xcept creates a window on the X-display and then connects to the ceptd. After the ceptd established the connection to the CEPT-exchange, xcept is ready to exchange data.

The following options are available:

-h host
    Connect to ceptd at host ``host''.

-p port
    Use socket port number ``port'' for connection to ceptd.

-l file
    Log CEPT-session to file ``file''.

-t file
    Log debug text to file ``file''.

-r file
    Replay CEPT-session from file ``file''. Stops at every page - press any key to continue.

-j count
    Jump over the first ``count'' pages (playback mode only).

-c  Connect to ceptd automatically on startup.

-x  Don't open X-window on startup (you have to run a script).

-X  Turn on synchronous mode for Xlib calls. Useful for debugging.

-b  Don't use Xserver's backingstore capability.

-2  Double size. Display each pixel as 2x2 pixels.

-m  Force monochrome display.

-S pathes
    Specify a colon separated list of pathes where to look for .xcept script files.

-s file [parameter]
    Run script ``file'' on startup with optional parameters. This has to be the last option. All following arguments are treated as script parameters (script variables argv_1, argv_2, ... ).

In addition to all alphanumeric keyboard symbols and cursor keys the following special keyboard commands are valid:

'ESC'
    Exit from xcept immediately.

'^L'
    Redraw the CEPT window.

'^Q???'
    3-digit octal quote. Send the specified 8-bit character code.

'*' Send the CEPT initiator character.

'#', 'RETURN'
    Send the CEPT terminator character.

Modifier 1 Key (ALT) + [aAoOuUs]
    Send german 'a umlaut', 'A umlaut', 'o umlaut', 'O umlaut', 'u umlaut', 'U umlaut', and 'sharp s' character.

'^W'
    Append current page as text to a file. The filename requester will be popped up only once.

XCEPT SCRIPT LANGUAGE
The language works on variables or string constants. Variable names can be of any length and consist of the characters [A-Z0-9a-z_]. String constants are enclosed in double quotes and may contain any ASCII characters. Script parameters are named argv_0 through argv_n. argv_0 is the name of the script file. The number of arguments can be found in the variable named argc. Any characters following a sharp sign (#) until the end of the line are treated as a comment. If the special script variable "DEBUG" is set to "on", each executed instruction is printed to stderr.

Special script string characters are:

\b  Write a <backspace> character.

\f  Write a <form-feed> character.

\n  Write a <new-line> character.

\r  Write a <carriage return> character.

\t  Write a <tab> character.

\v  Write a <vertical tab> character.

\\  Write a <backslash> character.

\num
    Write an 8-bit character whose ASCII value is the 1-, 2-, or 3-digit octal number num.

\a  Write a german <a umlaut> character.

\A  Write a german <A umlaut> character.

\o  Write a german <o umlaut> character.

\O  Write a german <O umlaut> character.

\u  Write a german <u umlaut> character.

\U  Write a german <U umlaut> character.

\s  Write a german <sharp s> character.

\#  Write the CEPT <terminator> character.

\*  Write the CEPT <initiator> character.

SCRIPT COMMANDS

set <var A>=<var B|str B>
    Assign value of B to variable A.

write <var A|str A> to <var B|str B>
    Write contents of A to file B.

read <var A> from <var B|str B>
    Read contents of file B into variable A.

append <var A|str A> to <var B|str B>
    Append contents of A to file B.

strcat <var A> , <var B|str B>
    Concatenate B to A.

send <var A|str A>
    Send A to the CEPT-exchange.

get <var A>=<var B|str B>,<var C|str C>,<var D|str D>,
    <var E|str E>
    Get the contents of the screen rectangle specified by B, C, D, E into variable A. B, C specify the coordinates of the upper left corner and D, E the coordinates of the lower right corner of the rectangle. The coordinates are 1 based (x-range: 1-40, y-range:1-24).

waitdct
    Wait for completion of the next page or user input.

if <var A|str A> == <var B|str B> goto <label C>
    Conditional goto. If A is equal to B then continue execution at instruction labeled C. Label names are defined with a following colon (:), but referenced without one. (forever: goto forever)

info <var A|str A>
    Write contents of A to <stdout>.

debug <var A|str A>
    Write contents of A to <stderr>.

goto <label A>
    Unconditional goto to label A.

inc <var A>
    Increment the numerical value of variable A.

dec <var A>
    Decrement the numerical value of variable A.

setpart <var A>=<var B|str B>,<var C|str C>,<var D|str D>
    Copy the contents of B beginning from position C up to position D into variable A.

system <var A|str A>
    Execute shell command A.

sleep <var A|str A>
    Sleep A seconds.

onx Open the xcept X-window at the display specified in the script variable "DISPLAY" or at the default display (DISPLAY environment variable).

offx
    Close the xcept X-window.

input <var A> :  <var B|str B> , <var C|str C>
    Popup a requester and get user input into variable A. Prompt string is B and default answer string is C. If C is equal to "*NO ECHO*", the user input isn't echoed to the window (useful for password input). If C is equal to "*STDIN*", input is read from stdin and not from a requester (useful for piped input).

connect
    Connect to the ceptd.

disconnect
    Close the connection to the ceptd.

playback <var A|str A>
    Start session playback from file A.

ppmsave <var A|str A>
    Save current CEPT page as PPM image to file A.

getstate <var A>
    Get the current terminal state into variable A. Possible states are "CONNECTED", "ONLINE", "DISCONNECTED" or "PLAYBACK".

quit
    Exit from xcept immediately.

EXAMPLE
This is a sample script (login.scp) which logs into CEPT as guest and selects page 50000.

Start with: xcept -s login.scp 50000

    connect
    waitdct # wait for login page
    send "\#" # accept guest id
    waitdct
    set page = "\*"
    strcat page, argv_1
    strcat page, "\#"
    send page # '*50000#'
    waitdct

ENVIRONMENT

XCEPTSCRIPTS
    overwrites the default search path for script files. (e.g. ~/.xcept:/local/lib/xcept)

XCEPTHOST
    overwrites the default hostname of server host (e.g. myhost.informatik.uni-erlangen.de)

For defaults type xcept -h.

SEE ALSO
ceptd(8)
"Functional Specification for BTX-Terminals", DBP Telekom

AUTHORS

Arno Augustin, University of Erlangen-Nuremberg,
    (aoaugust@cip.informatik.uni-erlangen.de)

Frank Hoering, University of Erlangen-Nuremberg,
    (fkhoerin@cip.informatik.uni-erlangen.de)

BUGS
Not all features are documented. For further information read the source code.