Re: add minimal ctxtcall.h

2008-09-09 Thread Rob Shearman
2008/9/8 Louis. Lenders [EMAIL PROTECTED]:
 +typedef HRESULT (*PFNCONTEXTCALL)(ComCallData *pparam);

You don't explicitly tell widl that this function is a __stdcall
function. Please check if that is automatically added in the generated
header file. If not, you'll have to specify it here.

 +
 +/*
 + * IContextcallback interface
 + */

Please change IContextcallback to IContextCallback.

-- 
Rob Shearman




Re: Simplify tools/wrc a bit (RESEND)

2008-09-09 Thread Alexandre Julliard
Gerald Pfeifer [EMAIL PROTECTED] writes:

 Any thoughts on this patch?

It breaks the WANT_NEAR_INDICATION case.

-- 
Alexandre Julliard
[EMAIL PROTECTED]




Re: mshtml: Implement HTMLElement2 get_scrollLeft

2008-09-09 Thread Alexandre Julliard
Alistair Leslie-Hughes [EMAIL PROTECTED] writes:

 @@ -831,8 +831,31 @@ static HRESULT WINAPI 
 HTMLElement2_put_scrollLeft(IHTMLElement2 *iface, long v)
  static HRESULT WINAPI HTMLElement2_get_scrollLeft(IHTMLElement2 *iface, long 
 *p)
  {
  HTMLElement *This = HTMLELEM2_THIS(iface);
 -FIXME((%p)-(%p)\n, This, p);
 -return E_NOTIMPL;
 +nsIDOMNSHTMLElement *nselem;
 +PRInt32 left = 0;
 +nsresult nsres;
 +
 +TRACE((%p)-(%p)\n, This, p);
 +
 +if(!This-nselem) {
 +FIXME(NULL nselem\n);
 +return E_NOTIMPL;
 +}
 +
 +nsres = nsIDOMHTMLElement_QueryInterface(This-nselem, 
 IID_nsIDOMNSHTMLElement, (void**)nselem);
 +if(NS_SUCCEEDED(nsres)) {
 +nsres = nsIDOMNSHTMLElement_GetScrollLeft(nselem, left);
 +nsIDOMNSHTMLElement_Release(nselem);
 +if(NS_FAILED(nsres))
 +ERR(GetScrollLeft failed: %08x\n, nsres);
 +}else {
 +ERR(Could not get nsIDOMNSHTMLElement interface: %08x\n, nsres);
 +}

Printing an ERR is not a substitute for handling errors, you can't just
continue as if nothing happened. Or if the error really can be
legitimately ignored then you shouldn't have an ERR.

-- 
Alexandre Julliard
[EMAIL PROTECTED]




Re: [1/5] secur32: Require gnutls for schannel

2008-09-09 Thread Alexandre Julliard
Henri Verbeet [EMAIL PROTECTED] writes:

 diff --git a/dlls/secur32/Makefile.in b/dlls/secur32/Makefile.in
 index df9695a..9805d92 100644
 --- a/dlls/secur32/Makefile.in
 +++ b/dlls/secur32/Makefile.in
 @@ -6,6 +6,8 @@ MODULE= secur32.dll
  IMPORTLIB = secur32
  IMPORTS   = netapi32 advapi32 kernel32 ntdll
  DELAYIMPORTS = crypt32
 +EXTRALIBS = @GNUTLSLIBS@
 +EXTRAINCL = @GNUTLSINCL@

You need to load the library dynamically, we don't want the whole dll to
fail to load if gnutls is missing at run-time.

-- 
Alexandre Julliard
[EMAIL PROTECTED]




Re: notepad: Only append .txt to missing files without a dot in them (try2)

2008-09-09 Thread Rob Shearman
2008/9/8 Alexander Nicolaysen Sørnes [EMAIL PROTECTED]:
 -if (!lstrcmp(txtW, cmdline + lstrlen(cmdline) - lstrlen(txtW)))
 +if (strchrW(PathFindFileNameW(cmdline), '.'))

You're using one shell helper function already so why not use
PathFindExtensionW instead?

-- 
Rob Shearman



coverity ... new run finally

2008-09-09 Thread Marcus Meissner
Hi folks,

A new Coverity run (274) was done finally, so
we can restart looking at issues ;)

Still a lot of NULL ptr migration issues which suck
to fix, but well.

Ciao, Marcus




Re: Patchwatcher security improvements

2008-09-09 Thread Dan Kegel
On Mon, Sep 8, 2008 at 9:01 PM, Austin English [EMAIL PROTECTED] wrote:
 On Mon, Sep 8, 2008 at 6:06 PM, Dan Kegel [EMAIL PROTECTED] wrote:
 Interesting.One of my goals is to support Solaris and BSD;
 have you tried your stuff there?

 What about OS X?

Yes, of course.




Re: user32/test Added test about window sizes

2008-09-09 Thread Michael Karcher
Am Dienstag, den 09.09.2008, 14:13 +0200 schrieb Florian Köberle:
 +ok( width == 500  height == 6, rect is not 6x6 but %dx%d: 
 %d,%d-%d,%d\n,
 +width, height, rect.left, rect.top, rect.right, rect.bottom);
[...]
 +ok( width == 6  height == 500, rect is not 6x6 but %dx%d: 
 %d,%d-%d,%d\n,
 +width, height, rect.left, rect.top, rect.right, rect.bottom);
These messages contain a copy  paste mistake. Please fix the 6x6.

Regards,
  Michael Karcher





Re: user32.dll: Add stub for LockWorkStation

2008-09-09 Thread Rob Shearman
2008/9/8 Steven Edwards [EMAIL PROTECTED]:
 On Mon, Sep 8, 2008 at 2:32 PM, Paul Chitescu [EMAIL PROTECTED] wrote:
 Changelog:
user32.dll: Stub for LockWorkStation()

 Not sure if user_main.c is the right place but I put it together with
 ExitWindowsEx.

 Would you mind taking a shot at implementing this properly? It was on
 my TODO but I most likely will never get back to it. Here is my patch
 from before which was wrong.

 http://www.winehq.org/pipermail/wine-patches/2007-May/039240.html

 What we need to do is use SendMessage to talk to the existing
 explorer.exe process and have it do the locking. Feel free to use what
 i have to make a patch if your interested.

Having a stub implementation is a good first step towards a full
implementation, provided that the stub won't cause security issues or
cause more applications to crash, which I don't believe is the case
here.

If you have an existing implementation, you can rebase it on top of
this patch and submit it to wine-devel/wine-patches.

-- 
Rob Shearman




Re: socket errors...

2008-09-09 Thread celticht32

 Ok thanks... so its safe to ignore which is what I was wondering =)

Chris


 


 

-Original Message-
From: Damjan Jovanovic [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: wine-devel wine-devel@winehq.org
Sent: Tue, 9 Sep 2008 1:01 am
Subject: Re: socket errors...










On Tue, Sep 9, 2008 at 5:03 AM, Chris Ahrendt [EMAIL PROTECTED] wrote:
 I started narrowing down some information in debugging a winemm issue
 and noticed the following in my logs...

 trace:winsock:WSARecvFrom socket 00e8, wsabuf 0x33f638, nbufs 1, flags
 0, from 0x33f67c, fromlen 16, ovl (nil), func (nil)
 trace:winsock:WSARecvFrom fd=51, options=0
 warn:winsock:WSARecvFrom  - ERROR 10035

 The 10035 is a buffer overflow error (I think)

No, 10035 is WSAEWOULDBLOCK, which is normal for WSARecvFrom() on
non-blocking sockets that currently have no data in the receive
buffer.

 and I don't know much if at all how this set of code is supposed to
 work... anyone else getting this with the latest git tree?

 and any help on figuring out why the buffer is getting this error...

I'd be more worried if it wasn't :-).

 thanks

 Chris


Bye
Damjan






 




Patchwatcher status: added urlmon:protocol.c and urlmon:url.c to blacklist

2008-09-09 Thread Dan Kegel
These tests failed randomly for a few people:

urlmon:url.c:2125: Test succeeded inside todo block: unexpected
OnProgress_CONNECTING
urlmon:url.c:2129: Test failed: expected OnProgress_SENDINGREQUEST
urlmon:url.c:2131: Test failed: expected OnResponse
urlmon:protocol.c:1597: Test failed: Read failed: 0001 (0 bytes)
urlmon:protocol.c:365: Test failed: expected ReportData
urlmon:protocol.c:1598: Test failed: Read failed: 800a (0 bytes)

so I've added urlmon:url.c and urlmon:protocol.c to the patchwatcher blacklist,

All of the tests that currently touch the real internet
probably need to be changed to touch a mock internet
if we want to have reliable tests.




re: coverity ... new run finally

2008-09-09 Thread Dan Kegel
Marcus wrote:
 A new Coverity run (274) was done finally, so
 we can restart looking at issues ;)

 Still a lot of NULL ptr migration issues which suck
 to fix, but well.

Yay!  Here are the new errors introduced since the end of May, sorted
by source file.
There are only 23 not in test code:

725 NULL_RETURNSContext_CopyProperties  crypt32/context.c
715 FORWARD_NULLCryptMsgGetAndVerifySigner  crypt32/msg.c
709 DEADCODEDEVENUM_ReadPinTypesdevenum/createdevenum.c
717 FORWARD_NULLDEVENUM_ReadPinTypesdevenum/createdevenum.c
726 OVERRUN_STATIC  test_EnumGroupsInGroup  dplayx/tests/dplayx.c
718 FORWARD_NULLMSI_GetUserInfo msi/msi.c
747 REVERSE_INULL   ILockBytes_RemoteReadAt_Stubole32/ole32_objidl_p.c
748 REVERSE_INULL   ILockBytes_RemoteReadAt_Stubole32/ole32_objidl_p.c
749 REVERSE_INULL   ISequentialStream_RemoteRead_Stub
ole32/ole32_objidl_p.c
750 REVERSE_INULL   ISequentialStream_RemoteRead_Stub
ole32/ole32_objidl_p.c
751 REVERSE_INULL   IEnumOLEVERB_RemoteNext_Stubole32/ole32_oleidl_p.c
752 REVERSE_INULL   IEnumOLEVERB_RemoteNext_Stubole32/ole32_oleidl_p.c
373 REVERSE_INULL   IDispatch_GetIDsOfNames_Stub
oleaut32/oleaut32_oaidl_p.c
753 REVERSE_INULL   ITypeLib_RemoteFindName_Stub
oleaut32/oleaut32_oaidl_p.c
754 REVERSE_INULL   IEnumConnectionPoints_RemoteNext_Stub
oleaut32/oleaut32_ocidl_p.c
755 REVERSE_INULL   IEnumConnections_RemoteNext_Stub
oleaut32/oleaut32_ocidl_p.c
714 FORWARD_NULLMediaSeekingImpl_SetPositions   quartz/control.c
713 FORWARD_NULLTestFilter_Create   quartz/tests/filtergraph.c
719 FORWARD_NULLME_FindPixelPos riched20/caret.c
708 DEADCODEarray_compute_and_size_conformance
rpcrt4/ndr_marshall.c
720 FORWARD_NULLCreateContext   wined3d/context.c
721 FORWARD_NULLCreateContext   wined3d/context.c
722 FORWARD_NULLtest_OpenRequestwinhttp/tests/winhttp.c
723 FORWARD_NULLtest_SendRequestwinhttp/tests/winhttp.c
724 FORWARD_NULLtest_WinHttpAddHeaders  winhttp/tests/winhttp.c
716 FORWARD_NULLInternetCrackUrlW   wininet/internet.c
712 FORWARD_NULLtest_mmioOpen   winmm/tests/mmio.c
710 FORWARD_NULLldap_parse_sort_controlWwldap32/parse.c
711 FORWARD_NULLldap_parse_vlv_controlW wldap32/parse.c

Sure would be nice if Coverity could identify the cl which introduced
each problem :-)
- Dan




I just found out that when the input content is alread y GB2312, “wine” automatica lly mistakes it for unicode

2008-09-09 Thread hawaii.wine wong
*Hi there,

I am a Chinese programmer. I have a problem here with wine
As we know wine is able to convert unicode to GB2312-- but weirdly, I just
found out that when the input content is already GB2312, wine
automatically mistakes it for unicode and therefore attempts to convert it
again—and of course it gets a wrong output.

**I thought wine could recognize GB2312 input and knows this input needs
no conversion.

Thanks in advance!!*



Re: coverity ... new run finally

2008-09-09 Thread Reece Dunn
2008/9/9 Dan Kegel [EMAIL PROTECTED]:
 Marcus wrote:
 A new Coverity run (274) was done finally, so
 we can restart looking at issues ;)

 Still a lot of NULL ptr migration issues which suck
 to fix, but well.

 Sure would be nice if Coverity could identify the cl which introduced
 each problem :-)

Given the line number you can always get that information using blame.
Admittedly, this requires more work on our part, but it should be
possible to write a script that can do this automatically.

- Reece




Re: I just found out that when the input content is alre ady GB2312, “wine” automatic ally mistakes it for unicode

2008-09-09 Thread Rob Shearman
2008/9/9 hawaii.wine wong [EMAIL PROTECTED]:
 Hi there,

 I am a Chinese programmer. I have a problem here with wine
 As we know wine is able to convert unicode to GB2312-- but weirdly, I just
 found out that when the input content is already GB2312, wine
 automatically mistakes it for unicode and therefore attempts to convert it
 again—and of course it gets a wrong output.

 I thought wine could recognize GB2312 input and knows this input needs no
 conversion.

wine is a bit too vague to make any sense to anyone, so could you
answer a few questions:
Where is the data being input - a builtin app like notepad, or a 3rd party app?
How is the data being input - keyboard, clipboard, file or network and
if not a builtin app, which APIs are being used?
What OS are you running?
What does the typing locale in a terminal output?

-- 
Rob Shearman



[PATCH] Open file in binary mode to work around a windows bug

2008-09-09 Thread Steven Edwards
-- 
Steven Edwards

There is one thing stronger than all the armies in the world, and
that is an idea whose time has come. - Victor Hugo
From d7e5946566433ee18ffda721dd48bd026ec8ee71 Mon Sep 17 00:00:00 2001
From: Steven Edwards [EMAIL PROTECTED]
Date: Wed, 10 Sep 2008 09:18:14 -0400
Subject: [PATCH] Open file in binary mode to work around a windows bug

---
 tools/widl/typelib.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/widl/typelib.c b/tools/widl/typelib.c
index b30b323..2706870 100644
--- a/tools/widl/typelib.c
+++ b/tools/widl/typelib.c
@@ -354,10 +354,10 @@ static void read_importlib(importlib_t *importlib)
 
 file_name = wpp_find_include(importlib-name, NULL);
 if(file_name) {
-fd = open(file_name, O_RDONLY);
+fd = open(file_name, O_RDONLY | O_BINARY );
 free(file_name);
 }else {
-fd = open(importlib-name, O_RDONLY);
+fd = open(importlib-name, O_RDONLY | O_BINARY );
 }
 
 if(fd  0)
-- 
1.5.4.3




Re: [PATCH] Open file in binary mode to work around a windows bug

2008-09-09 Thread Dmitry Timoshkov
Steven Edwards [EMAIL PROTECTED] wrote:

 [PATCH] Open file in binary mode to work around a windows bug

What bug is that? If that's a Windows bug why Wine needs to be patched?

-- 
Dmitry.




Re: I just found out that when the input content is alre ady GB2312, “wine” automatic ally mistakes it for unicode

2008-09-09 Thread hawaii.wine wong
I am using some third party apps developed in Chinese GB2312 by some
Chinese companies(in china, usually the companies use GB 2312)
OS info:
Linux version 2.6.24-19-generic ([EMAIL PROTECTED])
 (gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu7))
#1 SMP Wed Aug 20 22:56:21 UTC 2008

wine-1.1.4( install from source )


locale'soutput follows :
~$ locale -a
C
en_AU.utf8
en_BW.utf8
en_CA.utf8
en_DK.utf8
en_GB.utf8
en_HK.utf8
en_IE.utf8
en_IN
en_NZ.utf8
en_PH.utf8
en_SG.utf8
en_US.utf8
en_ZA.utf8
en_ZW.utf8
POSIX
zh_CN
zh_CN.gb18030
zh_CN.gb2312
zh_CN.gbk
zh_CN.utf8
zh_HK.utf8
zh_SG.utf8
zh_TW.utf8



On Tue, Sep 9, 2008 at 10:47 PM, Rob Shearman [EMAIL PROTECTED] wrote:

 2008/9/9 hawaii.wine wong [EMAIL PROTECTED]:
  Hi there,
 
  I am a Chinese programmer. I have a problem here with wine
  As we know wine is able to convert unicode to GB2312-- but weirdly, I just
  found out that when the input content is already GB2312, wine
  automatically mistakes it for unicode and therefore attempts to convert it
  again—and of course it gets a wrong output.
 
  I thought wine could recognize GB2312 input and knows this input needs no
  conversion.

 wine is a bit too vague to make any sense to anyone, so could you
 answer a few questions:
 Where is the data being input - a builtin app like notepad, or a 3rd party 
 app?
 How is the data being input - keyboard, clipboard, file or network and
 if not a builtin app, which APIs are being used?
 What OS are you running?
 What does the typing locale in a terminal output?

 --
 Rob Shearman



Re: [PATCH] Open file in binary mode to work around a windows bug

2008-09-09 Thread Rob Shearman
2008/9/9 Dmitry Timoshkov [EMAIL PROTECTED]:
 Steven Edwards [EMAIL PROTECTED] wrote:

 [PATCH] Open file in binary mode to work around a windows bug

 What bug is that? If that's a Windows bug why Wine needs to be patched?

It's not a bug. When opening a file in text mode on Windows, all LFs
will be converted to CRLFs. Typelib files are binary and therefore
random parts of the typelib data
will seemingly be corrupted when read.

The patch is correct, even if the description isn't.

-- 
Rob Shearman




Re: I just found out that when the input content is alre ady GB2312, “wine” automatic ally mistakes it for unicode

2008-09-09 Thread Rob Shearman
2008/9/9 hawaii.wine wong [EMAIL PROTECTED]:
 I am using some third party apps developed in Chinese GB2312 by some
 Chinese companies(in china, usually the companies use GB 2312)
 OS info:
 Linux version 2.6.24-19-generic ([EMAIL PROTECTED])
  (gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu7))
 #1 SMP Wed Aug 20 22:56:21 UTC 2008

 wine-1.1.4( install from source )


 locale'soutput follows :
 ~$ locale -a

