Posted to tcl by lunaphyte at Wed Feb 13 21:49:08 GMT 2019view raw

  1. # send the CID information to an external program
  2. # Input: $ciddate $cidtime $cidnumber $cidname $cidline $cidtype "" ""
  3. proc sendCID {cid} {
  4. global Program
  5. global ExecSh
  6. global ModDir
  7. global WakeUp
  8.  
  9. set modcid "$cid"
  10. # send DATE\nTIME\nNUMBER\nNAME\nLINE\nTYPE\nMESG\nMTYPE\n
  11. set modtype "using a module"
  12. set modin "[lindex $cid 0]\n[lindex $cid 1]\n[lindex $cid 2]\n[lindex $cid 3]\n[lindex $cid 4]\n[lindex $cid 5]\n[lindex $cid 6]\n[lindex $cid 7]"
  13. if $ExecSh {
  14. catch {exec sh -c $Program << "$modin" >@stdout &} oops
  15. } else {
  16. catch {exec $Program << "$modin" >@stdout &} oops
  17. }
  18. doVerbose "$modtype\nSent $Program $modcid" 1
  19. }