On Fri, Mar 16, 2012 at 9:43 PM, Mark Miesfeld <[email protected]> wrote:

>
> Just discovered this, ...
>
>


I looked at this to fix it,  and then decided to leave it alone because I'm
not sure what the intent was, based on some comments.

In this code:

  // configure the traditional single argument string
  rxargs = pgmThrdInst->NewArray(1);
  pgmThrdInst->ArrayPut(rxargs,
                        pgmThrdInst->NewStringFromAsciiz(arg_buffer), 1);

it is passing one argument to the Rexx program, always, even if there is no
argument.

Then in this code, :

  {
      if (program_name == NULL) {       /* no name yet?                  */
          program_name = argv[i];        /* program is first non-option  */
          *break;     /* end parsing after program_name* has been resolved
*/
      }
      else if ( real_argument )  {  /* part of the argument string   */
          if (arg_buffer[0] != '\0')  {   /* not the first one?      */
              strcat(arg_buffer, " ");     /* add an blank           */
          }
          strcat(arg_buffer, argv[i]);  /* add this to the argument..*/
      }
      real_argument = TRUE;
  }
it breaks as soon as it gets the program name.  This makes arg_buffer,
always, the empty string. Even if there are arguments.

--
Mark Miesfeld
------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to