Changeset 38258 in project


Ignore:
Timestamp:
03/14/20 19:50:34 (2 weeks ago)
Author:
wasamasa
Message:

breadline: Release v0.8

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/5/breadline

    r38179 r38258  
    204204and defaults to {{(repl-prompt)}}.
    205205
     206==== Cleanup
     207
     208<procedure>(cleanup-after-signal!)</procedure>
     209<procedure>(reset-after-signal!)</procedure>
     210
     211Procedures to call in sequence after receiving a signal in a signal
     212handler to ensure a clean terminal and readline state.
     213
     214<procedure>(reset-terminal! [TERMINAL-NAME])</procedure>
     215
     216Procedure to call after program exit to ensure a clean terminal state.
     217The optional argument {{TERMINAL-NAME}} defaults to the value of the
     218{{TERM}} environment variable.
     219
    206220=== Examples
    207221
    208222<enscript highlight="scheme">
     223(import (chicken process signal))
    209224(import breadline)
     225
     226(set-signal-handler! signal/int
     227                     (lambda _
     228                       (cleanup-after-signal!)
     229                       (reset-after-signal!)))
     230(on-exit reset-terminal!)
    210231
    211232(let loop ()
     
    243264=== Version history
    244265
     266==== 0.8
     267
     268* Expose cleanup procedures for signal and exit handlers
     269* Make use of these procedures in examples
     270
    245271==== 0.7
    246272
Note: See TracChangeset for help on using the changeset viewer.