9fans.net/go@v0.0.7/cmd/samterm/mesg.h.go (about)

     1  package main
     2  
     3  import "unicode/utf8"
     4  
     5  /* VERSION 1 introduces plumbing
     6  2 increases SNARFSIZE from 4096 to 32000
     7  */
     8  const VERSION = 2
     9  
    10  const TBLOCKSIZE = 512                         /* largest piece of text sent to terminal */
    11  const DATASIZE = (utf8.UTFMax*TBLOCKSIZE + 30) /* ... including protocol header stuff */
    12  const SNARFSIZE = 32000                        /* maximum length of exchanged snarf buffer, must fit in 15 bits */
    13  /*
    14   * Messages originating at the terminal
    15   */
    16  type Tmesg int
    17  
    18  const (
    19  	Tversion Tmesg = iota
    20  	Tstartcmdfile
    21  	Tcheck
    22  	Trequest
    23  	Torigin
    24  	Tstartfile
    25  	Tworkfile
    26  	Ttype
    27  	Tcut
    28  	Tpaste
    29  	Tsnarf
    30  	Tstartnewfile
    31  	Twrite
    32  	Tclose
    33  	Tlook
    34  	Tsearch
    35  	Tsend
    36  	Tdclick
    37  	Tstartsnarf
    38  	Tsetsnarf
    39  	Tack
    40  	Texit
    41  	Tplumb
    42  	TMAX
    43  )
    44  
    45  /*
    46   * Messages originating at the host
    47   */
    48  type Hmesg int
    49  
    50  const (
    51  	Hversion Hmesg = iota
    52  	Hbindname
    53  	Hcurrent
    54  	Hnewname
    55  	Hmovname
    56  	Hgrow
    57  	Hcheck0
    58  	Hcheck
    59  	Hunlock
    60  	Hdata
    61  	Horigin
    62  	Hunlockfile
    63  	Hsetdot
    64  	Hgrowdata
    65  	Hmoveto
    66  	Hclean
    67  	Hdirty
    68  	Hcut
    69  	Hsetpat
    70  	Hdelname
    71  	Hclose
    72  	Hsetsnarf
    73  	Hsnarflen
    74  	Hack
    75  	Hexit
    76  	Hplumb
    77  	HMAX
    78  )
    79  
    80  type Header struct {
    81  	typ    Hmesg
    82  	count0 uint8
    83  	count1 uint8
    84  }