home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / m / mxterm.zip / mxterm / ptyx.h < prev    next >
C/C++ Source or Header  |  1992-10-17  |  17KB  |  533 lines

  1. /*
  2.  *    $XConsortium: ptyx.h,v 1.60 91/06/24 20:45:02 gildea Exp $
  3.  */
  4.  
  5. /*
  6.  * Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
  7.  *
  8.  *                         All Rights Reserved
  9.  *
  10.  * Permission to use, copy, modify, and distribute this software and its
  11.  * documentation for any purpose and without fee is hereby granted,
  12.  * provided that the above copyright notice appear in all copies and that
  13.  * both that copyright notice and this permission notice appear in
  14.  * supporting documentation, and that the name of Digital Equipment
  15.  * Corporation not be used in advertising or publicity pertaining to
  16.  * distribution of the software without specific, written prior permission.
  17.  *
  18.  *
  19.  * DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  20.  * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
  21.  * DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
  22.  * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  23.  * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  24.  * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  25.  * SOFTWARE.
  26.  */
  27.  
  28. /* ptyx.h */
  29. /* @(#)ptyx.h    X10/6.6    11/10/86 */
  30.  
  31. #include <X11/IntrinsicP.h>
  32. #include <X11/Xmu/Misc.h>    /* For Max() and Min(). */
  33. #include <X11/Xfuncs.h>
  34. #include <X11/Xosdefs.h>
  35.  
  36. /* Extra Xlib definitions */
  37. #define AllButtonsUp(detail, ignore)  (\
  38.         ((ignore) == Button1) ? \
  39.                 (((detail)&(Button2Mask|Button3Mask)) == 0) \
  40.                 : \
  41.          (((ignore) == Button2) ? \
  42.                   (((detail)&(Button1Mask|Button3Mask)) == 0) \
  43.                 : \
  44.                   (((detail)&(Button1Mask|Button2Mask)) == 0)) \
  45.         )
  46.  
  47. #define MAX_COLS    200
  48. #define MAX_ROWS    128
  49.  
  50. /*
  51. ** System V definitions
  52. */
  53.  
  54. #ifdef SYSV
  55. #ifdef X_NOT_POSIX
  56. #ifndef CRAY
  57. #define    dup2(fd1,fd2)    ((fd1 == fd2) ? fd1 : \
  58.                 (close(fd2), fcntl(fd1, F_DUPFD, fd2)))
  59. #endif
  60. #endif
  61. #endif /* SYSV */
  62.  
  63. /*
  64. ** allow for mobility of the pty master/slave directories
  65. */
  66. #ifndef PTYDEV
  67. #ifdef hpux
  68. #define    PTYDEV        "/dev/ptym/ptyxx"
  69. #else    /* !hpux */
  70. #define    PTYDEV        "/dev/ptyxx"
  71. #endif    /* !hpux */
  72. #endif    /* !PTYDEV */
  73.  
  74. #ifndef TTYDEV
  75. #ifdef hpux
  76. #define TTYDEV        "/dev/pty/ttyxx"
  77. #else    /* !hpux */
  78. #define    TTYDEV        "/dev/ttyxx"
  79. #endif    /* !hpux */
  80. #endif    /* !TTYDEV */
  81.  
  82. #ifndef PTYCHAR1
  83. #ifdef hpux
  84. #define PTYCHAR1    "zyxwvutsrqp"
  85. #else    /* !hpux */
  86. #define    PTYCHAR1    "pqrstuvwxyzPQRSTUVWXYZ"
  87. #endif    /* !hpux */
  88. #endif    /* !PTYCHAR1 */
  89.  
  90. #ifndef PTYCHAR2
  91. #ifdef hpux
  92. #define    PTYCHAR2    "fedcba9876543210"
  93. #else    /* !hpux */
  94. #define    PTYCHAR2    "0123456789abcdef"
  95. #endif    /* !hpux */
  96. #endif    /* !PTYCHAR2 */
  97.  
  98. /* Until the translation manager comes along, I have to do my own translation of
  99.  * mouse events into the proper routines. */
  100.  
  101. typedef enum {NORMAL, LEFTEXTENSION, RIGHTEXTENSION} EventMode;
  102.  
  103. /*
  104.  * The origin of a screen is 0, 0.  Therefore, the number of rows
  105.  * on a screen is screen->max_row + 1, and similarly for columns.
  106.  */
  107.  
  108. typedef unsigned char Char;        /* to support 8 bit chars */
  109. typedef Char **ScrnBuf;
  110.  
  111. /*
  112.  * ANSI emulation.
  113.  */
  114. #define INQ    0x05
  115. #define    FF    0x0C            /* C0, C1 control names        */
  116. #define    LS1    0x0E
  117. #define    LS0    0x0F
  118. #define    CAN    0x18
  119. #define    SUB    0x1A
  120. #define    ESC    0x1B
  121. #define US    0x1F
  122. #define    DEL    0x7F
  123. #define HTS     ('H'+0x40)
  124. #define    SS2    0x8E
  125. #define    SS3    0x8F
  126. #define    DCS    0x90
  127. #define    OLDID    0x9A            /* ESC Z            */
  128. #define    CSI    0x9B
  129. #define    ST    0x9C
  130. #define    OSC    0x9D
  131. #define    PM    0x9E
  132. #define    APC    0x9F
  133. #define    RDEL    0xFF
  134.  
  135. #define NMENUFONTS 9            /* entries in fontMenu */
  136.  
  137. #define    NBOX    5            /* Number of Points in box    */
  138. #define    NPARAM    10            /* Max. parameters        */
  139.  
  140. #define    MINHILITE    32
  141.  
  142. typedef struct {
  143.     unsigned char    a_type;
  144.     unsigned char    a_pintro;
  145.     unsigned char    a_final;
  146.     unsigned char    a_inters;
  147.     char    a_nparam;        /* # of parameters        */
  148.     char    a_dflt[NPARAM];        /* Default value flags        */
  149.     short    a_param[NPARAM];    /* Parameters            */
  150.     char    a_nastyf;        /* Error flag            */
  151. } ANSI;
  152.  
  153. typedef struct {
  154.     int        row;
  155.     int        col;
  156.     unsigned    flags;    /* Vt100 saves graphics rendition. Ugh! */
  157.     char        curgl;
  158.     char        curgr;
  159.     char        gsets[4];
  160. } SavedCursor;
  161.  
  162. #define TEK_FONT_LARGE 0
  163. #define TEK_FONT_2 1
  164. #define TEK_FONT_3 2
  165. #define TEK_FONT_SMALL 3
  166. #define    TEKNUMFONTS 4
  167.  
  168. /* Actually there are 5 types of lines, but four are non-solid lines */
  169. #define    TEKNUMLINES    4
  170.  
  171. typedef struct {
  172.     int    x;
  173.     int    y;
  174.     int    fontsize;
  175.     int    linetype;
  176. } Tmodes;
  177.  
  178. typedef struct {
  179.     int Twidth;
  180.     int Theight;
  181. } T_fontsize;
  182.  
  183. typedef struct {
  184.     short *bits;
  185.     int x;
  186.     int y;
  187.     int width;
  188.     int height;
  189. } BitmapBits;
  190.  
  191. #define    SAVELINES        64      /* default # lines to save      */
  192. #define SCROLLLINES 1            /* default # lines to scroll    */
  193.  
  194. typedef struct {
  195. /* These parameters apply to both windows */
  196.     Display        *display;    /* X display for screen        */
  197.     int        respond;    /* socket for responses
  198.                        (position report, etc.)    */
  199.     long        pid;        /* pid of process on far side   */
  200.     int        uid;        /* user id of actual person    */
  201.     int        gid;        /* group id of actual person    */
  202.     GC        normalGC;    /* normal painting        */
  203.     GC        reverseGC;    /* reverse painting        */
  204.     GC        normalboldGC;    /* normal painting, bold font    */
  205.     GC        reverseboldGC;    /* reverse painting, bold font    */
  206.     GC        cursorGC;    /* normal cursor painting    */
  207.     GC        reversecursorGC;/* reverse cursor painting    */
  208.     GC        cursoroutlineGC;/* for painting lines around    */
  209.     Pixel        foreground;    /* foreground color        */
  210.     Pixel        cursorcolor;    /* Cursor color            */
  211.     Pixel        mousecolor;    /* Mouse color            */
  212.     Pixel        mousecolorback;    /* Mouse color background    */
  213.     int        border;        /* inner border            */
  214.     Cursor        arrow;        /* arrow cursor            */
  215.     unsigned short    send_mouse_pos;    /* user wants mouse transition  */
  216.                     /* and position information    */
  217.     int        select;        /* xterm selected        */
  218.     Boolean        visualbell;    /* visual bell mode        */
  219.     int        logging;    /* logging mode            */
  220.     Boolean        allowSendEvents;/* SendEvent mode        */
  221.     Boolean        grabbedKbd;    /* keyboard is grabbed        */
  222.     int        logfd;        /* file descriptor of log    */
  223.     char        *logfile;    /* log file name        */
  224.     unsigned char    *logstart;    /* current start of log buffer    */
  225.     int        inhibit;    /* flags for inhibiting changes    */
  226.  
  227. /* VT window parameters */
  228.     struct {
  229.         Window    window;        /* X window id            */
  230.         int    width;        /* width of columns        */
  231.         int    height;        /* height of rows        */
  232.         int    fullwidth;    /* full width of window        */
  233.         int    fullheight;    /* full height of window    */
  234.         int    f_width;    /* width of fonts in pixels    */
  235.         int    f_height;    /* height of fonts in pixels    */
  236.     } fullVwin;
  237.     Cursor pointer_cursor;        /* pointer cursor in window    */
  238.  
  239.     /* Terminal fonts must be of the same size and of fixed width */
  240.     XFontStruct    *fnt_norm;    /* normal font of terminal    */
  241.     XFontStruct    *fnt_bold;    /* bold font of terminal    */
  242.     int        enbolden;    /* overstrike for bold font    */
  243.     XPoint        *box;        /* draw unselected cursor    */
  244.  
  245.     int        cursor_state;    /* ON or OFF            */
  246.     int        cursor_set;    /* requested state        */
  247.     int        cursor_col;    /* previous cursor column    */
  248.     int        cursor_row;    /* previous cursor row        */
  249.     int        cur_col;    /* current cursor column    */
  250.     int        cur_row;    /* current cursor row        */
  251.     int        max_col;    /* rightmost column        */
  252.     int        max_row;    /* bottom row            */
  253.     int        top_marg;    /* top line of scrolling region */
  254.     int        bot_marg;    /* bottom line of  "        "    */
  255.     Widget        scrollWidget;    /* pointer to scrollbar struct    */
  256.     int        scrollbar;    /* if > 0, width of scrollbar, and
  257.                         scrollbar is showing    */
  258.     int        topline;    /* line number of top, <= 0    */
  259.     int        savedlines;     /* number of lines that've been saved */
  260.     int        savelines;    /* number of lines off top to save */
  261.     int        scrolllines;    /* number of lines to button scroll */
  262.     Boolean        scrollttyoutput; /* scroll to bottom on tty output */
  263.     Boolean        scrollkey;    /* scroll to bottom on key    */
  264.     
  265.     ScrnBuf        buf;        /* ptr to visible screen buf (main) */
  266.     ScrnBuf        allbuf;        /* screen buffer (may include
  267.                        lines scrolled off top)    */
  268.     char        *sbuf_address;    /* main screen memory address   */
  269.     ScrnBuf        altbuf;        /* alternate screen buffer    */
  270.     char        *abuf_address;    /* alternate screen memory address */
  271.     Boolean        alternate;    /* true if using alternate buf    */
  272.     unsigned short    do_wrap;    /* true if cursor in last column
  273.                         and character just output    */
  274.     int        incopy;        /* 0 idle; 1 XCopyArea issued;
  275.                         -1 first GraphicsExpose seen,
  276.                         but last not seen        */
  277.     int        copy_src_x;    /* params from last XCopyArea ... */
  278.     int        copy_src_y;
  279.     unsigned int    copy_width;
  280.     unsigned int    copy_height;
  281.     int        copy_dest_x;
  282.     int        copy_dest_y;
  283.     Boolean        c132;        /* allow change to 132 columns    */
  284.     Boolean        curses;        /* cludge-ups for more and vi    */
  285.     Boolean        marginbell;    /* true if margin bell on    */
  286.     int        nmarginbell;    /* columns from right margin    */
  287.     int        bellarmed;    /* cursor below bell margin    */
  288.     Boolean     multiscroll;    /* true if multi-scroll        */
  289.     int        scrolls;    /* outstanding scroll count,
  290.                         used only with multiscroll    */
  291.     SavedCursor    sc;        /* data for restore cursor    */
  292.     int        save_modes[19];    /* save dec private modes    */
  293.  
  294.     /* Improved VT100 emulation stuff.                */
  295.     char        gsets[4];    /* G0 through G3.        */
  296.     char        curgl;        /* Current GL setting.        */
  297.     char        curgr;        /* Current GR setting.        */
  298.     char        curss;        /* Current single shift.    */
  299.     int        scroll_amt;    /* amount to scroll        */
  300.     int        refresh_amt;    /* amount to refresh        */
  301.     Boolean        jumpscroll;    /* whether we should jumpscroll */
  302.     Boolean         always_highlight; /* whether to highlight cursor */
  303.  
  304. /* Tektronix window parameters */
  305.     GC        TnormalGC;    /* normal painting        */
  306.     GC        TcursorGC;    /* normal cursor painting    */
  307.     Pixel        Tforeground;    /* foreground color        */
  308.     Pixel        Tbackground;    /* Background color        */
  309.     Pixel        Tcursorcolor;    /* Cursor color            */
  310.     int        Tcolor;        /* colors used            */
  311.     Boolean        Vshow;        /* VT window showing        */
  312.     Boolean        Tshow;        /* Tek window showing        */
  313.     Boolean        waitrefresh;    /* postpone refresh        */
  314.     struct {
  315.         Window    window;        /* X window id            */
  316.         int    width;        /* width of columns        */
  317.         int    height;        /* height of rows        */
  318.         int    fullwidth;    /* full width of window        */
  319.         int    fullheight;    /* full height of window    */
  320.         double    tekscale;    /* scale factor Tek -> vs100    */
  321.     } fullTwin;
  322.     int        xorplane;    /* z plane for inverts        */
  323.     GC        linepat[TEKNUMLINES]; /* line patterns        */
  324.     Boolean        TekEmu;        /* true if Tektronix emulation    */
  325.     int        cur_X;        /* current x            */
  326.     int        cur_Y;        /* current y            */
  327.     Tmodes        cur;        /* current tek modes        */
  328.     Tmodes        page;        /* starting tek modes on page    */
  329.     int        margin;        /* 0 -> margin 1, 1 -> margin 2    */
  330.     int        pen;        /* current Tektronix pen 0=up, 1=dn */
  331.     char        *TekGIN;    /* nonzero if Tektronix GIN mode*/
  332.     int        gin_terminator; /* Tek strap option */
  333.  
  334.     int        multiClickTime;     /* time between multiclick selects */
  335.     int        bellSuppressTime; /* msecs after Bell before another allowed */
  336.     Boolean        bellInProgress; /* still ringing/flashing prev bell? */
  337.     char        *charClass;    /* for overriding word selection */
  338.     Boolean        cutNewline;    /* whether or not line cut has \n */
  339.     Boolean        cutToBeginningOfLine;  /* line cuts to BOL? */
  340.     char        *selection;    /* the current selection */
  341.     int        selection_size; /* size of allocated buffer */
  342.     int        selection_length; /* number of significant bytes */
  343.     int        selection_time;    /* latest event timestamp */
  344.     int        startHRow, startHCol, /* highlighted text */
  345.             endHRow, endHCol,
  346.             startHCoord, endHCoord;
  347.     Atom*        selection_atoms; /* which selections we own */
  348.     Cardinal    sel_atoms_size;    /*  how many atoms allocated */
  349.     Cardinal    selection_count; /* how many atoms in use */
  350.     Boolean        input_eight_bits;/* use 8th bit instead of ESC prefix */
  351.     Boolean        output_eight_bits; /* honor all bits or strip */
  352.     Pixmap        menu_item_bitmap;    /* mask for checking items */
  353.     Widget        mainMenu, vtMenu, tekMenu, fontMenu;
  354.     char*        menu_font_names[NMENUFONTS];
  355.     int        menu_font_number;
  356. } TScreen;
  357.  
  358. typedef struct _TekPart {
  359.     XFontStruct *Tfont[TEKNUMFONTS];
  360.     int        tobaseline[TEKNUMFONTS]; /* top to baseline for each font */
  361.     char    *initial_font;        /* large, 2, 3, small */
  362.     char    *gin_terminator_str;    /* ginTerminator resource */
  363. } TekPart;
  364.  
  365.  
  366.  
  367. /* meaning of bits in screen.select flag */
  368. #define    INWINDOW    01    /* the mouse is in one of the windows */
  369. #define    FOCUS        02    /* one of the windows is the focus window */
  370.  
  371. #define MULTICLICKTIME 250    /* milliseconds */
  372.  
  373. typedef struct
  374. {
  375.     unsigned    flags;
  376. } TKeyboard;
  377.  
  378. typedef struct _Misc {
  379.     char *geo_metry;
  380.     char *T_geometry;
  381.     char *f_n;
  382.     char *f_b;
  383.     Boolean log_on;
  384.     Boolean login_shell;
  385.     Boolean re_verse;
  386.     int resizeGravity;
  387.     Boolean reverseWrap;
  388.     Boolean autoWrap;
  389.     Boolean logInhibit;
  390.     Boolean signalInhibit;
  391.     Boolean tekInhibit;
  392.     Boolean scrollbar;
  393.     Boolean titeInhibit;
  394.     Boolean tekSmall;    /* start tek window in small size */
  395.     Boolean appcursorDefault;
  396.     Boolean appkeypadDefault;
  397. } Misc;
  398.  
  399. typedef struct {int foo;} XtermClassPart, TekClassPart;
  400.  
  401. typedef struct _XtermClassRec {
  402.     CoreClassPart  core_class;
  403.     XtermClassPart xterm_class;
  404. } XtermClassRec;
  405.  
  406. typedef struct _TekClassRec {
  407.     CoreClassPart core_class;
  408.     TekClassPart tek_class;
  409. } TekClassRec;
  410.  
  411. /* define masks for flags */
  412. #define CAPS_LOCK    0x01
  413. #define KYPD_APL    0x02
  414. #define CURSOR_APL    0x04
  415.  
  416.  
  417. #define N_MARGINBELL    10
  418. #define MAX_TABS    320
  419. #define TAB_ARRAY_SIZE    10    /* number of ints to provide MAX_TABS bits */
  420.  
  421. typedef unsigned Tabs [TAB_ARRAY_SIZE];
  422.  
  423. typedef struct _XtermWidgetRec {
  424.     CorePart    core;
  425.     TKeyboard    keyboard;    /* terminal keyboard        */
  426.     TScreen    screen;        /* terminal screen        */
  427.     unsigned    flags;        /* mode flags            */
  428.     unsigned    initflags;    /* initial mode flags        */
  429.     Tabs    tabs;        /* tabstops of the terminal    */
  430.     Misc    misc;        /* miscellaneous parameters    */
  431. } XtermWidgetRec, *XtermWidget;
  432.  
  433. typedef struct _TekWidgetRec {
  434.     CorePart core;
  435.     TekPart tek;
  436. } TekWidgetRec, *TekWidget;
  437.  
  438. #define BUF_SIZE 4096
  439.  
  440. /*
  441.  * terminal flags
  442.  * There are actually two namespaces mixed together here.
  443.  * One is the set of flags that can go in screen->buf attributes
  444.  * and which must fit in a char.
  445.  * The other is the global setting stored in
  446.  * term->flags and screen->save_modes.  This need only fit in an unsigned.
  447.  */
  448.  
  449. #define    ATTRIBUTES    0x07    /* mask: user-visible attributes */
  450. /* global flags and character flags (visible character attributes) */
  451. #define INVERSE        0x01    /* invert the characters to be output */
  452. #define UNDERLINE    0x02    /* true if underlining */
  453. #define BOLD        0x04
  454. /* character flags (internal attributes) */
  455. #define LINEWRAPPED    0x08    /* used on the first character in a
  456.                  * line to indicate that it wraps onto
  457.                  * the next line so we can tell the
  458.                  * difference between lines that have
  459.                  * wrapped around and lines that have
  460.                  * ended naturally with a CR at column
  461.                  * max_col.
  462.                  */
  463. #define CHARDRAWN    0x10    /* a character has been drawn here on the
  464.                    screen.  Used to distinguish blanks from
  465.                    empty parts of the screen when selecting */
  466. /* global flags */
  467. #define WRAPAROUND    0x400    /* true if auto wraparound mode */
  468. #define    REVERSEWRAP    0x800    /* true if reverse wraparound mode */
  469. #define REVERSE_VIDEO    0x1000    /* true if screen white on black */
  470. #define LINEFEED    0x2000    /* true if in auto linefeed mode */
  471. #define ORIGIN        0x4000    /* true if in origin mode */
  472. #define INSERT        0x8000    /* true if in insert mode */
  473. #define SMOOTHSCROLL    0x10000    /* true if in smooth scroll mode */
  474. #define IN132COLUMNS    0x20000    /* true if in 132 column mode */
  475.  
  476.  
  477. #define VWindow(screen)        (screen->fullVwin.window)
  478. #define VShellWindow        term->core.parent->core.window
  479. #define TextWindow(screen)      (screen->fullVwin.window)
  480. #define TWindow(screen)        (screen->fullTwin.window)
  481. #define TShellWindow        tekWidget->core.parent->core.window
  482. #define Width(screen)        (screen->fullVwin.width)
  483. #define Height(screen)        (screen->fullVwin.height)
  484. #define FullWidth(screen)    (screen->fullVwin.fullwidth)
  485. #define FullHeight(screen)    (screen->fullVwin.fullheight)
  486. #define FontWidth(screen)    (screen->fullVwin.f_width)
  487. #define FontHeight(screen)    (screen->fullVwin.f_height)
  488. #define TWidth(screen)        (screen->fullTwin.width)
  489. #define THeight(screen)        (screen->fullTwin.height)
  490. #define TFullWidth(screen)    (screen->fullTwin.fullwidth)
  491. #define TFullHeight(screen)    (screen->fullTwin.fullheight)
  492. #define TekScale(screen)    (screen->fullTwin.tekscale)
  493.  
  494. #define CursorX(screen,col) ((col) * FontWidth(screen) + screen->border \
  495.             + screen->scrollbar)
  496. #define CursorY(screen,row) ((((row) - screen->topline) * FontHeight(screen)) \
  497.             + screen->border)
  498.  
  499. #define    TWINDOWEVENTS    (KeyPressMask | ExposureMask | ButtonPressMask |\
  500.              ButtonReleaseMask | StructureNotifyMask |\
  501.              EnterWindowMask | LeaveWindowMask | FocusChangeMask)
  502.  
  503. #define    WINDOWEVENTS    (TWINDOWEVENTS | PointerMotionMask)
  504.  
  505.  
  506. #define TEK_LINK_BLOCK_SIZE 1024
  507.  
  508. typedef struct Tek_Link
  509. {
  510.     struct Tek_Link    *next;    /* pointer to next TekLink in list
  511.                    NULL <=> this is last TekLink */
  512.     short fontsize;        /* character size, 0-3 */
  513.     short count;        /* number of chars in data */
  514.     char *ptr;        /* current pointer into data */
  515.     char data [TEK_LINK_BLOCK_SIZE];
  516. } TekLink;
  517.  
  518. /* flags for cursors */
  519. #define    OFF        0
  520. #define    ON        1
  521. #define    CLEAR        0
  522. #define    TOGGLE        1
  523.  
  524. /* flags for inhibit */
  525. #define    I_LOG        0x01
  526. #define    I_SIGNAL    0x02
  527. #define    I_TEK        0x04
  528.  
  529. extern Cursor make_colored_cursor();
  530. extern int GetBytesAvailable();
  531. extern void first_map_occurred();
  532. extern int kill_process_group();
  533.