[Bug 44338] New: cmd: Brackets are no deliminiter in the condition part of the if command.
https://bugs.winehq.org/show_bug.cgi?id=44338 Bug ID: 44338 Summary: cmd: Brackets are no deliminiter in the condition part of the if command. Product: Wine Version: 3.0-rc5 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: cmd Assignee: wine-bugs(a)winehq.org Reporter: bernhardu(a)mailbox.org Distribution: --- Created attachment 60213 --> https://bugs.winehq.org/attachment.cgi?id=60213 cmd: Change parsing of the if command to avoid parsing the operators. Found while trying to look into #44236. There a batch script is executed that contains lines as this: --- if (%1)==(p) start /W " " "%SFDIR%WSFplot" wr2300.t35 3 --- This returns an error like this: --- Syntax error Can't recognize 'p' as an internal or external command, or batch script. --- It looks like native does handle the brackets differently when contained inside the condition part of the if command. Attached is a patch that tries to skip the parsing in WCMD_ReadAndParseLine of that part. Therefore it moves most of the content of WCMD_if into a helper and calls that to estimate how long the condition part is. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=44338 --- Comment #1 from Bernhard Übelacker <bernhardu(a)mailbox.org> --- Created attachment 60214 --> https://bugs.winehq.org/attachment.cgi?id=60214 cmd/tests: Test if command with operators containing brackets. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=44338 Fabian Maurer <dark.shadow4(a)web.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 CC| |dark.shadow4(a)web.de Keywords| |patch, testcase Status|UNCONFIRMED |NEW --- Comment #2 from Fabian Maurer <dark.shadow4(a)web.de> --- Confirming bug. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=44338 Vijay Kamuju <infyquest(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |infyquest(a)gmail.com --- Comment #3 from Vijay Kamuju <infyquest(a)gmail.com> --- merge both the patches. remove the commented static for 'int evaluate_if_condition' in builtins.c Also move the extern definition of the function evaluate_if_condition to wcmd.h -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=44338 --- Comment #4 from Vijay Kamuju <infyquest(a)gmail.com> --- Also add signoff to the patches -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=44338 Bernhard Übelacker <bernhardu(a)mailbox.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Distribution|--- |Debian --- Comment #5 from Bernhard Übelacker <bernhardu(a)mailbox.org> --- Patch sent: https://www.winehq.org/pipermail/wine-devel/2018-January/121764.html -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=44338 Jason Edmeades <us(a)edmeades.me.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |us(a)edmeades.me.uk --- Comment #6 from Jason Edmeades <us(a)edmeades.me.uk> --- Bernhard - Was there any feedback for your patch, explanation why it wasnt committed? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=44338 --- Comment #7 from Bernhard Übelacker <bernhardu(a)mailbox.org> --- There was no feedback. This was probably caused by me making patchwatcher not find the signed-of-by line by my usage of "---" in the commit message. I have rebased the patch and sent it again. https://www.winehq.org/pipermail/wine-devel/2018-July/129804.html -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=44338 --- Comment #8 from Jason Edmeades <us(a)edmeades.me.uk> --- For what its worth I think this patch takes the parsing in the right direction. I'm working on 'if' parsing and handling at the moment (I have a set of patches) but to solve some of the more complex problems I need to know where the condition ends, which your patch provides. Hopefully AJ will indicate if there's a problem or not, otherwise its worth asking (he's away at the moment) -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=44338 --- Comment #9 from Bernhard Übelacker <bernhardu(a)mailbox.org> --- Sorry for the delay. I have rebased the patch and resent: https://www.winehq.org/pipermail/wine-devel/2019-August/149828.html -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=44338 Bernhard Übelacker <bernhardu(a)mailbox.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED Fixed by SHA1| |f238e846e701d2039eceb51f2f6 | |e9d936f8c791c --- Comment #10 from Bernhard Übelacker <bernhardu(a)mailbox.org> --- Wine 4.15 should work as expected. Sorry for not marking it as fixed before. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=44338 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #11 from Alexandre Julliard <julliard(a)winehq.org> --- Closing bugs fixed in 4.16. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=44338 Matteo Bruni <matteo.mystral(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|cmd: Brackets are no |cmd: Brackets are no |deliminiter in the |delimiter for the condition |condition part of the if |part of the if command |command. | -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (2)
-
wine-bugs@winehq.org -
WineHQ Bugzilla