Skip to content
Tcl Source Code History Of Ticket 459115ffffffffffffffffffffffffffffffffff
Login

History Of Ticket 459115ffffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 459115ffffffffffffffffffffffffffffffffff

  1. Ticket change [b061deb651] (rid 97972) by davygrvy on 2001-09-06 10:53:28:

    1. assignee initialized to: "kennykb"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      example, line 408:
      
          tail = Tcl_WinUtfToTChar(tail, -1, &buf);
      
      tail is a char*.  Only under !ONE! condition is a 
      TCHAR* a char*.  Here's the big list:
      
      D:\thread_WS\tcl\win>c:\dev\bcc55\bin\bcc32.exe -Q -v-
       -vi- -O2 -D_DEBUG -c -q -3 -a4 -g0 -tWM -Ve -Vx -X- -
      I"c:\dev\bcc55\include" -I"..\win" -I"..\generic" -w-
      rch -w-pch -w-par -w-dup -w-pro -w-dpu -
      D_MT;NO_STRICT;_NO_VCL -DUSE_TCL_STUBS -
      o.\Release\tclWinReg.obj  ..\win\tclWinReg.c
      ..\win\tclWinReg.c:
      Warning W8075 ..\win\tclWinReg.c 407: Suspicious 
      pointer conversion in function
      DeleteKey
      Warning W8075 ..\win\tclWinReg.c 408: Suspicious 
      pointer conversion in function
      DeleteKey
      Warning W8075 ..\win\tclWinReg.c 465: Suspicious 
      pointer conversion in function
      DeleteValue
      Warning W8075 ..\win\tclWinReg.c 534: Suspicious 
      pointer conversion in function
      GetKeyNames
      Warning W8075 ..\win\tclWinReg.c 600: Suspicious 
      pointer conversion in function
      GetType
      Warning W8075 ..\win\tclWinReg.c 602: Suspicious 
      pointer conversion in function
      GetType
      Warning W8075 ..\win\tclWinReg.c 684: Suspicious 
      pointer conversion in function
      GetValue
      Warning W8075 ..\win\tclWinReg.c 687: Suspicious 
      pointer conversion in function
      GetValue
      Warning W8075 ..\win\tclWinReg.c 697: Suspicious 
      pointer conversion in function
      GetValue
      Warning W8075 ..\win\tclWinReg.c 839: Suspicious 
      pointer conversion in function
      GetValueNames
      Warning W8075 ..\win\tclWinReg.c 955: Suspicious 
      pointer conversion in function
      OpenSubKey
      Warning W8075 ..\win\tclWinReg.c 957: Suspicious 
      pointer conversion in function
      OpenSubKey
      Warning W8075 ..\win\tclWinReg.c 969: Suspicious 
      pointer conversion in function
      OpenSubKey
      Warning W8075 ..\win\tclWinReg.c 973: Suspicious 
      pointer conversion in function
      OpenSubKey
      Warning W8075 ..\win\tclWinReg.c 973: Suspicious 
      pointer conversion in function
      OpenSubKey
      Warning W8075 ..\win\tclWinReg.c 985: Suspicious 
      pointer conversion in function
      OpenSubKey
      Warning W8075 ..\win\tclWinReg.c 1143: Suspicious 
      pointer conversion in function
       RecursiveDeleteKey
      Warning W8075 ..\win\tclWinReg.c 1148: Suspicious 
      pointer conversion in function
       RecursiveDeleteKey
      Warning W8075 ..\win\tclWinReg.c 1203: Suspicious 
      pointer conversion in function
       SetValue
      Warning W8075 ..\win\tclWinReg.c 1216: Suspicious 
      pointer conversion in function
       SetValue
      Warning W8075 ..\win\tclWinReg.c 1252: Suspicious 
      pointer conversion in function
       SetValue
      Warning W8075 ..\win\tclWinReg.c 1259: Suspicious 
      pointer conversion in function
       SetValue
      Warning W8075 ..\win\tclWinReg.c 1271: Suspicious 
      pointer conversion in function
       SetValue
      Warning W8075 ..\win\tclWinReg.c 1282: Suspicious 
      pointer conversion in function
       SetValue
      
    4. foundin initialized to: "None"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "davygrvy"
    9. subsystem initialized to: "32. registry Package"
    10. title initialized to: "_MBCS,_UNICODE,Tcl_WinUtfToTChar abuse!"
    11. type initialized to: "Bug"
  2. Ticket change [72c5f4b80f] (rid 104918) by kennykb on 2001-09-06 22:58:19:

    1. icomment:
      Logged In: YES 
      user_id=99768
      
      I tend to get lost in the maze of build flags for Windows.
      
      I understand that _TCHAR can be one of three things:
      
         - char          (SBCS)
         - unsigned char (_MBCS)
         - wchar_t       (_UNICODE)
      
      Is there actually ever a case for building Tcl with _UNICODE and not
      _MBCS ?  Otherwise, the way I read things, it would appear that
      a simple
      
         #define _USE_INLINING
      
      might fix everything.  I get that idea from a cursory reading of
      
      http://msdn.microsoft.com/library/en-us/vccore98/html/_core_using_tchar..h_data_types_with__mbcs_code
      .asp
      
      But I don't lay claim to any great expertise here!  If you have a better
      idea, I'm eager to hear it!
      
      
      
    2. login: "kennykb"
    3. mimetype: "text/plain"
    4. username: "kennykb"
  3. Ticket change [460dfcd09f] (rid 99450) by davygrvy on 2001-09-07 03:31:34:

    1. icomment:
      Logged In: YES 
      user_id=7549
      
      I haven't read through the code yet, <blush>, but TCHAR is 
      one of special entity things.  I just finally got TCHAR 
      properly declared for both Borland and MinGW.  I'm a little 
      nervy about this whole TCHAR thing as the Tcl headers need 
      it declared before windows.h is included and for the oddest 
      reason, we leave an unexpanded TCHAR as a return type to 
      Tcl_WinUtfToTCharTcl().  I'm just rather touchy about TCHAR 
      right now.  It's a bug waiting to happen...
      
      "I tried to use Tcl in my NT service that's a unicode 
      application (wmain) and Tcl_WinUtfToTChar() is giving me 
      the wrong data.  I thought I'd get 16-bit unicode chars, 
      but got MCBS instead.  Why's this? Is there a bug?"
      
      I think my concept of TCHAR is off.  I'll read up some more.
      
      
    2. login: "davygrvy"
    3. mimetype: "text/plain"
    4. username: "davygrvy"
  4. Ticket change [821ae10be9] (rid 117169) by dacut on 2001-09-10 08:33:02:

    1. icomment:
      Logged In: YES 
      user_id=31992
      
      Well, I'm waiting to hear back from Jeff on whether he has any insight on this.  In the meantime, I'll post my 
      ignorance...
      
      TCHAR is either a char (for SBCS or MBCS) or wchar_t (for Unicode); which definition it gets is defined by 
      the UNICODE preprocessor macro.  Along with the TEXT() macro and the various tcsxxx() functions, the 
      intended usage is to port an application between SBCS/MBCS and Unicode easily -- that is, an application 
      can be switched between the two by flipping the UNICODE macro.
      
      But this is reserved for the application.  It is, IMHO, dangerous to have this *anywhere* in Tcl.  Dave G 
      points out the problem keenly (though reality is the reverse: Tcl_WinUtfToTChar always returns Unicode 
      strings, never MBCS).
      
      Anyway... looking at the various files, it seems like the functions accepting/returning TCHARs and TCHAR *'s 
      should use UTF-16 instead.  Tcl_UniChar should work fine.
      
      Note that the C++ intrinsic wchar_t doesn't exist intrinsically in C, and is the wrong size on most Unix 
      compilers -- UTF-32 instead of UTF-16.  WCHAR could be used if we're willing to bring in the windows.h 
      header (which may be just as well -- we'll know of clashes right away, and since both MSVC and BC 
      implement precompiled headers...).
      
      
      
    2. login: "dacut"
    3. mimetype: "text/plain"
    4. username: "dacut"
  5. Ticket change [dffb113ef7] (rid 115112) by davygrvy on 2001-11-07 13:32:00:

    1. closedate changed to: "2001-11-07T06:32:00"
    2. closer changed to: "davygrvy"
    3. icomment:
      Logged In: YES 
      user_id=7549
      
      After header file fun with odd macros and a better 
      understanding of Tcl_WinUtfToTChar(), I have to say that 
      where in the example above char *tail is more like a typeless placeholder than really a char *.
      
      I'll mark this closed.
      
      
    4. login: "davygrvy"
    5. mimetype: "text/plain"
    6. resolution changed to: "Invalid"
    7. status changed to: "Closed"
    8. username: "davygrvy"