Print this page
12212 typos in some section 3tecla man pages

Split Close
Expand all
Collapse all
          --- old/usr/src/man/man3tecla/gl_io_mode.3tecla.man.txt
          +++ new/usr/src/man/man3tecla/gl_io_mode.3tecla.man.txt
↓ open down ↓ 51 lines elided ↑ open up ↑
  52   52                           gl_get_line() from an external I/O-driven event loop.
  53   53  
  54   54  
  55   55  
  56   56         Newly created GetLine objects start in normal I/O mode, so to switch to
  57   57         non-blocking server mode requires an initial call to gl_io_mode().
  58   58  
  59   59     Server I/O Mode
  60   60         In non-blocking server I/O mode, the application is required to have an
  61   61         event loop that calls gl_get_line() whenever the terminal file
  62      -       descriptor can perform the type I/O that gl_get_line() is waiting for.
  63      -       To determine which type of I/O gl_get_line() is waiting for, the
       62 +       descriptor can perform the type of I/O that gl_get_line() is waiting
       63 +       for. To determine which type of I/O gl_get_line() is waiting for, the
  64   64         application calls the gl_pending_io() function.  The return value is
  65   65         one of the following two enumerated values.
  66   66  
  67   67         GLP_READ
  68   68                      gl_get_line() is waiting to write a character to the
  69   69                      terminal.
  70   70  
  71   71  
  72   72         GLP_WRITE
  73   73                      gl_get_line() is waiting to read a character from the
  74      -                    keyboad.
       74 +                    keyboard.
  75   75  
  76   76  
  77   77  
  78   78         If the application is using either the select(3C) or poll(2) function
  79   79         to watch for I/O on a group of file descriptors, then it should call
  80   80         the gl_pending_io() function before each call to these functions to
  81   81         determine which direction of I/O it should tell them to watch for, and
  82   82         configure their arguments accordingly. In the case of the select()
  83   83         function, this means using the FD_SET() macro to add the terminal file
  84   84         descriptor either to the set of file descriptors to be watched for
↓ open down ↓ 248 lines elided ↑ open up ↑
 333  333                    statements, and continue with the following statements,
 334  334                    which are executed regardless of whether or not a signal is
 335  335                    caught. Note that when sigsetjmp() returns, regardless of
 336  336                    why it returned, the process signal mask is returned to how
 337  337                    it was when sigsetjmp() was called. Thus the following
 338  338                    statements are always executed with all of our signals
 339  339                    blocked.
 340  340  
 341  341             10.    Reinstate the signal handlers that were displaced in step 5.
 342  342  
 343      -           11.    Check wether a signal was caught, by checking the file-scope
 344      -                  variable that the signal handler records signal numbers in.
      343 +           11.    Check whether a signal was caught, by checking the file-
      344 +                  scope variable that the signal handler records signal
      345 +                  numbers in.
 345  346  
 346  347             12.    If a signal was caught, send this signal to the application
 347  348                    again and unblock only this signal so that it invokes the
 348  349                    signal handler which was just reinstated in step 10.
 349  350  
 350  351             13.    Unblock all of the signals that were blocked in step 7.
 351  352  
 352  353     Signals Caught By gl_get_line()
 353  354         Since the application is expected to handle signals in non-blocking
 354  355         server mode, gl_get_line() does not attempt to duplicate this when it
↓ open down ↓ 5 lines elided ↑ open up ↑
 360  361         terminated by this signal, gl_get_line() returns NULL, and a following
 361  362         call to gl_return_status() returns the enumerated value GLR_SIGNAL.
 362  363  
 363  364     Aborting Line Input
 364  365         Often, rather than letting it terminate the process, applications
 365  366         respond to the SIGINT user-interrupt signal by aborting the current
 366  367         input line. This can be accomplished in non-blocking server-I/O mode by
 367  368         not calling gl_handle_signal() when this signal is caught, but by
 368  369         calling instead the gl_abandon_line() function. This function arranges
 369  370         that when gl_get_line() is next called, it first flushes any pending
 370      -       output to the terminal, discardes the current input line, outputs a new
      371 +       output to the terminal, discards the current input line, outputs a new
 371  372         prompt on the next line, and finally starts accepting input of a new
 372  373         input line from the user.
 373  374  
 374  375     Signal Safe Functions
 375  376         Provided that certain rules are followed, the gl_normal_io(),
 376  377         gl_raw_io(), gl_handle_signal(), and gl_abandon_line() functions can be
 377  378         written to be safely callable from signal handlers. Other functions in
 378  379         this library should not be called from signal handlers. For this to be
 379  380         true, all signal handlers that call these functions must be registered
 380  381         in such a way that only one instance of any one of them can be running
↓ open down ↓ 47 lines elided ↑ open up ↑
 428  429         +--------------------+-----------------+
 429  430         |MT-Level            | MT-Safe         |
 430  431         +--------------------+-----------------+
 431  432  
 432  433  SEE ALSO
 433  434         cpl_complete_word(3TECLA), ef_expand_file(3TECLA), gl_get_line(3TECLA),
 434  435         libtecla(3LIB), pca_lookup_file(3TECLA), attributes(5), tecla(5)
 435  436  
 436  437  
 437  438  
 438      -                                 June 1, 2004               GL_IO_MODE(3TECLA)
      439 +                               January 18, 2020             GL_IO_MODE(3TECLA)
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX