Re: Windows API on Linux
On 03/29/2013 01:27 PM, Abhinav Jangda wrote: Hello everyone, I'm working on a project which aims to develop a port of Windows API on Linux, so that programs written using Windows API could directly be compiled and executed on Linux with its native look and feel. Anyone, interested in working on this project. I think some Wine developers will be as they would be having a good knowledge of Windows API. Reminds me of Winelib Joris
Re: [PATCH 5/8] ntdll: Add detection for PF_SSE_DAZ_MODE_AVAILABLE
On 10/21/2012 05:49 PM, James Eder wrote: On Sat, Oct 20, 2012 at 7:06 PM, Chris Robinson chris.k...@gmail.com wrote: On 10/20/2012 05:40 PM, James Eder wrote: +/* Intel says we need a zeroed 16-byte aligned buffer */ +char buffer[512 + 16]; +XMM_SAVE_AREA32 *state = (XMM_SAVE_AREA32 *)(((ULONG_PTR)buffer + 15) ~15); +memset(buffer, 0, sizeof(buffer)); + +__asm__ __volatile__( fxsave %0 : =m (*state) : m (*state) ); Wouldn't this be simpler? DECLSPEC_ALIGN(16) XMM_SAVE_AREA32 state; memset(state, 0, sizeof(state)); __asm__ __volatile__(fxsave %0 : =m (*state) : m (*state)); May also want to make sure the two structs are packed. I used that alignment method because I saw it done that way other places in Wine. I figured there must have been a good reason for doing it that way (issue with some build environments?) but perhaps I'm being paranoid. I would think the construct is necessary when allocating memory (the allocation functions don't allow to require a certain alignment as far as I know) That might be where you saw this being done?
Re: [SOLVED] Debugging Wine with Lightroom 3.5
On 01/18/2012 10:10 PM, Roland Baudin wrote: You can find the attached complete patch against wine 1.3.35. Hello Roland, Please send patches to wine-patches. Unless you are asking for feedback? HTH, Joris
Re: Debugging Wine with Lightroom 3.5
Replying, also including the wine-devel list, On 12/17/2011 05:15 PM, Roland Baudin wrote: Hi, thanks for the answer. What do you mean by a different execution path? RB The application might decide to execute different code given the Vista settings. It may have a preferred execution path using certain functionality only available for Vista/Windows 7, and a fallback path for XP. Pseudocode: if (system is Vista+) use_builtin_functionality(); else /* XP */ use_fallback_mechanism(); HTH, Joris
Re: Debugging Wine with Lightroom 3.5
It's possible the application is choosing a different execution path, using Vista-specific features. This could be an explanation for the differences you are seeing. HTH, Joris
Re: comctl32/tests: Removed sign comparison warning in datetime tests.
On 10/05/2011 04:43 PM, Marko Nikolic wrote: static void test_mccolor_types(HWND hWndDateTime, int mccolor_type, const char* mccolor_name) { -LRESULT r; -COLORREF theColor, prevColor; +//LRESULT r; +COLORREF theColor, prevColor, crColor; Please avoid C++/C99-style comments in Wine code In this case you should remove the 'r' variable instead of commenting it out.
Re: [3/7] msi: Don't create a temporary copy of the package. (try 2)
Just an implementation detail I noticed: On 08/23/2011 11:45 AM, Hans Leidekker wrote: + +static UINT get_registered_local_package( const WCHAR *product, const WCHAR *package, WCHAR *localfile ) +{ +MSIINSTALLCONTEXT context; +HKEY product_key, props_key; +WCHAR *registered_package = NULL, unsquashed[GUID_SIZE]; +UINT r = ERROR_FUNCTION_FAILED; + +r = msi_locate_product( product,context ); +if (r != ERROR_SUCCESS) +return r; + +r = MSIREG_OpenProductKey( product, NULL, context,product_key, FALSE ); +if (r != ERROR_SUCCESS) +return r; + +r = MSIREG_OpenInstallProps( product, context, NULL,props_key, FALSE ); +if (r != ERROR_SUCCESS) +{ +RegCloseKey( product_key ); +return r; +} +registered_package = msi_reg_get_val_str( product_key, INSTALLPROPERTY_PACKAGECODEW ); +if (!registered_package) +goto done; + +unsquash_guid( registered_package, unsquashed ); +if (!strcmpiW( package, unsquashed )) +{ +WCHAR *filename = msi_reg_get_val_str( props_key, INSTALLPROPERTY_LOCALPACKAGEW ); +strcpyW( localfile, filename ); +msi_free( filename ); +r = ERROR_SUCCESS; +} +done: +msi_free( registered_package ); +RegCloseKey( props_key ); +RegCloseKey( product_key ); +return r; +} + I'm confused about the last part of the function. I think if the comparison between 'package' and 'unsquashed' fails, you want to return an error, but the return value 'r' will be ERROR_SUCCESS at that point, and isn't updated. HTH, Joris
Re: urlmon: Fix incorrect pointer arithmetic (too conversative) in map_url_to_zone. (RESEND)
On 06/04/2011 03:02 PM, Gerald Pfeifer wrote: Resending: This really looks like a straightforward bug fix and the current code definitely wrong??? The difference between two pointers (of the same type) is the number of elements, not the number of bytes. Thus the code below was way incorrect, luckily only too conversative. Gerald --- dlls/urlmon/sec_mgr.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/urlmon/sec_mgr.c b/dlls/urlmon/sec_mgr.c index 7b4bb35..75850ee 100644 --- a/dlls/urlmon/sec_mgr.c +++ b/dlls/urlmon/sec_mgr.c @@ -529,7 +529,7 @@ static HRESULT map_url_to_zone(LPCWSTR url, DWORD *zone, LPWSTR *ret_url) hres = CoInternetParseUrl(secur_url, PARSE_PATH_FROM_URL, 0, path, sizeof(path)/sizeof(WCHAR),size, 0); -if(SUCCEEDED(hres) (ptr = strchrW(path, '\\')) ptr-path sizeof(root)/sizeof(WCHAR)) { +if(SUCCEEDED(hres) (ptr = strchrW(path, '\\')) ptr-path sizeof(root)) { UINT type; memcpy(root, path, (ptr-path)*sizeof(WCHAR)); Indeed, the difference between two pointers is the number of elements. sizeof(root) is the number of bytes, sizeof(root)/sizeof(WCHAR) is the number of elements. HTH, Joris
Re: [PATCH 1/4] winealsa.drv: Partially implement IAudioSessionManager2
I'm sorry if I'm wrong, but it seems to me in this and following patches, the AudioSessionManager_Release() function is incomplete - I think the dealing with ref == 0 is missing. HTH, Joris
Re: GSoC-2011: Implement Missing Mesh Functions in Wine’s D3DX9
On 05/26/2011 10:33 AM, Michael Mc Donnell wrote: I've added some more tests to see if I could make it fail. Microsoft's UpdateSemantics is not very picky. I can't get it to return anything but D3D_OK except for when I pass a null pointer. My implementation follows this behavior except for two cases: it returns E_FAIL when passing an undefined type and when the offset is not 4 byte aligned. This is because the values are checked inside vertexdeclaration_init. So Wine is stricter. I don't think that it is necessarily a problem because applications that pass bogus declarations like those will likely not work anyway. My own tests with a small interactive demo show that in those cases the application will crash with an access violation when it tries to re-draw the scene. I don't know whether it applies here, but if I understand correctly, there have been cases before that Wine must not be stricter than Windows. Tthe reason is that a program may 'depend' on a function crashing (it having an exception caught in that case). In such a situation, Wine's version of the function not crashing would cause a code path being executed that normally never is (causing incorrect behavior even) Again I don't know whether it is relevant in this cause. HTH, Joris
Re: [2/2] d3dx9: Implement D3DXLoadMeshHierarchy for basic mesh hierarchy.
Hello, I found a possibly memory leak in the patch. In this function: +static HRESULT parse_mesh(IDirectXFileData *filedata, struct mesh_data *mesh_data, DWORD provide_flags) These may leak the allocated blocks: + +mesh_data-vertices = HeapAlloc(GetProcessHeap(), 0, +mesh_data-num_vertices * sizeof(*mesh_data-vertices)); +mesh_data-num_tri_per_face = HeapAlloc(GetProcessHeap(), 0, +mesh_data-num_poly_faces * sizeof(*mesh_data-num_tri_per_face)); +mesh_data-indices = HeapAlloc(GetProcessHeap(), 0, +(mesh_data-num_tri_faces + mesh_data-num_poly_faces * 2) * sizeof(*mesh_data-indices)); +if (!mesh_data-vertices || !mesh_data-num_tri_per_face || !mesh_data-indices) +return E_OUTOFMEMORY; + HTH, Joris
Re: [2/2] d3dx9: Implement D3DXLoadMeshHierarchy for basic mesh hierarchy.
On 05/19/2011 06:34 PM, Dylan Smith wrote: On Thu, May 19, 2011 at 6:16 AM, Joris Huizerjoris_hui...@yahoo.com wrote: Hello, I found a possibly memory leak in the patch. In this function: +static HRESULT parse_mesh(IDirectXFileData *filedata, struct mesh_data *mesh_data, DWORD provide_flags) These may leak the allocated blocks: + +mesh_data-vertices = HeapAlloc(GetProcessHeap(), 0, +mesh_data-num_vertices * sizeof(*mesh_data-vertices)); +mesh_data-num_tri_per_face = HeapAlloc(GetProcessHeap(), 0, +mesh_data-num_poly_faces * sizeof(*mesh_data-num_tri_per_face)); +mesh_data-indices = HeapAlloc(GetProcessHeap(), 0, +(mesh_data-num_tri_faces + mesh_data-num_poly_faces * 2) * sizeof(*mesh_data-indices)); +if (!mesh_data-vertices || !mesh_data-num_tri_per_face || !mesh_data-indices) +return E_OUTOFMEMORY; + All the pointers are stored in mesh_data, which isn't lost. They are freed at the end of load_skin_mesh_from_xof. +cleanup: +if (FAILED(hr)) { +if (d3dxmesh) IUnknown_Release(d3dxmesh); +if (adjacency) ID3DXBuffer_Release(adjacency); +} +HeapFree(GetProcessHeap(), 0, mesh_data.vertices); +HeapFree(GetProcessHeap(), 0, mesh_data.num_tri_per_face); +HeapFree(GetProcessHeap(), 0, mesh_data.indices); +return hr; +} Thanks for clarification (Sorry for the noise)
Re: d3dx9_36: Implement D3DXCreateBox
Hello, In this patch, one part seemed strange to me: You are declaring vertices as static memory: +static FLOAT vertices[144] But you are changing the values during the function: + +for(i = 0; i 24; i++) +{ +vertices[6 * i] *= width; +vertices[6 * i + 1] *= height; +vertices[6 * i + 2] *= depth; +} + Given that original values are never restored, I think you can not mark the array as static, otherwise incorrect values are used after the first call. The other arrays are not adapted, so they are fine as static memory (And you may in fact mark those static const) HTH, Joris
Re: [PATCH] Label verbosity levels.
On 03/19/2011 11:32 PM, Vitaliy Margolen wrote: On 03/18/2011 09:24 PM, m...@mtew.isa-geek.net wrote: - if ($opt_verbose 0) - { -print Processing .$spec_name.\n; - } + print Processing .$spec_name.\n +if $opt_verbose= $VERBOSE_INPUT; Please don't do this reverse notation. It's much more confusing to most people who are not too familiar with Perl. Also you changing logic, by replacing (greater then) with = (greater of equal. This is a big no-no to combine any logical changes with cleanup changes. This doesn't seem to change logic as $VERBOSE_INPUT equals 1 ( $VERBOSE_QUIET equals 0 )
Re: cryptnet/tests: Partially revert commit de6e33f306a3b1b424ad1a9c41e85d3692ef9e4d
Hello, I found a small (copy/paste) mistake in this patch: -/* w2k3,XP, newer w2k: CRYPT_E_NO_MATCH */ -ok(!ret (GetLastError() == CRYPT_E_NO_MATCH), +/* w2k3,XP, newer w2k: CRYPT_E_NO_MATCH, older w2k: CRYPT_E_ASN1_BADTAG */ +ok(!ret (GetLastError() == CRYPT_E_NO_MATCH || +broken(GetLastError() == CRYPT_E_NO_MATCH)), The comment indicates the alternative error, but the actual code doesn't check that one HTH, Joris
Re: [1/3] msxml3/xsl: Basic put_input() method for IXSLProcessor (try2)
Hello, I think I found a (possible) little issue in the patch: If one would pass a VARIANT of incorrect type to the xslprocessor_put_input() function (say type BSTR), the first type checks fail and leave hr uninitialised; in case it happened to have the value S_OK the other if block is skipped - assigning the uninitialised input_node; static HRESULT WINAPI xslprocessor_put_input( IXSLProcessor *iface, VARIANT input ) { xslprocessor *This = impl_from_IXSLProcessor( iface ); +IXMLDOMNode *input_node; +HRESULT hr; (assume hr happens to be S_OK) -FIXME((%p): stub\n, This); -return E_NOTIMPL; +TRACE((%p)-(%s)\n, This, debugstr_variant(input)); + +/* try IXMLDOMNode directly first */ +if (V_VT(input) == VT_UNKNOWN) +hr = IUnknown_QueryInterface(V_UNKNOWN(input), IID_IXMLDOMNode, (void**)input_node); +else if (V_VT(input) == VT_DISPATCH) +hr = IDispatch_QueryInterface(V_DISPATCH(input), IID_IXMLDOMNode, (void**)input_node); (both false) + +if (hr != S_OK) +{ //... +} (skipped) + +if (hr == S_OK) +{ +if (This-input) IXMLDOMNode_Release(This-input); +This-input = input_node; +} (executed, assigning garbage to This-input) + +return hr; } HTH, Joris
Re: user32: Add a test for reparenting a WS_POPUP window to a WS_CHILD parent.
Hello Dmitry Timoshkov, I noticed a small issue in your patch: - ret = DestroyWindow(parent); - ok( ret, DestroyWindow() error %d\n, GetLastError()); + ok(DestroyWindow(parent), DestroyWindow() error %d\n, GetLastError()); Please don't merge the call with the ok() statement; the GetLastError() call might be executed before the function to be tested, thus giving the old value. (There has been some cleaning up for this issue recently) The same goes for a few tests you added: + SetLastError(0xdeadbeef); + ok(SetForegroundWindow(popup), SetForegroundWindow() error %d\n, GetLastError()); + SetLastError(0xdeadbeef); +todo_wine + ok(SetForegroundWindow(popup), SetForegroundWindow() error %d\n, GetLastError()); + + SetLastError(0xdeadbeef); + ok(DestroyWindow(parent), DestroyWindow() error %d\n, GetLastError()); + HTH, Joris
the patches around ok()
Hello Henri Verbeet, and André Hentschel I wasn't (actively) on the mailing list, that's why I couldn't reply directly to your messages. I will try and make sure I have better titles for such patches in future! Regards, Joris
Re: programs: Add winemsibuilder.
While skimming through the new patches, I found: +WCHAR *encode_stream( const WCHAR *in ) +{ + DWORD c, next, count; + WCHAR *out, *p; + + count = strlenW( in ); + if (count MAX_STREAM_NAME) + return NULL; + + count += 2; + out = HeapAlloc( GetProcessHeap(), 0, count * sizeof(WCHAR) ); + p = out; You aren't checking for out-of-memory condition here. As you seem to cover all the other possible errors, I thought to let you know HTH, Joris
Re: [PATCH 4/4] comctl32/rebar: Implemented dragging between rows
Hello, In this patch, in function REBAR_HandleUDDrag: +if(yOff 0) +{ +/* Place the band above the current top row */ +DPA_DeletePtr(infoPtr-bands, iHitBand); +hitBand-fStyle = RBBS_BREAK; +REBAR_GetBand(infoPtr, 0)-fStyle |= RBBS_BREAK; +infoPtr-iGrabbedBand = DPA_InsertPtr( +infoPtr-bands, 0, hitBand); +} It looks like that should have been: hitBand-fStyle = ~RBBS_BREAK; HTH, Joris
Re: [1/2] msi: Don't try to install or remove ODBC drivers if the component is disabled.
Hello, I noticed in this patch, exactly the same lines are added in all the functions; wouldn't it be better to add a(n) (inline) function isComponentEnabled(rec,package) to reduce the repetition? HTH, Joris
Re: About: d3dx9: Store transform matrix per-sprite.
--- On Tue, 10/19/10, Austin English austinengl...@gmail.com wrote: While these emails are very helpful, can you please do a reply to the original thread? It makes it easier for those of us using clients with threaded mode to follow. Thanks! -- -Austin I can understand that's easier, less messy - I didn't do so up until now as it is quite a number of emails per day (especially if tracking both wine-devel and wine-patch) -- and my contributions/'contributions' are rare; Is there a way to do this other than registering to get the emails daily sent to me? I usually browse through the updates via the web (the mail archive and the patch watcher at http://source.winehq.org/patches/), and as far as I know there is no way of replying on either ? I think I will register to receive emails from the wine-devel and wine-patch mailing lists unless there's an other way to reply to thread. Best regards, Joris
About: d3dx9: Store transform matrix per-sprite.
Hello, In this patch ID3DXSpriteImpl_Flush is adapted; the new loop being like: int i, count, start; /* ... */ for(start=0;startThis-sprite_count;start+=count,count=0) { i=start; while(iThis-sprite_count (count==0 || This-sprites[i].texture==This-sprites[i-1].texture)) { /* filling in array */ } /* rest of the outer loop, using array and count */ } It seems count is used uninitialised here on the first iteration ? HTH, Joris
About: [PATCH 2/2] ntdll: Check for case-insensitive volumes.
Hello, In the proposed patch [PATCH 2/2] ntdll: Check for case-insensitive volumes., I found this piece: +/* Add a new entry */ +for (i = 0; i sizeof(fs_cache)/sizeof(fs_cache[0]); i++) +if (fs_cache[i].dev == 0) +{ +/* This entry is empty, use it */ +fs_cache[i].dev = dev; +fs_cache[i].fsid = fsid; +fs_cache[i].case_sensitive = case_sensitive; +} Maybe I'm missing something, but shouldn't you return from the function when finding a cache entry to fill? This seems to be filling every empty cache entry? HTH, Joris
About: msxml3: Partially implement ::setAttributeNode()
Hello, In proposed patch msxml3: Partially implement ::setAttributeNode() I think I found a little possible memory leak: +name = xmlChar_from_wchar(nameW); +value = xmlChar_from_wchar(V_BSTR(valueW)); + +if (!name || !value) +{ +SysFreeString(nameW); +VariantClear(valueW); +return E_OUTOFMEMORY; +} Wouldn't you need to free memory allocated for both name and value, in case one of the allocations succeeded ? HTH, Joris
Error path issues with gameux: Add implementation of IGameStatisticsMgr::RemoveGameStatistics.
Hello, I noticed the committed patch gameux: Add implementation of IGameStatisticsMgr::RemoveGameStatistics. (5cac9d2cb2c020802a56a5b1b28348316f1087ba) The GAMEUX_getAppIdFromGDFPath() function now ends with: +HeapFree(GetProcessHeap(), 0, lpRegistryPath); + +TRACE(found app id: %s, return: %#x\n, debugstr_w(lpApplicationId), hr); +return hr; In most of the error paths, lpRegistryPath is not initialized, so it's pointing to garbage; I think just initializing to NULL should be sufficient; Similarly, in that case, lpApplicationId is not initialized, so it contains garbage; Tracing will probably print some random stack bytes before hitting a zero byte. I'm not completely sure what should be done about this issue; I think it should probably only be traced on success, perhaps tracing the error otherwise; Any ideas? HTH, Joris
Unused code patch in: mshtml: Added nsIURL::GetQuery implementation.
Hello, I found a bit of unused code was introduced in commit ffe9cc87c0e759dffe2a19a96a1e5c7746c7ad62 mshtml: Added nsIURL::GetQuery implementation. +ptr_end = url.lpszExtraInfo+url.dwExtraInfoLength; +for(ptr = url.lpszExtraInfo; ptr ptr_end; ptr++) { +if(*ptr == '#') +break; +} + +ptr = url.lpszExtraInfo; Either the loop is leftover code, or the last (unconditional) assignment is wrong. HTH, Joris
Mistake in : msxml3: Don't use xmlnode's IXMLDOMNode iface in get_[first|last]Node implementations.
Hello, I noticed some copy/paste mistake in this patch; A number of functions for *get_lastChild now call node_get_first_child. HTH, Joris
Typo in : wined3d: Translate before scaling for rhw as well in transform_projection().
While skimming through recently committed patches, I noticed this piece: +/* Window Coord 0 is the middle of the first pixel, so translate by 1/2 pixels */ +glTranslatef(63.0f / 128.0f, 63.0f / 128.0f, 0.0f); +checkGLcall(glTranslatef(63.0f / 128.0f, -63.0f / 128.0f, 0.0f)); In the checkGLcall you changed the sign of the second parameter, but you didn't do this in the glTranslatef call. This seemed a bit strange (and I don't know which one would be right). HTH, Joris
[PATCH 5/6] d3dx9_36/tests: Added trigonometric functions test to HLSL test suite
Hello Travis Athougies, In this patch, you have this code: +void *ret = NULL; //... +ret = HeapAlloc(GetProcessHeap(), 0, 4 * samples); +for(i = 0;i 32;i++) { //... +memcpy((void*) (((DWORD) ret) + (4 * i)), lr.pBits, 4); //... +} I'm not sure, but I think this will cause 64-bit issues (truncating to a 32-bit value?) Even if it doesn't, it seems simpler (more readable) to use a char pointer instead of a void pointer, like +char *ret; //... +ret = HeapAlloc(GetProcessHeap(), 0, 4 * samples); //... +memcpy(ret + (4 * i), lr.pBits, 4); HTH, regards, Joris
[2/3] ntdll: fill unused tails of heap blocks if HEAP_FREE_CHECKING_ENABLED (take 3)
Dan Kegel, you wrote: To check whether we're too early in process setup to check global flags, I compare the arguments of RtlCreateHeap with the ones used by the call in virtual_init(). This is not especially clean, but I couldn't think of anything better. I was thinking, couldn't you place the RtlCreateHeap implementation with an internal function, that takes an extra argument (boolean or flags) to indicate whether to do this initialization step or not ? Then, call the internal function from virtual_init() with the boolean set, and have RtlCreateHeap just calling it, without the boolean set. I've seen something like this being done elsewhere (but for different reasons) I'm not sure whether this would be acceptable (performance-wise?) but it'd be cleaner I think. HTH, Joris
Simplify code in dlls/imm32/tests/imm32.c
Hello Gerald Pfeifer, You did, /* behavior differs between win9x and NT */ ret = ImmGetCompositionString(imc, GCS_COMPSTR, resstr, sizeof(resstr)); -ok(ret || !ret, You'll never read this.\n); +ok(TRUE, You'll never read this.\n); Wouldn't it be better to do something like: ok(ret || broken(!ret), You'll never read this.\n); or marking the other case broken()? Note that broken() should be interpreted as, unwanted functionality for Wine HTH, Joris
possible-wrong return value of PdhMakeCounterPathA
Obviously mostly a small and theoretical problem, but anyway: Looking at git commit 754b97c72c38f736100c6542af234c31a4bf7a5b, it seems, PdhMakeCounterPathA may be returning the wrong error in this case: Everything goes well until the allocation of bufferW. Assuming this fails, the function will return PDH_MORE_DATA, which seems the wrong error value (instead it should probably return PDH_MEMORY_ALLOCATION_FAILURE ? ) regards, Joris
Re: possible NULL dereference?
--- On Thu, 4/9/09, Paul Vriens paul.vriens.w...@gmail.com wrote: From: Paul Vriens paul.vriens.w...@gmail.com Subject: Re: possible NULL dereference? To: Joris Huizer joris_hui...@yahoo.com Cc: wine-devel@winehq.org Date: Thursday, April 9, 2009, 7:53 AM Joris Huizer wrote: Looking at git commit dcb3e52e2dfd0d6e494164932fb2b684d463a005, it seems, passing a NULL size pointer to GetUserNameEx[AW] is likely to crash. You may want to test whether Windows versions crash on it, and check for it if needed. HTH, Joris There is also another one (mentioned by Coverity) where passing a NULL lpNameBuffer and a big enough nSize will crash. I tested that one on W2K3 and this also crashes on W2K3. I didn't test the NULL nSize however. If time permits I'll add some tests and comments in the case of crashes. If somebody wants to be beat me to it, be my guest. Out of curiosity, did you find this by visual inspection? -- Cheers, Paul. Yea I just noticed this while skimming through, now and then I look at the latest changes on git. I assume Coverity doesn't complain as it noticed you don't test the nSize pointer in any code path, so it assumes you know what you're doing. That seems like a general problem - if it could pick up the WINAPI flag (explicitly different calling convention) and realize every argument is suspect, it would find all such problems as well; Such behavior would be desirable for library functions in general, except that different projects are likely to have very different requirements about when a function is a library function to be treated like that. Specifying what is a library function might already be supported or perhaps it could be requested as a generally useful feature? regards, Joris
possible NULL dereference?
Looking at git commit dcb3e52e2dfd0d6e494164932fb2b684d463a005, it seems, passing a NULL size pointer to GetUserNameEx[AW] is likely to crash. You may want to test whether Windows versions crash on it, and check for it if needed. HTH, Joris
Re: dlls/comctl32/tests/listview.c: fix ok statements to actually test something
--- On Thu, 4/2/09, Nikolay Sivov bungleh...@gmail.com wrote: From: Nikolay Sivov bungleh...@gmail.com Subject: Re: dlls/comctl32/tests/listview.c: fix ok statements to actually test something To: wine-devel@winehq.org, joris_hui...@yahoo.com Date: Thursday, April 2, 2009, 2:04 PM Joris Huizer wrote: Hi, Joris. Thanks for spotting this, but changes you've made will fail on Windows. I've just sent a corrected version with one test more. Here it is if you're interested: http://www.winehq.org/pipermail/wine-patches/2009-April/071433.html No problem :-) Sorry I didn't test with Windows just as I don't have it available; I wasn't sure what would be the proper action, to send a best-guess patch or personal email - any ideas on this in general? regards, Joris
Re: msxml3/tests:domdoc.c Test doc pointer before using it (coverity)
--- On Thu, 1/22/09, Austin English austinengl...@gmail.com wrote: From: Austin English austinengl...@gmail.com From: Joris Huizer jorishui...@debian.(none) Your e-mail is messed up in the patches. Alexandre's scripts take the patch info over the e-mail headers, so you should fix that. -- -Austin Sorry about that. Had forgotten I had reset local git tree since last time I sent a patch. Resent with correct info, I think that should be enough? Thanks for the warning, Joris
Internet Explorer running in Wine usefull for performance testing
Hello, Just as Dan Kegel likes to announce on the list, how Wine gets mentioned out on the internet, I thought this may be interesting/motivating to you. This page, http://ejohn.org/blog/accuracy-of-javascript-time/, mentions (big) problems in testing javascript performances (there's some interest in that in the new race between webbrowsers), when running IE (and other browsers) on Windows, which are fixed when running it under Wine (in this case on a Mac) Regards, Joris
Re: dlls/shlwapi/assoc.c:fix ASSOC_GetExecutable not to use uninitialised variable
--- On Sun, 10/19/08, Rob Shearman [EMAIL PROTECTED] wrote: The information is added at commit time so it won't make any difference if you just run git format-patch after configuring the above settings, it matters what the settings were when you committed. If you haven't committed anything since you can do: git reset HEAD^ git commit And then enter your commit message again and this will create a new commit with the correct author information. Thanks, it worked indeed, so next time the patch will have correct contact information Joris __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: dlls/shlwapi/assoc.c:fix ASSOC_GetExecutable not to use uninitialised variable
--- On Fri, 10/17/08, Austin English [EMAIL PROTECTED] wrote: git repo-config user.name Your Name git repo-config user.email [EMAIL PROTECTED] Uhm no that doesn't work. I had already tried that (or actually, the equivalent of adding these to .git/config) but it didn't make any difference Is there something missing when using `git format-patch --keep-subject -o out origin` to generate the patch? This command is suggested on the gitWine page. Thanks, Joris __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: dlls/shlwapi/assoc.c:fix ASSOC_GetExecutable not to use uninitialised variable
--- On Thu, 10/16/08, Austin English [EMAIL PROTECTED] wrote: From: Joris Huizer [EMAIL PROTECTED](none) Minor, but please fix your e-mail in the patch: Also, please set patch extensions to .txt, it makes it easier to read in browser. Alright, I did a resent with the corrected email address and .txt extension. Though I didn't manage to get git to fill in the correct address (it currently just tries to use the debian user name, which it can't turn into a real email address). How could I get git to fill in the address automatically? I couldn't find this at the GitWine page. (git format-patch seems to ignore the user/email pair as suggested for sending patches with git-imap-send) Thanks, Joris
Re: gdiplus: font.c: ensure to release resources
--- On Thu, 6/26/08, Huw Davies [EMAIL PROTECTED] wrote: You need to select out the hfont before deleting it. So the SelectObject should look like hfont_old = SelectObject(hdc, hfont); then after the GetTextMetrics do DeleteObject(SelectObject(hdc, hfont_old)) (then you don't need the two sets of DeleteObject) Huw. Thanks, I'll adapt the patch to take this into account. As you can see, I'm not too familiar with the windows API. As you mention this it kinda makes sence (like, I've seen this done in other parts of the Wine code?), but I couldn't make it up myself Hope I'll get it right now, sorry for the spam Joris
old dos/windows program crashing
Hello, I have a program, that I got like ages ago. It effectively is an atari emulator for dos, by the name pacifist, but I originally got it installed under windows ME. It has an old atari-basic program installed in it, (a simple game) written by a friend in it, which I wanted to play. I decided to try to get it to run again under Linux. The website it came from originally doesn't seem to have the program available for download anymore - so I just copied the files from the windows ME disc. I obviously tried WINE then, but it didn't work, however, dosbox works with it (though slow, obviously) so I know I'm not missing required files (though, perhaps, registry settings - not sure how likely that is, though) Anyway. This isn't such a big deal, though I'd like to look at what's going on in WINE, and possibly fix it - though I need help here. This program is, among things, a PMODE W/DOS Extender - so that means it probably does some obscure real-mode/protected-mode stuff. Console output is as follows, Warning: unprotecting memory to allow real-mode calls. NULL pointer accesses will no longer be caught. err:int:__wine_emulate_instruction mov cr0,eax at 0x0544 err:int:DOSVM_Int33Handler int33: unknown/not implemented parameters: int33: AX 0015, BX 0003, CX 11f7, DX 1165, SI 0055, DI 03ac, DS 11df, ES 11e7 fixme:int:DOSVM_Int10Handler Select vertical resolution - not supported fixme:int:DOSVM_Int10Handler Load ROM 8x8 Double Dot Patterns - Not Supported fixme:int31:DOSVM_Int31Handler physical address mapping (0x) - unimplemented wine: Unhandled page fault on read access to 0x at address 0x101f:0x0003ed71 (thread 002d), starting debugger... fixme:dbghelp:addr_to_linear Failed to linearize address 08f0:0002 (mode 0) fixme:dbghelp:addr_to_linear Failed to linearize address 08f0: (mode 0) Also I attached the visual display the winevdm shows as the program crashes. (It seems it crashes somewhere in generated code in kernel32.dll - in DPMI_PendingEventCheck() - written by the winebuild tool) I know some things about real-mode code, but not too much. Could you give me pointers on what to look at next? BTW, please CC me, I'm not on the mailing list currently. Thanks, Joris Check out the hottest 2008 models today at Yahoo! Autos. http://autos.yahoo.com/new_cars.htmlinline: pacifist.crash.gif
Re: Propsheet exception fix
--- Aric Stewart [EMAIL PROTECTED] wrote: Do not attempt to draw a page during WM_PAINT if there is no active page. Test which shows this working, causes exception without this patch Exception pointed out by EA Durbin. I in no way am in a position to criticise, but if it turns out not to be applied, you might want to add ok() checks, or at least comments, indicating what you are testing, as it currently doesn't really seem obvious regards, Joris Don't pick lemons. See all the new 2007 cars at Yahoo! Autos. http://autos.yahoo.com/new_cars.html
Re: automatically running wineprefixcreate
--- Tom Spear [EMAIL PROTECTED] wrote: Because I have a 20gb drive that Linux is installed on, and a blank 40gb mounted at /mnt/d (there is no windows installed on it). I want wine to install its things to my 40gb, and just for no other good reason than the fact that I am making an example of a normal user, I dont want to move the 40gb from /mnt/d .. IMHO if we are going to give the users the option to put their c drive where they want to so easily, we should make assumptions that they will want anything installed there to be moved if they relocate it, or we should give them a way to setup where their c drive is located before anything is put there, instead of assuming that they want it located at ~/.wine/drive_c .. It seems the easiest is to have ~/.wine a symlink to some directory on /mnt/d (if possible), that just works The fish are biting. Get more visitors on your site using Yahoo! Search Marketing. http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php
Re: Add casts to tools/makedep.c
--- Dmitry Timoshkov [EMAIL PROTECTED] wrote: Gerald Pfeifer [EMAIL PROTECTED] wrote: I accidently ended up building Wine using a C++ compiler the other day, and came across the following. -char *p = xmalloc (size); +char *p = (char*) xmalloc (size); That's a problem of C++ not Wine if it can't cope with casting void * to another pointer type. Polluting the whole source with useless casts buys us nothing. That's one of the few incompatibilities between C and C++ actually. C++ doesn't really like void pointers. Regards, Joris 8:00? 8:25? 8:40? Find a flick in no time with the Yahoo! Search movie showtime shortcut. http://tools.search.yahoo.com/shortcuts/#news
Re: HtmlHelp status, winecfg and SoC proposal
--- Paul Wise [EMAIL PROTECTED] wrote: The licence says this: * Limitations on Reverse-Engineering, Decompilation, and Disassembly. You may not reverse- engineer, decompile, or disassemble the SOFTWARE PRODUCT, except and only to the extent that such activity is expressly permitted by applicable law notwithstanding this limitation. As written in the chmspec colophon, I didn't do any disassembly of Microsoft stuff, only black-box format discovery. Mainly this was by sending different inputs to Microsoft's hhc and observing the output, as well as looking at existing samples of CHM files. I imagine that is probably reverse-engineering according to Microsoft (although they haven't contacted me at all, so maybe not). http://chmspec.nongnu.org/latest/Colophon.html That sounds like the same way wine and samba are developed, which is called clean-room reverse-engineering, and which should be legal. If it were not, using this code in wine wouldn't make anything worse ;-) regards, Joris Be a PS3 game guru. Get your game face on with the latest PS3 news and previews at Yahoo! Games. http://videogames.yahoo.com/platform?platform=120121
Re: DirectPlay should convert dwReserved1/2 registry keys from strings to DWORDs
if( i == 0 ) - memcpy( lpSpData-dwReserved1, returnBuffer, sizeof(lpSpData-dwReserved1) ); + sscanf(returnBuffer, %x, lpSpData-dwReserved1); Couldnt you use: strcpy(lpSpData-dwReserved1,returnBuffer); Sorry for only replying now; Your solution is equivalent, except that it is looks more complicated regards, Joris - The fish are biting. Get more visitors on your site using Yahoo! Search Marketing.
Re: DirectPlay should convert dwReserved1/2 registry keys from strings to DWORDs
--- Frank Richter [EMAIL PROTECTED] wrote: On 03.03.2007 13:56, Joris Huizer wrote: if( i == 0 ) - memcpy( lpSpData-dwReserved1, returnBuffer, sizeof(lpSpData-dwReserved1) ); + sscanf(returnBuffer, %x, lpSpData-dwReserved1); Couldnt you use: strcpy(lpSpData-dwReserved1,returnBuffer); Reading a string and interpreting it as a hex value, this value then being stored in a DWORD, is not quite the same as copying the string into the memory occupied by the DWORD. -f.r. Ow I'm sorry, then I mis-interpreted what was happening- sorry for that Looking for earth-friendly autos? Browse Top Cars by Green Rating at Yahoo! Autos' Green Center. http://autos.yahoo.com/green_center/
RE: xcopy try 3
--- Ann Jason Edmeades [EMAIL PROTECTED] wrote: For reference, in case anyone else hits it, the problem here is I like my windows editor so generally edit over a samba share. (I've just found...) Makes me feel like why not use wine to run it...? Oh well, just babbling, you must have a valid reason for that regards, Joris The fish are biting. Get more visitors on your site using Yahoo! Search Marketing. http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php
Re: a big fan (now with bad news)
Aww... yes, I'm seeing that too According the the wine application database (http://appdb.winehq.org/appview.php?iVersionId=469) some settings help it get a bit further, but it reports: Microsoft Internet Explorer has encountered a problem and needs to close. We are sorry for the inconvenience. (With a debug button) With these messages: fixme:shell:StopWatchMode () stub! fixme:shdocvw:IEWinMain 10 fixme:ole:CoResumeClassObjects stub err:module:DelayLoadFailureHook failed to delay load urlmon.dll.CreateURLMoniker wine: Call from 0x7b842138 to unimplemented function urlmon.dll.CreateURLMoniker, aborting fixme:imm:ImmDisableIME (-1): stub fixme:advapi:RegisterEventSourceW ((null),LMicrosoft Internet Explorer): stub fixme:advapi:ReportEventA (0xcafe4242,0x0001,0x,0x03e8,(nil),0x0005,0x0050,0x632f6ec0,0x632f6a84): stub fixme:advapi:ReportEventW (0xcafe4242,0x0001,0x,0x03e8,(nil),0x0005,0x0050,0x161400,0x632f6a84): stub err:eventlog:ReportEventW Liexplore.exe err:eventlog:ReportEventW L6.0.2800.1106 err:eventlog:ReportEventW L err:eventlog:ReportEventW L0.0.0.0 err:eventlog:ReportEventW L fixme:advapi:DeregisterEventSource (0xcafe4242) stub fixme:wininet:InternetGetConnectedState always returning LAN connection. Hitting debug crashes as an unimplemented function in urlmon is called - that seems weird, as it should be using the native version of urlmon... oh well I guess you need to use ies4linux to get a working IE for now. I had it installed as some program thought it needed it - hadn't noticed it didn't actually run Jeffrey Sabarese [EMAIL PROTECTED] wrote: Hi Joris, Thanks again for corresponding with me on this. (i realize there's much text here, so please take you time, get to it when you can...) for the link, just think: this dude is such a 'NOVICE'!! he really should take more 'NOTES'!!!... get it? novicenotes? hee hee then a text search (upper right) of WinE ie will get you there, undoubtedly. but that's not why i am writing. i wanted to let you know that the genuine installer, http://www.microsoft.com/windows/ie/ie6/downloads/critical/ie6sp1/default.mspx did not succeed in placing a useable software on the system. it seemed to install just fine, but launching it: [ wine '/home/user/.wine/drive_c/Program Files/Internet Explorer/iexplore.exe' ] brings up a window w/ nothing but white space. as if it wants to launch, but doesn't quite get there. when ie was installed via ies4linux, i DID experience a similar activity, but only if i launched IE via WinE application link, for example, if i linked to IE from... say EditPlus, as an external browser, i would get the same: a window w/ nothing in it-- as you might see after an app has crashed, the window's still up, but no screen-updating, so you get a frozen image, or white screen. so, the only time i've ever seen it look right myself was using the non-standard ies4linux launcher, as i've illustrated specifically, here some time ago (showing the 3 versions of IE in that package): http://digisquirrel.blogspot.com/2006/08/fiddlers-three.html please understand that i want to install it the proper, WinE developers' recommended way, so this is why i continue to research the subject (and continue to probably annoy you, for which i apologize). What might i be doing wrong? i noticed in my blog entry-- (a different one this time) http://novicenotes.com/2006/08/04/ie_on_linux_wine/ where i discussed DCOM98.EXE . i haven't actively installed that component this time-- so unless it came down w/ the MS installer, might i need to have that installed as well? any other feedback you have on this subject is appreciated. perhaps you have URL w/ the preferred, WinE dev's method? (assuming it's okay [legal] to do the MS installer) thank you for your generous help!! --Jeff Sabarese PS. I apologize if it's been an invasion-- i thought i mailed to the list last time, but it looks like i sent just to you last time? (and i know i sent only to you this time, so if you wish to forward to the list, please do so. i have a real problem w/ being not-concise [as you've noticed, i'm sure], so i tried to spare the other members for now. sorry i can't seem to shorten things more than i do). On 2/24/07, Joris Huizer wrote: I think I don't have it anymore, though I'd like to see - though I'm pretty sure you got it covered well, like before. regards, Joris --- Jeffrey Sabarese wrote: hey there! thanks for the valuable lesson learned here! btw-- i changed my web log info , per recommendations i received in this mail conversation. if you still have the link and care to see it-- you'll see that i've now got the wineHQ URL there, and a recommendation about IE6 should install properly :) On 2/23/07, Joris Huizer wrote: --- Jeffrey Sabarese wrote: I tried [ yum remove wine ], and then [yum install wine] which went without a hitch, but there's no change in my Primary
RE: a big fan (now with bad news)
--- Jeffrey Sabarese [EMAIL PROTECTED] wrote: I tried [ yum remove wine ], and then [yum install wine] which went without a hitch, but there's no change in my Primary User (the broken one) HOWEVER, WinE continues to run perfectly under other user accounts, and ROOT. The wine configuration is in ~/.wine Remove/rename it for a fresh start. Wine will automatically recreate the ~/.wine directory with required contents for normal functionality (but then you need to do installation of every program again) Yahoo! Music Unlimited Access over 1 million songs. http://music.yahoo.com/unlimited
Re: a big fan of your work
--- Jeffrey Sabarese [EMAIL PROTECTED] wrote: I have installed, and use the ies4linux ( here for more info if you're unfamiliar with it: http://novicenotes.com/install-internet-explorer-on-linux-under-wine-run-ie-on-linux/ ), but though it works VERY well launching from the Fedora Terminal I don't think you need ies4linux. At least in the current wine version you could just download ie6 (sp1) from the microsoft site (and I guess have a good look at the terms of use -- though I think you already agreed to them with running ies4linux) and run the installer - it gets the thing installed properly regards, Joris Don't pick lemons. See all the new 2007 cars at Yahoo! Autos. http://autos.yahoo.com/new_cars.html
-ansi, -pedantic warnings and errors on
Hello, I was looking at the result of configuring with -ansi, -pedantic flags. It gives loads of warnings (not all relevant - also complaining about 'long long' not being ansi) and indicates unnamed unions, among other things. Could someone confirm my idea that unnamed unions must all be dealt with? Am hoping to fix those if I get it to compile thus far; At this point, it complains about include/wine/unicode.h which has the combination 'extern' and 'inline', which it doesn't like. Getting rid of that, with -Dinline=__inline__, helps it get a bit further Next it complains about is libs/wine/string.c, which implements several functions that are also implemented in include/wine/unicode.h. These are again the 'extern inline' functions. As most headers have 'static inline' instead of 'extern inline', with the advantage of not having to duplicate the functions. I'm hoping this is an allowed fix, it gets compiling further anyway Finding fabulous fares is fun. Let Yahoo! FareChase search your favorite travel sites to find flight and hotel bargains. http://farechase.yahoo.com/promo-generic-14795097From f832d27650482cc0b764f1600bb571cd7240fb7b Mon Sep 17 00:00:00 2001 From: Joris Huizer [EMAIL PROTECTED](none) Date: Sat, 17 Feb 2007 14:07:11 +0100 Subject: [PATCH] -pedantic fix: make unicode functions static To: wine-patches [EMAIL PROTECTED] --- include/wine/unicode.h | 93 libs/wine/string.c | 181 2 files changed, 31 insertions(+), 243 deletions(-) diff --git a/include/wine/unicode.h b/include/wine/unicode.h index 7f723b0..8dc286d 100644 --- a/include/wine/unicode.h +++ b/include/wine/unicode.h @@ -99,21 +99,18 @@ extern int snprintfW( WCHAR *str, size_t extern int vsprintfW( WCHAR *str, const WCHAR *format, va_list valist ); extern int vsnprintfW( WCHAR *str, size_t len, const WCHAR *format, va_list valist ); -extern inline int wine_is_dbcs_leadbyte( const union cptable *table, unsigned char ch ); -extern inline int wine_is_dbcs_leadbyte( const union cptable *table, unsigned char ch ) +static inline int wine_is_dbcs_leadbyte( const union cptable *table, unsigned char ch ) { return (table-info.char_size == 2) (table-dbcs.cp2uni_leadbytes[ch]); } -extern inline WCHAR tolowerW( WCHAR ch ); -extern inline WCHAR tolowerW( WCHAR ch ) +static inline WCHAR tolowerW( WCHAR ch ) { extern WINE_UNICODE_API const WCHAR wine_casemap_lower[]; return ch + wine_casemap_lower[wine_casemap_lower[ch 8] + (ch 0xff)]; } -extern inline WCHAR toupperW( WCHAR ch ); -extern inline WCHAR toupperW( WCHAR ch ) +static inline WCHAR toupperW( WCHAR ch ) { extern WINE_UNICODE_API const WCHAR wine_casemap_upper[]; return ch + wine_casemap_upper[wine_casemap_upper[ch 8] + (ch 0xff)]; @@ -121,91 +118,77 @@ extern inline WCHAR toupperW( WCHAR ch ) /* the character type contains the C1_* flags in the low 12 bits */ /* and the C2_* type in the high 4 bits */ -extern inline unsigned short get_char_typeW( WCHAR ch ); -extern inline unsigned short get_char_typeW( WCHAR ch ) +static inline unsigned short get_char_typeW( WCHAR ch ) { extern WINE_UNICODE_API const unsigned short wine_wctype_table[]; return wine_wctype_table[wine_wctype_table[ch 8] + (ch 0xff)]; } -extern inline int iscntrlW( WCHAR wc ); -extern inline int iscntrlW( WCHAR wc ) +static inline int iscntrlW( WCHAR wc ) { return get_char_typeW(wc) C1_CNTRL; } -extern inline int ispunctW( WCHAR wc ); -extern inline int ispunctW( WCHAR wc ) +static inline int ispunctW( WCHAR wc ) { return get_char_typeW(wc) C1_PUNCT; } -extern inline int isspaceW( WCHAR wc ); -extern inline int isspaceW( WCHAR wc ) +static inline int isspaceW( WCHAR wc ) { return get_char_typeW(wc) C1_SPACE; } -extern inline int isdigitW( WCHAR wc ); -extern inline int isdigitW( WCHAR wc ) +static inline int isdigitW( WCHAR wc ) { return get_char_typeW(wc) C1_DIGIT; } -extern inline int isxdigitW( WCHAR wc ); -extern inline int isxdigitW( WCHAR wc ) +static inline int isxdigitW( WCHAR wc ) { return get_char_typeW(wc) C1_XDIGIT; } -extern inline int islowerW( WCHAR wc ); -extern inline int islowerW( WCHAR wc ) +static inline int islowerW( WCHAR wc ) { return get_char_typeW(wc) C1_LOWER; } -extern inline int isupperW( WCHAR wc ); -extern inline int isupperW( WCHAR wc ) +static inline int isupperW( WCHAR wc ) { return get_char_typeW(wc) C1_UPPER; } -extern inline int isalnumW( WCHAR wc ); -extern inline int isalnumW( WCHAR wc ) +static inline int isalnumW( WCHAR wc ) { return get_char_typeW(wc) (C1_ALPHA|C1_DIGIT|C1_LOWER|C1_UPPER); } -extern inline int isalphaW( WCHAR wc ); -extern inline int isalphaW( WCHAR wc ) +static inline int isalphaW( WCHAR wc ) { return get_char_typeW(wc) (C1_ALPHA|C1_LOWER
Re: -ansi, -pedantic warnings and errors on
Robert Shearman [EMAIL PROTECTED] wrote: Joris Huizer wrote: Hello, I was looking at the result of configuring with -ansi, -pedantic flags. It gives loads of warnings (not all relevant - also complaining about 'long long' not being ansi) and indicates unnamed unions, among other things. Could someone confirm my idea that unnamed unions must all be dealt with? Am hoping to fix those if I get it to compile thus far; At this point, it complains about include/wine/unicode.h which has the combination 'extern' and 'inline', which it doesn't like. Getting rid of that, with -Dinline=__inline__, helps it get a bit further Next it complains about is libs/wine/string.c, which implements several functions that are also implemented in include/wine/unicode.h. These are again the 'extern inline' functions. As most headers have 'static inline' instead of 'extern inline', with the advantage of not having to duplicate the functions. I'm hoping this is an allowed fix, it gets compiling further anyway On modern CPUs it is much better to have one copy of the function instead of inlining it. Making the functions static instead of extern will probably cause wine to be a bit slower at the expense of silencing some not very useful warnings. If you want to fix it for this case, I suggest you add a define that changes to static inline if pedantic/ansi mode is being used and extern inline otherwise and use it when declaring the functions. -- Rob Shearman Well if it isn't applied (btw how could I see what is/isn't applied?) will try to look at that. Though the keyword inline implies the code should get inlined, and if it shouldn't, the implementation copy should be removed from the unicode.h file Joris - Have a burning question? Go to Yahoo! Answers and get answers from real people who know.
git question
Hello, As a new wine is released I'm trying to get updated. Before I had used git for generating patches, I could do: git fetch; git rebase origin however, now this doesn't seem to pickup anything. How should I tell git to actually update to the files on the server? Thanks, Joris Do you Yahoo!? Everyone is raving about the all-new Yahoo! Mail beta. http://new.mail.yahoo.com
avifil32: sign-compare fixes
Hello As the previous time I was inserting too many casts, I want to ask whether this approach is better (introducing an ULONG version if it fixes compare warnings, and casting away remaining problems) If this is not alright, could you tell what's the best way to fix? regards, Joris Never miss an email again! Yahoo! Toolbar alerts you the instant new Mail arrives. http://tools.search.yahoo.com/toolbar/features/mail/From 1bc8e723684ad790ac7062334dcbebb37e0dc791 Mon Sep 17 00:00:00 2001 From: Joris Huizer [EMAIL PROTECTED](none) Date: Thu, 15 Feb 2007 13:03:25 +0100 Subject: [PATCH] avifil32: sign-compare fixes To: wine-patches [EMAIL PROTECTED] --- dlls/avifil32/api.c |3 ++- dlls/avifil32/avifile.c | 11 ++- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/dlls/avifil32/api.c b/dlls/avifil32/api.c index 92c6774..3909d18 100644 --- a/dlls/avifil32/api.c +++ b/dlls/avifil32/api.c @@ -922,10 +922,11 @@ LONG WINAPI AVIStreamLength(PAVISTREAM p * AVIStreamSampleToTime (AVIFILE.133) * AVIStreamSampleToTime (AVIFIL32.@) */ -LONG WINAPI AVIStreamSampleToTime(PAVISTREAM pstream, LONG lSample) +LONG WINAPI AVIStreamSampleToTime(PAVISTREAM pstream, LONG _lSample) { AVISTREAMINFOW asiw; LONG time; + ULONG lSample = _lSample; TRACE((%p,%d)\n, pstream, lSample); diff --git a/dlls/avifil32/avifile.c b/dlls/avifil32/avifile.c index f989c79..64b9d38 100644 --- a/dlls/avifil32/avifile.c +++ b/dlls/avifil32/avifile.c @@ -787,10 +787,11 @@ static HRESULT WINAPI IAVIStream_fnInfo( return AVIERR_OK; } -static LONG WINAPI IAVIStream_fnFindSample(IAVIStream *iface, LONG pos, +static LONG WINAPI IAVIStream_fnFindSample(IAVIStream *iface, LONG _pos, LONG flags) { IAVIStreamImpl *This = (IAVIStreamImpl *)iface; + ULONG pos = _pos; LONG offset = 0; @@ -809,7 +810,7 @@ static LONG WINAPI IAVIStream_fnFindSamp if (flags FIND_TYPE) { if (flags FIND_KEY) { - while (0 = pos pos = This-lLastFrame) { + while (pos = (ULONG)This-lLastFrame) { if (This-idxFrames[pos].dwFlags AVIIF_KEYFRAME) goto RETURN_FOUND; @@ -819,7 +820,7 @@ static LONG WINAPI IAVIStream_fnFindSamp pos--; }; } else if (flags FIND_ANY) { - while (0 = pos pos = This-lLastFrame) { + while (pos = (ULONG)This-lLastFrame) { if (This-idxFrames[pos].dwChunkLength 0) goto RETURN_FOUND; @@ -849,7 +850,7 @@ static LONG WINAPI IAVIStream_fnFindSamp } } - if (pos (LONG)This-sInfo.dwStart) + if (pos This-sInfo.dwStart) return 0; /* format changes always for first frame */ } } @@ -858,7 +859,7 @@ static LONG WINAPI IAVIStream_fnFindSamp } RETURN_FOUND: - if (pos (LONG)This-sInfo.dwStart) + if (pos This-sInfo.dwStart) return -1; switch (flags FIND_RET) { -- 1.4.4
Re: wineboot: Start items in StartUp folder on boot, includes security measures.
It seems the patch itself got lost Food fight? Enjoy some healthy debate in the Yahoo! Answers Food Drink QA. http://answers.yahoo.com/dir/?link=listsid=396545367
signedness/WINAPI changing question
I have a small question: I find some function LONG WINAPI AVIStreamSampleToTime(PAVISTREAM pstream, LONG lSample) (in the avifil32 dll), the second parameter should really be an ULONG instead of a LONG. It'd fix the signedness problems. My question is, is such a change allowed? And what should I do to update for such a change (except for the header gcc warns about) In case such change must not be performed, I'll just add a local variable which is a casted version. I thought this needs asking; adding in unnecessary variables doesn't seem the best fix to me. regards, Joris Don't pick lemons. See all the new 2007 cars at Yahoo! Autos. http://autos.yahoo.com/new_cars.html
Re: winegcc: sign-compare fixes
--- [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On 2/7/07, Joris Huizer [EMAIL PROTECTED] wrote: I believe this one causes problems -- please do not commit yet Joris Huizer [EMAIL PROTECTED] wrote: Need Mail bonding? Go to the Yahoo! Mail QA for great tips from Yahoo! Answers users.From 8686a200bd1f1cbd934d761013c487a9ddc195c9 Mon Sep 17 00:00:00 2001 From: Joris Huizer Date: Wed, 7 Feb 2007 15:19:25 +0100 Subject: [PATCH] winegcc sign-compare fixes To: wine-patches --- tools/winegcc/utils.c | 13 +++-- tools/winegcc/winegcc.c | 11 ++- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/tools/winegcc/utils.c b/tools/winegcc/utils.c index 1af91e9..c144077 100644 --- a/tools/winegcc/utils.c +++ b/tools/winegcc/utils.c @@ -120,14 +120,14 @@ void strarray_add(strarray* arr, const c void strarray_del(strarray* arr, int i) { - if (i 0 || i = arr-size) error(Invalid index i=%d, i); + if (i 0 || (unsigned int)i = arr-size) error(Invalid index i=%d, i); The unsigned int comparison here makes the negative check superfluous. Perhaps the argument should even be changed to unsigned as well, to match the range of arr-size (if the element is one byte). Alright, that makes sence, will do memmove(arr-base[i], arr-base[i + 1], (arr-size - i - 1) * sizeof(arr-base[0])); arr-size--; } If the element size could be greater than one byte, the multiplication here should be checked for overflow (actually, this is more necessary when the array is created or expanded). Well, the base field in the structure is defined as const char** base so sizeof(base[0]) == sizeof(const char *), should be 4 or so. How do you mean overflow in this case? sorry for asking dumb questions... Finding fabulous fares is fun. Let Yahoo! FareChase search your favorite travel sites to find flight and hotel bargains. http://farechase.yahoo.com/promo-generic-14795097
Re: [urlmon 1/2] Cast-qual warning fix
--- Paul Vriens [EMAIL PROTECTED] wrote: Hi, Fix a warning and remove the now not needed cast. Changelog Cast-qual warning fix Cheers, Paul. diff --git a/dlls/urlmon/umon.c b/dlls/urlmon/umon.c index 49260ab..d593c81 100644 --- a/dlls/urlmon/umon.c +++ b/dlls/urlmon/umon.c @@ -1605,7 +1605,7 @@ HRESULT WINAPI URLDownloadToCacheFileW(LPUNKNOWN lpUnkCaller, LPCWSTR szURL, LPW HRESULT hr; LPWSTR ext; -static const WCHAR header[] = { +static WCHAR header[] = { 'H','T','T','P','/','1','.','0',' ','2','0','0',' ', 'O','K','\\','r','\\','n','\\','r','\\','n',0 }; @@ -1631,7 +1631,7 @@ HRESULT WINAPI URLDownloadToCacheFileW(LPUNKNOWN lpUnkCaller, LPCWSTR szURL, LPW modified.dwLowDateTime = 0; if (!CommitUrlCacheEntryW(szURL, cache_path, expire, modified, NORMAL_CACHE_ENTRY, - (LPWSTR)header, sizeof(header), NULL, NULL)) + header, sizeof(header), NULL, NULL)) return E_FAIL; if (lstrlenW(cache_path) dwBufLength) -- If CommitUrlCacheEntryW does not take a constant pointer, this might be dangerous - if it changes the string, the next time this code executes the wrong (modified) string gets used If this is indeed possible, the static keyword needs to be dropped too (ensuring the string is reinitialised with the next call) If it is only not possible in this particular case, sorry for complaining; (though it may be possible to factor out that part of the code that is used, thus ensuring constness) If this is not possible in general, the function CommitUrlCacheEntryW should take a constant pointer instead (same for the other patch) regards, Joris Do you Yahoo!? Everyone is raving about the all-new Yahoo! Mail beta. http://new.mail.yahoo.com
Re: winegcc: sign-compare fixes
I believe this one causes problems -- please do not commit yet Joris Huizer [EMAIL PROTECTED] wrote: - Need Mail bonding? Go to the Yahoo! Mail QA for great tips from Yahoo! Answers users.From 8686a200bd1f1cbd934d761013c487a9ddc195c9 Mon Sep 17 00:00:00 2001 From: Joris Huizer Date: Wed, 7 Feb 2007 15:19:25 +0100 Subject: [PATCH] winegcc sign-compare fixes To: wine-patches --- tools/winegcc/utils.c | 13 +++-- tools/winegcc/winegcc.c | 11 ++- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/tools/winegcc/utils.c b/tools/winegcc/utils.c index 1af91e9..c144077 100644 --- a/tools/winegcc/utils.c +++ b/tools/winegcc/utils.c @@ -120,14 +120,14 @@ void strarray_add(strarray* arr, const c void strarray_del(strarray* arr, int i) { -if (i 0 || i = arr-size) error(Invalid index i=%d, i); +if (i 0 || (unsigned int)i = arr-size) error(Invalid index i=%d, i); memmove(arr-base[i], arr-base[i + 1], (arr-size - i - 1) * sizeof(arr-base[0])); arr-size--; } void strarray_addall(strarray* arr, const strarray* from) { -int i; +unsigned int i; for (i = 0; i from-size; i++) strarray_add(arr, from-base[i]); @@ -136,7 +136,7 @@ void strarray_addall(strarray* arr, cons strarray* strarray_dup(const strarray* arr) { strarray* dup = strarray_alloc(); -int i; +unsigned int i; for (i = 0; i arr-size; i++) strarray_add(dup, arr-base[i]); @@ -160,7 +160,7 @@ strarray* strarray_fromstring(const char char* strarray_tostring(const strarray* arr, const char* sep) { char *str, *newstr; -int i; +unsigned int i; str = strmake(%s, arr-base[0]); for (i = 1; i arr-size; i++) @@ -277,7 +277,7 @@ static file_type guess_lib_type(const ch file_type get_lib_type(strarray* path, const char* library, char** file) { -int i; +unsigned int i; for (i = 0; i path-size; i++) { @@ -289,7 +289,8 @@ file_type get_lib_type(strarray* path, c void spawn(const strarray* prefix, const strarray* args, int ignore_errors) { -int i, status; +unsigned int i; +int status; strarray* arr = strarray_dup(args); const char** argv; char* prog = 0; diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c index f1aa87e..f1a7bb0 100644 --- a/tools/winegcc/winegcc.c +++ b/tools/winegcc/winegcc.c @@ -170,7 +170,7 @@ struct options static void clean_temp_files(void) { -int i; +unsigned int i; if (keep_generated) return; @@ -239,7 +239,8 @@ static const strarray* get_translator(en static void compile(struct options* opts, const char* lang) { strarray* comp_args = strarray_alloc(); -int j, gcc_defs = 0; +unsigned int j; +int gcc_defs = 0; switch(opts-processor) { @@ -434,7 +435,7 @@ static void build(struct options* opts) const char *output_name, *spec_file, *lang; const char* winebuild = getenv(WINEBUILD); int generate_app_loader = 1; -int j; +unsigned int j; /* NOTE: for the files array we'll use the following convention: *-axxx: xxx is an archive (.a) @@ -719,7 +720,7 @@ static int is_linker_arg(const char* arg -static, -static-libgcc, -shared, -shared-libgcc, -symbolic, -framework }; -int j; +unsigned int j; switch (arg[1]) { @@ -769,7 +770,7 @@ static int is_mingw_arg(const char* arg) { -mno-cygwin, -mwindows, -mconsole, -mthreads, -municode }; -int j; +unsigned int j; for (j = 0; j sizeof(mingw_switches)/sizeof(mingw_switches[0]); j++) if (strcmp(mingw_switches[j], arg) == 0) return 1; -- 1.4.4 - Need a quick answer? Get one in minutes from people who know. Ask your question on Yahoo! Answers.
Re: winegcc: sign-compare fixes
Joris Huizer [EMAIL PROTECTED] wrote: I believe this one causes problems -- please do not commit yet Sorry for the spamming - the patch should be alright - Everyone is raving about the all-new Yahoo! Mail beta.
Re: advapi32: sign-compare fixes
Vitaliy Margolen [EMAIL PROTECTED] wrote: Joris Huizer wrote: - int len = WideCharToMultiByte(CP_ACP, 0, lpNameW, -1, lpName, + unsigned int len = WideCharToMultiByte(CP_ACP, 0, lpNameW, -1, lpName, This isn't right. WideCharToMultiByte returns INT, which is signed. @@ -1995,11 +1995,11 @@ LookupAccountSidW( if (dm) { BOOL status = TRUE; -if (*accountSize lstrlenW(ac)) { +if (*accountSize (unsigned)lstrlenW(ac)) { if (account) lstrcpyW(account, ac); } -if (*domainSize lstrlenW(dm)) { +if (*domainSize (unsigned)lstrlenW(dm)) { if (domain) lstrcpyW(domain, dm); } This isn't correct either. lstrlenW() also returns INT and you can't just cast it to (unsigned). Unsigned what? int/long/dword? Vitaliy. Sorry I'll fix it; Will try and check in future Joris - Now that's room service! Choose from over 150,000 hotels in 45,000 destinations on Yahoo! Travel to find your fit.
make installs recompiles files
Hello, I have this question: I noticed make install recompiles a number of files; it appears to happen in these directories: libs/wine dlls/uuid dlls/hhctrl.ocx dlls/shdocvw dlls/shlwapi It seems every source file of these directories gets recompiled. This happens with source of wine 0.9.17; it also happened in a few previous versions; I get the sources through cvs though it's gets updated on the day when the new wine version is released Any idea what's going wrong? regards, Joris
Re: Pen Widths, and patch etiquette
You may want to try and write a regression test (a small amount of C code calling the function/functions in such a way that the problem you see can be seen as output value) to show what windows does in this case; if then the values are corrected under wine with your changes, it shows you're going in the right direction :-) HTH, Joris
Re: [ntdll][3/3] Fix returncode for NtDeleteKey (with test)
Paul Vriens wrote: The server needs to check the handle anyway, there's no reason to do the check twice. Why twice? I return right after the NULL check. Paul. I think he meant, if there is a NULL check in the server code, the NULL check gets executed twice if it isn't NULL; the first one could be avoided then HTH, Joris
Re: [setupapi] fix return values and GUID string in SetupDiOpenClassRegKeyExW
Damjan Jovanovic wrote: +guidStringWithBraces[0] = (WCHAR) '{'; +CopyMemory(guidStringWithBraces[1], lpGuidString, +(MAX_GUID_STRING_LEN - 3)*sizeof(WCHAR)); +guidStringWithBraces[MAX_GUID_STRING_LEN - 2] = (WCHAR) '}'; +guidStringWithBraces[MAX_GUID_STRING_LEN - 1] = 0; +RpcStringFreeW(lpGuidString); Just wondering, shouldn't that be something like guidStringWithBraces[0] = (WCHAR) '{'; CopyMemory(guidStringWithBraces[1], lpGuidString, (MAX_GUID_STRING_LEN - 3)*sizeof(WCHAR)); guidStringWithBraces[1 + strlenW(lpGuidString)] = (WCHAR) '}'; guidStringWithBraces[2 + strlenW(lpGuidString)] = 0; RpcStringFreeW(lpGuidString); HTH, Joris
Re: setupapi: Fix SetupCloseInfFile when a NULL handle is given, with tests
James Hawkins wrote: Hi, This fixes bug 5511. Changelog: * Fix SetupCloseInfFile when a NULL handle is given, with tests. dlls/setupapi/parser.c |2 ++ dlls/setupapi/tests/parser.c |9 + 2 files changed, 11 insertions(+), 0 deletions(-) -- James Hawkins This attachment seems to be empty; regards, Joris
Re: secur32: Implement QueryContextAttributes. Add tests. cbMaxToken is 1904 not 2010.
Kai Blin wrote: +case SECPKG_ATTR_SIZES: +{ +PSecPkgContext_Sizes spcs = +SECUR32_ALLOC(sizeof(SecPkgContext_Sizes)); +spcs-cbMaxToken = NTLM_MAX_BUF; +spcs-cbMaxSignature = 16; +spcs-cbBlockSize = 1; +spcs-cbSecurityTrailer = 16; +pBuffer = spcs; +return SEC_E_OK; +} This doesn't seem to set pBuffer to spcs. What did I miss here? Maybe that should be *pBuffer? just guessing though
Re: netapi32: Improve NetUserGetInfo function
Simon Kissane wrote: netapi32: Improve NetUserGetInfo function * Implemented support for all levels documented by MSDN * Corrected error codes for nonexistent levels * Now works with empty string as server name I have also attached a C program (which can be compiled with MINGW), which tests the NetUserGetInfo functionality. Perhaps you could write unit tests based on the test program, to show correctness of the current code - this helps avoiding regressions HTH, Joris
msi: sql parsing
Hello, As somebody asked me whether I could try to use MSN Beta 8, I decided to give it a try; The installer quits at some point, caused by an unhandled SQL command ALTER TABLE `Registry` HOLD I decided to have a look at this, but I'm not familiar with msi, and my SQL knowledge isn't very big either; anyway, I added a few lines to the parser; now -- how could I find how to implement something for this? Regards, Joris diff --git a/dlls/msi/sql.y b/dlls/msi/sql.y index 86ebe30..f8c9f40 100644 --- a/dlls/msi/sql.y +++ b/dlls/msi/sql.y @@ -79,7 +79,7 @@ static struct expr * EXPR_wildcard( void int integer; } -%token TK_ABORT TK_AFTER TK_AGG_FUNCTION TK_ALL TK_AND TK_AS TK_ASC +%token TK_ABORT TK_AFTER TK_ALTER TK_AGG_FUNCTION TK_ALL TK_AND TK_AS TK_ASC %token TK_BEFORE TK_BEGIN TK_BETWEEN TK_BITAND TK_BITNOT TK_BITOR TK_BY %token TK_CASCADE TK_CASE TK_CHAR TK_CHECK TK_CLUSTER TK_COLLATE TK_COLUMN %token TK_COMMA TK_COMMENT TK_COMMIT TK_CONCAT TK_CONFLICT @@ -127,7 +127,7 @@ static struct expr * EXPR_wildcard( void %type column_list selcollist column column_and_type column_def table_def %type column_list column_assignment update_assign_list constlist %type query query from fromtable selectfrom unorderedsel -%type query oneupdate onedelete oneselect onequery onecreate oneinsert +%type query oneupdate onedelete oneselect onequery onecreate oneinsert onealter %type expr expr val column_val const_val %type column_type column_type data_type data_type_l data_count %type integer number @@ -156,6 +156,7 @@ onequery: | oneinsert | oneupdate | onedelete + | onealter ; oneinsert: @@ -235,6 +236,14 @@ onedelete: } ; +onealter: +TK_ALTER TK_TABLE table TK_HOLD +{ + FIXME(Unimplemented: ALTER TABLE, HOLD\n); + $$ = NULL; +} +; + table_def: column_def TK_PRIMARY TK_KEY selcollist { @@ -807,7 +816,7 @@ UINT MSI_ParseSQL( MSIDATABASE *db, LPCW sql.len = 0; sql.view = phview; sql.mem = mem; - + r = SQL_parse(sql); TRACE(Parse returned %d\n, r); diff --git a/dlls/msi/tokenize.c b/dlls/msi/tokenize.c index 05c3cda..9b628c0 100644 --- a/dlls/msi/tokenize.c +++ b/dlls/msi/tokenize.c @@ -45,6 +45,7 @@ struct Keyword { static const Keyword aKeywordTable[] = { { ABORT, TK_ABORT }, { AFTER, TK_AFTER }, + { ALTER, TK_ALTER }, { ALL, TK_ALL }, { AND, TK_AND }, { AS, TK_AS },
Re: appdb security
Tobias Burnus wrote: Why don't you use mysql_escape_string(...)? http://de.php.net/manual/en/function.mysql-escape-string.php Tobias The page says it's deprecated and mentions using mysql_real_escape_string instead (http://nl2.php.net/mysql_real_escape_string) HTH, Joris
Re: MAPI32: implement FGetComponentPath
Dmitry Timoshkov wrote: +static const char * const fmt[] = { %d\\NT, %d\\95, %d }; +char lcid_ver[20]; +UINT i; + +for (i = 0; i sizeof(fmt)/sizeof(fmt[0]); i++) +{ +/* FIXME: what's the correct behaviour here? */ +if (!qualifier || qualifier == lcid_ver) +{ +sprintf(lcid_ver, fmt[i], GetUserDefaultUILanguage()); +qualifier = lcid_ver; +} + I don't know this API or so, but... it seems to me that variable lcid_ver needs to be declared static, the data might get trashed otherwise HTH, Joris
Re: WineD3D: SetDisplayMode and GetDisplayMode
Stefan Dösinger wrote: Am Donnerstag, 18. Mai 2006 22:31 schrieb Stefan Dösinger: + +ret = ChangeDisplaySettingsExW(NULL, devmode, NULL, CDS_FULLSCREEN, NULL); +if (ret != DISP_CHANGE_SUCCESSFUL) { +if(devmode.dmDisplayFrequency != 0) { +WARN(ChangeDisplaySettingsExW failed, trying without the refresh rate\n); +devmode.dmFields = ~DM_DISPLAYFREQUENCY; +devmode.dmDisplayFrequency = 0; +ret = ChangeDisplaySettingsExW(NULL, devmode, NULL, CDS_FULLSCREEN, NULL) != DISP_CHANGE_SUCCESSFUL; +} +if(ret != DISP_CHANGE_SUCCESSFUL) { +return DDERR_INVALIDMODE; +} +} I'm not sure, but I think this line: ret = ChangeDisplaySettingsExW(NULL, devmode, NULL, CDS_FULLSCREEN, NULL) != DISP_CHANGE_SUCCESSFUL; should be ret = ChangeDisplaySettingsExW(NULL, devmode, NULL, CDS_FULLSCREEN, NULL); as otherwise the test following it will always fire; HTH, Joris
OT: just a greeting
Hey, seeing you emailing again Alexandre Julliard, welcome back, hope you enjoyed your vacation :-) regards, Joris
Re: advpack [2/17]: Install the OCX in RegisterOCX
James Hawkins wrote: Hi, Changelog: * Install the OCX in RegisterOCX. dlls/advpack/advpack.c | 17 + 1 files changed, 17 insertions(+), 0 deletions(-) -- James Hawkin s it seems the attachment is empty regards, Joris
Re: Using msvcmon to debug
Uwe Bonnes wrote: Ryan == Ryan Miller [EMAIL PROTECTED] writes: Ryan Hi, I've been using msvcmon previously to remote debug application Ryan in Visual Studio on Wine. It's great to have an IDE to debug Wine Ryan with the breakpoints and watch windows and all. I'm now using Ryan Crossover Office Pro 5.0.1-1rc2 and msvcmon is no longer working. Ryan I'm getting the log message (which is new): Ryan epoll_ctl: Operation not permitted What distribution are you using? What wine version is involved? The epoll_ctl: Operation not permitted problem appeared now and then, but mostly only Suse Distribution was involved. If I remember right, the dll/kernel/test directory provoked such an error for me, but does not now, with a nearly up-to-date CVS wine on Suse 10.0 This doesn't seem to be suse-specific; I saw such error the other day but ignored it (it didn't seem to cause any problems) - I'm running debian stable (sarge) regards, Joris
Re: [usp10] Fix return-codes of ScriptGetFontProperties (resend)
Paul Vriens wrote: +/* Now a NULL hdc again */ +hr = ScriptGetFontProperties(NULL,psc,sfp); +/* Save the psc pointer */ +old_psc = psc; +ok( hr == S_OK, (NULL,psc,sfp), expected S_OK, got %08x\n, (unsigned int)hr); +ok( psc == old_psc, Expected psc not to be changed, was %p is now %p\n, old_psc, psc); +ScriptFreeCache(psc); +ok( psc == NULL, Expected psc to be NULL, got %p\n, psc); actually You didn't test anything about psc here, after setting old_psc nothing happens with psc -- save the pointer before calling ScriptGetFontProperties(NULL,psc,sfp); HTH, Joris
Knights and merchants (valgrind)
Hello, As suggested earlier on the list, I ran this game with valgrind (at last I tried again with svn, which works better than trying to patch 3.1.1) There are a few problems: valgrind comes with loads of errors, but only indicates which file (*.so) the errors come from (so I need to compile wine with gdb debugger support, without optimisations, I guess?) More serious, it seems wine uses some feature currently not supported by valgrind: - x86toIR: unimplemented feature vex: the `impossible' happened: x86 segment override (SEG=CS) prefix vex storage: T total 1908936388 bytes allocated valgrind: the 'impossible' happened: LibVEX called failure_exit(). ==14207==at 0xB00170DB: (within /usr/local/lib/valgrind/x86-linux/memcheck) sched status: running_tid=1 Thread 1: status = VgTs_Runnable ==14207==at 0x480D03: ??? Thread 3: status = VgTs_WaitSys ==14207==at 0x200546A1: (within /lib/tls/libpthread-0.60.so) ==14207==by 0x202E81B7: (within /usr/local/lib/wine/ntdll.dll.so) Thread 4: status = VgTs_WaitSys ==14207==at 0x20129523: poll (in /lib/tls/libc-2.3.2.so) ==14207==by 0x23F252EF: (within /usr/local/lib/wine/wineoss.drv.so) Thread 5: status = VgTs_Runnable ==14207==at 0x2011D347: sched_yield (in /lib/tls/libc-2.3.2.so) ==14207==by 0x23F252EF: (within /usr/local/lib/wine/wineoss.drv.so) Thread 6: status = VgTs_Runnable ==14207==at 0x219840BE: (within /usr/local/lib/wine/winex11.drv.so) ==14207==by 0x23F252EF: (within /usr/local/lib/wine/wineoss.drv.so) Note: see also the FAQ.txt in the source distribution. It contains workarounds to several common problems. If that doesn't help, please report this bug to: www.valgrind.org In the bug report, send all the above text, the valgrind version, and what Linux distro you are using. Thanks. - is there a patch for this one? at least I will recompile wine with gdb debugger support and look at the errors valgrind comes with regards, Joris
Re: [EMAIL PROTECTED]
Kuba Ober wrote: On Friday 14 April 2006 15:25, Chris Morgan wrote: Just thought that I would throw out the point that it isn't likely that SETI at home will ever find any intelligent signals and that it is mostly a waste of energy to look for them given our long distance to nearby galaxies and planets. A more productive use of the same cpu time is likely to be protein folding, something that can be applied to science in the near term. This is all for fun anyway. Probably [EMAIL PROTECTED] wastes less energy than running Doom3 on a high-end GPU :) Besides, something being not likely is not an excuse for not trying. People win lotto, survive cancer and develop windows replacements from scratch, after all ;) Cheers, Kuba there's a difference, there *is* a chance to win lotto etc; even if you'd find ET with the [EMAIL PROTECTED] thing, it's completely useless; except for some people freaking out, it doesn't make any difference whatsoever; and chance of finding ET is zero too (finding ET? using radio signals? don't think so) why not spend idle computer time usefull if you are going to spend it? one related question -- wouldn't running cpu hardware maximally reduce their lifetime? regards, Joris
Re: Coverity doing scans of Wine codebase!
Tom Spear wrote: On 4/7/06, *Michael Stefaniuc* [EMAIL PROTECTED] I couldn't agree more. Matter of fact I recall that this is the reason that the KLEZ virus from a few years ago was able to infect a linux system running outlook express on wine, as well as why certain games crash (they work around a bug that doesn't exist in our code), so at the time, AJ said that if windows has a bug, so should wine. I was puzzled by it at the time, but since then I figured it out (previous note in () ). :-) Tom P.S. AJ, how should we go about determining what bugs that Coverity picks up are bugs that exist in windows, so that they can be marked in the actual code (in order to prevent regressions)? That's what regression tests are for, right? just me thinking aloud ;-) regards, Joris
Re: function counting script, memcheck.sh
Segin wrote: Attached is version 0.2 of this script, with a lot of additional functionality. You will need to be able to write to /tmp and make a file /tmp/grep to use the extended functionality (default functionality needs none of that, and is unmodified.) Your message does not have the script attached, could you resend please :-) regards, Joris
Re: Function counting script
Segin wrote: It's not a C interpeter, it's literally a frint end of sorts to grep. There's only one textual occurence of malloc() in the code, so it only returns one. Think before you speak. P.S. I'll add a C interpeter when there becomes a need for one. It was my impression that the goal was to find leaks by counting allocating and freeing of memory; My example was about that: the counts do not have to indicate correct usage of malloc()/free() Sorry if this was an incorrect assumption regards, Joris
Re: How hard would it be to support Java?
Christoph wrote: Dan Kegel schrieb: Quite a few apps use embedded JVM's. Case in point: SPSS, one of the apps requested by Munich. WTF? There is a JVM for Linux available. To my mind contact the manufacture of your software and explain to them that Java is platform independent ... Having it available for linux is not enough, at least wine would need to offer a wrapper dll that forwards java calls to the java engine (as executables try to hook into a java dll, and just fail if it isn't available) - the better option would ofcourse be... getting java working; I have no idea how hard that wrapper dll would be though HTH, Joris
Re: Function counting script
Segin wrote: As my small contribution, attached is a small shell script that, unmodified, finds out how many times certain functions are called in a given sample of files. The default functions are 'malloc', 'realloc', and 'free', and the sample files are all files ending in .c in the current directory. It even prints out the result in a neat manner on ANSI colourized terminals. The script is very flexible, and easy to modify. Current version is 256bytes long. Hmmm, I'm affraid this isn't telling much, consider: int main() { int i; char *ptr; for (i = 0; i 10; i++) ptr = malloc(20); free(ptr); return 0; } you're script will report one 'malloc' and one 'free', but ten times a 'malloc' is executed and only one 'free' ... :-/
Re: Recently created font problem - anyone see similar?
Dr J A Gow wrote: Hi, I found that the following patch, committed to CVS on 23/02/06 at 20:33:06 made all my Wine system fonts squashed up and unreadable, which in turn made a mess of formatting in some dialog boxes. I backed the patch out from a current tree and the problem went away. Anyone else see this behaviour? I am wondering what the purpose of this patch is as the fonts were quite OK before it was committed, and now they are completely unreadable on this system. Any thoughts before I submit a patch to put this back the way it was? John. The offending patch: Module: wine Branch: refs/heads/master Commit: 69a23a608eea59624b2f37ab424e0f42b3da5baf URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=69a23a608eea59624b2f37ab424e0f42b3da5baf Author: Dmitry Timoshkov dmitry at codeweavers.com Date: Thu Feb 23 20:33:06 2006 +0800 gdi: Use MS Sans Serif as default sans serif font, not Arial. --- dlls/gdi/freetype.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/gdi/freetype.c b/dlls/gdi/freetype.c index ad0d6eb..51e92b8 100644 --- a/dlls/gdi/freetype.c +++ b/dlls/gdi/freetype.c @@ -284,10 +284,10 @@ static struct list font_list = LIST_INIT static const WCHAR defSerif[] = {'T','i','m','e','s',' ','N','e','w',' ', 'R','o','m','a','n','\0'}; -static const WCHAR defSans[] = {'A','r','i','a','l','\0'}; +static const WCHAR defSans[] = {'M','S',' ','S','a','n','s',' ','S','e','r','i','f','\0'}; static const WCHAR defFixed[] = {'C','o','u','r','i','e','r',' ','N','e','w','\0'}; -static const WCHAR defSystem[] = {'A','r','i','a','l','\0'}; +static const WCHAR defSystem[] = {'S','y','s','t','e','m','\0'}; static const WCHAR SystemW[] = {'S','y','s','t','e','m','\0'}; static const WCHAR MSSansSerifW[] = {'M','S',' ','S','a','n','s',' ', 'S','e','r','i','f','\0'}; I the same font problem (I think) - In firefox, everything shows ok but file-saving dialogs (and maybe more?) render blocks instead of letters; where should I find the fonts wine used before, and where are they placed? (it seems ~/.wine/drive_c/windows/fonts is the directory that is mentioned?) thanks, Joris
Re: Winelib
Michael King wrote: Hi, I'm looking into porting our graphic application language to Linux usign WineLib but having some trouble just getting started. I downloaded and installed wine-0.9.8-SuSELinux92.i586.rpm for our SUSE 9.2 system and then tried to create the 'notepad' program using the instructions given on http://www.winehq.org/site/docs/winelib-guide/winelib-getting-started . Unfortunately after following the instructions I ended up with a 'notepad.exe.so' not a simple ./notepad file. Our goal is to create a true executable file, not a .so library that needs to be invoked using Wine. Have the build instructions changed? Michael F. King PVX Plus Technologies, Ltd. www.pvxplus.com With winelib, there is no way to make a true executable without any dependencies on wine; you could make a wrapper script so that the user does not have to type 'wine' anymore - this is what winelib used to do, which made the 'notepad' file in the documentation (that part of the documentation is a little out dated I'm affraid) HTH, Joris
Re: Fwd: game Knights and Merchants deadlocks
Andreas Mohr wrote: Hi, On Sat, Feb 04, 2006 at 01:47:42PM +0100, James Trotter wrote: On 2/4/06, Joris Huizer [EMAIL PROTECTED] wrote: I have this question: I have a game called Knights and Merchants which I sometimes play; I find it deadlocks each time after playing for an hour or so it seems it isn't a complete deadlock, sometimes some of sound comes through between intervals of minutes or so; harddisk activity seems extreme - the light is burning constantly. I then usually decide to kill the program; as it opens fullscreen I can't get to the xterm that launched it, so I try to get to a console; The system is so slow that it takes some time to get to a console ctrl-alt-f1, and login in may time out a few times before finaly getting in (the cure to that one is simple: login before starting the game...) - then it takes another minute or so to run ps and kill the wine process This really sounds like a memory leak to me. Usually I'd use valgrind ( http://valgrind.org/) to find memory leaks and such. Valgrind 3.1.0 works with wine, but it produces alot of output you'd have to look through and the program will run insanely slow. It might be worth a try. I'd bet this isn't a deadlock. Instead, your program is consuming massive amounts of memory that your system cannot cope with, thus quickly running into swap and tearing the whole system performance down due to excessive swap activity. No deadlock at all, simply massive overload. A normal memory leak sounds less plausible to me, too. May I suggest that this is caused by a memory allocation of a pointer variable instead of a memory size variable? Pointers (memory addresses) usually are in the 0x40XX or 0x08XX range, so if you take those values as amount of memory to allocate... IOW, perhaps there is a function parameter count mismatch in .spec files or some other random stack trashing that leads to such high memory allocation due to accessing the wrong variable. You should probably try a ulimit -S -m 12800 , that will most likely kill the process then when everything goes haywire, thus supporting my theory at least halfway. Andreas Mohr indeed the program got killed... at least it's a memory problem (maybe it was not the best situation, but I was logged in at a console and some output on running out of memory was written there) I don't really know what to look for, but as far as I see there isn't much interesting in the log, just a few fixme's that are repeated lots of times, and then these critical section timeouts: err:ntdll:RtlpWaitForCriticalSection section 0x40a01560 gdiobj.c: GDI_level wait timed out in thread 0009, blocked by , retrying (60 sec) err:ntdll:RtlpWaitForCriticalSection section 0x4110f380 x11drv_main.c: X11DRV_CritSection wait timed out in thread 0009, blocked by 000d, retrying (60 sec) ... err:ntdll:RtlpWaitForCriticalSection section 0x40a01560 gdiobj.c: GDI_level wait timed out in thread 0009, blocked by 000d, retrying (60 sec) There also a lot of error lines on dsound: err:dsound:DSOUND_MixInBuffer length not a multiple of block size, len = 3, block size = 2 with varying len values I put the complete log online at home.planet.nl/~huize784/kam.log.bz2 as I think it's too much to send as attachment (compressed, it is 107KB) regards, Joris end of the log (hopefully the relevant part) : fixme:ddraw:Main_DirectDraw_WaitForVerticalBlank (0x403d1a00)-(flags=0x0001,handle=(nil)) fixme:ddraw:Main_DirectDraw_WaitForVerticalBlank (0x403d1a00)-(flags=0x0001,handle=(nil)) fixme:wave:DSD_CreateSecondaryBuffer (0x403e5270,0x4084fc48,e2,0,0x5b09842c,0x571bf94c,0x5b098408): stub err:dsound:DSOUND_MixInBuffer length not a multiple of block size, len = 221, block size = 2 err:dsound:DSOUND_MixInBuffer length not a multiple of block size, len = 3, block size = 2 err:dsound:DSOUND_MixInBuffer length not a multiple of block size, len = 221, block size = 2 err:dsound:DSOUND_MixInBuffer length not a multiple of block size, len = 3, block size = 2 err:dsound:DSOUND_MixInBuffer length not a multiple of block size, len = 331, block size = 2 err:dsound:DSOUND_MixInBuffer length not a multiple of block size, len = 309, block size = 2 err:dsound:DSOUND_MixInBuffer length not a multiple of block size, len = 3, block size = 2 fixme:ddraw:Main_DirectDraw_WaitForVerticalBlank (0x403d1a00)-(flags=0x0001,handle=(nil)) fixme:wave:DSD_CreateSecondaryBuffer (0x403e5270,0x4084fc48,e2,0,0x596bea7c,0x48629a7c,0x596bea58): stub fixme:wave:DSD_CreateSecondaryBuffer (0x403e5270,0x4084fc48,e2,0,0x5b0a0624,0x564301d4,0x5b0a0600): stub err:dsound:DSOUND_MixInBuffer length not a multiple of block size, len = 441, block size = 2 err:dsound:DSOUND_MixInBuffer length not a multiple of block size, len = 3, block size = 2 err:dsound:DSOUND_MixInBuffer length not a multiple of block size, len = 441, block size = 2 err:dsound:DSOUND_MixInBuffer length not a multiple of block size, len = 3, block
Re: game Knights and Merchants deadlocks
Jesse Allen wrote: On 2/5/06, Joris Huizer [EMAIL PROTECTED] wrote: I'm running alsa with oss emulation - I think wine is using the oss interface (just ran winecfg, it says no audio driver is selected in registry, and it assumes it should run oss) And what sound module? (snd_intel8x0, snd_cmipci...) Sorry I don't really know what specs you need; the sound module is 'snd_emu10k1' [12:28:[EMAIL PROTECTED]:~$ lsmod|grep snd snd_emu10k176616 0 snd_rawmidi18628 1 snd_emu10k1 snd_pcm_oss44264 0 snd_mixer_oss 14336 1 snd_pcm_oss snd_pcm75880 2 snd_emu10k1,snd_pcm_oss snd_timer 19268 1 snd_pcm snd_seq_device 5928 2 snd_emu10k1,snd_rawmidi snd_ac97_codec 57604 1 snd_emu10k1 snd_page_alloc 8264 2 snd_emu10k1,snd_pcm snd_util_mem3008 1 snd_emu10k1 snd_hwdep 6436 1 snd_emu10k1 snd41732 10 snd_emu10k1,snd_rawmidi,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_timer,snd_seq_device,snd_ac97_codec,snd_util_mem,snd_hwdep soundcore 6656 1 snd /usr/bin/lspci gives these lines on the sound card: :00:07.0 Multimedia audio controller: Creative Labs SB Live! EMU10k1 (rev 08) :00:07.1 Input device controller: Creative Labs SB Live! MIDI/Game Port (rev 08) are there more commands to run to get additional information? regards, Joris
Re: VC++ demangling tool
Eric Pouech wrote: Michael Stefaniuc wrote: Hello! winedump has a VC++ symbol demangling function but that is bitrotting as it is a copy of the msvcrt.__unDname . As i wanted to use the newer msvcrt.__unDname funtion i have written a quick and dirty program that is basicaly only a wrapper around UnDecorateSymbolName(). Most importand feature is that it runs on the command line. I'm not expecting it to go into Wine but others might find it usefull. After applying the patch configure needs to be regenerated. actually, there's a tool in the MS SDK called undname that does exactly this... it has also a couple of other options (like demangling all symbols listed in a text file)... but what should be done is to port back the code from msvcrt into winedump A+ I'm wondering, why can't winedump import msvcrt and call what it needs, instead of duplicating code? (Just me thinking aloud)
Re: Fwd: game Knights and Merchants deadlocks
I built valgrind 3.1.0 with the given patch, but for some reason valgrind fails to start the program correctly; I attached the log of a run; When I do not run with valgrind the program starts successfully. What is wrong? how should I get valgrind with the program running? Script started on Mon Feb 6 19:16:17 2006 [19:16:[EMAIL PROTECTED]:~/.wine/drive_c/Program Files/KnightsAndMerchants$ valgrind --leak-check=full --trace-children=yes wine KaM_800.exe ==29564== Memcheck, a memory error detector. ==29564== Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward et al. ==29564== Using LibVEX rev 1471, a library for dynamic binary translation. ==29564== Copyright (C) 2004-2005, and GNU GPL'd, by OpenWorks LLP. ==29564== Using valgrind-3.1.0, a dynamic binary instrumentation framework. ==29564== Copyright (C) 2000-2005, and GNU GPL'd, by Julian Seward et al. ==29564== For more details, rerun with: -v ==29564== --29564-- DWARF2 CFI reader: unhandled CFI instruction 0:50 --29564-- DWARF2 CFI reader: unhandled CFI instruction 0:50 --29564-- DWARF2 CFI reader: unhandled CFI instruction 0:50 --29564-- DWARF2 CFI reader: unhandled CFI instruction 0:50 ==29564== Memcheck, a memory error detector. ==29564== Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward et al. ==29564== Using LibVEX rev 1471, a library for dynamic binary translation. ==29564== Copyright (C) 2004-2005, and GNU GPL'd, by OpenWorks LLP. ==29564== Using valgrind-3.1.0, a dynamic binary instrumentation framework. ==29564== Copyright (C) 2000-2005, and GNU GPL'd, by Julian Seward et al. ==29564== For more details, rerun with: -v ==29564== ==29564== Warning: set address range perms: large range 535756800, a 0, v 0 --29564-- DWARF2 CFI reader: unhandled CFI instruction 0:50 --29564-- DWARF2 CFI reader: unhandled CFI instruction 0:50 --29564-- DWARF2 CFI reader: unhandled CFI instruction 0:50 --29564-- DWARF2 CFI reader: unhandled CFI instruction 0:50 ==29564== Warning: set address range perms: large range 1040056320, a 0, v 0 ==29564== Warning: set address range perms: large range 1040056320, a 1, v 1 ==29564== Warning: set address range perms: large range 520028160, a 0, v 0 ==29564== Warning: set address range perms: large range 520028160, a 0, v 0 ==29564== Warning: set address range perms: large range 520028160, a 1, v 1 ==29564== Warning: set address range perms: large range 259981312, a 0, v 0 ==29564== Warning: set address range perms: large range 260046848, a 0, v 0 ==29564== Warning: set address range perms: large range 260046848, a 1, v 1 ==29564== Warning: set address range perms: large range 130023424, a 0, v 0 ==29564== Warning: set address range perms: large range 130023424, a 1, v 1 ==29564== Warning: set address range perms: large range 130023424, a 0, v 0 ==29564== Warning: set address range perms: large range 545259520, a 0, v 0 ==29564== Warning: set address range perms: large range 545259520, a 1, v 1 ==29564== Warning: set address range perms: large range 272629760, a 0, v 0 ==29564== Warning: set address range perms: large range 272629760, a 1, v 1 ==29564== Warning: set address range perms: large range 136314880, a 0, v 0 ==29564== Warning: set address range perms: large range 136314880, a 1, v 1 ==29566== Memcheck, a memory error detector. ==29566== Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward et al. ==29566== Using LibVEX rev 1471, a library for dynamic binary translation. ==29566== Copyright (C) 2004-2005, and GNU GPL'd, by OpenWorks LLP. ==29566== Using valgrind-3.1.0, a dynamic binary instrumentation framework. ==29566== Copyright (C) 2000-2005, and GNU GPL'd, by Julian Seward et al. ==29566== For more details, rerun with: -v ==29566== --29566-- DWARF2 CFI reader: unhandled CFI instruction 0:50 --29566-- DWARF2 CFI reader: unhandled CFI instruction 0:50 ==29566== ==29566== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 25 from 1) ==29566== malloc/free: in use at exit: 277 bytes in 14 blocks. ==29566== malloc/free: 69 allocs, 55 frees, 6,209 bytes allocated. ==29566== For counts of detected errors, rerun with: -v ==29566== searching for pointers to 14 not-freed blocks. ==29566== checked 182,280 bytes. ==29566== ==29566== 156 (36 direct, 120 indirect) bytes in 1 blocks are definitely lost in loss record 1 of 4 ==29566==at 0x401B65A: malloc (in /usr/local/lib/valgrind/x86-linux/vgpreload_memcheck.so) ==29566==by 0x4228EE6: (within /lib/tls/libc-2.3.2.so) ==29566==by 0x4228788: __nss_database_lookup (in /lib/tls/libc-2.3.2.so) ==29566==by 0x437CAFB: ??? ==29566==by 0x41E9D4B: getpwuid_r (in /lib/tls/libc-2.3.2.so) ==29566==by 0x41E9590: getpwuid (in /lib/tls/libc-2.3.2.so) ==29566==by 0x4021D67: (within /usr/local/lib/libwine.so.1) ==29566==by 0x402218C: wine_get_server_dir (in /usr/local/lib/libwine.so.1) ==29566==by 0x8068570: (within /usr/local/bin/wineserver) ==29566==by 0x8068BAD: (within /usr/local/bin/wineserver) ==29566==by 0x8058452: (within
Re: game Knights and Merchants deadlocks
Jesse Allen wrote: On 2/4/06, Joris Huizer [EMAIL PROTECTED] wrote: If you could tell us your sound module name and which wine sound driver you use that could be helpful. There are a variety of sound problems out there. Jesse I'm running alsa with oss emulation - I think wine is using the oss interface (just ran winecfg, it says no audio driver is selected in registry, and it assumes it should run oss)
game Knights and Merchants deadlocks
Hello, I have this question: I have a game called Knights and Merchants which I sometimes play; I find it deadlocks each time after playing for an hour or so it seems it isn't a complete deadlock, sometimes some of sound comes through between intervals of minutes or so; harddisk activity seems extreme - the light is burning constantly. I then usually decide to kill the program; as it opens fullscreen I can't get to the xterm that launched it, so I try to get to a console; The system is so slow that it takes some time to get to a console ctrl-alt-f1, and login in may time out a few times before finaly getting in (the cure to that one is simple: login before starting the game...) - then it takes another minute or so to run ps and kill the wine process is there a way to find what is causing the deadlock? I can log the output wine gives using `script`, but as deadlocks only occur after a lot of time running the game with lots of logging active would be a pain will log the output at least next time I play; for now, has somebody ideas how to log without getting major slowdown (otherwise there's no playing in it)? thanks, Joris
Re: Fwd: game Knights and Merchants deadlocks
James Trotter wrote: On 2/4/06, *Joris Huizer* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hello, I have this question: I have a game called Knights and Merchants which I sometimes play; I find it deadlocks each time after playing for an hour or so it seems it isn't a complete deadlock, sometimes some of sound comes through between intervals of minutes or so; harddisk activity seems extreme - the light is burning constantly. I then usually decide to kill the program; as it opens fullscreen I can't get to the xterm that launched it, so I try to get to a console; The system is so slow that it takes some time to get to a console ctrl-alt-f1, and login in may time out a few times before finaly getting in (the cure to that one is simple: login before starting the game...) - then it takes another minute or so to run ps and kill the wine process is there a way to find what is causing the deadlock? I can log the output wine gives using `script`, but as deadlocks only occur after a lot of time running the game with lots of logging active would be a pain will log the output at least next time I play; for now, has somebody ideas how to log without getting major slowdown (otherwise there's no playing in it)? thanks, Joris This really sounds like a memory leak to me. Usually I'd use valgrind (http://valgrind.org/) to find memory leaks and such. Valgrind 3.1.0 works with wine, but it produces alot of output you'd have to look through and the program will run insanely slow. It might be worth a try. I'm sort of familiar with valgrind too :-) will try if playing it is still possible when running with valgrind; I know it is doing direct-draw and direct-sound (as wine gives warnings and fixmes on some of the calls it does to those) just wondering... when it hangs, how should it be killed such that valgrind will still report where it broke? (kill -9 stops it too brutely, at least with valgrind 2.4.0) thanks, Joris
Re: Benchmarks for 0.9.5
I'm a bit confused, how can there be failures under windows? is this because of driver problems? regards, Joris
Re: Accidentally fixed a bug :-)
Dan Kegel wrote: I've been helping a couple small ISVs test their apps and file bugs lately. To my surprise, one of the bugs (ChooseColor() not responding to keystrokes, http://bugs.winehq.org/show_bug.cgi?id=4125) was easy enough to fix without any real knowledge of the code, so I posted a patch that seems to fix it (http://www.winehq.org/pipermail/wine-patches/2005-December/023048.html). It was a pleasant surprise to run into something so easy to fix. Guess I should try it more often! - Dan Yup :-) That's how programming works, doing work in building blocks, such that you only have to change a few bits when something is wrong - in the ideal situation just in (a part of) one function; glad you got this one working :-) Joris
Re: [wined3d] Converting Wined3d to use WGL instead of GLX
Aric Cyr wrote: Now everything works fine, except this brings up another issue with wglGetProcAddress. The problem is that all gl extensions function pointers are declared WINAPI, and indeed this is what type of functoin wglGetProcAddress is expected to return. However for extensions that are not registered in opengl_ext.c wglGetProcAddress falls back to glXGetProcAddressARB which would return a non-WINAPI function pointer. After the first call to such a function we would have corrupted the stack. There doesn't seem to be a nice way to fix this that I can think of. wglGetProcAddress should never return a non-WINAPI function though, as that is just asking for trouble. Better to return NULL instead of falling back to glXGetProcAddressARB. Maybe it'd be possible to make a wrapper function -- a WINAPI function pointer that just does a call to this glXGetProcAddressARB ? (Just me thinking aloud ;-) )
SHFileOperationW 1 : helper functions
This patch adds a simple structure to contain commonly-requested file properties (named `struct fileops_file_data`, wondering whether that name should that change?) Functions added: -void printFileData(): debugging function, printing contents of a `struct fileops_file_data` thing; -int shfileops_delete_file() function to delete given file -- making sure to call the right functions for either a regular file or a directory -int shfileop_unmasked_setup() the extracted code common for move and copy calls -int shfileop_move_unmasked the specific code on moving unmasked -- this one does a lot of recursion on SHFileOperationW -int shfileop_copy_unmasked the specific code on copying unmasked -- this one does some recursion too Further more, I seperated code of deleting, renaming, moving, and copying, and the overall result is that code becomes simpler - though a small amount of code is duplicated (mostly in move/copy operations, that's why I split the largest part of common code in a separate function) When this patch is accepted I'll submit the rest (that is, the code using these functions) Index: shlfileop.c === RCS file: /home/wine/wine/dlls/shell32/shlfileop.c,v retrieving revision 1.56 diff -u -p -r1.56 shlfileop.c --- shlfileop.c 10 Nov 2005 11:15:22 - 1.56 +++ shlfileop.c 16 Dec 2005 15:21:05 - @@ -866,9 +866,69 @@ static const char * debug_shfileops_acti return wine_dbg_sprintf(%s, cFO_Name[ op ]); } +struct fileops_file_data +{ + LPCWSTR next; + LPCWSTR name; + LPWSTR temp; + LPWSTR file; + DWORD attr; + DWORD pathAttr; + BOOL multi; + BOOL invalidTail; + BOOL valid; + BOOL tailSlash; +}; + +void printFileData(struct fileops_file_data *field) +{ + + TRACE(data on %p:\n + next: %s\n + name: %s\n + temp: %s\n + file: %s\n + attr: %lx\n + pathAttr: %lx\n + multi: %d\n + invalidTail: %d\n + valid: %d\n + tailSlash: %d\n, + field, + debugstr_w(field-next), + debugstr_w(field-name), + debugstr_w(field-temp), + debugstr_w(field-file), + field-attr, + field-pathAttr, + field-multi, + field-invalidTail, + field-valid, + field-tailSlash + ); +} + #define ERROR_SHELL_INTERNAL_FILE_NOT_FOUND 1026 #define HIGH_ADR (LPWSTR)0x +static int shfileops_delete_file(WIN32_FIND_DATAW *wfd,int confirm,LPWSTR pFromFile,LPWSTR pTempFrom) +{ + int retCode = 0; + LPWSTR lpFileName; + lpFileName = wfd-cAlternateFileName; + if (!lpFileName[0]) +lpFileName = wfd-cFileName; + SHFileStrCpyCatW(pFromFile[1], lpFileName, NULL); + if (IsAttribFile(wfd-dwFileAttributes)) + { +if(SHNotifyDeleteFileW(pTempFrom) != ERROR_SUCCESS) + retCode = 0x78; /* value unknown */ + } + else if(!SHELL_DeleteDirectoryW(pTempFrom,confirm)) +retCode = 0x79; /* value unknown */ + return retCode; +} + /* handle the complete deletion of `pTempFrom` */ static int shfileops_delete(WIN32_FIND_DATAW *wfd,SHFILEOPSTRUCTW nFileOp, LPWSTR pFromFile,LPWSTR pTempFrom,HANDLE *hFind) @@ -884,20 +944,12 @@ static int shfileops_delete(WIN32_FIND_D if (IsDotDir(lpFileName) || ((b_Mask) IsAttribDir(wfd-dwFileAttributes) (nFileOp.fFlags FOF_FILESONLY))) continue; -SHFileStrCpyCatW(pFromFile[1], lpFileName, NULL); -/* TODO: Check the SHELL_DeleteFileOrDirectoryW() function in shell32.dll */ -if (IsAttribFile(wfd-dwFileAttributes)) -{ -if(SHNotifyDeleteFileW(pTempFrom) != ERROR_SUCCESS) -{ -nFileOp.fAnyOperationsAborted = TRUE; -retCode = 0x78; /* value unknown */ -} -} -else if(!SHELL_DeleteDirectoryW(pTempFrom, (!(nFileOp.fFlags FOF_NOCONFIRMATION + +retCode = shfileops_delete_file(wfd,(nFileOp.fFlags FOF_NOCONFIRMATION) == 0,pFromFile,pTempFrom); +if (retCode) { -nFileOp.fAnyOperationsAborted = TRUE; -retCode = 0x79; /* value unknown */ + nFileOp.fAnyOperationsAborted = TRUE; + break; } } while (!nFileOp.fAnyOperationsAborted FindNextFileW(*hFind,wfd)); @@ -1001,6 +1053,210 @@ static DWORD shfileops_get_parent_attr(L return PathAttr; } +static int shfileop_unmasked_setup(WIN32_FIND_DATAW wfd, struct fileops_file_data *to,struct fileops_file_data *from,BOOL b_Multi,long FuncSwitch) +{ + int retCode = 0; + + TRACE(b_Multi: %d\n,b_Multi); + TRACE(to:\n); + printFileData(to); + TRACE(from:\n); + printFileData(from); + + if (IsAttribDir(wfd.dwFileAttributes) (to-attr == INVALID_FILE_ATTRIBUTES)) + { +if (to-file) +{ + to-pathAttr = shfileops_get_parent_attr2(to-file,to-temp,to-valid,retCode); + if (retCode) +return retCode; + if (to-invalidTail) + { +retCode = 0x10003; +return retCode; + } +
Re: SHFileOperationW split
Sorry, just got a message of someone (James Hawkins) telling me he's working on the function and it's best not modified before his patches get applied :-) After that, we''ll see whether any of this still finds a need :-)