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
August 2009
----- 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
4 participants
1042 discussions
Start a n
N
ew thread
Jacek Caban : mshtml: Moved TASK_PARSECOMPLETE to nsIMutationObserver:: EndLoad.
by Alexandre Julliard
12 Aug '09
12 Aug '09
Module: wine Branch: master Commit: dbe0de733796ac6d31b2b1d78697093544052716 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=dbe0de733796ac6d31b2b1d78…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Aug 11 19:14:17 2009 +0200 mshtml: Moved TASK_PARSECOMPLETE to nsIMutationObserver::EndLoad. --- dlls/mshtml/mutation.c | 16 ++++++++++++++++ dlls/mshtml/navigate.c | 17 ----------------- dlls/mshtml/nsevents.c | 13 ------------- 3 files changed, 16 insertions(+), 30 deletions(-) diff --git a/dlls/mshtml/mutation.c b/dlls/mshtml/mutation.c index 6060a8d..f161de4 100644 --- a/dlls/mshtml/mutation.c +++ b/dlls/mshtml/mutation.c @@ -461,6 +461,22 @@ static void NSAPI nsDocumentObserver_BeginLoad(nsIDocumentObserver *iface, nsIDo static void NSAPI nsDocumentObserver_EndLoad(nsIDocumentObserver *iface, nsIDocument *aDocument) { + NSContainer *This = NSDOCOBS_THIS(iface); + task_t *task; + + TRACE("\n"); + + task = heap_alloc(sizeof(task_t)); + + task->doc = This->doc; + task->task_id = TASK_PARSECOMPLETE; + task->next = NULL; + + /* + * This should be done in the worker thread that parses HTML, + * but we don't have such thread (Gecko parses HTML for us). + */ + push_task(task); } static void NSAPI nsDocumentObserver_ContentStatesChanged(nsIDocumentObserver *iface, nsIDocument *aDocument, diff --git a/dlls/mshtml/navigate.c b/dlls/mshtml/navigate.c index eee0b34..fb743f4 100644 --- a/dlls/mshtml/navigate.c +++ b/dlls/mshtml/navigate.c @@ -978,23 +978,6 @@ static HRESULT nsChannelBSC_stop_binding(BSCallback *bsc, HRESULT result) } } - if(FAILED(result)) - return S_OK; - - if(This->bsc.doc && This->bsc.doc->bscallback == This && !This->bsc.doc->nscontainer) { - task_t *task = heap_alloc(sizeof(task_t)); - - task->doc = This->bsc.doc; - task->task_id = TASK_PARSECOMPLETE; - task->next = NULL; - - /* - * This should be done in the worker thread that parses HTML, - * but we don't have such thread. - */ - push_task(task); - } - return S_OK; } diff --git a/dlls/mshtml/nsevents.c b/dlls/mshtml/nsevents.c index 1933c57..0ba11d2 100644 --- a/dlls/mshtml/nsevents.c +++ b/dlls/mshtml/nsevents.c @@ -131,7 +131,6 @@ static nsresult NSAPI handle_load(nsIDOMEventListener *iface, nsIDOMEvent *event { NSContainer *This = NSEVENTLIST_THIS(iface)->This; nsIDOMHTMLElement *nsbody = NULL; - task_t *task; TRACE("(%p)\n", This); @@ -149,18 +148,6 @@ static nsresult NSAPI handle_load(nsIDOMEventListener *iface, nsIDOMEvent *event if(This->doc->usermode == EDITMODE) handle_edit_load(This->doc); - task = heap_alloc(sizeof(task_t)); - - task->doc = This->doc; - task->task_id = TASK_PARSECOMPLETE; - task->next = NULL; - - /* - * This should be done in the worker thread that parses HTML, - * but we don't have such thread (Gecko parses HTML for us). - */ - push_task(task); - if(!This->doc->nsdoc) { ERR("NULL nsdoc\n"); return NS_ERROR_FAILURE;
1
0
0
0
Paul Vriens : transl: Write more information to the lang and summary files.
by Alexandre Julliard
12 Aug '09
12 Aug '09
Module: tools Branch: master Commit: 7e64d9bf346771fd0aefb5e657beeb697f71061a URL:
http://source.winehq.org/git/tools.git/?a=commit;h=7e64d9bf346771fd0aefb5e6…
Author: Paul Vriens <Paul.Vriens.Wine(a)gmail.com> Date: Tue Aug 11 10:30:01 2009 +0200 transl: Write more information to the lang and summary files. --- transl/php/lang.php | 2 +- transl/scripts/parse_resfiles.php | 25 +++++++++++++++++++++---- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/transl/php/lang.php b/transl/php/lang.php index 304783d..91aee9d 100644 --- a/transl/php/lang.php +++ b/transl/php/lang.php @@ -19,7 +19,7 @@ function parse_file($lang) $curr_file = ""; while ($line = fgets($file, 4096)) { - if (preg_match("/FILE ([A-Z]+) (.*) ([0-9]+) ([0-9]+) ([0-9]+)/", $line, $m)) + if (preg_match("/FILE ([A-Z]+) (.*) ([0-9]+) ([0-9]+) ([0-9]+) ([0-9]+) ([0-9]+) ([0-9]+)/", $line, $m)) { $curr_file = $m[2]; if ($m[1] == "NONE") diff --git a/transl/scripts/parse_resfiles.php b/transl/scripts/parse_resfiles.php index b1d8b82..41ed364 100644 --- a/transl/scripts/parse_resfiles.php +++ b/transl/scripts/parse_resfiles.php @@ -285,7 +285,7 @@ foreach (array_keys($checks) as $dir) if (!isset($file_langs[$lang]) && !isset($file_langs[$basic_lang])) { $langout = fopen("$workdir/$lang", "a+"); - fwrite($langout, "FILE NONE $dir 0 $mastercount 0\n"); + fwrite($langout, "FILE NONE $dir 0 $mastercount 0 0 0 0\n"); fclose($langout); continue; } @@ -293,7 +293,9 @@ foreach (array_keys($checks) as $dir) $translated = 0; $missing = 0; $errors = 0; + $total_errors = 0; $warnings = 0; + $total_warnings = 0; $errors_rl = array(); $missing_rl = array(); @@ -328,6 +330,9 @@ foreach (array_keys($checks) as $dir) ": Translation inherited from @LANG($basic_lang)"; $translated++; } + + if ($res_warnings) + $warnings++; } } else @@ -347,11 +352,17 @@ foreach (array_keys($checks) as $dir) ": Resource translated"; $translated++; } + + if ($res_warnings) + $warnings++; } + + $total_errors += $res_errors; + $total_warnings += $res_warnings; } $langout = fopen("$workdir/$lang", "a+"); - fwrite($langout, "FILE STAT $dir $translated $missing $errors\n"); + fwrite($langout, "FILE STAT $dir $translated $missing $errors $total_errors $warnings $total_warnings\n"); foreach ($errors_rl as $msg) fwrite($langout, "$msg\n"); foreach ($missing_rl as $msg) @@ -369,19 +380,25 @@ foreach ($languages as $lang) $transl = 0; $missing = 0; $errors = 0; + $total_errors = 0; + $warnings = 0; + $total_warnings = 0; $file = fopen("$workdir/$lang", "r"); while ($line = fgets($file, 4096)) { - if (preg_match("/^FILE [A-Z]+ .* ([0-9]+) ([0-9]+) ([0-9]+)$/", $line, $m)) + if (preg_match("/^FILE [A-Z]+ .* ([0-9]+) ([0-9]+) ([0-9]+) ([0-9]+) ([0-9]+) ([0-9]+)$/", $line, $m)) { $transl += $m[1]; $missing += $m[2]; $errors += $m[3]; + $total_errors += $m[4]; + $warnings += $m[5]; + $total_warnings += $m[6]; } } fclose($file); $sum = $transl + $missing + $errors; - fwrite($summary, "LANG $lang $sum $transl $missing $errors\n"); + fwrite($summary, "LANG $lang $sum $transl $missing $errors $total_errors $warnings $total_warnings\n"); } fclose($summary); ?>
1
0
0
0
Paul Vriens : transl: Port checkmakefile perl script to a php script.
by Alexandre Julliard
12 Aug '09
12 Aug '09
Module: tools Branch: master Commit: 7ac7fab5e3de504324b0b2c26616415f1b38b3ae URL:
http://source.winehq.org/git/tools.git/?a=commit;h=7ac7fab5e3de504324b0b2c2…
Author: Paul Vriens <Paul.Vriens.Wine(a)gmail.com> Date: Tue Aug 11 08:19:13 2009 +0200 transl: Port checkmakefile perl script to a php script. --- transl/php/lib_res.php | 92 ++++++++ transl/scripts/Master.sh | 2 +- transl/scripts/checkmakefile.pl | 448 ------------------------------------- transl/scripts/parse_resfiles.php | 387 ++++++++++++++++++++++++++++++++ winetest/make-winetest | 2 +- 5 files changed, 481 insertions(+), 450 deletions(-) Diff:
http://source.winehq.org/git/tools.git/?a=commitdiff;h=7ac7fab5e3de504324b0…
1
0
0
0
Paul Vriens : transl: Add the ability to retrieve warnings or errors.
by Alexandre Julliard
12 Aug '09
12 Aug '09
Module: tools Branch: master Commit: 198a926677d76890fdd88d02bf1237eda3dffccf URL:
http://source.winehq.org/git/tools.git/?a=commit;h=198a926677d76890fdd88d02…
Author: Paul Vriens <Paul.Vriens.Wine(a)gmail.com> Date: Mon Aug 10 17:23:46 2009 +0200 transl: Add the ability to retrieve warnings or errors. --- transl/php/lib_res.php | 70 +++++++++++++++++++++++++++++++---------------- 1 files changed, 46 insertions(+), 24 deletions(-) diff --git a/transl/php/lib_res.php b/transl/php/lib_res.php index 21ba98d..ddc65ab 100644 --- a/transl/php/lib_res.php +++ b/transl/php/lib_res.php @@ -174,8 +174,16 @@ function dump_resource_row($id, &$resource, &$master, $method_name, $diff_method { $extra = ""; if ($master && $diff_method_name) - if ($resource->$diff_method_name($master, $lparam, $master_lparam)) - $extra = " class=\"diff\""; + if ($master_lparam == NULL) + { + if ($resource->$diff_method_name($master, $lparam, TRUE)) + $extra = " class=\"diff\""; + } + else + { + if ($resource->$diff_method_name($master, $lparam, $master_lparam, TRUE)) + $extra = " class=\"diff\""; + } if ($master_lparam == NULL) $master_lparam = $lparam; @@ -430,13 +438,18 @@ class StringTable extends Resource dump_unicode_or_empty($this->strings[$lparam]); } - function is_string_different(&$other, $lparam) + function is_string_different(&$other, $lparam, $pedantic = TRUE) { $uni_str = $this->strings[$lparam]; $other_uni_str = $other->strings[$lparam]; - return ((!$other_uni_str && $uni_str) || - ($other_uni_str && !$uni_str) || - (($uni_str && $other_uni_str) && ($uni_str == $other_uni_str))); + + $generic = (!$other_uni_str && $uni_str) || ($other_uni_str && !$uni_str); + + if ($pedantic != TRUE) + return $generic; + + return $generic || + (($uni_str && $other_uni_str) && ($uni_str == $other_uni_str)); } function dump($master_res = NULL) @@ -506,13 +519,18 @@ class MessageTable extends Resource dump_unicode_or_empty($this->strings[$lparam]); } - function is_string_different(&$other, $lparam) + function is_string_different(&$other, $lparam, $pedantic = TRUE) { $uni_str = $this->strings[$lparam]; $other_uni_str = $other->strings[$lparam]; - return ((!$other_uni_str && $uni_str) || - ($other_uni_str && !$uni_str) || - (($uni_str && $other_uni_str) && ($uni_str == $other_uni_str))); + + $generic = (!$other_uni_str && $uni_str) || ($other_uni_str && !$uni_str); + + if ($pedantic != TRUE) + return $generic; + + return $generic || + (($uni_str && $other_uni_str) && ($uni_str == $other_uni_str)); } function dump($master_res = NULL) @@ -879,7 +897,7 @@ class DialogResource extends Resource } /* check if the row should be in red */ - function is_control_different(&$other, $lparam, $other_lparam) + function is_control_different(&$other, $lparam, $other_lparam, $pedantic = TRUE) { global $CONSTS; if (!$lparam[1] || !$other_lparam[1]) /* one item is missing */ @@ -892,18 +910,23 @@ class DialogResource extends Resource if (is_int($this_ctrl['className']) && $this_ctrl['className'] == 0x80 /* button */) $ignore_style = $CONSTS["BS_MULTILINE"]; - return ($this_ctrl['id'] != $other_ctrl['id']) || - (($this_ctrl['style'] | $ignore_style) != ($other_ctrl['style'] | $ignore_style)) || - ($this_ctrl['exStyle'] != $other_ctrl['exStyle']) || - (!is_equal_unicode_or_id($this_ctrl['className'], $other_ctrl['className'])) || - // We should have either id's or text in both - (is_int($this_ctrl['text']) ^ is_int($other_ctrl['text'])) || - // If it's an id they should be equal - (is_int($this_ctrl['text']) && - !is_equal_unicode_or_id($this_ctrl['text'], $other_ctrl['text'])) || - // If either text is empty they should be equal - (!is_int($this_ctrl['text']) && ((count($this_ctrl['text']) == 0) || (count($other_ctrl['text']) == 0)) && - !is_equal_unicode_or_id($this_ctrl['text'], $other_ctrl['text'])) || + $generic = ($this_ctrl['id'] != $other_ctrl['id']) || + (($this_ctrl['style'] | $ignore_style) != ($other_ctrl['style'] | $ignore_style)) || + ($this_ctrl['exStyle'] != $other_ctrl['exStyle']) || + (!is_equal_unicode_or_id($this_ctrl['className'], $other_ctrl['className'])) || + // We should have either id's or text in both + (is_int($this_ctrl['text']) ^ is_int($other_ctrl['text'])) || + // If it's an id they should be equal + (is_int($this_ctrl['text']) && + !is_equal_unicode_or_id($this_ctrl['text'], $other_ctrl['text'])) || + // If either text is empty they should be equal + (!is_int($this_ctrl['text']) && ((count($this_ctrl['text']) == 0) || (count($other_ctrl['text']) == 0)) && + !is_equal_unicode_or_id($this_ctrl['text'], $other_ctrl['text'])); + + if ($pedantic != TRUE) + return $generic; + + return $generic || // If we have text in both they should not be equal (!is_int($this_ctrl['text']) && ((count($this_ctrl['text']) != 0) && (count($other_ctrl['text']) != 0)) && is_equal_unicode_or_id($this_ctrl['text'], $other_ctrl['text'])); @@ -941,7 +964,6 @@ class DialogResource extends Resource $master_pos++; } } - } ?>
1
0
0
0
Paul Vriens : transl: Add the ability to pass a resource file.
by Alexandre Julliard
12 Aug '09
12 Aug '09
Module: tools Branch: master Commit: 208510e32d3c7de6a45ab79ef233bede3d6b1ac7 URL:
http://source.winehq.org/git/tools.git/?a=commit;h=208510e32d3c7de6a45ab79e…
Author: Paul Vriens <Paul.Vriens.Wine(a)gmail.com> Date: Mon Aug 10 17:14:57 2009 +0200 transl: Add the ability to pass a resource file. --- transl/php/lib.php | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/transl/php/lib.php b/transl/php/lib.php index 8d23291..0d69076 100644 --- a/transl/php/lib.php +++ b/transl/php/lib.php @@ -44,7 +44,7 @@ function res_enum($header, $f) } } -function enum_locale_names() +function enum_locale_names($kernel32_res = "") { include_once "lib_res.php"; include "config.php"; @@ -54,7 +54,11 @@ function enum_locale_names() { return; } - $res = new ResFile("$DATAROOT/res/dlls-kernel32.res"); + + if ($kernel32_res == "") + $kernel32_res = "$DATAROOT/res/dlls-kernel32.res"; + + $res = new ResFile($kernel32_res); $res->enumResources("res_enum"); ksort($LOCALE_NAMES); }
1
0
0
0
Paul Vriens : jscript: Add some Dutch translations.
by Alexandre Julliard
11 Aug '09
11 Aug '09
Module: wine Branch: master Commit: 862bd3c61ee75477b559292a2aad44cb77620dc5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=862bd3c61ee75477b559292a2…
Author: Paul Vriens <Paul.Vriens.Wine(a)gmail.com> Date: Tue Aug 11 12:08:09 2009 +0200 jscript: Add some Dutch translations. --- dlls/jscript/jscript_Nl.rc | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/dlls/jscript/jscript_Nl.rc b/dlls/jscript/jscript_Nl.rc index 71ba6b5..e3bd39f 100644 --- a/dlls/jscript/jscript_Nl.rc +++ b/dlls/jscript/jscript_Nl.rc @@ -30,6 +30,7 @@ STRINGTABLE DISCARDABLE IDS_SEMICOLON "';' verwacht" IDS_LBRACKET "'(' verwacht" IDS_RBRACKET "')' verwacht" + IDS_UNTERMINATED_STR "Onafgesloten tekenreeksconstante" IDS_NOT_FUNC "Functie verwacht" IDS_NOT_DATE "'[object]' is geen datum object" IDS_NOT_NUM "Getal verwacht"
1
0
0
0
Vincent Povirk : gdiplus: Remove an unnecessary picture reference in GdipSaveImageToFile.
by Alexandre Julliard
11 Aug '09
11 Aug '09
Module: wine Branch: master Commit: d76d00ea7eb32bffdcf41f977fe937af63ce98aa URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d76d00ea7eb32bffdcf41f977…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Tue Aug 11 09:55:23 2009 -0500 gdiplus: Remove an unnecessary picture reference in GdipSaveImageToFile. --- dlls/gdiplus/image.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/dlls/gdiplus/image.c b/dlls/gdiplus/image.c index f06eb02..2ed64f8 100644 --- a/dlls/gdiplus/image.c +++ b/dlls/gdiplus/image.c @@ -1290,9 +1290,6 @@ GpStatus WINGDIPAPI GdipSaveImageToFile(GpImage *image, GDIPCONST WCHAR* filenam if (!image || !filename|| !clsidEncoder) return InvalidParameter; - if (!(image->picture)) - return InvalidParameter; - stat = GdipCreateStreamOnFile(filename, GENERIC_WRITE, &stream); if (stat != Ok) return GenericError;
1
0
0
0
Piotr Caban : jscript: Added $ handling to String.replace.
by Alexandre Julliard
11 Aug '09
11 Aug '09
Module: wine Branch: master Commit: 59cf9c449ed04e7a8226ef66dec929a4021c2bd8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=59cf9c449ed04e7a8226ef66d…
Author: Piotr Caban <piotr.caban(a)gmail.com> Date: Tue Aug 11 14:06:52 2009 +0200 jscript: Added $ handling to String.replace. --- dlls/jscript/string.c | 69 +++++++++++++++++++++++++++++++++++++---- dlls/jscript/tests/regexp.js | 33 ++++++++++++++++++++ 2 files changed, 95 insertions(+), 7 deletions(-) diff --git a/dlls/jscript/string.c b/dlls/jscript/string.c index 6695bf8..4cf3783 100644 --- a/dlls/jscript/string.c +++ b/dlls/jscript/string.c @@ -802,7 +802,7 @@ static HRESULT String_replace(DispatchEx *dispex, LCID lcid, WORD flags, DISPPAR DWORD parens_cnt = 0, parens_size=0, rep_len=0, length; BSTR rep_str = NULL, match_str = NULL, ret_str, val_str = NULL; DispatchEx *rep_func = NULL, *regexp = NULL; - match_result_t *parens = NULL, match; + match_result_t *parens = NULL, match, **parens_ptr = &parens; strbuf_t ret = {NULL,0,0}; BOOL gcheck = FALSE; VARIANT *arg_var; @@ -884,12 +884,9 @@ static HRESULT String_replace(DispatchEx *dispex, LCID lcid, WORD flags, DISPPAR if(FAILED(hres)) break; - if(strchrW(rep_str, '$')) { - FIXME("unsupported $ in replace string\n"); - hres = E_NOTIMPL; - } - rep_len = SysStringLen(rep_str); + if(!strchrW(rep_str, '$')) + parens_ptr = NULL; } } @@ -900,7 +897,7 @@ static HRESULT String_replace(DispatchEx *dispex, LCID lcid, WORD flags, DISPPAR while(1) { if(regexp) { - hres = regexp_match_next(regexp, gcheck, str, length, &cp, rep_func ? &parens : NULL, + hres = regexp_match_next(regexp, gcheck, str, length, &cp, parens_ptr, &parens_size, &parens_cnt, &match); gcheck = TRUE; @@ -934,6 +931,64 @@ static HRESULT String_replace(DispatchEx *dispex, LCID lcid, WORD flags, DISPPAR SysFreeString(cstr); if(FAILED(hres)) break; + }else if(rep_str && regexp) { + const WCHAR *ptr = rep_str, *ptr2; + + while((ptr2 = strchrW(ptr, '$'))) { + hres = strbuf_append(&ret, ptr, ptr2-ptr); + if(FAILED(hres)) + break; + + switch(ptr2[1]) { + case '$': + hres = strbuf_append(&ret, ptr2, 1); + ptr = ptr2+2; + break; + case '&': + hres = strbuf_append(&ret, match.str, match.len); + ptr = ptr2+2; + break; + case '`': + hres = strbuf_append(&ret, str, match.str-str); + ptr = ptr2+2; + break; + case '\'': + hres = strbuf_append(&ret, ecp, (str+length)-ecp); + ptr = ptr2+2; + break; + default: { + DWORD idx; + + if(!isdigitW(ptr2[1])) { + hres = strbuf_append(&ret, ptr2, 1); + ptr = ptr2+1; + break; + } + + idx = ptr2[1] - '0'; + if(isdigitW(ptr[3]) && idx*10 + (ptr[2]-'0') <= parens_cnt) { + idx = idx*10 + (ptr[2]-'0'); + ptr = ptr2+3; + }else if(idx && idx <= parens_cnt) { + ptr = ptr2+2; + }else { + hres = strbuf_append(&ret, ptr2, 1); + ptr = ptr2+1; + break; + } + + hres = strbuf_append(&ret, parens[idx-1].str, parens[idx-1].len); + } + } + + if(FAILED(hres)) + break; + } + + if(SUCCEEDED(hres)) + hres = strbuf_append(&ret, ptr, (rep_str+rep_len)-ptr); + if(FAILED(hres)) + break; }else if(rep_str) { hres = strbuf_append(&ret, rep_str, rep_len); if(FAILED(hres)) diff --git a/dlls/jscript/tests/regexp.js b/dlls/jscript/tests/regexp.js index 3e4db68..4344dfe 100644 --- a/dlls/jscript/tests/regexp.js +++ b/dlls/jscript/tests/regexp.js @@ -158,6 +158,39 @@ function replaceFunc2(m, subm, off, str) { r = "[test1] [test2]".replace(/\[([^\[]+)\]/g, replaceFunc2); ok(r === "r0 r1", "r = '" + r + "' expected 'r0 r1'"); +r = "$1,$2".replace(/(\$(\d))/g, "$$1-$1$2"); +ok(r === "$1-$11,$1-$22", "r = '" + r + "' expected '$1-$11,$1-$22'"); + +r = "abc &1 123".replace(/(\&(\d))/g, "$&"); +ok(r === "abc &1 123", "r = '" + r + "' expected 'abc &1 123'"); + +r = "abc &1 123".replace(/(\&(\d))/g, "$'"); +ok(r === "abc 123 123", "r = '" + r + "' expected 'abc 123 123'"); + +r = "abc &1 123".replace(/(\&(\d))/g, "$`"); +ok(r === "abc abc 123", "r = '" + r + "' expected 'abc abc 123'"); + +r = "abc &1 123".replace(/(\&(\d))/g, "$3"); +ok(r === "abc $3 123", "r = '" + r + "' expected 'abc $3 123'"); + +r = "abc &1 123".replace(/(\&(\d))/g, "$"); +ok(r === "abc $ 123", "r = '" + r + "' expected 'abc $ 123'"); + +r = "abc &1 123".replace(/(\&(\d))/g, "$a"); +ok(r === "abc $a 123", "r = '" + r + "' expected 'abc $a 123'"); + +r = "abc &1 123".replace(/(\&(\d))/g, "$11"); +ok(r === "abc &11 123", "r = '" + r + "' expected 'abc &11 123'"); + +r = "abc &1 123".replace(/(\&(\d))/g, "$0"); +ok(r === "abc $0 123", "r = '" + r + "' expected 'abc $0 123'"); + +r = "1 2 3".replace("2", "$&"); +ok(r === "1 $& 3", "r = '" + r + "' expected '1 $& 3'"); + +r = "1 2 3".replace("2", "$'"); +ok(r === "1 $' 3", "r = '" + r + "' expected '1 $' 3'"); + r = "1,,2,3".split(/,+/g); ok(r.length === 3, "r.length = " + r.length); ok(r[0] === "1", "r[0] = " + r[0]);
1
0
0
0
Vladimir Pankratov : hhctrl.ocx: Handle NULL param.
by Alexandre Julliard
11 Aug '09
11 Aug '09
Module: wine Branch: master Commit: 01128fa35b0c16e91837ff213f2d4f7cd18d4377 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=01128fa35b0c16e91837ff213…
Author: Vladimir Pankratov <scriptkid(a)mail.ru> Date: Tue Aug 11 17:07:00 2009 +0500 hhctrl.ocx: Handle NULL param. --- dlls/hhctrl.ocx/help.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/hhctrl.ocx/help.c b/dlls/hhctrl.ocx/help.c index a19e1e6..092e97e 100644 --- a/dlls/hhctrl.ocx/help.c +++ b/dlls/hhctrl.ocx/help.c @@ -129,7 +129,7 @@ BOOL NavigateToChm(HHInfo *info, LPCWSTR file, LPCWSTR index) return FALSE; } - wsprintfW(buf, url_format, full_path, index[0] == '/' ? empty : slash, index); + wsprintfW(buf, url_format, full_path, (!index || index[0] == '/') ? empty : slash, index); /* FIXME: HACK */ if((ptr = strchrW(buf, '#')))
1
0
0
0
Alexandre Julliard : libwine: Ignore libraries that are of the wrong 32/ 64 class.
by Alexandre Julliard
11 Aug '09
11 Aug '09
Module: wine Branch: master Commit: 99538272d5b4ffc852f950dd3447a7072d6316ff URL:
http://source.winehq.org/git/wine.git/?a=commit;h=99538272d5b4ffc852f950dd3…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Aug 11 17:29:07 2009 +0200 libwine: Ignore libraries that are of the wrong 32/64 class. --- libs/wine/loader.c | 46 ++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 44 insertions(+), 2 deletions(-) diff --git a/libs/wine/loader.c b/libs/wine/loader.c index d10a6e0..37c603e 100644 --- a/libs/wine/loader.c +++ b/libs/wine/loader.c @@ -147,12 +147,54 @@ static void build_dll_path(void) } } +/* check if the library is the correct architecture */ +/* only returns false for a valid library of the wrong arch */ +static int check_library_arch( int fd ) +{ +#ifdef __APPLE__ + struct /* Mach-O header */ + { + unsigned int magic; + unsigned int cputype; + } header; + + if (read( fd, &header, sizeof(header) ) != sizeof(header)) return 1; + if (header.magic != 0xfeedface) return 1; + if (sizeof(void *) == sizeof(int)) return !(header.cputype >> 24); + else return (header.cputype >> 24) == 1; /* CPU_ARCH_ABI64 */ +#else + struct /* ELF header */ + { + unsigned char magic[4]; + unsigned char class; + unsigned char data; + unsigned char version; + } header; + + if (read( fd, &header, sizeof(header) ) != sizeof(header)) return 1; + if (memcmp( header.magic, "\177ELF", 4 )) return 1; + if (header.version != 1 /* EV_CURRENT */) return 1; +#ifdef WORDS_BIGENDIAN + if (header.data != 2 /* ELFDATA2MSB */) return 1; +#else + if (header.data != 1 /* ELFDATA2LSB */) return 1; +#endif + if (sizeof(void *) == sizeof(int)) return header.class == 1; /* ELFCLASS32 */ + else return header.class == 2; /* ELFCLASS64 */ +#endif +} + /* check if a given file can be opened */ static inline int file_exists( const char *name ) { + int ret = 0; int fd = open( name, O_RDONLY ); - if (fd != -1) close( fd ); - return (fd != -1); + if (fd != -1) + { + ret = check_library_arch( fd ); + close( fd ); + } + return ret; } static inline char *prepend( char *buffer, const char *str, size_t len )
1
0
0
0
← Newer
1
...
70
71
72
73
74
75
76
...
105
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
Results per page:
10
25
50
100
200