Please read my previous mail carefully and try to answer all of the
questions. It will be difficult to help you otherwise.

 On Tue, Sep 9, 2008 at 10:47 PM, Rob Shearman [EMAIL PROTECTED] wrote:

 2008/9/9 hawaii.wine wong [EMAIL PROTECTED]:
  Hi there,
 
  I am a Chinese programmer. I have a problem here with wine
  As we know wine is able to convert unicode to GB2312-- but weirdly, I 
  just
  found out that when the input content is already GB2312, wine
  automatically mistakes it for unicode and therefore attempts to convert it
  again—and of course it gets a wrong output.
 
  I thought wine could recognize GB2312 input and knows this input needs 
  no
  conversion.

 wine is a bit too vague to make any sense to anyone, so could you
 answer a few questions:
 Where is the data being input - a builtin app like notepad, or a 3rd party 
 app?
 How is the data being input - keyboard, clipboard, file or network and
 if not a builtin app, which APIs are being used?
 What OS are you running?
 What does the typing locale in a terminal output?


-- 
Rob Shearman



Re: I just found out that when the input content is alre ady GB2312, “wine” automatic ally mistakes it for unicode

2008-09-09 Thread hawaii.wine wong
In simple words, i use a app that's text written in gb2312, wine can
not show that correctly.
i use ubuntu and it has support for gb2312 , because i can use gedit
to read text encoding in  gb2312 .


On Tue, Sep 9, 2008 at 11:14 PM, Rob Shearman [EMAIL PROTECTED] wrote:
 2008/9/9 hawaii.wine wong [EMAIL PROTECTED]:
 I am using some third party apps developed in Chinese GB2312 by some
 Chinese companies(in china, usually the companies use GB 2312)
 OS info:
 Linux version 2.6.24-19-generic ([EMAIL PROTECTED])
  (gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu7))
 #1 SMP Wed Aug 20 22:56:21 UTC 2008

 wine-1.1.4( install from source )


 locale'soutput follows :
 ~$ locale -a

 Please read my previous mail carefully and try to answer all of the
 questions. It will be difficult to help you otherwise.

 On Tue, Sep 9, 2008 at 10:47 PM, Rob Shearman [EMAIL PROTECTED] wrote:

 2008/9/9 hawaii.wine wong [EMAIL PROTECTED]:
  Hi there,
 
  I am a Chinese programmer. I have a problem here with wine
  As we know wine is able to convert unicode to GB2312-- but weirdly, I 
  just
  found out that when the input content is already GB2312, wine
  automatically mistakes it for unicode and therefore attempts to convert it
  again—and of course it gets a wrong output.
 
  I thought wine could recognize GB2312 input and knows this input needs 
  no
  conversion.

 wine is a bit too vague to make any sense to anyone, so could you
 answer a few questions:
 Where is the data being input - a builtin app like notepad, or a 3rd party 
 app?
 How is the data being input - keyboard, clipboard, file or network and
 if not a builtin app, which APIs are being used?
 What OS are you running?
 What does the typing locale in a terminal output?


 --
 Rob Shearman




Launching a Linux Executable from a Windows app Running under Wine

2008-09-09 Thread Mike Engelhardt
I write a Windows application that I want to be
useful under Linux  WINE.  I want to use xchm to
view the help documentation .chm file since
WINE doesn't yet properly display this .chm file
which was generated with third party tools and
includes advanced features.  xchm does render the
file acceptably and I'll e-mail the .chm file to
anyone interested in that.

But for the time being, I want to simply launch
xchm from my app whenever my app finds itself
being run under WINE.  What I have is done so far
is system() a command with path names of xchm
and my .chm file that seem to basically be trying
to outsmart WINE outsmarting Windows.  Clearly this
is an ugly hack and is not a long term solution.

Is there a supported/recommended manner of launching
an X Window System executable with Linux absolute
path arguments from a MS Windows application running
under Linux  WINE?

--Mike


Re: Simplify dlls/atl/registrar.c

2008-09-09 Thread Rob Shearman
2008/9/7 Gerald Pfeifer [EMAIL PROTECTED]:
 --- dlls/atl/registrar.c7 May 2008 12:06:02 -   1.29
 +++ dlls/atl/registrar.c7 Sep 2008 13:42:54 -
 @@ -661,7 +661,7 @@ static const IRegistrarVtbl RegistrarVtb
 Registrar_ResourceUnregister,
  };

 -static HRESULT Registrar_create(const IUnknown *pUnkOuter, REFIID riid, void 
 **ppvObject)
 +static HRESULT Registrar_create(REFIID riid, void **ppvObject)
  {
 Registrar *ret;

 @@ -711,7 +711,7 @@ static HRESULT WINAPI RegistrarCF_Create
 REFIID riid, void **ppvObject)
  {
 TRACE((%p)-(%s %p)\n, iface, debugstr_guid(riid), ppvObject);
 -return Registrar_create(pUnkOuter, riid, ppvObject);
 +return Registrar_create(riid, ppvObject);
  }

A test needs to be added to see whether or not the Registrar class
factory supports aggregation. If it does then a FIXME should be
emitted. If not then an ERR may be emitted and CLASS_E_NOAGGREGATION
returned. Just removing pUnkOuter isn't the right thing to do.

-- 
Rob Shearman




Re: I just found out that when the input content is alre ady GB2312, “wine” automatic ally mistakes it for unicode

2008-09-09 Thread Rob Shearman
2008/9/9 hawaii.wine wong [EMAIL PROTECTED]:
 In simple words, i use a app that's text written in gb2312, wine can
 not show that correctly.
 i use ubuntu and it has support for gb2312 , because i can use gedit
 to read text encoding in  gb2312 .

So, you're trying to type text into the application and it doesn't
show up correctly, right?

Does it work if you use Wine's notepad?

-- 
Rob Shearman




Re: I just found out that when the input content is alre ady GB2312, “wine” automatic ally mistakes it for unicode

2008-09-09 Thread hawaii.wine wong
i can not type Chinese into notepad

and
the code follows also can not work correctly
it'soutput was
45
���

not
45
你好

//winegcc -o test test.c
#includestdio.h
//#includewindows.h
#include locale.h

int main()
{
  int i;
  int sum=0;
  for( i=0 ; i 10 ; i++ ){
sum+=i;
  }
  printf(%d\r\n,sum);
  printf(你好\n);
  return sum;
}



