Tcl Source Code

Hex Artifact Content
Login

Artifact 272b8164f266ec92332b8fdd02551a8336a12e21:

Attachment "noBoom.msg" to ticket [219355ffff] added by davygrvy 2001-05-18 06:22:48.
0000: 46 72 6f 6d 20 6a 65 73 73 65 6c 40 69 6e 61 67  From jessel@inag
0010: 6f 2e 63 6f 6d 20 54 68 75 20 4d 61 79 20 31 37  o.com Thu May 17
0020: 20 31 33 3a 35 36 3a 33 35 20 32 30 30 31 0a 50   13:56:35 2001.P
0030: 61 74 68 3a 20 6e 6e 74 70 31 2d 73 66 2e 70 62  ath: nntp1-sf.pb
0040: 69 2e 6e 65 74 21 63 79 63 6c 6f 6e 65 2d 73 66  i.net!cyclone-sf
0050: 2e 70 62 69 2e 6e 65 74 21 36 33 2e 32 30 38 2e  .pbi.net!63.208.
0060: 32 30 38 2e 31 34 33 21 66 65 65 64 32 2e 6f 6e  208.143!feed2.on
0070: 65 6d 61 69 6e 2e 63 6f 6d 21 66 65 65 64 31 2e  emain.com!feed1.
0080: 6f 6e 65 6d 61 69 6e 2e 63 6f 6d 21 6e 65 77 73  onemain.com!news
0090: 66 65 65 64 2e 64 69 72 65 63 74 2e 63 61 21 6c  feed.direct.ca!l
00a0: 6f 6f 6b 2e 63 61 21 6e 65 77 73 31 2e 74 6f 72  ook.ca!news1.tor
00b0: 2e 6d 65 74 72 6f 6e 65 74 2e 63 61 21 6e 6e 72  .metronet.ca!nnr
00c0: 70 31 2e 74 6f 72 2e 6d 65 74 72 6f 6e 65 74 2e  p1.tor.metronet.
00d0: 63 61 21 6e 6f 74 2d 66 6f 72 2d 6d 61 69 6c 0a  ca!not-for-mail.
00e0: 4d 65 73 73 61 67 65 2d 49 44 3a 20 3c 33 42 30  Message-ID: <3B0
00f0: 34 33 41 34 34 2e 36 37 46 43 39 36 41 42 40 69  43A44.67FC96AB@i
0100: 6e 61 67 6f 2e 63 6f 6d 3e 0a 46 72 6f 6d 3a 20  nago.com>.From: 
0110: 44 65 65 63 68 20 3c 6a 65 73 73 65 6c 40 69 6e  Deech <jessel@in
0120: 61 67 6f 2e 63 6f 6d 3e 0a 58 2d 4d 61 69 6c 65  ago.com>.X-Maile
0130: 72 3a 20 4d 6f 7a 69 6c 6c 61 20 34 2e 37 32 20  r: Mozilla 4.72 
0140: 5b 65 6e 5d 20 28 57 69 6e 4e 54 3b 20 55 29 0a  [en] (WinNT; U).
0150: 58 2d 41 63 63 65 70 74 2d 4c 61 6e 67 75 61 67  X-Accept-Languag
0160: 65 3a 20 65 6e 0a 4d 49 4d 45 2d 56 65 72 73 69  e: en.MIME-Versi
0170: 6f 6e 3a 20 31 2e 30 0a 4e 65 77 73 67 72 6f 75  on: 1.0.Newsgrou
0180: 70 73 3a 20 63 6f 6d 70 2e 6c 61 6e 67 2e 74 63  ps: comp.lang.tc
0190: 6c 0a 53 75 62 6a 65 63 74 3a 20 6d 75 6c 74 69  l.Subject: multi
01a0: 74 68 72 65 61 64 65 64 20 74 63 6c 20 63 72 61  threaded tcl cra
01b0: 73 68 65 73 20 63 20 70 72 6f 67 72 61 6d 20 69  shes c program i
01c0: 66 20 77 65 20 63 72 65 61 74 65 20 69 6e 74 65  f we create inte
01d0: 72 70 20 0a 43 6f 6e 74 65 6e 74 2d 54 79 70 65  rp .Content-Type
01e0: 3a 20 74 65 78 74 2f 70 6c 61 69 6e 3b 20 63 68  : text/plain; ch
01f0: 61 72 73 65 74 3d 75 73 2d 61 73 63 69 69 0a 43  arset=us-ascii.C
0200: 6f 6e 74 65 6e 74 2d 54 72 61 6e 73 66 65 72 2d  ontent-Transfer-
0210: 45 6e 63 6f 64 69 6e 67 3a 20 37 62 69 74 0a 4c  Encoding: 7bit.L
0220: 69 6e 65 73 3a 20 33 35 0a 44 61 74 65 3a 20 54  ines: 35.Date: T
0230: 68 75 2c 20 31 37 20 4d 61 79 20 32 30 30 31 20  hu, 17 May 2001 
0240: 32 30 3a 35 36 3a 33 35 20 47 4d 54 0a 4e 4e 54  20:56:35 GMT.NNT
0250: 50 2d 50 6f 73 74 69 6e 67 2d 48 6f 73 74 3a 20  P-Posting-Host: 
0260: 32 30 39 2e 38 32 2e 34 31 2e 31 32 0a 4e 4e 54  209.82.41.12.NNT
0270: 50 2d 50 6f 73 74 69 6e 67 2d 44 61 74 65 3a 20  P-Posting-Date: 
0280: 54 68 75 2c 20 31 37 20 4d 61 79 20 32 30 30 31  Thu, 17 May 2001
0290: 20 31 34 3a 35 36 3a 33 35 20 4d 44 54 0a 4f 72   14:56:35 MDT.Or
02a0: 67 61 6e 69 7a 61 74 69 6f 6e 3a 20 4d 65 74 72  ganization: Metr
02b0: 6f 4e 65 74 20 43 6f 6d 6d 75 6e 69 63 61 74 69  oNet Communicati
02c0: 6f 6e 73 20 47 72 6f 75 70 20 49 6e 63 2e 0a 58  ons Group Inc..X
02d0: 72 65 66 3a 20 63 79 63 6c 6f 6e 65 2d 73 66 2e  ref: cyclone-sf.
02e0: 70 62 69 2e 6e 65 74 20 63 6f 6d 70 2e 6c 61 6e  pbi.net comp.lan
02f0: 67 2e 74 63 6c 3a 31 31 31 30 30 39 0a 0a 49 20  g.tcl:111009..I 
0300: 61 70 6f 6c 6f 67 69 7a 65 20 66 6f 72 20 74 68  apologize for th
0310: 65 20 72 65 70 6f 73 74 20 62 75 74 20 49 20 68  e repost but I h
0320: 61 76 65 20 72 65 63 69 65 76 65 64 20 6e 6f 20  ave recieved no 
0330: 68 65 6c 70 20 69 6e 20 74 68 65 20 6c 61 73 74  help in the last
0340: 20 66 65 77 0a 77 65 65 6b 73 2e 0a 57 65 20 68   few.weeks..We h
0350: 61 76 65 20 61 20 43 20 70 72 6f 67 72 61 6d 20  ave a C program 
0360: 74 68 61 74 20 6c 69 6e 6b 73 20 61 67 61 69 6e  that links again
0370: 73 74 20 61 20 6d 75 6c 74 69 74 68 72 65 61 64  st a multithread
0380: 65 64 20 62 75 69 6c 64 20 6f 66 20 74 68 65 0a  ed build of the.
0390: 74 63 6c 38 2e 34 20 6c 69 62 72 61 72 79 20 72  tcl8.4 library r
03a0: 75 6e 6e 69 6e 67 20 6f 6e 20 57 69 6e 64 6f 77  unning on Window
03b0: 73 20 4e 54 2e 0a 0a 49 66 20 77 65 20 63 72 65  s NT...If we cre
03c0: 61 74 65 20 61 6e 20 69 6e 74 65 72 70 72 65 74  ate an interpret
03d0: 65 72 2c 20 74 68 65 6e 20 64 65 6c 65 74 65 20  er, then delete 
03e0: 74 68 65 20 69 6e 74 65 72 70 72 65 74 65 72 20  the interpreter 
03f0: 61 6e 64 20 6c 65 74 20 74 68 65 0a 63 6f 64 65  and let the.code
0400: 20 65 78 65 63 75 74 69 6f 6e 20 63 6f 6d 70 6c   execution compl
0410: 65 74 65 20 6e 6f 72 6d 61 6c 6c 79 20 77 65 20  ete normally we 
0420: 68 61 76 65 20 6e 6f 20 70 72 6f 62 6c 65 6d 73  have no problems
0430: 2e 0a 0a 49 66 20 68 6f 77 65 76 65 72 2c 20 77  ...If however, w
0440: 65 20 64 6f 20 6e 6f 74 20 77 61 69 74 20 66 6f  e do not wait fo
0450: 72 20 74 68 65 20 63 6f 64 65 20 74 6f 20 63 6f  r the code to co
0460: 6d 70 6c 65 74 65 20 62 75 74 20 70 75 74 20 69  mplete but put i
0470: 6e 20 61 20 70 61 75 73 65 0a 28 73 65 65 20 62  n a pause.(see b
0480: 65 6c 6f 77 29 20 74 68 65 6e 20 63 6c 6f 73 65  elow) then close
0490: 20 74 68 65 20 63 6f 6e 73 6f 6c 65 2c 20 74 68   the console, th
04a0: 65 20 64 65 62 75 67 67 65 72 20 72 65 70 6f 72  e debugger repor
04b0: 74 73 20 74 68 61 74 20 74 68 65 0a 54 63 6c 38  ts that the.Tcl8
04c0: 34 2e 64 6c 6c 20 65 78 63 65 70 74 73 21 20 4f  4.dll excepts! O
04d0: 75 72 20 61 70 70 6c 69 63 61 74 69 6f 6e 20 77  ur application w
04e0: 69 6c 6c 20 62 65 20 72 75 6e 20 69 6e 20 61 6e  ill be run in an
04f0: 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 20 77 68 65   environment whe
0500: 72 65 0a 74 68 69 73 20 73 6f 72 74 20 6f 66 20  re.this sort of 
0510: 70 72 6f 67 72 61 6d 20 74 65 72 6d 69 6e 61 74  program terminat
0520: 69 6f 6e 20 77 69 6c 6c 20 62 65 20 63 6f 6d 6d  ion will be comm
0530: 6f 6e 2e 20 54 68 69 73 20 77 61 73 20 6e 6f 74  on. This was not
0540: 20 61 20 70 72 6f 62 6c 65 6d 0a 77 68 65 6e 20   a problem.when 
0550: 77 65 20 77 65 72 65 20 6c 69 6e 6b 65 64 20 61  we were linked a
0560: 67 61 69 73 74 20 61 20 6e 6f 6e 2d 6d 75 6c 74  gaist a non-mult
0570: 69 74 68 72 65 61 64 65 64 20 6c 69 62 72 61 72  ithreaded librar
0580: 79 2e 0a 0a 43 6f 64 65 20 74 68 61 74 20 73 68  y...Code that sh
0590: 6f 77 73 20 74 68 65 73 65 20 70 72 6f 70 65 72  ows these proper
05a0: 74 69 65 73 20 6c 6f 6f 6b 73 20 65 78 61 63 74  ties looks exact
05b0: 6c 79 20 6c 69 6b 65 20 74 68 69 73 2e 2e 2e 0a  ly like this....
05c0: 0a 0a 23 69 6e 63 6c 75 64 65 0a 69 6e 74 20 6d  ..#include.int m
05d0: 61 69 6e 28 20 69 6e 74 20 61 72 67 63 2c 20 63  ain( int argc, c
05e0: 68 61 72 2a 20 61 72 67 76 5b 5d 20 29 0a 7b 0a  har* argv[] ).{.
05f0: 20 20 20 20 70 72 69 6e 74 66 28 20 22 73 74 61      printf( "sta
0600: 72 74 21 5c 6e 22 29 3b 0a 20 20 20 20 54 63 6c  rt!\n");.    Tcl
0610: 5f 49 6e 74 65 72 70 2a 20 6d 5f 70 49 6e 74 65  _Interp* m_pInte
0620: 72 70 20 3d 20 54 63 6c 5f 43 72 65 61 74 65 49  rp = Tcl_CreateI
0630: 6e 74 65 72 70 28 29 3b 0a 20 20 20 20 54 63 6c  nterp();.    Tcl
0640: 5f 49 6e 69 74 28 6d 5f 70 49 6e 74 65 72 70 29  _Init(m_pInterp)
0650: 3b 20 20 20 20 2f 2f 6e 6f 20 69 6e 69 74 20 65  ;    //no init e
0660: 72 72 6f 72 73 21 0a 20 20 20 20 54 63 6c 5f 44  rrors!.    Tcl_D
0670: 65 6c 65 74 65 49 6e 74 65 72 70 28 6d 5f 70 49  eleteInterp(m_pI
0680: 6e 74 65 72 70 29 3b 0a 20 20 20 20 70 72 69 6e  nterp);.    prin
0690: 74 66 28 20 22 63 6c 6f 73 65 20 74 68 65 20 77  tf( "close the w
06a0: 69 6e 64 6f 77 21 5c 6e 22 29 3b 0a 20 20 20 20  indow!\n");.    
06b0: 67 65 74 63 68 61 72 28 29 3b 20 20 20 20 2f 2f  getchar();    //
06c0: 61 74 20 74 68 69 73 20 70 61 75 73 65 20 77 65  at this pause we
06d0: 20 63 6c 69 63 6b 20 74 68 65 20 27 78 27 20 6f   click the 'x' o
06e0: 6e 20 74 68 65 20 63 6f 6e 73 6f 6c 65 2e 0a 20  n the console.. 
06f0: 20 20 20 72 65 74 75 72 6e 20 30 3b 0a 7d 0a 0a     return 0;.}..
0700: 50 6c 65 61 73 65 20 72 65 73 70 6f 6e 64 20 77  Please respond w
0710: 69 74 68 20 73 6f 6d 65 20 73 6f 72 74 20 6f 66  ith some sort of
0720: 20 73 75 67 67 65 73 74 69 6f 6e 2e 20 41 6d 20   suggestion. Am 
0730: 49 20 6d 69 73 73 69 6e 67 20 73 6f 6d 65 74 68  I missing someth
0740: 69 6e 67 0a 68 65 72 65 3f 0a 4a 65 73 73 65 6c  ing.here?.Jessel
0750: 40 69 6e 61 67 6f 2e 63 6f 6d 0a 0a 0a 0a 0a     @inago.com.....