From: Jean-Louis F. <jfa...@gm...> - 2012-03-25 23:40:26
|
Commit done, but I see that this declaration rxcargs = pgmThrdInst->NewArray(1); could also be declared with the right size, as done in rexxhide. Several files to fix, nothing urgent, I will do that next WE. Jean-Louis 2012/3/26 Jean-Louis Faucher <jfa...@gm...> > Hi Mark > > Ok, I will fix trunk by using the same style of code than Windows, i.e. > size 0 or 1. > > Jean-Louis > > > 2012/3/26 Mark Miesfeld <mie...@gm...> > >> Hi Jean-Louis, >> >> I saw your commit and realized that the unix version of rexx is >> probably still broken. I checked and it is. >> >> You're correct in that the argument array must be of size 0 if there are >> no arguments. I personally perfer to create the array the correct size, as >> is done in the Windows version of rexx, rather than create it and then have >> to expand it. But, your fix in your sandbox is prefectly fine also. >> >> I'd say go ahead and fix trunk now. >> >> -- >> Mark Miesfeld >> >> On Sun, Mar 25, 2012 at 3:41 PM, Jean-Louis Faucher < >> jfa...@gm...> wrote: >> >>> Hi >>> >>> Tiny fix for unix, works for me. >>> Will apply it in trunk, unless David wants to fix differently. >>> >>> Jean-Louis >>> >>> ---------- Forwarded message ---------- >>> From: <jfa...@us...> >>> Date: 2012/3/26 >>> Subject: [Oorexx-svn] SF.net SVN: oorexx:[7699] >>> sandbox/jlf/trunk/utilities/rexx/platform/unix/ rexx.cpp >>> To: oor...@li... >>> >>> >>> Revision: 7699 >>> http://oorexx.svn.sourceforge.net/oorexx/?rev=7699&view=rev >>> Author: jfaucher >>> Date: 2012-03-25 22:27:58 +0000 (Sun, 25 Mar 2012) >>> Log Message: >>> ----------- >>> arg()==1 when no arg : fixed by declaring an array of size 0 >>> >>> Modified Paths: >>> -------------- >>> sandbox/jlf/trunk/utilities/rexx/platform/unix/rexx.cpp >>> >>> Modified: sandbox/jlf/trunk/utilities/rexx/platform/unix/rexx.cpp >>> =================================================================== >>> --- sandbox/jlf/trunk/utilities/rexx/platform/unix/rexx.cpp >>> 2012-03-25 20:46:25 UTC (rev 7698) >>> +++ sandbox/jlf/trunk/utilities/rexx/platform/unix/rexx.cpp >>> 2012-03-25 22:27:58 UTC (rev 7699) >>> @@ -143,7 +143,8 @@ >>> else { >>> RexxCreateInterpreter(&pgmInst, &pgmThrdInst, NULL); >>> // configure the traditional single argument string >>> - rxargs = pgmThrdInst->NewArray(1); >>> + // Initial size must be zero, because in >>> CallProgramDispatcher::run, size will be tested, not items >>> + rxargs = pgmThrdInst->NewArray(0); // Will be extended if needed >>> if (argCount > 0) { >>> pgmThrdInst->ArrayPut(rxargs, >>> >>> pgmThrdInst->NewStringFromAsciiz(arg_buffer), 1); >>> >>> This was sent by the SourceForge.net collaborative development platform, >>> the world's largest Open Source development site. >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> This SF email is sponsosred by: >>> Try Windows Azure free for 90 days Click Here >>> http://p.sf.net/sfu/sfd2d-msazure >>> _______________________________________________ >>> Oorexx-svn mailing list >>> Oor...@li... >>> https://lists.sourceforge.net/lists/listinfo/oorexx-svn >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> This SF email is sponsosred by: >>> Try Windows Azure free for 90 days Click Here >>> http://p.sf.net/sfu/sfd2d-msazure >>> _______________________________________________ >>> Oorexx-devel mailing list >>> Oor...@li... >>> https://lists.sourceforge.net/lists/listinfo/oorexx-devel >>> >>> >> >> >> ------------------------------------------------------------------------------ >> This SF email is sponsosred by: >> Try Windows Azure free for 90 days Click Here >> http://p.sf.net/sfu/sfd2d-msazure >> _______________________________________________ >> Oorexx-devel mailing list >> Oor...@li... >> https://lists.sourceforge.net/lists/listinfo/oorexx-devel >> >> > |