On Tue, Sep 9, 2008 at 11:30 PM, Rob Shearman [EMAIL PROTECTED] wrote:
 2008/9/9 hawaii.wine wong [EMAIL PROTECTED]:
 In simple words, i use a app that's text written in gb2312, wine can
 not show that correctly.
 i use ubuntu and it has support for gb2312 , because i can use gedit
 to read text encoding in  gb2312 .

 So, you're trying to type text into the application and it doesn't
 show up correctly, right?

 Does it work if you use Wine's notepad?

 --
 Rob Shearman




Re: [PATCH] Open file in binary mode to work around a windows bug

2008-09-09 Thread Steven Edwards
On Tue, Sep 9, 2008 at 11:10 AM, Rob Shearman [EMAIL PROTECTED] wrote:
 2008/9/9 Dmitry Timoshkov [EMAIL PROTECTED]:
 Steven Edwards [EMAIL PROTECTED] wrote:

 [PATCH] Open file in binary mode to work around a windows bug

 What bug is that? If that's a Windows bug why Wine needs to be patched?

 It's not a bug. When opening a file in text mode on Windows, all LFs
 will be converted to CRLFs. Typelib files are binary and therefore
 random parts of the typelib data
 will seemingly be corrupted when read.

 The patch is correct, even if the description isn't.

Sorry I should have said Allow opening files in binary mode to avoid
corruption from text mode on Windows or some such. I know the line
LF/CRLF stuff is not really a bug as there is not a standard that says
All line endings should follow the Unix method I just view the
historic dos/windows usage as a bug.

If Alexandre does not apply it I will resend.

-- 
Steven Edwards

There is one thing stronger than all the armies in the world, and
that is an idea whose time has come. - Victor Hugo




Re: coverity ... new run finally

2008-09-09 Thread Juan Lang
Hi Dan,

 There are only 23 not in test code:

am I confused by this statement?  The following sure seem to be in
test code, unless I misunderstand your meaning:
 726 OVERRUN_STATIC  test_EnumGroupsInGroup  dplayx/tests/dplayx.c
 722 FORWARD_NULLtest_OpenRequestwinhttp/tests/winhttp.c
 723 FORWARD_NULLtest_SendRequestwinhttp/tests/winhttp.c
 724 FORWARD_NULLtest_WinHttpAddHeaders  winhttp/tests/winhttp.c
 712 FORWARD_NULLtest_mmioOpen   winmm/tests/mmio.c

--Juan




Re: user32.dll: Implementation for LockWorkStation() based on xdg-screensaver

2008-09-09 Thread Michael Karcher
Am Dienstag, den 09.09.2008, 18:25 +0300 schrieb Paul Chitescu:
 Known problems:
 1. Although trying to check with access() if /usr/bin/xdg-screensaver is 
 executable there is no error returned from spawnvp() if exec() eventually 
 fails after fork() succeeds. Unlikely but possible.
I see that as a bug in spawnvp(). You can not do anything about that.
But I dislike checking using access, because
 a) it is a well-known race condition (in this case, it does not seem to
matter, as /usr/bin should be writable by root only).
 b) you sacrifice the possibility to find /usr/local/bin/xdg-screensaver
if the utility has been locally added. (more important point).
Would removing the access call and just trying to call xdg-screensaver
have any negative implication except for not letting the windows
application know that locking failed? If not, I would remove the call,
as MSDN says that locking can also fail on Windows for various reasons
even if LockWorkStation returned TRUE.

 2. No way to disable it - maybe users don't want their screen locked.
So what? If a windows process calls LockWorkStation when the user does
not want the workstation to be locked, it's a bug in the windows
process, except...

 3. Doesn't take into account virtual desktops, and I have no idea what it 
 should do in that case, just deny access?
... if running in virtual desktop mode. (I suppose you mean
explorer /desktop and not virtual desktop provided by X Window
managers or virtual desktops provided by the linux kernel) As the real
right way to implement this call is to SendMessage to explorer.exe, and
explorer knows whether it runs in virtual desktop mode, I would suggest
that the patch be extended to handle the screensaver start in Wine's
explorer process, and just do nothing in the virtual desktop case.

Regards,
  Michael Karcher






Re: user32.dll: Implementation for LockWorkStation() based on xdg-screensaver

2008-09-09 Thread Steven Edwards
On Tue, Sep 9, 2008 at 11:25 AM, Paul Chitescu [EMAIL PROTECTED] wrote:
 Changelog:
user32.dll: Implementation for LockWorkStation() based on
 xdg-screensaver

 Thanks to Steven Edwards ([EMAIL PROTECTED]) for the idea of
 using xdg-screensaver lock.

When I submitted the patch before, Alexandre and I discussed this both
on and off list, I think there is another thread somewhere regarding
it and I think he wanted it in explorer because of applications
running in Desktop mode. I think the right behavior is to send a
message to Explorer and if a wine application is not running in
desktop mode then to invoke the xdg-screensaver, otherwise we should
stub out or load a windows style screensaver in the emulated desktop.

-- 
Steven Edwards

There is one thing stronger than all the armies in the world, and
that is an idea whose time has come. - Victor Hugo




Re: James Hawkins : netapi32: Fix two failing tests in NT4.

2008-09-09 Thread Kai Blin
On Wednesday 03 September 2008 14:43:55 Alexandre Julliard wrote:

 -ok(ret == NERR_BadUsername, Adding user with too long username
 returned 0x%08x\n, ret); +ok(ret == NERR_BadUsername ||
 +   broken(ret == NERR_PasswordTooShort), /* NT4 */
 +   Adding user with too long username returned 0x%08x\n, ret);


I'd argue that this is not broken, but the only error NT4 returns for bad 
username/password combinations. At least the comments in the surrounding code 
should be updated. Sorry for not catching this one earlier, I didn't have 
that much time for Wine recently.

Cheers,
Kai

--
Kai Blin
WorldForge developer  http://www.worldforge.org/
Wine developerhttp://wiki.winehq.org/KaiBlin
Samba team member http://www.samba.org/samba/team/
--
Will code for cotton.


signature.asc
Description: This is a digitally signed message part.



Re: Launching a Linux Executable from a Windows app Running under Wine

