From: Rick M. <obj...@gm...> - 2008-06-24 10:20:50
|
On Tue, Jun 24, 2008 at 12:44 AM, Mark Miesfeld <mie...@gm...> wrote: > On Mon, Jun 23, 2008 at 4:25 PM, Rick McGuire <obj...@gm...> wrote: >> Mark, >> >> I checked in a fix for this. Now we're up to an error in the FILESPEC >> function, which I'm probably not going to get to tonight. > > Okay, in FILESPEC there 2 problems. > > 1.) When it breaks out of the switch without a match it returns the > NULLOBJECT instead of the empty string. This would be the diff for > the fix: > > - return NULLOBJECT; /* return extracted part */ > + return context->NullString(); // nothing found, return the > empty string > > So, here would be a good place to explain the new API a little. I > think context->NullString() is right here, as opposed to say: > > return context->NewString("", 0); > > But, I wasn't 100% sure that NullString() was the same as the empty > string. And I still have trouble finding the backing code for some of > these things. I see it should resolve to: > > RexxNullString = (RexxStringObject)OREF_NULLSTRING; > > But then I don't seem to be able to find what OREF_NULLSTRING is. Yes, that's the correct thing. There's no actual code backing that particular API...the reference is just stored directly in the API vector. It's the same thing with the True(), False(), and Nil(() items as well. These are just made immediately available because they are frequently used. > > 2.) The other problem is that when you enter: > > RexxRoutine2(RexxStringObject, sysFilespec, CSTRING, option, CSTRING, name) > > Both option and name are "Path" Only option should be "Path" name > from the executing Rexx code is a full directory name. > > In RexxNativeActivation::callNativeRoutine(), when it goes into > processArguments() it looks to me like the argList gets processed > correctly into the descriptors. With index 0 being the return value > descriptor. Then index 1 being the CSTRING "Path" and index 2 being > the CSTRING "E:\work.ooRexx\..." (the directory I'm working from.) > > So, I don't see how they end up wrong on entry to RexxRoutine2 ? > > The obvious thing would be a typo in the RexxRoutine2 macro, but it > looks correct to me. Hmmm, ok, this will require a little deeper look. Rick > > -- > Mark Miesfeld > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > Oorexx-devel mailing list > Oor...@li... > https://lists.sourceforge.net/lists/listinfo/oorexx-devel > |