Re: PGP signing party
I'm replying to my own email, as people are responding and it seems that some clarification is going to be required. Shachar Shemesh wrote: 1. Have a PGP key. You can generate one for yourself using gpg. Make sure to keep it somewhere safe afterwards, and not forget the password for it. 2. Send the PGP key finger print to me AT LEAST A WEEK BEFORE THE CONFERENCE. Any later then that, and it is not certain that we'll manage to get your key on the printed piece of paper that is necessary for carrying out the party. My mistake. I'm going to need both the finger print AND the actual key. Also, if you DON'T want the key published to a key server (I use http://pgp.mit.edu), please let me know well in advance. Obviously, your key will be published to all the people present at the key party. If your name's not there on your email headers, include it in the body. The name must be the same as appears on your formal IDs. The purpose of a pgp signing party is to establish a link between your virtual identity (your key) and your real one (as verified by an ID). For that reason it is impossible to participate by proxy, or under an alias. 3. Bring a copy you can trust to wineconf, to make sure other people are really signing your key (i.e. - that I'm not pulling anybody's leg). What you need is to do one of two things. A week before the party I'm going to send to everyone who is participating in the pgp signing party a text file which has everyone's names and fingerprint on it. You will need to go over this page and make sure that your own name is spelled correctly. Also make sure that the fingerprint on the page is the same as the one you sent me. The full details of what a key signing party is, why are the procedures as they are, and what's so important about *not* signing the keys with your laptop at the party can be found at http://www.cryptnet.net/fdp/crypto/gpg-party.html Already this is turning out to be a better success than last year. Make sure to join the web of trust and get your key recognized. Shachar -- Shachar Shemesh Lingnu Open Source Consulting ltd. Have you backed up today's work? http://www.lingnu.com/backup.html
Re: Should all A functions forward to their respective W's?
James Hawkins wrote: Hi, In the current state of wine, we have several A/W functions. Sometimes both the A and W functions are separately implemented with an ansi and unicode implementation respectively. Other A/W functions have the A forward to the W, converting the ansi to unicode. For all the functions that can, should we forward all A to their W counterparts? When it comes to the conformance test suite, this would be ideal. Only the A functions would have to be tested and in doing so, we test the A/W conversion and the functionality of the W functions (we're striving for all-unicode internally anyway). This would reduce the number of bugs, and the time it takes to fix current bugs. When both A and W are implemented and we find a bug in one of them, we have to remember to fix the same bug in the other function. For most of the functions, converting ansi to unicode is boilerplate code. This process could even be a janitorial project. What do you think? I think that for all functions we can, but care should be taken about what can means. For example, some experiments on Windows lead me to believe that GetCharacterPlacementW calls the A version, instead of vice versa (that is, on Windows 2000). Trying to reorder a string with Unicode characters not in the locale simply doesn't work. Obviously, is almost no one calls GetCharacterPlacement at all, this is not something we should be overly worried about, but I'm just trying to point out that such situations exist. Other places where converting the dependent calls have been tricky is with all the functions that put up a dialog box (and thus require a message handler function). These are fairly tricky to get right without repeating code, and in many places we preferred not to. What I'm trying to say is that I'm with you on that one, but stating it as you have may lead some people to be overly enthusiastic about things. Shachar -- Shachar Shemesh Lingnu Open Source Consulting ltd. Have you backed up today's work? http://www.lingnu.com/backup.html
Re: Should all A functions forward to their respective W's?
On Apr 5, 2005 1:19 AM, Shachar Shemesh [EMAIL PROTECTED] wrote: I think that for all functions we can, but care should be taken about what can means. It's understandable that there will be functions where this process is not applicable, but for a majority of the api, we can implement the conversion with relative ease. Figuring out which conversions would be easy is up to us I guess. -- James Hawkins
Wayne and twin
Hi, I haven't seen recent information on wine and twain. I already sent a similar mail to wine-users and, in a second step to wine-devel, but without any information back until now. May be the trick Wine and twain to Wayne and twin will give me more chance to be listen. Or may be my question is really stupid? >From a recent mail that I got, the problem is of interest for at least another people too. To be honest, she was at an earlier stage of installing Fine Reader and nothing came up for her wine installation. My problem is accessing the scanner from Fine Reader. I am not a specialist of Wine and simply use Winetools basic installation to install my fake drive, and then use standard wine to install all my Windows programs, including Noteworthy Composer recently (with timidity as midi synthesiser as reported on apps-db) and Fine Reader. Here is the question: I am trying to test a Finereader Office (version 5) with an USB scanner. Everything seems working. But I get scanner not ready when searching for scanner. Sane, gimp or whatever program using sane are working well with my scanner. Doing WINEDEBUG=+loaddll wine finereader.exe I get: ... trace:loaddll:load_dll Loaded module LC:\\program files\\abbyy finereader 5.0 office\\scan\\scanman0.dll : native trace:loaddll:load_dll Loaded module Lc:\\windows\\system\\msvcrt.dll : builtin trace:loaddll:MODULE_FlushModrefs Unloaded module Lc:\\windows\\system\\msvcrt.dll : builtin err:module:load_builtin_dll loaded .so for LTwain.dll but got Ltwain_32.dll instead - probably 16-bit dll trace:loaddll:MODULE_LoadModule16 Loaded module c:\\windows\\Twain.dll : builtin Scanning driver not ready. But the scanner is ready: # sane-find-scanner -v searching for USB scanners: checking /dev/usb/scanner... failed to open (Invalid argument) checking /dev/usb/scanner0... failed to open (Invalid argument) ... checking /dev/usbscanner15... failed to open (Invalid argument) found USB scanner (vendor=0x03f0 [hp], product=0xb402 [photosmart 7700 series]) at libusb:002:002 found USB scanner (vendor=0x04b8 [EPSON], product=0x010f [EPSON Scanner 010F], chip=LM9832/3) at libusb:001:003 # scanimage -L device `plustek:libusb:001:003' is a Epson Perfection 1250/Photo USB flatbed scanner device `net:localhost:plustek:libusb:001:003' is a Epson Perfection 1250/Photo USB flatbed scanner Thus the device is something like plustek:libusb:001:003 and # scanimage -d plustek:libusb:001:003 foo.pnm works. Is there any wine test (windows exe) in order to test twain? What can I do to go further Regards, Nicolas -- Brouard Nicolas [EMAIL PROTECTED]
Re: redirecting text to standard INPUT
Le vendredi 25 mars 2005 22:01 +0100, Hans Leidekker a crit : On Friday 25 March 2005 16:14, Raphael Clifford wrote: I am running a windows app under wine that prints text to the screen. This can be copied and pasted into wine's notepad. Is there any way to get wine to simply output all text written by the app to standard out? I remember I did something like this to extract the word list from a Dutch dictionary program: WINEDEBUG=trace+text wine app.exe 21 Because my program can't display all words at once and because I didn't want to click the mouse button a hundred thousand times I wrote a little program to do it. I used xwininfo and xev to find the window id and coordinates of the down arrow on the scroll bar for the word list. The program would then send X button press and release events to this window in a loop. -Hans With the same kind of idea, I would like to run Stata, a nice statistical package, in batch mode (it was running in batch mode on AIX). On Windows (and Wine), stata pops up in interactive mode and you have an internal windows window named Stata command where you have to enter manually a command like do foo.do . And I would like to do wine stata foo.do or something similar. Unfortunately, using stata 7, all windows (Review, Variables, Stata results etc. are imbedded in a huge Intercooled stata 7.0 window and I can't access to them individually. xwinfo displays the same Windows Id for all the imbedded windows. Any hint? Nicolas -- Brouard Nicolas [EMAIL PROTECTED]
Re: redirecting text to standard INPUT
On Tuesday 5 April 2005 12:39, Brouard Nicolas wrote: With the same kind of idea, I would like to run Stata, a nice statistical package, in batch mode (it was running in batch mode on AIX). Maybe CXtest fits your needs? http://cxtest.org/ -Hans
Re: comctl32: tab unicodification
Dimitrie O. Paun [EMAIL PROTECTED] wrote: infoPtr = (TAB_INFO *)Alloc (sizeof(TAB_INFO)); - SetWindowLongA(hwnd, 0, (DWORD)infoPtr); + SetWindowLongPtrW(hwnd, 0, (DWORD_PTR)infoPtr); If you change it here ... @@ -2975,7 +2952,7 @@ KillTimer(infoPtr-hwnd, TAB_HOTTRACK_TIMER); Free (infoPtr); - SetWindowLongA(infoPtr-hwnd, 0, 0); + SetWindowLongW(infoPtr-hwnd, 0, 0); ... it would be better to change it here to SetWindowLongPtrW as well. I think that moving Free (infoPtr); below of SetWindowLong would be appropriate as well. Dimi please add -p to your default diff flags, it makes the diffs much more readable. -- Dmitry.
Re: comctl32: tab unicodification
On Tue, Apr 05, 2005 at 09:04:18PM +0900, Dmitry Timoshkov wrote: Dimitrie O. Paun [EMAIL PROTECTED] wrote: infoPtr = (TAB_INFO *)Alloc (sizeof(TAB_INFO)); - SetWindowLongA(hwnd, 0, (DWORD)infoPtr); + SetWindowLongPtrW(hwnd, 0, (DWORD_PTR)infoPtr); If you change it here ... @@ -2975,7 +2952,7 @@ KillTimer(infoPtr-hwnd, TAB_HOTTRACK_TIMER); Free (infoPtr); - SetWindowLongA(infoPtr-hwnd, 0, 0); + SetWindowLongW(infoPtr-hwnd, 0, 0); ... it would be better to change it here to SetWindowLongPtrW as well. I think that moving Free (infoPtr); below of SetWindowLong would be appropriate as well. Yeah, you're right. I'll send an updated patch soon. Dimi please add -p to your default diff flags, it makes the diffs much more readable. Done. -- Dimi.
Re: Wayne and twin
Hi, On Tue, Apr 05, 2005 at 12:21:10PM +0200, Brouard Nicolas wrote: What can I do to go further At a minimum, it'd be useful to post logs with the +twain channel added. twain.dll support seems to be very old (Corel!!), so it's quite easily imaginable that something broke in the meantime or that several parts are not implemented yet. Note that I don't know anything about our twain support, though. Andreas Mohr
Re: [Wine]Re: Wayne and twin
Le mardi 05 avril 2005 14:56 +0200, Andreas Mohr a crit : Hi, On Tue, Apr 05, 2005 at 12:21:10PM +0200, Brouard Nicolas wrote: What can I do to go further At a minimum, it'd be useful to post logs with the +twain channel added. twain.dll support seems to be very old (Corel!!), so it's quite easily imaginable that something broke in the meantime or that several parts are not implemented yet. Many thanks for the answer. Which lets me think that it could (should?) work. In fact, in a couple of minutes, I just downloaded the TryBuy version 7 pro at http://download.abbyy.com/content/default.aspx and installed it without a problem with wine (winetools basic fake drive). Before a new installation I usually do: $ cp -dilpR ~/.wine ~/.wine-before-FineReader7 in order to save my wine configuration with hardlinks in order to save disk space. If something is wrong, I am back with the earlier version. I installed the English, French, Spain trial version. Now I tried to run with the +twain and went to the scan page menu and click to scan a page. Here is the output: $ WINEDEBUG=+twain,+loaddll wine /home/brouard/.wine/drive_c/Program\ Files/ABBYY\ FineReader\ 7.0\ Professional\ Edition/FineReader.exe trace:loaddll:load_dll Loaded module Lc:\\windows\\system\ \advapi32.dll : builtin trace:loaddll:load_dll Loaded module Lc:\\windows\\system\\gdi32.dll : builtintrace:loaddll:load_dll Loaded module Lc:\\windows\\system\ \user32.dll : builtin trace:loaddll:load_dll Loaded module LC:\\Program Files\\ABBYY FineReader 7.0 Professional Edition\\msvcrt.dll : native trace:loaddll:load_dll Loaded module LC:\\windows\\system\ \shlwapi.dll : native trace:loaddll:load_dll Loaded module Lc:\\windows\\system\ \comctl32.dll : builtin trace:loaddll:load_dll Loaded module Lc:\\windows\\system\ \shell32.dll : builtin trace:loaddll:load_dll Loaded module Lc:\\windows\\system\ \winspool.drv : builtin trace:loaddll:load_dll Loaded module Lc:\\windows\\system\ \comdlg32.dll : builtin trace:loaddll:load_dll Loaded module LC:\\windows\\system\ \RPCRT4.dll : nativetrace:loaddll:load_dll Loaded module LC:\\windows\ \system\\msi.dll : native trace:loaddll:load_dll Loaded module LC:\\Program Files\\ABBYY FineReader 7.0 Professional Edition\\FineObj.dll : native trace:loaddll:load_dll Loaded module LC:\\windows\\system\\ole32.dll : native trace:loaddll:load_dll Loaded module LC:\\windows\\system\ \OLEAUT32.dll : native trace:loaddll:load_dll Loaded module LC:\\Program Files\\ABBYY FineReader 7.0 Professional Edition\\FineObjFC.dll : native trace:loaddll:load_dll Loaded module LC:\\Program Files\\ABBYY FineReader 7.0 Professional Edition\\Langinfo.dll : native trace:loaddll:load_dll Loaded module LC:\\Program Files\\ABBYY FineReader 7.0 Professional Edition\\Morphology.DLL : native trace:loaddll:load_dll Loaded module LC:\\Program Files\\ABBYY FineReader 7.0 Professional Edition\\TRS.dll : native trace:loaddll:load_dll Loaded module Lc:\\windows\\system\\mpr.dll : builtin trace:loaddll:MODULE_LoadModule16 Loaded module krnl386.exe : builtin trace:loaddll:MODULE_LoadModule16 Loaded module system.drv : builtin trace:loaddll:MODULE_LoadModule16 Loaded module GDI.EXE : builtin trace:loaddll:MODULE_LoadModule16 Loaded module USER.EXE : builtin trace:loaddll:MODULE_LoadModule16 Loaded module keyboard.drv : builtin trace:loaddll:load_dll Loaded module Lc:\\windows\\system\ \x11drv.dll : builtin trace:loaddll:load_dll Loaded module Lc:\\windows\\system\\imm32.dll : builtintrace:loaddll:load_dll Loaded module Lc:\\windows\\system\ \lz32.dll : builtin trace:loaddll:load_dll Loaded module Lc:\\windows\\system\ \version.dll : builtin trace:loaddll:load_dll Loaded module LC:\\program files\\abbyy finereader 7.0 professional edition\\morphores3.dll : native trace:loaddll:MODULE_FlushModrefs Unloaded module LC:\\program files\ \abbyy finereader 7.0 professional edition\\morphores3.dll : native trace:loaddll:load_dll Loaded module LC:\\program files\\abbyy finereader 7.0 professional edition\\shell3.dll : native trace:loaddll:MODULE_FlushModrefs Unloaded module LC:\\program files\ \abbyy finereader 7.0 professional edition\\shell3.dll : native trace:loaddll:load_dll Loaded module LC:\\program files\\abbyy finereader 7.0 professional edition\\morphores3.dll : native trace:loaddll:load_dll Loaded module LC:\\program files\\abbyy finereader 7.0 professional edition\\shell3.dll : native trace:loaddll:load_dll Loaded module LC:\\program files\\abbyy finereader 7.0 professional edition\\engine3.dll : native trace:loaddll:MODULE_FlushModrefs Unloaded module LC:\\program files\ \abbyy finereader 7.0 professional edition\\engine3.dll : native trace:loaddll:load_dll Loaded module LC:\\program files\\abbyy finereader 7.0 professional edition\\engine3.dll : native trace:loaddll:load_dll Loaded module LC:\\windows\\system\ \shfolder.dll : native trace:loaddll:load_dll Loaded module LC:\\Program Files\\ABBYY FineReader 7.0 Professional Edition\\ShellRes.dll :
Re: Remove reference to nonexistant strmif.h
On Mon, Apr 04, 2005 at 10:24:53PM -0400, Dimitrie O. Paun wrote: ChangeLog Remove reference to nonexistant strmif.h +++ include/Makefile.in 5 Apr 2005 02:23:26 - - strmif.h \ /src/wine-cvs/include$ ls strmif.h strmif.h ? it's there for me. :) -- Kees Cook@outflux.net
Notes on adding a test
Thomas Kho mentioned that http://www.geekymedia.com/twiki/bin/view.cgi/WineDev/AddingMakefile was helpful to him. Since the webmaster there says he's taking down that wiki soon, here's a copy for posterity. -- snip -- Topic: AddingMakefile (as part of a new Wine test) Follow the example of the lzexpand test patch: http://www.winehq.com/hypermail/wine-patches/2004/11/0182.html Basic steps. (you'll have to chmod mod most of the files to 644 before you can edit them) 1. In your tests directory, look over wine/dlls/lzexpand/Makefile.in and wine/dlls/lzexpand/tests/Makefile.in 2. Now look at the Makefile.in in your dll directory. Copy it into your tests dir and change the list of .c files to your test .c file 3. Edit the Makefile.in file in your dll directory to add a subdirs line (see lzexpand/Makefile.in for an example) 4. In your wine directory, chmod 644 configure.ac 5. Edit configure.ac, find your dll directory in the AC_CONFIG_FILES and then add the path to your tests directory after it. 6. In your wine directory, run autoconf. Make sure you have 2.53 installed (autoconf --version). 7. Run configure. Your Makefile should be listed at the end now. -- snip -- -- Trying to get a job as a c++ developer? See http://kegel.com/academy/getting-hired.html
Press: medical records software works with Wine
Here's an interesting story about some medical software that works with Wine and CrossOver Office: http://www.linuxmednews.com/linuxmednews/1112336432/index_html quote: He finally succeeded in running the CPRS client on Linux with only a few problems. Previous releases of WINE could not run the client at all, but last fall things started to improve when William Wong, a colleague from Malaysia's PCDOM organization, was able to launch CPRS for the first time using WINE. According to Joseph Dal Molin: 'Something changed under the covers of WINE that made it possible. A few releases ago, this did not work. Now it does.' scary statistic: As many as 98,000 people die each year as a result of preventable medical errors -Brian
Re: Remove reference to nonexistant strmif.h
On Mon, 4 Apr 2005, Kees Cook wrote: On Mon, Apr 04, 2005 at 10:24:53PM -0400, Dimitrie O. Paun wrote: ChangeLog Remove reference to nonexistant strmif.h +++ include/Makefile.in 5 Apr 2005 02:23:26 - - strmif.h \ /src/wine-cvs/include$ ls strmif.h strmif.h ? it's there for me. :) It's generated from strmif.idl which means it's already in $(IDL_HEADERS) so it should not be listed in $(WINDOWS_INCLUDES) too. -- Francois Gouget [EMAIL PROTECTED]http://fgouget.free.fr/ Linux: Because rebooting is for adding new hardware
Re: [MSVCRT] implement _mbsbtype
On Tuesday 15 March 2005 00:43, Juan Lang wrote: Raphael wrote: + if (!*str) { /** TODO: check *str validity */ +return -1; /** _MBC_ILLEGAL */ + } + if (start == str MSVCRT_isleadbyte(*str)) { +return 1; /** _MBC_LEAD */ + } + if (start == str MSVCRT_isleadbyte(str[-1])) { +return 2; /**_MBC_TRAIL */ + } + + return 0; /** _MBC_SINGLE */ Cool. How about patching mbctype.h with these constants too? --Juan Try 2 :) Changelog: - implement _mbsbtype (bug 1831) This One without tests improvements as they failed on wine (as wine don't seems to support chineese) :( the test patch for people who want to test: Index: dlls/msvcrt/tests/string.c === RCS file: /home/wine/wine/dlls/msvcrt/tests/string.c,v retrieving revision 1.2 diff -u -r1.2 string.c --- dlls/msvcrt/tests/string.c 4 May 2004 04:13:06 - 1.2 +++ dlls/msvcrt/tests/string.c 5 Apr 2005 20:33:36 - @@ -22,6 +22,8 @@ #include winbase.h #include string.h #include stdlib.h +#include mbctype.h +#include mbstring.h static void* (*pmemcpy)(void *, const void *, size_t n); static int* (*pmemcmp)(void *, const void *, size_t n); @@ -34,6 +36,10 @@ { void *mem; static const char xilstring[]=c:/xilinx; + +static const char s_chin[] = \326\354; /* ZHU1 for mbcs tests */ +static const char s_jap[] = A\x9A\x8B\xE0\xEF\xF0xXyYzZ; + int nLen=strlen(xilstring); HMODULE hMsvcrt = LoadLibraryA(msvcrt.dll); ok(hMsvcrt != 0, LoadLibraryA failed\n); @@ -46,6 +52,24 @@ ok(mem != NULL, memory not allocated for size 0\n); strcpy((char*)mem,xilstring); pmemcpy((char*)mem+5, mem,nLen+1); -ok(pmemcmp((char*)mem+5,xilstring, nLen) == 0, - Got result %s\n,(char*)mem+5); +ok(pmemcmp((char*)mem+5,xilstring, nLen) == 0, Got result %s\n,(char*)mem+5); + +/** + * http://www.geocities.com/yongweiwu/multibyte.htm + * http://home.a03.itscom.net/tsuzu/programing/tips06_2.htm + */ + +_setmbcp(936); /* Japanese */ +ok( 0 == _ismbblead(s_jap[1]), 0 == _ismbblead(s_jap[1]), was %d\n, _ismbblead(s_jap[1]) ); + +_setmbcp(932); /* Chinese GBK */ +ok( 4 == _ismbblead(s_chin[1]), 4 == _ismbblead(s_chin[1]), was %d\n, _ismbblead(s_chin[1]) ); +ok( 0 == _ismbslead(s_chin, s_chin[1]), 0 == _ismbslead(s_chin, s_chin[1]), was %d\n, _ismbslead(s_chin, s_chin[1])); + +ok( 2 == strlen(s_chin), 2 == strlen(s_chin), was %d\n, strlen(s_chin)); +ok( 1 == _mbslen(s_chin), 1 == _mbslen(s_chin), was %d\n, _mbslen(s_chin)); + +ok( _MBC_LEAD == _mbsbtype(s_chin, 0), _MBC_LEAD == _mbsbtype(s_chin, 0), was %d\n, _mbsbtype(s_chin, 0) ); +ok( _MBC_TRAIL == _mbsbtype(s_chin, 1), _MBC_TRAIL == _mbsbtype(s_chin, 1), was %d\n, _mbsbtype(s_chin, 1) ); + } Regards, Raphael Index: dlls/msvcrt/mbcs.c === RCS file: /home/wine/wine/dlls/msvcrt/mbcs.c,v retrieving revision 1.30 diff -u -r1.30 mbcs.c --- dlls/msvcrt/mbcs.c 25 Feb 2005 14:07:57 - 1.30 +++ dlls/msvcrt/mbcs.c 5 Apr 2005 20:29:51 - @@ -24,6 +24,7 @@ */ #include msvcrt.h +#include msvcrt/mbctype.h #include wine/unicode.h #include wine/debug.h @@ -1143,4 +1144,37 @@ str += (MSVCRT_isleadbyte(*str)?2:1); } return NULL; +} + +/* + * _mbsbtype (MSVCRT.@) + */ +int _mbsbtype(const unsigned char* mbstr, size_t count) { + const unsigned char* str; + const unsigned char* start = mbstr; + + str = mbstr + count; + + /** from _ismbslead */ + if (MSVCRT___mb_cur_max 1) + { +while (start str) { + if (!*start) { + return _MBC_ILLEGAL; + } + start += MSVCRT_isleadbyte(*str) ? 2 : 1; +} + + } + if (!*str) { /** TODO: check *str validity */ +return _MBC_ILLEGAL; + } + if (start == str MSVCRT_isleadbyte(*str)) { +return _MBC_LEAD; + } + if (start == str MSVCRT_isleadbyte(str[-1])) { +return _MBC_TRAIL; + } + + return _MBC_SINGLE; } Index: include/msvcrt/mbctype.h === RCS file: /home/wine/wine/include/msvcrt/mbctype.h,v retrieving revision 1.5 diff -u -r1.5 mbctype.h --- include/msvcrt/mbctype.h 25 Jun 2004 01:19:15 - 1.5 +++ include/msvcrt/mbctype.h 5 Apr 2005 20:29:51 - @@ -27,6 +27,12 @@ extern C { #endif +/* return values for _mbsbtype and _mbbtype */ +#define _MBC_SINGLE0 +#define _MBC_LEAD 1 +#define _MBC_TRAIL 2 +#define _MBC_ILLEGAL (-1) + unsigned char* __p__mbctype(void); #define _mbctype (__p__mbctype()) pgp2RYmZWP1iQ.pgp Description: PGP signature
Re: crypt32: CryptProtectData/CryptUnprotectData take 2
On Tue, Apr 05, 2005 at 02:32:11PM +0900, Mike McCormack wrote: The new patch looks good. I should have mentioned before that writing a test case will help your patch be accepted. Did you have any test code about that you could turn into a test case for your newly implemented functions? Sure, I can write something. I'll look around for docs on how to run tests -- I didn't find that when I looked around this morning. Also: I realize I should provide full documentation for the actual Windows API calls themselves. I documented everything BUT those. :) What's the convention for the number after the API name? I've seen some with numbers, and some with just an @ sign? -- Kees Cook@outflux.net
Re: crypt32: CryptProtectData/CryptUnprotectData take 2
Kees Cook wrote: On Tue, Apr 05, 2005 at 02:32:11PM +0900, Mike McCormack wrote: The new patch looks good. I should have mentioned before that writing a test case will help your patch be accepted. Did you have any test code about that you could turn into a test case for your newly implemented functions? Sure, I can write something. I'll look around for docs on how to run tests -- I didn't find that when I looked around this morning. Also: I realize I should provide full documentation for the actual Windows API calls themselves. I documented everything BUT those. :) What's the convention for the number after the API name? I've seen some with numbers, and some with just an @ sign? I think it's an @ for normal calls, and a number for an 'ordinal' call; (though don't really know what the difference is... ;)) HTH, Joris
Re: [MSVCRT] implement _mbsbtype
Hi Raphael, looking better. One more point below: --- Raphael [EMAIL PROTECTED] wrote: Index: dlls/msvcrt/mbcs.c === RCS file: /home/wine/wine/dlls/msvcrt/mbcs.c,v retrieving revision 1.30 diff -u -r1.30 mbcs.c --- dlls/msvcrt/mbcs.c25 Feb 2005 14:07:57 - 1.30 +++ dlls/msvcrt/mbcs.c5 Apr 2005 20:29:51 - @@ -1143,4 +1144,37 @@ str += (MSVCRT_isleadbyte(*str)?2:1); } return NULL; +} + +/* + * _mbsbtype (MSVCRT.@) + */ +int _mbsbtype(const unsigned char* mbstr, size_t count) { + const unsigned char* str; + const unsigned char* start = mbstr; + + str = mbstr + count; + + /** from _ismbslead */ + if (MSVCRT___mb_cur_max 1) + { +while (start str) { + if (!*start) { + return _MBC_ILLEGAL; + } + start += MSVCRT_isleadbyte(*str) ? 2 : 1; +} + + } + if (!*str) { /** TODO: check *str validity */ +return _MBC_ILLEGAL; + } + if (start == str MSVCRT_isleadbyte(*str)) { +return _MBC_LEAD; + } + if (start == str MSVCRT_isleadbyte(str[-1])) { +return _MBC_TRAIL; + } For this last comparison, it's possible that you're indexing before the array if count is 0. Also, it seems more natural to check if (start == str !MSVCRT_isleadbyte(*str)) return _MBC_SINGLE, but that would imply that _MBC_TRAIL is never returned. A test case would satisfy my curiosity, at least. --Juan __ Yahoo! Messenger Show us what our next emoticon should look like. Join the fun. http://www.advision.webevents.yahoo.com/emoticontest
Re: [MSVCRT] implement _mbsbtype
On Wed, 6 Apr 2005 08:58, Troy Rollo wrote: while (start str) { This should have been while (start = str)
Re: crypt32: CryptProtectData/CryptUnprotectData take 2
Kees Cook wrote: Sure, I can write something. I'll look around for docs on how to run tests -- I didn't find that when I looked around this morning. The best way to write a test is to look at some of the test cases that are there already. Write and run the test under Windows, and make sure it passes on Windows first. The test is something like this: /* filename is dlls/crypt32/tests/protect.c */ #include wine/test.h START_TEST(protect) { /* basic form of the test */ ok(TRUE, This should be true\n); /* try with incorrect parameters */ ok(!CryptProtectData(NULL,NULL,NULL,NULL,NULL,0,NULL), crypt protect data should fail\n); ok(GetLastError() == ERROR_INVALID_PARAMETER, error returned incorrect\n); ... /* try with correct parameters */ ... /* for tests that pass on windows, but not on Wine */ wine_todo { ok( failing_test(), this test should pass\n); } } Also: I realize I should provide full documentation for the actual Windows API calls themselves. I documented everything BUT those. :) What's the convention for the number after the API name? I've seen some with numbers, and some with just an @ sign? Describing the function is good, but IMO, test cases are a more accurate description :) You're probably safe using [EMAIL PROTECTED], as crypt32 probably doesn't export functions via ordinal (number). You can check the crypt32.spec file to see. Mike
Re: Notes on adding a test
On Tue, Apr 05, 2005 at 09:17:17AM -0700, Dan Kegel wrote: Thomas Kho mentioned that http://www.geekymedia.com/twiki/bin/view.cgi/WineDev/AddingMakefile was helpful to him. Since the webmaster there says he's taking down that wiki soon, here's a copy for posterity. It would be best if someone integrated it into the Devel Guide. -- Dimi.
Re: real SetProcessClass and SetThreadPriority support
Robert Reif wrote: Are there any plans or is anyone working on mapping Windows SetProcessClass and SetThreadPriority support to linux process priorities on kernels that support CAP_SYS_NICE? Mapping Win32 thread priority levels to Linux nice levels is fairly trivial, but convincing kernel developers to allow unprivileged user-space programs to control thread priorities is the big problem. The last time a discussion like this came up, we (Wine developers and Cedega developers) requested a way of changing a thread's relative priority within a process (without affecting the overall CPU time the process gets). This should be a good compromise between meeting applications' needs and preventing unprivileged applications from freezing the computer. AFAIK, this hasn't been implemented yet. Rob
Re: real SetProcessClass and SetThreadPriority support
On Wed, 6 Apr 2005 14:04, Robert Shearman wrote: The last time a discussion like this came up, we (Wine developers and Cedega developers) requested a way of changing a thread's relative priority within a process (without affecting the overall CPU time the process gets) This is far from trivial to implement in the kernel - I wouldn't count on it happening in anything approaching a reasonable time frame, and I'd bet against it being done at all. If we want to be able to increase the priority of a thread, I suspect that the only reasonable way to do so (that stands a chance of being done) will be by means of either a helper process that runs as root or a kernel module, and I would lean towards the helper process as being the preferable solution.