Re: wininet file scheme

2006-06-19 Thread Nick Cronin
I think your right Travis, there is a difference however I'm not removing it per-say. If file:// is sent, InternetCrackUrl does not take out the %xx ascii values, however if 
file:///
is sent, it does. I've added a test case for these both. I also wrote
a test case for http:/// which currently the code I'm suggesting passes
(although the output is useless).On 6/17/06, Travis Watkins [EMAIL PROTECTED] wrote:
On 6/16/06, Mike McCormack [EMAIL PROTECTED] wrote: Nick Cronin wrote:  unlike http:// etc, file:/// has 3 slashes, this patch removes the third
  slash. Could you provide a test case for this please? Specifically, is http:///foo.bar different to http://foo.bar
?Your code treats them equally.How about file:/// and file://? MikeI thought it was 
file://computername/path/to/file withfile:///path/to/file implying the local machine. I'm not so sure thisshould be changed, it's some kind of a standard.--Travis Watkins
http://www.realistanew.com
Index: wine/dlls/wininet/internet.c
===
RCS file: /home/wine/wine/dlls/wininet/internet.c,v
retrieving revision 1.179
diff -u -p -r1.179 internet.c
--- wine/dlls/wininet/internet.c2 Jun 2006 19:12:55 -   1.179
+++ wine/dlls/wininet/internet.c17 Jun 2006 06:12:40 -
@@ -1377,7 +1377,11 @@ BOOL WINAPI InternetCrackUrlW(LPCWSTR lp
 /* double slash indicates the net_loc portion is present */
 if ((lpszcp[0] == '/')  (lpszcp[1] == '/'))
 {
-lpszcp += 2;
+/* three slashes is possible in 'file' scheme */
+if( lpszcp[2] == '/'  lpUC-nScheme == INTERNET_SCHEME_FILE )
+lpszcp+= 3;
+else
+lpszcp += 2;
 
 lpszNetLoc = strpbrkW(lpszcp, lpszSlash);
 if (lpszParam)
Index: wine/dlls/wininet/tests/url.c
===
RCS file: /home/wine/wine/dlls/wininet/tests/url.c,v
retrieving revision 1.4
diff -u -p -r1.4 url.c
--- wine/dlls/wininet/tests/url.c   14 Jun 2006 11:54:31 -  1.4
+++ wine/dlls/wininet/tests/url.c   17 Jun 2006 06:12:43 -
@@ -39,6 +39,11 @@
 #define TEST_URL2_PATHEXTRA /myscript.php?arg=1
 #define TEST_URL2_EXTRA ?arg=1
 #define TEST_URL3 
file:///C:/Program%20Files/Atmel/AVR%20Tools/STK500/STK500.xml
+#define TEST_URL3_URL C:\\Program Files\\Atmel\\AVR Tools\\STK500\\STK500.xml
+#define TEST_URL4 
file://C:/Program%20Files/Atmel/AVR%20Tools/STK500/STK500.xml
+#define TEST_URL4_URL 
C:\\Program%20Files\\Atmel\\AVR%20Tools\\STK500\\STK500.xml
+#define TEST_URL5 http:///www.winehq.org;
+#define TEST_URL5_URL /www.winehq.org
 
 #define CREATE_URL1 http://username:[EMAIL PROTECTED]/site/about
 #define CREATE_URL2 http://[EMAIL PROTECTED]/site/about
@@ -208,6 +213,23 @@ static void InternetCrackUrl_test(void)
   ok(!strcmp(urlComponents.lpszScheme, about), lpszScheme was \%s\ 
instead of \about\\n, urlComponents.lpszScheme);
   ok(!strcmp(urlComponents.lpszHostName, host), lpszHostName was \%s\ 
instead of \host\\n, urlComponents.lpszHostName);
   ok(!strcmp(urlComponents.lpszUrlPath, /blank), lpszUrlPath was \%s\ 
instead of \/blank\\n, urlComponents.lpszUrlPath);
+
+  todo_wine
+  copy_compsA(urlSrc, urlComponents, 32, 1024, 1024, 1024, 2048, 1024);
+  InternetCrackUrlA( TEST_URL3, 0, ICU_DECODE, urlComponents );
+  ok( strcmp( urlComponents.lpszUrlPath, TEST_URL3_URL ) == 0, 
+ InternetCrackUrl returned \%s\ expected was \%s\\n, 
urlComponents.lpszUrlPath, TEST_URL3_URL );
+
+  todo_wine
+  copy_compsA(urlSrc, urlComponents, 32, 1024, 1024, 1024, 2048, 1024);
+  InternetCrackUrlA( TEST_URL4, 0, ICU_DECODE, urlComponents );
+  ok( strcmp( urlComponents.lpszUrlPath, TEST_URL4_URL ) == 0,
+ InternetCrackUrl returned \%s\ expected was \%s\\n, 
urlComponents.lpszUrlPath, TEST_URL4_URL );
+
+  copy_compsA(urlSrc, urlComponents, 32, 1024, 1024, 1024, 2048, 1024);
+  InternetCrackUrlA( TEST_URL5, 0, ICU_DECODE, urlComponents );
+  ok( strcmp( urlComponents.lpszUrlPath, TEST_URL5_URL ) == 0,
+ InternetCrackUrl returned \%s\ expected was \%s\\n, 
urlComponents.lpszUrlPath, TEST_URL5_URL );
 }
 
 static void InternetCrackUrlW_test(void)



[dinput] multiple /dev/input joysticks (for test/review)

2006-06-19 Thread Christoph Frick
hiho,

the attached patch detects _all_ joysticks of /dev/input/event%d; please
have a test before i refine the patch for submission. i tried it with
Il2 Sturmovik and with Live For Speed - both games worked. as neither my
cougar nor my brd wheel have force feedback i was not able to test, if
everything still works.

details:
- use a seperate struct for holding infos about the /dev/input/event
  devices
- use the general infos about the devices instead of
  acquiring/unacquiring before/after infos about the device are needed
- changed the dinput_main to use three states to return on
  create_device: -1 == dont try further, 0 == there is no such device,
  1 == there we go

next ideas/patches:
- use a linked list for storing only the JoyDev's that there are
- the guid is stored in the JoyImpl and the JoyDev
- the logic in setting the guids is as first joystick == GUID_Joystick
  then use the wine default; this currently leads into the same GUID for
  instance and product; i saw in joystick_linux.c how this is solved
  there
- as dmesg shows a proper name for the device we might somehow retrieve
  it with an ioctl-call; currently the /dev/... name is used, which is
  good for developers but not for users
- per-device-config via registry (e.g. combine axes)

this patch actually is longer than the things it really does -
introducing a sub-struct for holding common data adds lots of
``-joydev'' so i decided instead of splitting this patch into several
fragments send an unfinished version and then finish the job with the
following small patches.

please note: the patch is against ~wine/dll/dinput (i use cvs for the
wine original and git where i need it for patching)

-- 
cu

diff --git a/device.c b/device.c
diff --git a/dinput_main.c b/dinput_main.c
index 9f93a52..d928d96 100644
--- a/dinput_main.c
+++ b/dinput_main.c
@@ -220,10 +220,11 @@ static HRESULT WINAPI IDirectInputAImpl_
 
 for (i = 0; i  NB_DINPUT_DEVICES; i++) {
 if (!dinput_devices[i]-enum_deviceA) continue;
-for (j = 0, r = -1; r != 0; j++) {
+TRACE(  - checking device %d ('%s')\n, i, dinput_devices[i]-name);
+for (j = 0, r = 0; r != -1; j++) {
devInstance.dwSize = sizeof(devInstance);
-   TRACE(  - checking device %d ('%s')\n, i, 
dinput_devices[i]-name);
-   if ((r = dinput_devices[i]-enum_deviceA(dwDevType, dwFlags, 
devInstance, This-dwVersion, j))) {
+   if (1 == (r = dinput_devices[i]-enum_deviceA(dwDevType, dwFlags, 
devInstance, This-dwVersion, j))) {
+TRACE(  - found id %d\n, j);
if (lpCallback(devInstance,pvRef) == DIENUM_STOP)
return 0;
}
@@ -250,10 +251,11 @@ static HRESULT WINAPI IDirectInputWImpl_
 
 for (i = 0; i  NB_DINPUT_DEVICES; i++) {
 if (!dinput_devices[i]-enum_deviceW) continue;
-for (j = 0, r = -1; r != 0; j++) {
+TRACE(  - checking device %d ('%s')\n, i, dinput_devices[i]-name);
+for (j = 0, r = 0; r != -1; j++) {
devInstance.dwSize = sizeof(devInstance);
-   TRACE(  - checking device %d ('%s')\n, i, 
dinput_devices[i]-name);
-   if ((r = dinput_devices[i]-enum_deviceW(dwDevType, dwFlags, 
devInstance, This-dwVersion, j))) {
+   if (1 == (r = dinput_devices[i]-enum_deviceW(dwDevType, dwFlags, 
devInstance, This-dwVersion, j))) {
+TRACE(  - found id %d\n, j);
if (lpCallback(devInstance,pvRef) == DIENUM_STOP)
return 0;
}
diff --git a/joystick_linux.c b/joystick_linux.c
index d56271d..abedc5c 100644
--- a/joystick_linux.c
+++ b/joystick_linux.c
@@ -162,11 +162,15 @@ static int joydev_get_device(char *dev, 
 return ret;
 }
 
-static BOOL joydev_enum_deviceA(DWORD dwDevType, DWORD dwFlags, 
LPDIDEVICEINSTANCEA lpddi, DWORD version, int id)
+static int joydev_enum_deviceA(DWORD dwDevType, DWORD dwFlags, 
LPDIDEVICEINSTANCEA lpddi, DWORD version, int id)
 {
 int fd = -1;
 char dev[32];
 
+if (id0) {
+return -1;
+}
+
 if (dwFlags  DIEDFL_FORCEFEEDBACK) {
 WARN(force feedback not supported\n);
 return FALSE;
@@ -209,13 +213,17 @@ static BOOL joydev_enum_deviceA(DWORD dw
 return FALSE;
 }
 
-static BOOL joydev_enum_deviceW(DWORD dwDevType, DWORD dwFlags, 
LPDIDEVICEINSTANCEW lpddi, DWORD version, int id)
+static int joydev_enum_deviceW(DWORD dwDevType, DWORD dwFlags, 
LPDIDEVICEINSTANCEW lpddi, DWORD version, int id)
 {
 int fd = -1;
 char name[MAX_PATH];
 char dev[32];
 char friendly[32];
 
+if (id0) {
+return -1;
+}
+
 if (dwFlags  DIEDFL_FORCEFEEDBACK) {
 WARN(force feedback not supported\n);
 return FALSE;
diff --git a/joystick_linuxinput.c b/joystick_linuxinput.c
index 30f81f1..94a0383 100644
--- a/joystick_linuxinput.c
+++ b/joystick_linuxinput.c
@@ -85,12 +85,28 @@ HRESULT linuxinput_get_info_W(int fd, RE
 typedef struct JoystickImpl JoystickImpl;
 static 

Re: [PATCH 2/3] server: add calls to get/set menu info

2006-06-19 Thread Robert Shearman

[EMAIL PROTECTED] wrote:


+typedef struct {
+/* --- MENUITEMINFO Stuff --- */
+UINT fType;/* Item type. */
+UINT fState;   /* Item state.  */
+UINT_PTR wID;  /* Item id.  */
+HMENU hSubMenu;/* Pop-up menu.  */
+HBITMAP hCheckBit; /* Bitmap when checked.  */
+HBITMAP hUnCheckBit;   /* Bitmap when unchecked.  */
+LPWSTR text;   /* Item text. */
+ULONG_PTR dwItemData;  /* Application defined.  */
+LPWSTR dwTypeData; /* depends on fMask */
+HBITMAP hbmpItem;  /* bitmap */
+/* --- Wine stuff --- */
+RECT  rect;/* Item area (relative to menu window) */
+UINT  xTab;/* X position of text after Tab */
+SIZE   bmpsize; /* size needed for the HBMMENU_CALLBACK
+ * bitmap */ 
+} MENUITEM;

+
+/* Popup menu structure */
+typedef struct {
+WORDwFlags;   /* Menu flags (MF_POPUP, MF_SYSMENU) */
+WORDwMagic;   /* Magic number */
+WORD   Width;/* Width of the whole menu */
+WORD   Height;   /* Height of the whole menu */
+UINTnItems;   /* Number of items in the menu */
+HWNDhWnd; /* Window containing the menu */
+MENUITEM*items;   /* Array of menu items */
+UINTFocusedItem;  /* Currently focused item */
+HWND   hwndOwner;/* window receiving the messages for ownerdraw */
+BOOLbTimeToHide;  /* Request hiding when receiving a second click 
in the top-level menu item */
+BOOLbScrolling;   /* Scroll arrows are active */
+UINTnScrollPos;   /* Current scroll position */
+UINTnTotalHeight; /* Total height of menu items inside menu */
+/*  MENUINFO members -- */
+DWORD  dwStyle;/* Extended menu style */
+UINT   cyMax;  /* max height of the whole menu, 0 is screen 
height */
+HBRUSH hbrBack;/* brush for menu background */
+DWORD  dwContextHelpID;
+DWORD  dwMenuData; /* application defined value */
+HMENU   hSysMenuOwner;  /* Handle to the dummy sys menu holder */
+SIZEmaxBmpSize; /* Maximum size of the bitmap items */
+} POPUPMENU, *LPPOPUPMENU;



Hi Thomas,

This needs to be cleaned up a lot more before it will be accepted.

For a start, the members of this structure need to be cleaned up. Some 
of the members of the POPUPMENU structure are for keeping track of the 
menu while it's in use (bTimeToHide, bScrolling, nScrollPos, 
FocusedItem), so these could be kept on the client side. Also, 
everything needs to be converted to wineserver types.


It should become clear what needs to change as menu item handling is 
moved into the server, so I would urge you to work on that and then 
rework these patches.


Thanks,

--
Rob Shearman





Re: configure: datarootdir is unused, and causes a warning with newer versions of autoconf.

2006-06-19 Thread Marcus Meissner
On Mon, Jun 19, 2006 at 06:12:38PM +0900, Mike McCormack wrote:

 diff --git a/Make.rules.in b/Make.rules.in
 index 9af2d3e..9deee72 100644
 --- a/Make.rules.in
 +++ b/Make.rules.in
 @@ -98,7 +98,6 @@ prefix  = @prefix@
  exec_prefix = @exec_prefix@
  bindir  = @bindir@
  libdir  = @libdir@
 -datarootdir = @datarootdir@
  datadir = @datadir@
  infodir = @infodir@
  mandir  = @mandir@

We added this especially because configure warned about it.

Ciao, Marcus




Re: Fix definition of SECURITY_INTEGER

2006-06-19 Thread Kai Blin
* Thomas Weidenmueller [EMAIL PROTECTED] [19/06/06, 11:38:54]:


 Index: dlls/secur32/negotiate.c
 ===
 RCS file: /home/wine/wine/dlls/secur32/negotiate.c,v
 retrieving revision 1.3
 diff -u -r1.3 negotiate.c
 --- dlls/secur32/negotiate.c  23 May 2006 12:48:34 -  1.3
 +++ dlls/secur32/negotiate.c  19 Jun 2006 09:10:31 -
 @@ -110,7 +110,10 @@
  phCredential-dwUpper = fCredentialsUse;
  /* Same here, shamelessly stolen from schannel.c */
  if (ptsExpiry)
 -ptsExpiry-QuadPart = 0;
 +{
 +ptsExpiry-LowPart = 0;
 +ptsExpiry-HighPart = 0;
 +}
  ret = SEC_E_OK;
  }
  return ret;

Be aware that negotiate.c is a complete stub. If this function is
changed, it should be changed like this:
 
diff --git a/dlls/secur32/negotiate.c b/dlls/secur32/negotiate.c
index b8531aa..586e559 100644
--- a/dlls/secur32/negotiate.c
+++ b/dlls/secur32/negotiate.c
@@ -93,28 +93,6 @@ static SECURITY_STATUS SEC_ENTRY nego_Qu
 return ret;
 }
 
-static SECURITY_STATUS nego_AcquireCredentialsHandle(ULONG
fCredentialsUse,
-PCredHandle phCredential, PTimeStamp ptsExpiry)
-{
-SECURITY_STATUS ret;
-
-if(fCredentialsUse == SECPKG_CRED_BOTH)
-{
-ret = SEC_E_NO_CREDENTIALS;
-}
-else
-{
-/* Ok, just store the direction like schannel does for now.
- * FIXME: This should probably do something useful later on
- */
-phCredential-dwUpper = fCredentialsUse;
-/* Same here, shamelessly stolen from schannel.c */
-if (ptsExpiry)
-ptsExpiry-QuadPart = 0;
-ret = SEC_E_OK;
-}
-return ret;
-}
 
 /***
  *  AcquireCredentialsHandleA
@@ -124,11 +102,10 @@ static SECURITY_STATUS SEC_ENTRY nego_Ac
  PLUID pLogonID, PVOID pAuthData, SEC_GET_KEY_FN pGetKeyFn,
  PVOID pGetKeyArgument, PCredHandle phCredential, PTimeStamp ptsExpiry)
 {
-TRACE((%s, %s, 0x%08lx, %p, %p, %p, %p, %p, %p)\n,
+TRACE((%s, %s, 0x%08lx, %p, %p, %p, %p, %p, %p) stub\n,
  debugstr_a(pszPrincipal), debugstr_a(pszPackage), fCredentialUse,
  pLogonID, pAuthData, pGetKeyFn, pGetKeyArgument, phCredential,
ptsExpiry);
-return nego_AcquireCredentialsHandle(fCredentialUse, phCredential,
-ptsExpiry);
+return SEC_E_UNSUPPORTED_FUNCTION;
 }
 
 /***
@@ -139,11 +116,10 @@ static SECURITY_STATUS SEC_ENTRY nego_Ac
  PLUID pLogonID, PVOID pAuthData, SEC_GET_KEY_FN pGetKeyFn,
  PVOID pGetKeyArgument, PCredHandle phCredential, PTimeStamp ptsExpiry)
 {
-TRACE((%s, %s, 0x%08lx, %p, %p, %p, %p, %p, %p)\n,
+TRACE((%s, %s, 0x%08lx, %p, %p, %p, %p, %p, %p) stub\n,
  debugstr_w(pszPrincipal), debugstr_w(pszPackage), fCredentialUse,
  pLogonID, pAuthData, pGetKeyFn, pGetKeyArgument, phCredential,
ptsExpiry);
-return nego_AcquireCredentialsHandle(fCredentialUse, phCredential,
-ptsExpiry);
+return SEC_E_UNSUPPORTED_FUNCTION;
 }
 
 /***

There's just no use in fixing negotiate.c as long as ntlm.c is in flux.
Negotiate will use the same solution as NTLM.

Cheers,
Kai

-- 
Kai Blin, (blin at gmx dot net)
There are things that are so serious that you can only joke about them
- Heisenberg




Re: appdb security

2006-06-19 Thread Jonathan Ernst
Hi,

The recent changes you made have resulted in a regression at least in
the note edition.

\'s and ''s are too much addslashized again. I remember having fixed
this some time ago...

Thanks.

Jonathan


signature.asc
Description: Ceci est une partie de message	numériquement signée



Re: configure: datarootdir is unused, and causes a warning with newer versions of autoconf.

2006-06-19 Thread Mike McCormack


Marcus Meissner wrote:


-datarootdir = @datarootdir@



We added this especially because configure warned about it.


With Debian/amd64 unstable which has autoconf 2.59.cvs.2006.06.05-1, I get:

config.status: WARNING: tools/wmc/Makefile contains a reference to the 
variable `datarootdir' which seems to be undefined.  Please make sure it 
is defined.


Alexandre is wondering whether it might be an autoconf bug.

Mike




Re: wined3d: declaration/FVF conversion test

2006-06-19 Thread Jason Green

On 6/15/06, Ivan Gyurdiev [EMAIL PROTECTED] wrote:

Hi, I'm attaching test, which demonstrates incorrect behavior of SetFVF
and SetVertexDeclaration.
Windows converts one to the other and backwards (at least partially),
and we do not such thing - this breaks at least 2 demos (dx9_hlsl_*)

I'm posting it here, because:

- I don't have Windows, and I need someone to try it on machine with
pixel shader support (preferably 3.0, will need to enable pshaders and
GLSL registry key). The whole first part of the test checks decl to fvf
conversions, and they're almost all set to 0 in order to pass on H.
Verbeet and V. Margolen's setups [ which have no pshaders ]. MSDN has a
whole page on how to convert to an fvf, and the values there are
definitely *not* 0, so that's why I'm suspicious.


I just tested this on a Windows box that supports Shader model 2.0,
and all tests came back positive without failures.   So, now we need
to clean up the test so it doesn't report twice the number of errors
and get it applied.  Then, we fix Wine.  ;-)

Jason




Re: Win64 patch 1/13

2006-06-19 Thread Mike McCormack


Ge van Geldorp wrote:


+SPEC_SRC32  = $(BASEMODULE).spec
+SPEC_SRC64  ?= $(SPEC_SRC32)


Not sure we want seperate spec files.  In any case, ?= doesn't look 
portable.



-ULONG WINAPI MAPILogon(ULONG uiparam, LPSTR profile, LPSTR password,
+ULONG WINAPI MAPILogon(ULONG_PTR uiparam, LPSTR profile, LPSTR password,
 FLAGS flags, ULONG reserved, LPLHANDLE session)



--- programs/wordpad/wordpad.c  14 Feb 2006 16:48:40 -  1.1
+++ programs/wordpad/wordpad.c  19 Jun 2006 17:34:48 -


I thought I already fixed these...  I don't think these will apply to 
the current git tree.



--- dlls/ntdll/tests/generated.c3 Jul 2005 11:23:30 -   1.23
+++ dlls/ntdll/tests/generated.c19 Jun 2006 17:20:17 -


You should be changing tools/winapi/winapi_test*, not the generated files.

The heap changes look useful, I will check them out when I get back from 
my holiday.


Mike




RE: Win64 patch 1/13

2006-06-19 Thread Ge van Geldorp
 From: Mike McCormack [mailto:[EMAIL PROTECTED] 
 
 Ge van Geldorp wrote:
 
  +SPEC_SRC32  = $(BASEMODULE).spec
  +SPEC_SRC64  ?= $(SPEC_SRC32)
 
 Not sure we want seperate spec files.  In any case, ?= 
 doesn't look portable.

I don't want them either, but I didn't see another option. 32-bit doesn't
export Get/SetWindowLongPtrA/W and GetSetClassLongPtrA/W (they are just
#defines in winuser.h), while 64-bit has to export them.
Is there a portable solution to set a Make variable only when it doesn't
have a value yet?

 I thought I already fixed these...  I don't think these will 
 apply to the current git tree.

Changes are against current CVS.

  --- dlls/ntdll/tests/generated.c3 Jul 2005 11:23:30 
 - 1.23
  +++ dlls/ntdll/tests/generated.c19 Jun 2006 17:20:17 -
 
 You should be changing tools/winapi/winapi_test*, not the 
 generated files.

Except that dlls/ntdll/tests/generated.c was hand-modified.

Thanks for your comments, Gé.





Re: [MSI 1/4] add streams table

2006-06-19 Thread Mike McCormack


Hi,

Thanks for submitting the patch, and keeping the coding style consistent!

Andrey Turkin wrote:

This patch adds virtual _Streams table to MSI because native MSI
maintains such table

ChangeLog:
virtual _Streams table added



+static UINT STREAMS_fetch_stream( struct tagMSIVIEW *view, UINT row, UINT col, 
IStream **stm )
+{




+
+/*
+ * The column marked with the type stream data seems to have a single 
number
+ * which references the column containing the name of the stream data
+ *
+ * Fetch the column to reference first.
+ */
+r = view-ops-fetch_int( view, row, col, ival );


I'm not so keen on the way this is done.

You seem to have duplicated alot of code from TABLE_fetch_stream here.


+if( r != ERROR_SUCCESS )
+{
+ERR(1: %d\n, r);
+return r;
+}
+
+ERR(fetched %d\n, ival);


And forgotten to remove your debug code.


+MSIVIEWOPS streams_ops =
+{
+TABLE_fetch_int,
+STREAMS_fetch_stream,
+TABLE_set_int,
+TABLE_insert_row,
+STREAMS_execute,
+TABLE_close,
+TABLE_get_dimensions,
+TABLE_get_column_info,
+TABLE_modify,
+TABLE_delete,
+TABLE_find_matching_rows
+};


The streams table is just another table.  How about generating an 
MSITABLE structure containing the data rather than treat it as a special 
case in here?


Mike




Re: Win64 patch 1/13

2006-06-19 Thread Mike McCormack


Ge van Geldorp wrote:


I don't want them either, but I didn't see another option. 32-bit doesn't
export Get/SetWindowLongPtrA/W and GetSetClassLongPtrA/W (they are just
#defines in winuser.h), while 64-bit has to export them.
Is there a portable solution to set a Make variable only when it doesn't
have a value yet?


Is there any problem with just exporting them in win32 also?  Last time 
I talked to Alexandre about this, I think that was the conclusion that 
was reached.


I thought I already fixed these...  I don't think these will 
apply to the current git tree.


Changes are against current CVS.


I think you're a bit behind the times:

http://cvs.winehq.org/cvsweb/wine/dlls/mapi32/mapi32_main.c.diff?r1=1.13r2=1.14
http://cvs.winehq.org/cvsweb/wine/dlls/user/user32.spec.diff?r1=1.114r2=1.115


Except that dlls/ntdll/tests/generated.c was hand-modified.


That would explain the rather large diff that I saw when I regenerated 
these tests :/


Mike




CVS server

2006-06-19 Thread Ge van Geldorp
 From: Mike McCormack [mailto:[EMAIL PROTECTED] 

 I think you're a bit behind the times:
 

http://cvs.winehq.org/cvsweb/wine/dlls/mapi32/mapi32_main.c.diff?r1=1.13r2=
1.14

http://cvs.winehq.org/cvsweb/wine/dlls/user/user32.spec.diff?r1=1.114r2=1.1
15

Indeed... Being on the European side of the ocean, I used the
rhlx01.fht-esslingen.de mirror. Seems it's no longer up-to-date. Apparently,
it has been removed from http://www.winehq.org/site/cvs too. Time to make
the switch to git I guess.

Gé.





Usage of checkGLcall in wined3d

2006-06-19 Thread Paul Vriens
Hi,

while going through some wined3d code I've seen that a 'normal' sequence
is:

some call;
checkGLcall(some call);

there are however several cases where the call isn't followed by a
checkGLcall:

surface.c:1713:glEnable(GL_TEXTURE_2D);

surface.c:2165:glEnable(GL_SCISSOR_TEST);

or that parameters/text are wrong for checkGLcall:

surface.c-2220-glBindTexture(GL_TEXTURE_2D, 0);
surface.c:2221:checkGLcall(glEnable glBindTexture);

surface.c-2406-glGetIntegerv(GL_DRAW_BUFFER, prev_draw);
surface.c:2407:vcheckGLcall(glIntegerv);

Should this one be defined as a janitorial task? 

Cheers,

Paul.





Re: Win64 status

2006-06-19 Thread Kuba Ober
On Monday 19 June 2006 14:17, Ge van Geldorp wrote:
 With the Win64 patches I just submitted to wine-patches, I'm able to
 successfully build Win64-enabled Wine and execute the following 64-bit
 winelib (winelib64? wine64lib?) application:

 #include windows.h

 int WINAPI WinMain(HINSTANCE hinst, HINSTANCE hprev, LPSTR cmdline, int
 cmdshow)
 {
   DWORD Written;

   WriteFile(GetStdHandle(STD_OUTPUT_HANDLE), Hello, world\r\n, 14,
 Written, NULL);

   return 0;
 }

 Unfortunately, compiling the above app as a true 64-bit HELLO64.EXE using
 Microsoft Visual Studio and then executing it using Wine doesn't work. The
 problem is that the calling convention for functions is different between
 MSVC and GCC generated apps. Basically, MSVC puts the function arguments in
 registers RCX, RDX, R8, R9 while GCC puts function arguments in registers
 RDI, RSI, RDX, RCX, R8, R9. I guess we'll have to wait for true .EXE
 support until someone teaches GCC the MSVC calling convention.

I'm currently hacking on gcc for an embedded target (Z8 Encore), but I 
wouldn't mind giving it a try while I'm digging in the gcc tree.

I'd like to hear any suggestions as to how to tell the compiler to use that 
calling convention (I'm not talking about implementation, just how the 
compiler used would tell it).

I presume it'd need to be something that can be set globally per each compiler 
invocation, as well as a per declaration override.

I'm thinking of -msvc (like -liberty ;) compiler option to force a 
MSVC-compatible ABI, and for now that'd only apply to 64 bit code (i.e. with 
-m64). Maybe in the future it could enable something special for 32 bit code 
as well.

I'm all ears about the per-declaration override (a pragma? an __attribute__?), 
and about alternatives to -msvc.

I'd be submitting a patch to mingw32 people as soon as it's done, in addition 
to posting it here. Note that the only way for me to test it would be to 
inspect the assembly output, as I'm not running 64 bit environment here (even 
though I'm on a 64 bit AMD processor). So it'd need testing from 64 bit 
people here at least.

Cheers, Kuba




Re: Usage of checkGLcall in wined3d

2006-06-19 Thread Stefan Dösinger
Am Montag 19 Juni 2006 21:25 schrieb Paul Vriens:
 Hi,

 while going through some wined3d code I've seen that a 'normal' sequence
 is:

 some call;
 checkGLcall(some call);

 there are however several cases where the call isn't followed by a
 checkGLcall:

 snip

 Should this one be defined as a janitorial task?
Yes, the the examples you listed are wrong, most likely due to bad copy + 
paste. It should be corrected.

There are some cases when a gl call is not followed by a checkGLcall, for 
example in the code I just sent with my vbo patch. This is the case when 
wined3d can handle the error somehow and fall back to an alternate code path.

Stefan


pgp9cxFE86bdH.pgp
Description: PGP signature



Re: ntoskrnl status

2006-06-19 Thread Jaap Stolk

I also would like to try the ntoskrnl.exe patch.
I uninstalled and deleted my cvs wine, updated python and installed
git, and completed Cloning the Wine GIT repository. I had a little
peek at the patch by renaming it to .bz2, but how do I add this patch
to to my local wine copy, using git ?
http://wiki.winehq.org/GitWine seems to be more oriented at making
patches, not importing a patch made by someone else.




Re: Recording with Lexia (mci open new)

2006-06-19 Thread Robert Reif

Damjan Jovanovic wrote:


3) Most importantly: Why is it necessary to add
CAPTURE to system.ini?
   Perhaps the alias argument isn't correctly
handled?
   



Yes wine's MCI is broken: the parsing of some
formats
of MCI commands is incorrect, one of the examples I
clearly remember being:

open G: type cdaudio alias cd
and wine complains that it could not load driver for
type G: (whereas the driver type is cdaudio, no?)
and you have to add G:=mcicda.dll in system.ini



__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 




 


I'm having a simular problem with G711Tool.exe

0009:trace:mci:mciSendStringW (Lopen waveaudio alias snd, 0x40371358, 
512, (nil))

0009:trace:mci:MCI_LoadMciDriver wDevID=0001
0009:trace:mci:mciSetDriverData (0001, 40371848)
0009:trace:mci:MCI_LoadMciDriver Loaded driver 0x40371a98 
(LWAVEAUDIO), type is 522, cmdTable=

0009:trace:mci:MCI_LoadMciDriver mcidev=1, uDevTyp=020A wDeviceID=0001 !
0009:trace:mci:MCI_SetCommandTable (0x408bca7c, 0)
0009:trace:mci:MCI_IsCommandTableValid Dumping cmdTbl=0 
[lpTable=0x408bca7c devType=0]

0009:trace:mci:MCI_GetCommandTable = 0
0009:trace:mci:MCI_SetCommandTable (0x408be900, 522)
0009:trace:mci:MCI_IsCommandTableValid Dumping cmdTbl=1 
[lpTable=0x408be900 devType=522]

0009:trace:mci:MCI_GetCommandTable = 1
0009:trace:mci:mciSendStringW verb=Lopen on dev=Lwaveaudio; offset=2
0009:trace:mci:MCI_ParseOptArgs args=Lalias snd offset=2
0009:trace:mci:mciSendStringW [1, MCI_OPEN, 2400, /(null) 
/(null) 4037176a/Lwaveaudio /(null) 4037178a/Lsnd 
/(null)]

0009:trace:mci:mciGetDriverData (0001)
0009:trace:mci:mciSendStringW = 1/ 0 (L)
0009:trace:mci:mciSendStringW = 2/ 0 (L1)
0009:trace:mci:mciSendStringW (Lcapability snd can play, 0x40371318, 
512, (nil))

0009:trace:mci:mciSendStringW verb=Lcapability on dev=Lsnd; offset=2
0009:trace:mci:MCI_ParseOptArgs args=Lcan play offset=2
0009:trace:mci:mciSendStringW [1, MCI_GETDEVCAPS, 0100, 
/(null) /(null) 0008/#0008 /(null) 
/(null) /(null)]

0009:trace:mci:mciGetDriverData (0001)
0009:trace:mci:mciSendStringW = 1/ 1 (L)
0009:trace:mci:mciSendStringW = 2/ 0 (Ltrue)
0009:trace:mci:mciSendStringW (Lclose snd, 0x40371318, 512, (nil))
0009:trace:mci:mciSendStringW verb=Lclose on dev=Lsnd; offset=1
0009:trace:mci:mciSendStringW [1, MCI_CLOSE, , /(null) 
/(null) /(null) /(null) /(null) 
/(null)]

0009:trace:mci:MCI_Close (0001, , 0x4083f408)
0009:trace:mci:mciGetDriverData (0001)
0009:trace:mci:mciGetDriverData (0001)
0009:trace:mci:mciSetDriverData (0001, )
0009:trace:mci:mciGetDriverData ()
0009:warn:mci:mciGetDriverData Bad uDeviceID
0009:trace:mci:mciSendStringW = 1/ 0 (L)
0009:trace:mci:mciSendStringW = 2/ 0 (L)
0009:trace:mci:mciSendStringW (Lcapability waveaudio can save, 
0x40371318, 512, (nil))

0009:trace:mci:mciSendStringW (Lopen waveaudio wait, (nil), 0, (nil))
0009:trace:mci:MCI_LoadMciDriver wDevID=0001
0009:trace:mci:mciSetDriverData (0001, 40371998)
0009:trace:mci:MCI_LoadMciDriver Loaded driver 0x40371970 
(LWAVEAUDIO), type is 522, cmdTable=

0009:trace:mci:MCI_LoadMciDriver mcidev=1, uDevTyp=020A wDeviceID=0001 !
0009:trace:mci:mciSendStringW verb=Lopen on dev=Lwaveaudio; offset=2
0009:trace:mci:MCI_ParseOptArgs args=Lwait offset=2
0009:trace:mci:mciSendStringW [1, MCI_OPEN, 2002, /(null) 
/(null) 40371802/Lwaveaudio /(null) /(null) 
/(null)]

0009:trace:mci:mciGetDriverData (0001)
0009:trace:mci:mciSendStringW = 1/ 0 ((null))
0009:trace:mci:mciSendStringW = 2/ 0 ((null))
0009:trace:mci:mciSendStringW verb=Lcapability on dev=Lwaveaudio; 
offset=2

0009:trace:mci:MCI_ParseOptArgs args=Lcan save offset=2
0009:trace:mci:mciSendStringW [1, MCI_GETDEVCAPS, 0100, 
/(null) /(null) 0009/#0009 /(null) 
/(null) /(null)]

0009:trace:mci:mciGetDriverData (0001)
0009:trace:mci:mciSendStringW = 1/ 1 (L)
0009:trace:mci:mciSendStringW = 2/ 0 (Ltrue)
0009:trace:mci:mciSendStringW (Lcapability waveaudio can record, 
0x40371318, 512, (nil))
0009:trace:mci:mciSendStringW verb=Lcapability on dev=Lwaveaudio; 
offset=2

0009:trace:mci:MCI_ParseOptArgs args=Lcan record offset=2
0009:trace:mci:mciSendStringW [1, MCI_GETDEVCAPS, 0100, 
/(null) /(null) 0001/#0001 /(null) 
/(null) /(null)]

0009:trace:mci:mciGetDriverData (0001)
0009:trace:mci:mciSendStringW = 1/ 1 (L)
0009:trace:mci:mciSendStringW = 2/ 0 (Ltrue)
0009:trace:mci:mciSendStringW (Lclose all, 0x403768a8, 512, (nil))
0009:trace:mci:mciSendStringW (Lopen all wait, (nil), 0, (nil))
0009:trace:mci:MCI_LoadMciDriver wDevID=0002
0009:trace:mci:mciSendStringW (Lclose all, 0x40376930, 512, (nil))
0009:trace:mci:mciSendStringW (Lopen all 

Re: Usage of checkGLcall in wined3d

2006-06-19 Thread H. Verbeet

On 19/06/06, Stefan Dösinger [EMAIL PROTECTED] wrote:

Yes, the the examples you listed are wrong, most likely due to bad copy +
paste. It should be corrected.

There are some cases when a gl call is not followed by a checkGLcall, for
example in the code I just sent with my vbo patch. This is the case when
wined3d can handle the error somehow and fall back to an alternate code path.

Also, keep in mind that checkGLcall actually checks all GL calls since
the previous checkGLcall. There are probably enough places where just
putting the checkGLcall at the end of a block of code is sufficient.




Re: Win64 status

2006-06-19 Thread Kuba Ober
  I'd be submitting a patch to mingw32 people as soon as it's
  done, in addition to posting it here. Note that the only way
  for me to test it would be to inspect the assembly output, as
  I'm not running 64 bit environment here (even though I'm on a
  64 bit AMD processor). So it'd need testing from 64 bit
  people here at least.

 I'm volunteering. I could also give you ssh access to a 64 bit environment.

Once I get sensible assembly coming out I'll let you know. I'll try the 
__attribute__(__msvccall__) for per-function, and -msvc for per-file.

Cheers, Kuba




Re: ntoskrnl status

2006-06-19 Thread Saulius Krasuckas
* On Tue, 20 Jun 2006, Jaap Stolk wrote:
 I uninstalled and deleted my cvs wine, updated python and installed
 git, and completed Cloning the Wine GIT repository. I had a little
 peek at the patch by renaming it to .bz2, but how do I add this patch
 to to my local wine copy, using git ?

I'd make some experimental branch or master or defined commit, then 
patch it with given diff, and commit the changes under single name.

 http://wiki.winehq.org/GitWine seems to be more oriented at making
 patches, not importing a patch made by someone else.

$ bunzip2 --keep origin_sd1.diff.bz2
$ git branch ntoskrnl 1d40bf0141b7f67b1188555962698f5dab631bc3
$ git branch
$ git checkout ntoskrnl
$ git branch
$ cat origin_sd1.diff | patch -p1
$ tools/make_requests
$ git commit -a -m ntoskrnl: Experimental implementation.
  # recompile Wine
$ ./configure  make depend  make  tools/wineprefixcreate --use-wine-tree .
  # below goes your experiments
$ ...
  # and here we go back to the normal tree
$ git checkout master
  # recompile Wine
$ ./configure  make depend  make  tools/wineprefixcreate --use-wine-tree .
  # and do our stuff
$ ...




Re: Winelib Getting Started 1.3.2. Test Drive

2006-06-19 Thread Robert Muller

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


Dee Ayy wrote:
| As a newbie, the statement It can be found in the programs subdirectory.
| had me lost.

It seems that the Winelib guide assumes that you know how to download
the wine sources already. (Quick and dirty meathod of downloading the
latest official tarball: On the main WineHQ page, the latest
announcement Wine 0.9.x released or somesuch has a link available
now; move it to an appropriate place, then unarchive it: $tar -xjf
wine-0.9.15.tar.bz2 or somesuch)

At this point, the sentance that gave you problems could be modified to
say: It can be found in the programs subdirectory of the wine source.

- -RFMuller
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFElz0yjfMdLxNd9ZERAqW4AKD2XDfJCevbr/qipE4mT0FVhX60eQCgzSm0
Hp4nNg6jwdIsMrik6hA7kFs=
=lg1u
-END PGP SIGNATURE-