2008-09-09 Thread Steven Edwards
On Tue, Sep 9, 2008 at 11:24 AM, Mike Engelhardt
[EMAIL PROTECTED] wrote:
 Is there a supported/recommended manner of launching
 an X Window System executable with Linux absolute
 path arguments from a MS Windows application running
 under Linux  WINE?

There is a script to invoke native apps that have a windows
association. I don't know if this will really work the way you want.
If you expect to be able to just click on help and have it invoke xchm
for chm files, then no but if there is a windows association set and
your application tries to open the file using the association method,
like say you have pdf files registered using xpdf and IE tries to Open
the pdf, then yes it will work.

-- 
Steven Edwards

There is one thing stronger than all the armies in the world, and
that is an idea whose time has come. - Victor Hugo




Re: [PATCH] Open file in binary mode to work around a windows bug

2008-09-09 Thread Dmitry Timoshkov
Steven Edwards [EMAIL PROTECTED] wrote:

 If Alexandre does not apply it I will resend.

Usually he doesn't apply the patches sent to wine-devel, so
you have to resend.

-- 
Dmitry.




Re: [PATCH] Open file in binary mode to work around a windows bug

2008-09-09 Thread Steven Edwards
On Tue, Sep 9, 2008 at 12:03 PM, Dmitry Timoshkov
[EMAIL PROTECTED] wrote:
 Steven Edwards [EMAIL PROTECTED] wrote:

 If Alexandre does not apply it I will resend.

 Usually he doesn't apply the patches sent to wine-devel, so
 you have to resend.

Duh! I am being really careless today for some reason...

-- 
Steven Edwards

There is one thing stronger than all the armies in the world, and
that is an idea whose time has come. - Victor Hugo




Re: coverity ... new run finally

2008-09-09 Thread Dan Kegel
On Tue, Sep 9, 2008 at 8:51 AM, Juan Lang [EMAIL PROTECTED] wrote:
 There are only 23 not in test code:

 am I confused by this statement?  The following sure seem to be in
 test code, unless I misunderstand your meaning:
 726 OVERRUN_STATIC  test_EnumGroupsInGroup  dplayx/tests/dplayx.c
 722 FORWARD_NULLtest_OpenRequestwinhttp/tests/winhttp.c
 723 FORWARD_NULLtest_SendRequestwinhttp/tests/winhttp.c
 724 FORWARD_NULLtest_WinHttpAddHeaders  winhttp/tests/winhttp.c
 712 FORWARD_NULLtest_mmioOpen   winmm/tests/mmio.c

Did you count the ones I listed not in test code?  I probably should
have separated them out...




Re: coverity ... new run finally

2008-09-09 Thread Juan Lang
 Did you count the ones I listed not in test code?  I probably should
 have separated them out...

No, I didn't.  Now I understand the source of my confusion, thanks.

My account appears to be closed, so I hope you don't mind if I tell
you the status of the two new crypt32 reports:
725 NULL_RETURNSContext_CopyProperties  crypt32/context.c
This one is valid, sort of.  The returned property lists might indeed
be NULL, but only if a) the app passes a bogus pointer, which will
crash on Windows, b) Wine's code passes a bogus pointer, which is a
bug elsewhere, or c) memory gets corrupted.  As these are all
exceptional conditions, I'll introduce an assert.

715 FORWARD_NULLCryptMsgGetAndVerifySigner  crypt32/msg.c
False positive, though it would be hard for a static analyzer to know
it.  I believe it's complaining about pdwSignerIndex being
dereferenced on line 2848, when it's checked against NULL on line
2827, implying it might be allowed to be NULL.  However it's only
dereferenced if CMSG_USE_SIGNER_INDEX_FLAG is set, which implies that
pdwSignerIndex must not be NULL.
--Juan




Re: Launching a Linux Executable from a Windows app Running under Wine

2008-09-09 Thread Mike Engelhardt
Steve,


 On Tue, Sep 9, 2008 at 11:24 AM, Mike Engelhardt
 [EMAIL PROTECTED] wrote:
 Is there a supported/recommended manner of launching
 an X Window System executable with Linux absolute
 path arguments from a MS Windows application running
 under Linux  WINE?
 
 There is a script to invoke native apps that have a windows
 association. I don't know if this will really work the way you want.
 If you expect to be able to just click on help and have it invoke xchm
 for chm files, then no but if there is a windows association set and
 your application tries to open the file using the association method,
 like say you have pdf files registered using xpdf and IE tries to Open
 the pdf, then yes it will work.

I'm do not want to change global associations, I just
want a way to launch a Linux executable from a Windows
program.  Right now, I've written the Windows app to
do this:

   char XchmViewer[MAX_PATH] = Z:\\usr\\bin\\xchm;
   sprintf(cmd, %s %s, XchmViewer, helpfilepath);
   system(cmd);

Where the helpfilepath is computed to outsmart WINE
trying to outsmart Windows.  I also don't like that
I have to use a path like Z:\\usr\\bin\\xchm to
invoke /usr/bin/xchm since my app should not need to
know what the drive letters are.

Since I'm the one writing the Windows app, I would like
to be able to launch a better native Linux app to launch
than WINE's .chm viewer.

--Mike




Re: ws2_32: ioctlsocket should try to check if argp is valid

2008-09-09 Thread Juan Lang
Hi Jeff, I have a stylistic complaint about your tests in this patch:

+if(sock == INVALID_SOCKET)
+{
+ok(0, Creating the socket failed: %d, skipping test\n,
WSAGetLastError());
+return;
+}
If you intend to skip a test, shouldn't you use skip instead?

+ret = ioctlsocket(sock, cmds[i], (u_long *)1);
+if(ret != SOCKET_ERROR)
+   ok(0, ioctlsocket succeeded unexpectedly\n);
+else
+{
I'm not a fan of the ok(0) approach here.  Why not use ok(ret ==
SOCKET_ERROR) instead?
--Juan




Re: Launching a Linux Executable from a Windows app Running under Wine

