% @(#)tydoc.tex	19.1 (ESO-IPG) 02/25/03 14:13:00 
\beginofdbc
\settype{Module}
\version{1.0}
\date{28-Nov-1990}
\setname{tydoc.c}
\author{ESO-IPG, Garching}
\language{C}
\class{TeX}
\filename{/diskb/midas/test/lib/tw3/./tydoc.c}
\enva{TermWindows}
\envb{\#include $<$twset.h$>$ /$*$ TermWindow Definitions $*$/}
\envb{\#include $<$str.h$>$ /$*$ String Utilities $*$/}
\commentsa{This module includes the various functions to deal with Documents, i.e. a set of Windows.}
\commentsb{}

\historya{[1.0] 28-Nov-1990}
\endofset
\beginofentry
\entrytype{Function}
\entryname{ty\_display}
\synopsis{int ty\_display(win, str, len, option)}
\parama{WINDOW $*$win}{IN: Window to echo the processed text}
\paramb{char $*$str}{IN: text to display, or NULL (continuation )}
\paramb{int len}{IN: Length of text}
\paramz{int option}{IN: Option 1 to edit the complete document}
\descriptiona{Display a text on a Document}
\returna{--- Document number (positive number)}

\returnb{--- NOK Error occured.}
\endofentry
\beginofentry
\entrytype{Function}
\entryname{ty\_mdisplay}
\synopsis{int ty\_mdisplay(win, str, nstr, option)}
\parama{WINDOW $*$win}{IN: Window to echo the processed text}
\paramb{char $*$$*$str}{IN: Array of strings to display, as n$*$ (start, end)}
\paramb{int nstr}{IN: Number of strings}
\paramz{int option}{IN: Option 1 to edit the complete document}
\descriptiona{Display a text on the window made of several pieces of text. The pieces are provided by the array of 
strings str made of (2$*$nstr) pointers, specifying nstr times (start, end). (a pointer to the end of a string is the 
byte just following the last byte of the string, i.e. the address of the null character for a standard string)}
\returna{--- Document number (positive number)}

\returnb{--- NOK Error occured.}
\endofentry
\beginofentry
\entrytype{Function}
\entryname{ty\_fdisplay}
\synopsis{int ty\_fdisplay(win, fid, len, option)}
\parama{WINDOW $*$win}{IN: Window to echo the processed text}
\paramb{int fid}{IN: File number (opened by fi\_open)}
\paramb{int len}{IN: Maximal number of bytes to read}
\paramz{int option}{IN: Option 1 to edit the complete document}
\descriptiona{Display a file extract on the window.}
\returna{--- Document number (positive number)}

\returnb{--- NOK Error occured.}
\endofentry
\beginofentry
\entrytype{Function}
\entryname{ty\_file}
\synopsis{int ty\_file(win, fname, option)}
\parama{WINDOW $*$win}{IN: Window to echo the processed text}
\paramb{char $*$fname}{IN: File name}
\paramz{int option}{IN: Option 1 to edit the complete document}
\descriptiona{Display a complete file extract on the window.}
\returna{--- Document number (positive number)}

\returnb{--- NOK Error occured.}
\endofentry
\beginofentry
\entrytype{Function}
\entryname{ty\_close}
\synopsis{int ty\_close(id)}
\paramy{int id}{IN: Document to Close}
\descriptiona{Close a Document}
\returna{OK / NOK}
\endofentry
\beginofentry
\entrytype{Function}
\entryname{ty\_pseek}
\synopsis{int ty\_pseek(id, times, mode)}
\parama{int id}{IN: Document concerned}
\paramb{int times}{IN: Number of Pages to move}
\paramz{int mode}{IN: Mode as 0(Absolute) / 1 (Relative) / 2 (EOF)}
\descriptiona{Move in the document by PAGE units}
\returna{Current position / -1 for Errors}
\remarksa{Just SET the position; use ty\_show to display the current contents. The position specified is adjusted if 
it's outside the document limits.}
\endofentry
\beginofentry
\entrytype{Function}
\entryname{ty\_lseek}
\synopsis{int ty\_lseek(id, times, mode)}
\parama{int id}{IN: Document concerned}
\paramb{int times}{IN: Number of Lines to Move}
\paramz{int mode}{IN: Mode as 0(Absolute) / 1 (Relative) / 2 (EOF)}
\descriptiona{Move in the document by LINE units}
\returna{Current position / -1 for Errors}
\remarksa{Just SET the position; use ty\_show to display the current contents.}
\endofentry
\beginofentry
\entrytype{Function}
\entryname{ty\_show}
\synopsis{int ty\_show(id)}
\paramy{int id}{IN: Document concerned}
\descriptiona{Display on Window the current Document Position}
\returna{OK / NOK}
\endofentry
\endofdbc
\beginofdbx
\extrynamea{eh\_ed\_i}
\extrynameb{eh\_put}
\extrynameb{mm\_ssave}
\extrynameb{osmmexp}
\extrynameb{osmmfree}
\extrynamez{osmmget}
\extrynameb{pm\_enter}
\extrynameb{pm\_iexit}
\extrynameb{tw\_home}
\extrynameb{tw\_r}
\extrynameb{tw\_st}
\extrynamez{tw\_tra}
\extrynameb{tw\_wa}
\extrynameb{tx\_display}
\extrynameb{tx\_fdisplay}
\extrynameb{tx\_file}
\extrynameb{tx\_mdisplay}
\extrynamez{$<$twset.h$>$}
\extrynameb{$<$str.h$>$}
\endofdbx
