winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
October 2010
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
1174 discussions
Start a n
N
ew thread
Yaron Shahrabani : msacm32: Added Hebrew translation.
by Alexandre Julliard
27 Oct '10
27 Oct '10
Module: wine Branch: master Commit: 177e7014e35cb5d79dc932db44c33bed0ac2392f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=177e7014e35cb5d79dc932db4…
Author: Yaron Shahrabani <sh.yaron(a)gmail.com> Date: Tue Oct 26 19:10:48 2010 +0200 msacm32: Added Hebrew translation. --- dlls/msacm32/Makefile.in | 1 + dlls/msacm32/msacm_He.rc | 57 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+), 0 deletions(-) diff --git a/dlls/msacm32/Makefile.in b/dlls/msacm32/Makefile.in index d8f0903..c86c3fe 100644 --- a/dlls/msacm32/Makefile.in +++ b/dlls/msacm32/Makefile.in @@ -18,6 +18,7 @@ RC_SRCS = \ msacm_En.rc \ msacm_Es.rc \ msacm_Fr.rc \ + msacm_He.rc \ msacm_Hu.rc \ msacm_It.rc \ msacm_Ja.rc \ diff --git a/dlls/msacm32/msacm_He.rc b/dlls/msacm32/msacm_He.rc new file mode 100644 index 0000000..4221d29 --- /dev/null +++ b/dlls/msacm32/msacm_He.rc @@ -0,0 +1,57 @@ +/* + * Hebrew resource file for MS ACM + * + * Copyright 2000 Eric Pouech + * Copyright 2010 Yaron Shahrabani <sh.yaron(a)gmail.com> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "wineacm.h" + +#pragma code_page(65001) + +LANGUAGE LANG_HEBREW, SUBLANG_DEFAULT + +DLG_ACMFORMATCHOOSE_ID DIALOG 10, 20, 225, 100 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_LAYOUTRTL +CAPTION "בחירת צליל" +FONT 8, "MS Shell Dlg" +BEGIN + + LTEXT "&שם:", -1, 5, 5, 115, 8, NOT WS_GROUP + + COMBOBOX IDD_ACMFORMATCHOOSE_CMB_CUSTOM, 5, 15, 115, 60, + CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP + + PUSHBUTTON "שמירה &בשם...", IDD_ACMFORMATCHOOSE_BTN_SETNAME, 125, 14, 45, 14 + PUSHBUTTON "ה&סרה", IDD_ACMFORMATCHOOSE_BTN_DELNAME, 175, 14, 45, 14 + + LTEXT "&מבנה:", -1, 5, 41, 44, 8, NOT WS_GROUP + + COMBOBOX IDD_ACMFORMATCHOOSE_CMB_FORMATTAG, 50, 39, 170, 60, + CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP + + LTEXT "מ&אפיינים:", -1, 5, 59, 44, 8, NOT WS_GROUP + + COMBOBOX IDD_ACMFORMATCHOOSE_CMB_FORMAT, 50, 57, 170, 60, + CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + + DEFPUSHBUTTON "אישור", IDOK, 48, 80, 40, 14 + PUSHBUTTON "ביטול", IDCANCEL, 92, 80, 40, 14 + PUSHBUTTON "ע&זרה", IDD_ACMFORMATCHOOSE_BTN_HELP, 136, 80, 40, 14 + +END
1
0
0
0
Martin Wilck : xcopy: Fix command line parsing logic.
by Alexandre Julliard
27 Oct '10
27 Oct '10
Module: wine Branch: master Commit: 766f6b0b4b153e8262591a52e123e63b0f7c2f01 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=766f6b0b4b153e8262591a52e…
Author: Martin Wilck <Martin.Wilck(a)particle-dynamics.de> Date: Wed Oct 27 01:49:06 2010 +0200 xcopy: Fix command line parsing logic. Experiments show xcopy under Windows does not use argc/argv logic for treating double quotes and backslashes. The xcopy logic is simplified because literal quotes are illegal in Windows file names, thus escaped double quotes (\") need not be treated. 'XCOPY "c:\dir a" "c:\dir b\"' works under Windows. --- programs/xcopy/xcopy.c | 142 +++++++++++++++++++++++++++++++++++------------- 1 files changed, 103 insertions(+), 39 deletions(-) diff --git a/programs/xcopy/xcopy.c b/programs/xcopy/xcopy.c index ed736db..9e931c0 100644 --- a/programs/xcopy/xcopy.c +++ b/programs/xcopy/xcopy.c @@ -49,9 +49,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(xcopy); /* Prototypes */ -static int XCOPY_ParseCommandLine(int argc, WCHAR **argvW, - WCHAR *suppliedsource, - WCHAR *supplieddestination, DWORD *flags); +static int XCOPY_ParseCommandLine(WCHAR *suppliedsource, + WCHAR *supplieddestination, DWORD *flags); static int XCOPY_ProcessSourceParm(WCHAR *suppliedsource, WCHAR *stem, WCHAR *spec, DWORD flags); static int XCOPY_ProcessDestParm(WCHAR *supplieddestination, WCHAR *stem, @@ -130,12 +129,12 @@ int wmain (int argc, WCHAR *argvW[]) /* * Parse the command line */ - if ((rc = XCOPY_ParseCommandLine(argc, argvW, suppliedsource, - supplieddestination, &flags)) != RC_OK) { - if (rc == RC_HELP) - return RC_OK; - else - return rc; + if ((rc = XCOPY_ParseCommandLine(suppliedsource, supplieddestination, + &flags)) != RC_OK) { + if (rc == RC_HELP) + return RC_OK; + else + return rc; } /* Trace out the supplied information */ @@ -196,43 +195,102 @@ int wmain (int argc, WCHAR *argvW[]) /* ========================================================================= XCOPY_ParseCommandLine - Parses the command line ========================================================================= */ -static int XCOPY_ParseCommandLine(int argc, WCHAR **argvW, - WCHAR *suppliedsource, - WCHAR *supplieddestination, DWORD *pflags) +static BOOL is_whitespace(WCHAR c) +{ + return c == ' ' || c == '\t'; +} + +static WCHAR *skip_whitespace(WCHAR *p) +{ + for (; *p && is_whitespace(*p); p++); + return p; +} + +/* Windows XCOPY uses a simplified command line parsing algorithm + that lacks the escaped-quote logic of build_argv(), because + literal double quotes are illegal in any of its arguments. + Example: 'XCOPY "c:\DIR A" "c:DIR B\"' is OK. */ +static int find_end_of_word(const WCHAR *word, WCHAR **end) +{ + BOOL in_quotes = 0; + const WCHAR *ptr = word; + for (;;) { + for (; *ptr != '\0' && *ptr != '"' && + (in_quotes || !is_whitespace(*ptr)); ptr++); + if (*ptr == '"') { + in_quotes = !in_quotes; + ptr++; + } + /* Odd number of double quotes is illegal for XCOPY */ + if (in_quotes && *ptr == '\0') + return RC_INITERROR; + if (*ptr == '\0' || (!in_quotes && is_whitespace(*ptr))) + break; + } + *end = (WCHAR*)ptr; + return RC_OK; +} + +/* Remove all double quotes from a word */ +static void strip_quotes(WCHAR *word, WCHAR **end) +{ + WCHAR *rp, *wp; + for (rp = word, wp = word; *rp != '\0'; rp++) { + if (*rp == '"') + continue; + if (wp < rp) + *wp = *rp; + wp++; + } + *wp = '\0'; + *end = wp; +} + +static int XCOPY_ParseCommandLine(WCHAR *suppliedsource, + WCHAR *supplieddestination, DWORD *pflags) { const WCHAR EXCLUDE[] = {'E', 'X', 'C', 'L', 'U', 'D', 'E', ':', 0}; DWORD flags = *pflags; + WCHAR *cmdline, *word, *end, *next; + int rc = RC_INITERROR; - /* Confirm at least one parameter */ - if (argc < 2) { - XCOPY_wprintf(XCOPY_LoadMessage(STRING_INVPARMS)); - return RC_INITERROR; - } + cmdline = _wcsdup(GetCommandLineW()); + if (cmdline == NULL) + return rc; /* Skip first arg, which is the program name */ - argvW++; + if ((rc = find_end_of_word(cmdline, &word)) != RC_OK) + goto out; + word = skip_whitespace(word); - while (argc > 1) + while (*word) { - argc--; - WINE_TRACE("Processing Arg: '%s'\n", wine_dbgstr_w(*argvW)); + WCHAR first; + if ((rc = find_end_of_word(word, &end)) != RC_OK) + goto out; + + next = skip_whitespace(end); + first = word[0]; + *end = '\0'; + strip_quotes(word, &end); + WINE_TRACE("Processing Arg: '%s'\n", wine_dbgstr_w(word)); /* First non-switch parameter is source, second is destination */ - if (*argvW[0] != '/') { + if (first != '/') { if (suppliedsource[0] == 0x00) { - lstrcpyW(suppliedsource, *argvW); + lstrcpyW(suppliedsource, word); } else if (supplieddestination[0] == 0x00) { - lstrcpyW(supplieddestination, *argvW); + lstrcpyW(supplieddestination, word); } else { XCOPY_wprintf(XCOPY_LoadMessage(STRING_INVPARMS)); - return RC_INITERROR; + goto out; } } else { /* Process all the switch options Note: Windows docs say /P prompts when dest is created but tests show it is done for each src file regardless of the destination */ - switch (toupper(argvW[0][1])) { + switch (toupper(word[1])) { case 'I': flags |= OPT_ASSUMEDIR; break; case 'S': flags |= OPT_RECURSIVE; break; case 'Q': flags |= OPT_QUIET; break; @@ -254,19 +312,19 @@ static int XCOPY_ParseCommandLine(int argc, WCHAR **argvW, /* E can be /E or /EXCLUDE */ case 'E': if (CompareStringW(LOCALE_USER_DEFAULT, NORM_IGNORECASE | SORT_STRINGSORT, - &argvW[0][1], 8, + &word[1], 8, EXCLUDE, -1) == 2) { - if (XCOPY_ProcessExcludeList(&argvW[0][9])) { + if (XCOPY_ProcessExcludeList(&word[9])) { XCOPY_FailMessage(ERROR_INVALID_PARAMETER); - return RC_INITERROR; + goto out; } else flags |= OPT_EXCLUDELIST; } else flags |= OPT_EMPTYDIR | OPT_RECURSIVE; break; /* D can be /D or /D: */ - case 'D': if ((argvW[0][2])==':' && isdigit(argvW[0][3])) { + case 'D': if (word[2]==':' && isdigit(word[3])) { SYSTEMTIME st; - WCHAR *pos = &argvW[0][3]; + WCHAR *pos = &word[3]; BOOL isError = FALSE; memset(&st, 0x00, sizeof(st)); @@ -285,6 +343,7 @@ static int XCOPY_ParseCommandLine(int argc, WCHAR **argvW, /* Parse the arg : Day */ if (!isError) { st.wYear = _wtol(pos); + while (*pos && isdigit(*pos)) pos++; if (st.wYear < 100) st.wYear+=2000; } @@ -305,24 +364,25 @@ static int XCOPY_ParseCommandLine(int argc, WCHAR **argvW, wine_dbgstr_w(datestring), wine_dbgstr_w(timestring)); } else { XCOPY_FailMessage(ERROR_INVALID_PARAMETER); - return RC_INITERROR; + goto out; } } else { flags |= OPT_DATENEWER; } break; - case '-': if (toupper(argvW[0][2])=='Y') + case '-': if (toupper(word[2])=='Y') flags &= ~OPT_NOPROMPT; break; case '?': XCOPY_wprintf(XCOPY_LoadMessage(STRING_HELP)); - return RC_HELP; + rc = RC_HELP; + goto out; default: - WINE_TRACE("Unhandled parameter '%s'\n", wine_dbgstr_w(*argvW)); - XCOPY_wprintf(XCOPY_LoadMessage(STRING_INVPARM), *argvW); - return RC_INITERROR; + WINE_TRACE("Unhandled parameter '%s'\n", wine_dbgstr_w(word)); + XCOPY_wprintf(XCOPY_LoadMessage(STRING_INVPARM), word); + goto out; } } - argvW++; + word = next; } /* Default the destination if not supplied */ @@ -330,7 +390,11 @@ static int XCOPY_ParseCommandLine(int argc, WCHAR **argvW, lstrcpyW(supplieddestination, wchr_dot); *pflags = flags; - return RC_OK; + rc = RC_OK; + + out: + free(cmdline); + return rc; }
1
0
0
0
Martin Wilck : xcopy: Move command line parsing code into separate function .
by Alexandre Julliard
27 Oct '10
27 Oct '10
Module: wine Branch: master Commit: b62c0d23f7d5b1bbcab40768be7516975ae489ff URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b62c0d23f7d5b1bbcab40768b…
Author: Martin Wilck <Martin.Wilck(a)particle-dynamics.de> Date: Wed Oct 27 01:48:50 2010 +0200 xcopy: Move command line parsing code into separate function. --- programs/xcopy/xcopy.c | 153 +++++++++++++++++++++++++++-------------------- programs/xcopy/xcopy.h | 1 + 2 files changed, 89 insertions(+), 65 deletions(-) diff --git a/programs/xcopy/xcopy.c b/programs/xcopy/xcopy.c index 4572374..ed736db 100644 --- a/programs/xcopy/xcopy.c +++ b/programs/xcopy/xcopy.c @@ -49,6 +49,9 @@ WINE_DEFAULT_DEBUG_CHANNEL(xcopy); /* Prototypes */ +static int XCOPY_ParseCommandLine(int argc, WCHAR **argvW, + WCHAR *suppliedsource, + WCHAR *supplieddestination, DWORD *flags); static int XCOPY_ProcessSourceParm(WCHAR *suppliedsource, WCHAR *stem, WCHAR *spec, DWORD flags); static int XCOPY_ProcessDestParm(WCHAR *supplieddestination, WCHAR *stem, @@ -108,17 +111,6 @@ int wmain (int argc, WCHAR *argvW[]) const WCHAR PROMPTSTR1[] = {'/', 'Y', 0}; const WCHAR PROMPTSTR2[] = {'/', 'y', 0}; const WCHAR COPYCMD[] = {'C', 'O', 'P', 'Y', 'C', 'M', 'D', 0}; - const WCHAR EXCLUDE[] = {'E', 'X', 'C', 'L', 'U', 'D', 'E', ':', 0}; - - /* - * Parse the command line - */ - - /* Confirm at least one parameter */ - if (argc < 2) { - XCOPY_wprintf(XCOPY_LoadMessage(STRING_INVPARMS)); - return RC_INITERROR; - } /* Preinitialize flags based on COPYCMD */ if (GetEnvironmentVariableW(COPYCMD, copyCmd, MAXSTRING)) { @@ -135,6 +127,88 @@ int wmain (int argc, WCHAR *argvW[]) lose */ flags |= OPT_COPYHIDSYS; + /* + * Parse the command line + */ + if ((rc = XCOPY_ParseCommandLine(argc, argvW, suppliedsource, + supplieddestination, &flags)) != RC_OK) { + if (rc == RC_HELP) + return RC_OK; + else + return rc; + } + + /* Trace out the supplied information */ + WINE_TRACE("Supplied parameters:\n"); + WINE_TRACE("Source : '%s'\n", wine_dbgstr_w(suppliedsource)); + WINE_TRACE("Destination : '%s'\n", wine_dbgstr_w(supplieddestination)); + + /* Extract required information from source specification */ + rc = XCOPY_ProcessSourceParm(suppliedsource, sourcestem, sourcespec, flags); + if (rc != RC_OK) return rc; + + /* Extract required information from destination specification */ + rc = XCOPY_ProcessDestParm(supplieddestination, destinationstem, + destinationspec, sourcespec, flags); + if (rc != RC_OK) return rc; + + /* Trace out the resulting information */ + WINE_TRACE("Resolved parameters:\n"); + WINE_TRACE("Source Stem : '%s'\n", wine_dbgstr_w(sourcestem)); + WINE_TRACE("Source Spec : '%s'\n", wine_dbgstr_w(sourcespec)); + WINE_TRACE("Dest Stem : '%s'\n", wine_dbgstr_w(destinationstem)); + WINE_TRACE("Dest Spec : '%s'\n", wine_dbgstr_w(destinationspec)); + + /* Pause if necessary */ + if (flags & OPT_PAUSE) { + DWORD count; + char pausestr[10]; + + XCOPY_wprintf(XCOPY_LoadMessage(STRING_PAUSE)); + ReadFile (GetStdHandle(STD_INPUT_HANDLE), pausestr, sizeof(pausestr), + &count, NULL); + } + + /* Now do the hard work... */ + rc = XCOPY_DoCopy(sourcestem, sourcespec, + destinationstem, destinationspec, + flags); + + /* Clear up exclude list allocated memory */ + while (excludeList) { + EXCLUDELIST *pos = excludeList; + excludeList = excludeList -> next; + HeapFree(GetProcessHeap(), 0, pos->name); + HeapFree(GetProcessHeap(), 0, pos); + } + + /* Finished - print trailer and exit */ + if (flags & OPT_SIMULATE) { + XCOPY_wprintf(XCOPY_LoadMessage(STRING_SIMCOPY), filesCopied); + } else if (!(flags & OPT_NOCOPY)) { + XCOPY_wprintf(XCOPY_LoadMessage(STRING_COPY), filesCopied); + } + if (rc == RC_OK && filesCopied == 0) rc = RC_NOFILES; + return rc; + +} + +/* ========================================================================= + XCOPY_ParseCommandLine - Parses the command line + ========================================================================= */ +static int XCOPY_ParseCommandLine(int argc, WCHAR **argvW, + WCHAR *suppliedsource, + WCHAR *supplieddestination, DWORD *pflags) +{ + const WCHAR EXCLUDE[] = {'E', 'X', 'C', 'L', 'U', 'D', 'E', ':', 0}; + DWORD flags = *pflags; + + /* Confirm at least one parameter */ + if (argc < 2) { + XCOPY_wprintf(XCOPY_LoadMessage(STRING_INVPARMS)); + return RC_INITERROR; + } + /* Skip first arg, which is the program name */ argvW++; @@ -241,7 +315,7 @@ int wmain (int argc, WCHAR *argvW[]) case '-': if (toupper(argvW[0][2])=='Y') flags &= ~OPT_NOPROMPT; break; case '?': XCOPY_wprintf(XCOPY_LoadMessage(STRING_HELP)); - return RC_OK; + return RC_HELP; default: WINE_TRACE("Unhandled parameter '%s'\n", wine_dbgstr_w(*argvW)); XCOPY_wprintf(XCOPY_LoadMessage(STRING_INVPARM), *argvW); @@ -255,59 +329,8 @@ int wmain (int argc, WCHAR *argvW[]) if (supplieddestination[0] == 0x00) lstrcpyW(supplieddestination, wchr_dot); - /* Trace out the supplied information */ - WINE_TRACE("Supplied parameters:\n"); - WINE_TRACE("Source : '%s'\n", wine_dbgstr_w(suppliedsource)); - WINE_TRACE("Destination : '%s'\n", wine_dbgstr_w(supplieddestination)); - - /* Extract required information from source specification */ - rc = XCOPY_ProcessSourceParm(suppliedsource, sourcestem, sourcespec, flags); - if (rc != RC_OK) return rc; - - /* Extract required information from destination specification */ - rc = XCOPY_ProcessDestParm(supplieddestination, destinationstem, - destinationspec, sourcespec, flags); - if (rc != RC_OK) return rc; - - /* Trace out the resulting information */ - WINE_TRACE("Resolved parameters:\n"); - WINE_TRACE("Source Stem : '%s'\n", wine_dbgstr_w(sourcestem)); - WINE_TRACE("Source Spec : '%s'\n", wine_dbgstr_w(sourcespec)); - WINE_TRACE("Dest Stem : '%s'\n", wine_dbgstr_w(destinationstem)); - WINE_TRACE("Dest Spec : '%s'\n", wine_dbgstr_w(destinationspec)); - - /* Pause if necessary */ - if (flags & OPT_PAUSE) { - DWORD count; - char pausestr[10]; - - XCOPY_wprintf(XCOPY_LoadMessage(STRING_PAUSE)); - ReadFile (GetStdHandle(STD_INPUT_HANDLE), pausestr, sizeof(pausestr), - &count, NULL); - } - - /* Now do the hard work... */ - rc = XCOPY_DoCopy(sourcestem, sourcespec, - destinationstem, destinationspec, - flags); - - /* Clear up exclude list allocated memory */ - while (excludeList) { - EXCLUDELIST *pos = excludeList; - excludeList = excludeList -> next; - HeapFree(GetProcessHeap(), 0, pos->name); - HeapFree(GetProcessHeap(), 0, pos); - } - - /* Finished - print trailer and exit */ - if (flags & OPT_SIMULATE) { - XCOPY_wprintf(XCOPY_LoadMessage(STRING_SIMCOPY), filesCopied); - } else if (!(flags & OPT_NOCOPY)) { - XCOPY_wprintf(XCOPY_LoadMessage(STRING_COPY), filesCopied); - } - if (rc == RC_OK && filesCopied == 0) rc = RC_NOFILES; - return rc; - + *pflags = flags; + return RC_OK; } diff --git a/programs/xcopy/xcopy.h b/programs/xcopy/xcopy.h index 1c93395..3e9644e 100644 --- a/programs/xcopy/xcopy.h +++ b/programs/xcopy/xcopy.h @@ -26,6 +26,7 @@ #define RC_CTRLC 2 #define RC_INITERROR 4 #define RC_WRITEERROR 5 +#define RC_HELP 6 #define OPT_ASSUMEDIR 0x00000001 #define OPT_RECURSIVE 0x00000002
1
0
0
0
David Hedberg : shlwapi: Add room for null terminator in local SHGetShellKey buffer.
by Alexandre Julliard
27 Oct '10
27 Oct '10
Module: wine Branch: master Commit: 8a4c60335ec41ae411c8193de3acf43ce0e89551 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8a4c60335ec41ae411c8193de…
Author: David Hedberg <dhedberg(a)codeweavers.com> Date: Wed Oct 27 03:13:11 2010 +0200 shlwapi: Add room for null terminator in local SHGetShellKey buffer. --- dlls/shlwapi/ordinal.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/shlwapi/ordinal.c b/dlls/shlwapi/ordinal.c index b04fd9e..3c00b8e 100644 --- a/dlls/shlwapi/ordinal.c +++ b/dlls/shlwapi/ordinal.c @@ -4514,7 +4514,7 @@ HKEY WINAPI SHGetShellKey(DWORD flags, LPCWSTR sub_key, BOOL create) else size_user = 0; - path = HeapAlloc(GetProcessHeap(), 0, size_key+size_subkey+size_user); + path = HeapAlloc(GetProcessHeap(), 0, size_key+size_subkey+size_user+sizeof(WCHAR)); if(!path) { ERR("Out of memory\n"); return NULL;
1
0
0
0
Nikolay Sivov : msxml3: Output error message for fatal errors.
by Alexandre Julliard
27 Oct '10
27 Oct '10
Module: wine Branch: master Commit: 9a3bfce9c032715b86a1ccdac0bb4162bc0906da URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9a3bfce9c032715b86a1ccdac…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Oct 27 01:25:26 2010 +0400 msxml3: Output error message for fatal errors. --- dlls/msxml3/saxreader.c | 17 ++++++++++------- 1 files changed, 10 insertions(+), 7 deletions(-) diff --git a/dlls/msxml3/saxreader.c b/dlls/msxml3/saxreader.c index fbc10cf..a0c821e 100644 --- a/dlls/msxml3/saxreader.c +++ b/dlls/msxml3/saxreader.c @@ -1292,7 +1292,7 @@ static void libxmlFatalError(void *ctx, const char *msg, ...) { saxlocator *This = ctx; char message[1024]; - WCHAR *wszError; + WCHAR *error; DWORD len; va_list args; @@ -1311,22 +1311,25 @@ static void libxmlFatalError(void *ctx, const char *msg, ...) va_end(args); len = MultiByteToWideChar(CP_UNIXCP, 0, message, -1, NULL, 0); - wszError = heap_alloc(sizeof(WCHAR)*len); - if(wszError) - MultiByteToWideChar(CP_UNIXCP, 0, message, -1, wszError, len); + error = heap_alloc(sizeof(WCHAR)*len); + if(error) + { + MultiByteToWideChar(CP_UNIXCP, 0, message, -1, error, len); + TRACE("fatal error for %p: %s\n", This, debugstr_w(error)); + } if(This->vbInterface) { - BSTR bstrError = SysAllocString(wszError); + BSTR bstrError = SysAllocString(error); IVBSAXErrorHandler_fatalError(This->saxreader->vberrorHandler, (IVBSAXLocator*)&This->lpVBSAXLocatorVtbl, &bstrError, E_FAIL); SysFreeString(bstrError); } else ISAXErrorHandler_fatalError(This->saxreader->errorHandler, - (ISAXLocator*)&This->lpSAXLocatorVtbl, wszError, E_FAIL); + (ISAXLocator*)&This->lpSAXLocatorVtbl, error, E_FAIL); - heap_free(wszError); + heap_free(error); xmlStopParser(This->pParserCtxt); This->ret = E_FAIL;
1
0
0
0
Nikolay Sivov : msxml3: Fix a leak of error message BSTR.
by Alexandre Julliard
27 Oct '10
27 Oct '10
Module: wine Branch: master Commit: bd7787c12a3df1db44fc899bb78e4d86b40daead URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bd7787c12a3df1db44fc899bb…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Oct 27 01:15:38 2010 +0400 msxml3: Fix a leak of error message BSTR. --- dlls/msxml3/saxreader.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/dlls/msxml3/saxreader.c b/dlls/msxml3/saxreader.c index 815d062..fbc10cf 100644 --- a/dlls/msxml3/saxreader.c +++ b/dlls/msxml3/saxreader.c @@ -218,6 +218,7 @@ static void format_error_message_from_id(saxlocator *This, HRESULT hr) BSTR bstrMsg = SysAllocString(msg); IVBSAXErrorHandler_fatalError(This->saxreader->vberrorHandler, (IVBSAXLocator*)&This->lpVBSAXLocatorVtbl, &bstrMsg, hr); + SysFreeString(bstrMsg); } else ISAXErrorHandler_fatalError(This->saxreader->errorHandler, @@ -1319,6 +1320,7 @@ static void libxmlFatalError(void *ctx, const char *msg, ...) BSTR bstrError = SysAllocString(wszError); IVBSAXErrorHandler_fatalError(This->saxreader->vberrorHandler, (IVBSAXLocator*)&This->lpVBSAXLocatorVtbl, &bstrError, E_FAIL); + SysFreeString(bstrError); } else ISAXErrorHandler_fatalError(This->saxreader->errorHandler,
1
0
0
0
Nikolay Sivov : msxml3: Make line endings fix helper faster using BSTR stored length.
by Alexandre Julliard
27 Oct '10
27 Oct '10
Module: wine Branch: master Commit: ecfc3f153cd146505695267295acc0ab6c4b84c7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ecfc3f153cd14650569526729…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Oct 27 01:10:53 2010 +0400 msxml3: Make line endings fix helper faster using BSTR stored length. --- dlls/msxml3/node.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/msxml3/node.c b/dlls/msxml3/node.c index 3e8665f..0d12209 100644 --- a/dlls/msxml3/node.c +++ b/dlls/msxml3/node.c @@ -903,7 +903,7 @@ static BSTR EnsureCorrectEOL(BSTR sInput) int nLen; int i; - nLen = lstrlenW(sInput); + nLen = SysStringLen(sInput); /* Count line endings */ for(i=0; i < nLen; i++) { @@ -935,7 +935,7 @@ static BSTR EnsureCorrectEOL(BSTR sInput) sNew = sInput; } - TRACE("len %d\n", lstrlenW(sNew)); + TRACE("len %d\n", SysStringLen(sNew)); return sNew; }
1
0
0
0
Piotr Caban : urlmon: Improved url canonicalize when Uri_CREATE_FILE_USE_DOS_PATH is specified.
by Alexandre Julliard
27 Oct '10
27 Oct '10
Module: wine Branch: master Commit: 8a6210d28fcea9b6b16a5b35b679dcf0623ea3f2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8a6210d28fcea9b6b16a5b35b…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Tue Oct 26 23:27:59 2010 +0200 urlmon: Improved url canonicalize when Uri_CREATE_FILE_USE_DOS_PATH is specified. --- dlls/urlmon/tests/uri.c | 29 +++++++++++++++++++++++++++++ dlls/urlmon/uri.c | 6 ++++-- 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/dlls/urlmon/tests/uri.c b/dlls/urlmon/tests/uri.c index 8045a27..93493a8 100644 --- a/dlls/urlmon/tests/uri.c +++ b/dlls/urlmon/tests/uri.c @@ -3744,6 +3744,35 @@ static const uri_properties uri_tests[] = { {URLZONE_INVALID,E_NOTIMPL,FALSE} } }, + /* Allow more characters when Uri_CREATE_FILE_USE_DOS_PATH is specified */ + { "file:///c:/dir\%%61%20%5Fname/file%2A.html", Uri_CREATE_FILE_USE_DOS_PATH, S_OK, FALSE, + Uri_HAS_ABSOLUTE_URI|Uri_HAS_DISPLAY_URI|Uri_HAS_EXTENSION|Uri_HAS_PATH + |Uri_HAS_PATH_AND_QUERY|Uri_HAS_RAW_URI|Uri_HAS_SCHEME_NAME|Uri_HAS_HOST_TYPE + |Uri_HAS_SCHEME, FALSE, + { + {"file://c:\\dir\%a _name\\file*.html",S_OK,FALSE}, + {"",S_FALSE,FALSE}, + {"file://c:\\dir\%a _name\\file*.html",S_OK,FALSE}, + {"",S_FALSE,FALSE}, + {".html",S_OK,FALSE}, + {"",S_FALSE,FALSE}, + {"",S_FALSE,FALSE}, + {"",S_FALSE,FALSE}, + {"c:\\dir\%a _name\\file*.html",S_OK,FALSE}, + {"c:\\dir\%a _name\\file*.html",S_OK,FALSE}, + {"",S_FALSE,FALSE}, + {"file:///c:/dir\%%61%20%5Fname/file%2A.html",S_OK,FALSE}, + {"file",S_OK,FALSE}, + {"",S_FALSE,FALSE}, + {"",S_FALSE,FALSE} + }, + { + {0,S_OK,FALSE}, + {0,S_FALSE,FALSE}, + {URL_SCHEME_FILE,S_OK,FALSE}, + {URLZONE_INVALID,E_NOTIMPL,FALSE} + } + }, { "file://c|/dir\\index.html", Uri_CREATE_FILE_USE_DOS_PATH, S_OK, FALSE, Uri_HAS_ABSOLUTE_URI|Uri_HAS_DISPLAY_URI|Uri_HAS_EXTENSION|Uri_HAS_PATH |Uri_HAS_PATH_AND_QUERY|Uri_HAS_RAW_URI|Uri_HAS_SCHEME_NAME|Uri_HAS_HOST_TYPE diff --git a/dlls/urlmon/uri.c b/dlls/urlmon/uri.c index 9f78e28..77d14cd 100644 --- a/dlls/urlmon/uri.c +++ b/dlls/urlmon/uri.c @@ -2870,6 +2870,7 @@ static BOOL canonicalize_authority(const parse_data *data, Uri *uri, DWORD flags * NOTES: * file://c:/test%20test -> file:///c:/test%2520test * file://c:/test%3Etest -> file:///c:/test%253Etest + * if Uri_CREATE_FILE_USE_DOS_PATH is not set: * file:///c:/test%20test -> file:///c:/test%20test * file:///c:/test%test -> file:///c:/test%25test */ @@ -2931,7 +2932,7 @@ static BOOL canonicalize_path_hierarchical(const parse_data *data, Uri *uri, WCHAR val; /* Check if the % represents a valid encoded char, or if it needs encoded. */ - BOOL force_encode = !check_pct_encoded(&tmp) && is_file; + BOOL force_encode = !check_pct_encoded(&tmp) && is_file && !(flags&Uri_CREATE_FILE_USE_DOS_PATH); val = decode_pct_val(ptr); if(force_encode || escape_pct) { @@ -2940,7 +2941,8 @@ static BOOL canonicalize_path_hierarchical(const parse_data *data, Uri *uri, pct_encode_val(*ptr, uri->canon_uri+uri->canon_len); uri->canon_len += 3; } else if((is_unreserved(val) && known_scheme) || - (is_file && (is_unreserved(val) || is_reserved(val)))) { + (is_file && (is_unreserved(val) || is_reserved(val) || + (val && flags&Uri_CREATE_FILE_USE_DOS_PATH && !is_forbidden_dos_path_char(val))))) { if(!computeOnly) uri->canon_uri[uri->canon_len] = val; ++uri->canon_len;
1
0
0
0
Louis Lenders : rpcrt4: Add stub for NdrMesTypeEncode2.
by Alexandre Julliard
27 Oct '10
27 Oct '10
Module: wine Branch: master Commit: 92f41c56f7397f1763d90bee41e6ec1c04804595 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=92f41c56f7397f1763d90bee4…
Author: Louis Lenders <xerox_xerox2000(a)yahoo.co.uk> Date: Tue Oct 26 22:56:11 2010 +0200 rpcrt4: Add stub for NdrMesTypeEncode2. --- dlls/rpcrt4/ndr_es.c | 6 ++++++ dlls/rpcrt4/rpcrt4.spec | 2 +- 2 files changed, 7 insertions(+), 1 deletions(-) diff --git a/dlls/rpcrt4/ndr_es.c b/dlls/rpcrt4/ndr_es.c index 9a56939..b336c21 100644 --- a/dlls/rpcrt4/ndr_es.c +++ b/dlls/rpcrt4/ndr_es.c @@ -445,6 +445,12 @@ void RPC_ENTRY NdrMesTypeDecode2(handle_t Handle, const MIDL_TYPE_PICKLING_INFO FIXME("(%p, %p, %p, %p, %p)\n", Handle, pPicklingInfo, pStubDesc, pFormatString, pObject); } +void RPC_ENTRY NdrMesTypeEncode2(handle_t Handle, const MIDL_TYPE_PICKLING_INFO *pPicklingInfo, + const MIDL_STUB_DESC *pStubDesc, PFORMAT_STRING pFormatString, const void *pObject) +{ + FIXME("(%p, %p, %p, %p, %p)\n", Handle, pPicklingInfo, pStubDesc, pFormatString, pObject); +} + void RPC_ENTRY NdrMesTypeFree2(handle_t Handle, const MIDL_TYPE_PICKLING_INFO *pPicklingInfo, const MIDL_STUB_DESC *pStubDesc, PFORMAT_STRING pFormatString, void *pObject) { diff --git a/dlls/rpcrt4/rpcrt4.spec b/dlls/rpcrt4/rpcrt4.spec index 477b3f0..e0c6c11 100644 --- a/dlls/rpcrt4/rpcrt4.spec +++ b/dlls/rpcrt4/rpcrt4.spec @@ -227,7 +227,7 @@ @ stub NdrMesTypeAlignSize @ stdcall NdrMesTypeDecode2(ptr ptr ptr ptr ptr) @ stub NdrMesTypeDecode -@ stub NdrMesTypeEncode2 +@ stdcall NdrMesTypeEncode2(ptr ptr ptr ptr ptr) @ stub NdrMesTypeEncode @ stdcall NdrMesTypeFree2(ptr ptr ptr ptr ptr) @ stdcall NdrNonConformantStringBufferSize(ptr ptr ptr)
1
0
0
0
Louis Lenders : winscard: Add stub for SCardReleaseStartedEvent.
by Alexandre Julliard
27 Oct '10
27 Oct '10
Module: wine Branch: master Commit: 85b886ecfbd659495cd9bca32f19420bb0e466d3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=85b886ecfbd659495cd9bca32…
Author: Louis Lenders <xerox_xerox2000(a)yahoo.co.uk> Date: Tue Oct 26 23:12:20 2010 +0200 winscard: Add stub for SCardReleaseStartedEvent. --- dlls/winscard/winscard.c | 5 +++++ dlls/winscard/winscard.spec | 2 +- include/winscard.h | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/dlls/winscard/winscard.c b/dlls/winscard/winscard.c index bbf1d72..412299c 100644 --- a/dlls/winscard/winscard.c +++ b/dlls/winscard/winscard.c @@ -115,3 +115,8 @@ LONG WINAPI SCardReleaseContext(SCARDCONTEXT context) SetLastError(ERROR_CALL_NOT_IMPLEMENTED); return SCARD_F_INTERNAL_ERROR; } + +void WINAPI SCardReleaseStartedEvent(void) +{ + FIXME("stub\n"); +} diff --git a/dlls/winscard/winscard.spec b/dlls/winscard/winscard.spec index 116cb04..1bd6ef1 100644 --- a/dlls/winscard/winscard.spec +++ b/dlls/winscard/winscard.spec @@ -48,7 +48,7 @@ @ stub SCardLocateCardsW @ stub SCardReconnect @ stdcall SCardReleaseContext(long) -@ stub SCardReleaseStartedEvent +@ stdcall SCardReleaseStartedEvent() @ stub SCardRemoveReaderFromGroupA @ stub SCardRemoveReaderFromGroupW @ stub SCardSetAttrib diff --git a/include/winscard.h b/include/winscard.h index 825e26d..8da8e7f 100644 --- a/include/winscard.h +++ b/include/winscard.h @@ -129,7 +129,7 @@ LONG WINAPI SCardLocateCardsByATRW(SCARDCONTEXT,LPSCARD_ATRMASK,DWORD,LPS #define SCardLocateCardsByATR WINELIB_NAME_AW(SCardLocateCardsByATR) LONG WINAPI SCardReconnect(SCARDHANDLE,DWORD,DWORD,DWORD,LPDWORD); LONG WINAPI SCardReleaseContext(SCARDCONTEXT); -void WINAPI SCardReleaseStartedEvent(HANDLE); +void WINAPI SCardReleaseStartedEvent(void); LONG WINAPI SCardRemoveReaderFromGroupA(SCARDCONTEXT,LPCSTR,LPCSTR); LONG WINAPI SCardRemoveReaderFromGroupW(SCARDCONTEXT,LPCWSTR,LPCWSTR); #define SCardRemoveReaderFromGroup WINELIB_NAME_AW(SCardRemoveReaderFromGroup)
1
0
0
0
← Newer
1
...
7
8
9
10
11
12
13
...
118
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
Results per page:
10
25
50
100
200