2008-09-09 Thread Rob Shearman
2008/9/9 Mike Engelhardt [EMAIL PROTECTED]:
 Steve,


 On Tue, Sep 9, 2008 at 11:24 AM, Mike Engelhardt
 [EMAIL PROTECTED] wrote:
 Is there a supported/recommended manner of launching
 an X Window System executable with Linux absolute
 path arguments from a MS Windows application running
 under Linux  WINE?

 There is a script to invoke native apps that have a windows
 association. I don't know if this will really work the way you want.
 If you expect to be able to just click on help and have it invoke xchm
 for chm files, then no but if there is a windows association set and
 your application tries to open the file using the association method,
 like say you have pdf files registered using xpdf and IE tries to Open
 the pdf, then yes it will work.

 I'm do not want to change global associations, I just
 want a way to launch a Linux executable from a Windows
 program.  Right now, I've written the Windows app to
 do this:

   char XchmViewer[MAX_PATH] = Z:\\usr\\bin\\xchm;
   sprintf(cmd, %s %s, XchmViewer, helpfilepath);
   system(cmd);

 Where the helpfilepath is computed to outsmart WINE
 trying to outsmart Windows.  I also don't like that
 I have to use a path like Z:\\usr\\bin\\xchm to
 invoke /usr/bin/xchm since my app should not need to
 know what the drive letters are.

 Since I'm the one writing the Windows app, I would like
 to be able to launch a better native Linux app to launch
 than WINE's .chm viewer.

Hi Mike,

You should you should just do ShellExecute(helpfilepath) and set the
default value of HKCR\chm.file\shell\open\command to Z:\usr\bin\xchm
on install and the user can change this if he or she wishes.

I think it is safe to assume that Z: will always map to / in Wine.
You can always not install the association if Z: isn't mapped to
anything.

-- 
Rob Shearman




Re: ws2_32: ioctlsocket should try to check if argp is valid

2008-09-09 Thread Jeff Zaroyko
On Wed, Sep 10, 2008 at 2:57 AM, Juan Lang [EMAIL PROTECTED] wrote:
 Hi Jeff, I have a stylistic complaint about your tests in this patch:

 +if(sock == INVALID_SOCKET)
 +{
 +ok(0, Creating the socket failed: %d, skipping test\n,
 WSAGetLastError());
 +return;
 +}
 If you intend to skip a test, shouldn't you use skip instead?
 +ret = ioctlsocket(sock, cmds[i], (u_long *)1);
 +if(ret != SOCKET_ERROR)
 +   ok(0, ioctlsocket succeeded unexpectedly\n);
 +else
 +{
 I'm not a fan of the ok(0) approach here.  Why not use ok(ret ==
 SOCKET_ERROR) instead?
 --Juan


Good point, I'll use skip instead and for your second concern, I guess
I can use the return value of ok(ret == SOCKET_ERROR,.. in an if
expression.

I'll resend.

Thanks
-Jeff




Re: coverity ... new run finally

2008-09-09 Thread Alexander Dorofeyev
Dan Kegel wrote:

 Still a lot of NULL ptr migration issues which suck
 to fix, but well.
 709 DEADCODEDEVENUM_ReadPinTypesdevenum/createdevenum.c
 717 FORWARD_NULLDEVENUM_ReadPinTypesdevenum/createdevenum.c

NULL-dereference may be a false positive from the way memory for lpMediaType is 
allocated there. Not sure though, will look some more later; BTW, a stupid 
question - is there more details available on what and where it detects in the 
function (free of charge)? Couldn't really find it by quick look around their 
website and google, except short definition of FORWARD_NULL meaning etc.

 713 FORWARD_NULLTestFilter_Create   quartz/tests/filtergraph.c

I sent a patch for this.




Re: Patchwatcher online

2008-09-09 Thread Detlef Riekenberg
On Fr, 2008-09-05 at 10:24 -0700, Dan Kegel wrote:
 The results page
 http://kegel.com/wine/patchwatcher/results/
 looks nice and green; 

Opps, all developer send there Patches in September with 09 as minute,
and in August with 08 ...

:-)

And it would be very nice, when you hide the Email-Address to
block the bots, who collect spam targets.




-- 
 
By by ... Detlef






Re: Patchwatcher online

2008-09-09 Thread Dan Kegel
On Tue, Sep 9, 2008 at 11:37 AM, Detlef Riekenberg [EMAIL PROTECTED] wrote:
 http://kegel.com/wine/patchwatcher/results/

 Opps, all developer send there Patches in September with 09 as minute,
 and in August with 08 ...

Whoops!

 And it would be very nice, when you hide the Email-Address to
 block the bots, who collect spam targets.

Is that needed, given how the addresses are in the open on
the mailing list and all its archives?




Re: ws2_32: ioctlsocket should try to check if argp is valid (try 2)

2008-09-09 Thread Juan Lang
Hi Jeff,

+if(sock == INVALID_SOCKET)
+skip(Creating the socket failed: %d, skipping test.\n,
WSAGetLastError());
skip needs a return too.

+ret = ioctlsocket(sock, cmds[i], (u_long *)1);
+if(ok(ret == SOCKET_ERROR, ioctlsocket succeeded unexpectedly\n))
+{
I think you mean:
ok(ret == SOCKET_ERROR...)
if (ret == SOCKET_ERROR)
{
}
although really the if is unnecessary, as you won't cause a crash if
the first test fails.
--Juan




Re: ws2_32: ioctlsocket should try to check if argp is valid (try 2)

2008-09-09 Thread Jeff Zaroyko
On Wed, Sep 10, 2008 at 4:55 AM, Juan Lang [EMAIL PROTECTED] wrote:
 Hi Jeff,

 +if(sock == INVALID_SOCKET)
 +skip(Creating the socket failed: %d, skipping test.\n,
 WSAGetLastError());
 skip needs a return too.

 +ret = ioctlsocket(sock, cmds[i], (u_long *)1);
 +if(ok(ret == SOCKET_ERROR, ioctlsocket succeeded unexpectedly\n))
 +{
 I think you mean:
 ok(ret == SOCKET_ERROR...)
 if (ret == SOCKET_ERROR)
 {
 }
 although really the if is unnecessary, as you won't cause a crash if
 the first test fails.
 --Juan


Oops, yes, there should be a return there.  if(ok(expr, seems
perfectly valid, but yes I see that it could be considered
unnecessary.  I only added the if expression because printing the
value of WSALastError(); didn't seem relevant if ioctlsocket
succeeded.  I'll remove the if to simplify it.

Thanks for the feedback
-Jeff




Re: Patchwatcher online

2008-09-09 Thread Henri Verbeet
2008/9/9 Dan Kegel [EMAIL PROTECTED]:
 And it would be very nice, when you hide the Email-Address to
 block the bots, who collect spam targets.

 Is that needed, given how the addresses are in the open on
 the mailing list and all its archives?

I doubt it, we're probably on every possible spam list anyway.




splint (Re: Adding Flawfinder to Patchwatcher)

2008-09-09 Thread Detlef Riekenberg
On So, 2008-09-07 at 18:10 +, Jason Spiro wrote:

  Other people may be able to suggest more good tools.
 
 AFAIK splint is one of the most popular OSS static analysis tools, but I've
 never really used it.  Has anyone here used it?  On the flawfinder homepage, 
 it
 says that splint does deeper analysis than flawfinder.  It says it ...works
 somewhat like lint, 

Use grep / read the source:
  dnl Check for lint
  AC_CHECK_PROGS(LINT, lclint lint)
...

But I think, thats unused for years...
(and it does not work for splint)


-- 
 
By by ... Detlef






Re: msi: Uninitialized variable fix (Coverity)

2008-09-09 Thread James Hawkins
On Tue, Sep 9, 2008 at 3:54 PM, Andrew Talbot
[EMAIL PROTECTED] wrote:
 Fix for Coverity error CID: 762.

 ---
 Changelog:
msi: Uninitialized variable fix (Coverity).

 diff --git a/dlls/msi/action.c b/dlls/msi/action.c
 index 8a8efe7..48557f0 100644
 --- a/dlls/msi/action.c
 +++ b/dlls/msi/action.c
 @@ -3838,7 +3838,7 @@ static UINT ACTION_PublishFeatures(MSIPACKAGE *package)
 MSIFEATURE *feature;
 UINT rc;
 HKEY hkey;
 -HKEY userdata;
 +HKEY userdata = NULL;

 if (!msi_check_publish(package))
 return ERROR_SUCCESS;
 @@ -3952,7 +3952,7 @@ static UINT ACTION_PublishFeatures(MSIPACKAGE *package)

  end:
 RegCloseKey(hkey);
 -RegCloseKey(userdata);
 +if (userdata) RegCloseKey(userdata);
 return rc;

Please don't add another NULL-before-free check.

-- 
James Hawkins




Re: msi: Uninitialized variable fix (Coverity)

2008-09-09 Thread Andrew Talbot
James Hawkins wrote:

 On Tue, Sep 9, 2008 at 3:54 PM, Andrew Talbot
 [EMAIL PROTECTED] wrote:
 Fix for Coverity error CID: 762.

 [...]
 -RegCloseKey(userdata);
 +if (userdata) RegCloseKey(userdata);
 return rc;
 
 Please don't add another NULL-before-free check.
 

Hi James,

Sorry, I don't understand what I have done wrong. RegCloseKey() will return 
ERROR_INVALID_HANDLE if called with hkey==NULL.

-- 
Andy.





Re: msi: Uninitialized variable fix (Coverity)

2008-09-09 Thread James Hawkins
On Tue, Sep 9, 2008 at 4:24 PM, Andrew Talbot
[EMAIL PROTECTED] wrote:
 James Hawkins wrote:

 On Tue, Sep 9, 2008 at 3:54 PM, Andrew Talbot
 [EMAIL PROTECTED] wrote:
 Fix for Coverity error CID: 762.

 [...]
 -RegCloseKey(userdata);
 +if (userdata) RegCloseKey(userdata);
 return rc;

 Please don't add another NULL-before-free check.


 Hi James,

 Sorry, I don't understand what I have done wrong. RegCloseKey() will return 
 ERROR_INVALID_HANDLE if called with hkey==NULL.


...and we don't care what value it returns.

-- 
James Hawkins




Re: coverity ... new run finally

2008-09-09 Thread Dan Kegel
alexd4 asked:
 is there more details available on what and where it detects in the
 function (free of charge)?

Yes.  See
http://scan.coverity.com/devfaq.html#account
- Dan




Re: msi: Uninitialized variable fix (Coverity)

2008-09-09 Thread Juan Lang
Hi Andy,

 Sorry, I don't understand what I have done wrong. RegCloseKey() will return 
 ERROR_INVALID_HANDLE if called with hkey==NULL.

To expand on James's brief response,

 -HKEY userdata;
 +HKEY userdata = NULL;

This change looks correct, but the other isn't necessary.
--Juan




Re: msi: Uninitialized variable fix (Coverity)

2008-09-09 Thread Andrew Talbot
James Hawkins wrote:

 Sorry, I don't understand what I have done wrong. RegCloseKey() will
 return ERROR_INVALID_HANDLE if called with hkey==NULL.

 
 ...and we don't care what value it returns.
 

Ah, of course! Thanks, James (and Juan).

-- 
Andy.






Re: Debugging applications running on wine

2008-09-09 Thread Kevin Krieser

On Sep 8, 2008, at 9:36 PM, Dan Kegel wrote:

 Kevin K wrote:
 Is winedbg the only method of debugging applications being
 developed for Windows on Wine?

 For instance, assume a program developed with Visual Studio
 in C or C++, and I needed to debug it on Linux?

 If winedbg doesn't work for you, we should fix it.   Same
 goes for other debuggers.

 For instance, ollydbg seems to work
 http://appdb.winehq.org/objectManager.php?sClass=applicationiId=2619

 Visual C++ 6's debugger seems to work at least a little, too:
 http://appdb.winehq.org/objectManager.php?sClass=versioniId=31

 Please file bugs for any problems you run into.
 - Dan

Thanks.

This is just hypothetical right now about some future development that  
may have to support Linux, XP/Vista, and Windows Mobile.





Praise of sorts for Wine re Softmaker Office 2008

2008-09-09 Thread Dan Kegel
http://forum.ubuntuusers.de/topic/softmaker-office-2008--eine-alternative--vora/
has a review of an office suite named Softmaker Office 2008,
available for Windows and now also Linux.  The review says in part

Irritiert hat uns, daß die Windows-Version von Office 2008, die
von Stick gestartet werden kann, unter Wine besser, schneller
und stabiler läuft, wie die native Office 2008 für Linux. Wer also
die Windows-Version legal erworben hat, kann hier Geld sparen.

(It irritated us that the Windows version runs better on Wine
than the native Linux version.  If you have the Windows version
already, save your money and run it on Wine.)

That's praise of sorts... although I hope it doesn't
dissuade other vendors from doing native ports.
- Dan