[Oorexx-devel] Subtle gcc-error on Apple

2011-03-19 Thread Rony G. Flatscher
Hi there,

a couple of weeks ago, after changing the code of BSF4ooRexx, the Apple
version started to behave erroneously. Originally, I thought that I
introduced some error into the code and tried to debug this whenever I
got some free time.

It turns out, that there is a subtle gcc-error on Apple (using
i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5664)): if
the source code employs inline functions it may be the case that a
global variable pointing to a structure may do so wrongly! In my case I
could remedy the situation - after having narrowed the problem down to
this rather exotic phenomenon - by just removing the inline keyword from
the Apple compilation!

Thought that those of you who are working on Apple should be aware of
this bug. However, in this particular case the source code of
BSF4ooRexx.cc is not yet cleaned which means it contains an
unbelievable amount of defs and inlines from the past ten years, so this
complexity may be needed for getting into this situation (if the
preprocessor is causing the bug).

Regards,

---rony


--
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] Question ad DecodeConditionInfo(...)

2011-03-19 Thread Rony G. Flatscher
Sorry, after changing the code, it just occurred to me: cond.program
is a RexxStringObject and should never take on NULL as Jean-Louis
reports, but should rather be Nil()?

Or with other words: is it possible that the RexxStringObject members in
a RexxCondition structure can be NULL?

---rony


On 19.03.2011 20:27, Rony G. Flatscher wrote:
 Sorry, it should read Nil in the text rather than NULL.

 ---rony

 On 19.03.2011 20:12, Rony G. Flatscher wrote:
 In a bug report which relates to BSF4ooRexx Jean-Louis was kind
 enough to look into the issue and came up with an analysis in
 https://sourceforge.net/tracker/?func=detailatid=684730aid=3205263group_id=119701.

 According to his findings, the RexxCondition member program was
 NULL in the supplied example. Before changing/adapting the code, I
 was wondering whether it is truly possible for the program member
 to be NULL in the case of a SYNTAX condition?

 What about the members errortext, code, message, could they be
 NULL as well in SYNTAX condition?

 Is it safe to assume that the member conditionName will always have
 a string value?

 ---rony

 P.S.: Here is the code that uses DecodeConditionInfo(...) to create a
 Rexx-like error message which then gets forwarded to the Java side,
 where the line causing the crash is highlighted in bold red.

 // allocates and creates a Rexx-like error message
 inline char * RgfCreateRexxlikeErrorInfo (RexxThreadContext *rtc, 
 RexxDirectoryObject condObj, const char * header)
 {
 rtc-ClearCondition();

 RexxCondition cond;
 rtc-DecodeConditionInfo(condObj, cond);

 char *msg=(char *)RexxAllocateMemory( 4096 );
 msg[0]=0;

 // format message according to exception type
 if (rtc-SendMessage1(cond.conditionName, EQUALS, 
 rtc-String(SYNTAX))==rtc-True()) // SYNTAX condition ?
 {
 // will only use 1024 of it
 char const 
 *line1=rtc-CString(rtc-SendMessage0(rtc-DirectoryAt(condObj, 
 TRACEBACK), FIRSTITEM)) ; // first traceback line=error line

 char line2[2048]=;// will only use 1024 of it
 SNPRINTF(line2, 2048, Error %d running %.512s line %d:  
 %.1024s,
   *  (int) cond.rc,   
 rtc-CString(cond.program),*
 (int) cond.position, 
 rtc-CString(cond.errortext) );

 char line3[2048]=;// will only use 1024 of it
 SNPRINTF( line3, 2048, Error %d.%d:  %.1024s, (int) (cond.code 
 / 1000),
 (int) (cond.code % 1000),
  
 rtc-CString(cond.message));

 SNPRINTF( msg, 4096, %.16s%.512s:\n%.1024s\n%.1024s\n%.1024s, 
 DLLNAME, header, line1, line2, line3);

 }
 else
 {
 SNPRINTF( msg, 4096, %.16s%.512s: Rexx condition [%.512s] 
 raised, DLLNAME, header, rtc-CString(cond.conditionName));
 }

 return msg;
 }
   


--
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


[Oorexx-devel] Beta-test for new version of BSF4ooRexx ...

2011-03-19 Thread Rony G. Flatscher
Hi there,

at http://wi.wu.ac.at/rgf/rexx/bsf4oorexx/archive/2011/2011-03-19/
there is a new BSF4ooRexx package, which is at a beta level (needs
testing on the various platforms). It should fix the problem reported by
Uli Zinngrebe.

Will be testing this version over this weekend and once regarded to be
o.k. I will move on to setup an own BSF4ooRexx communication area on
Sourceforge (probably next weekend), such that purely BSF4ooRexx related
discussions can be moved there.

---rony




--
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] Question ad DecodeConditionInfo(...)

2011-03-19 Thread Mark Miesfeld
Why do you clear the condition before you you decode it?  Without looking at
code, can't say for sure, but that seems risky.  How do you know clearing
the condition doesn't set program to null?

On Mar 19, 2011 12:12 PM, Rony G. Flatscher rony.flatsc...@wu-wien.ac.at
wrote:

 In a bug report which relates to BSF4ooRexx Jean-Louis was kind enough to
look into the issue and came up with an analysis in
https://sourceforge.net/tracker/?func=detailatid=684730aid=3205263group_id=119701https://sourceforge.net/tracker/?func=detailatid=684730aid=3205263group_id=119701
.

According to his findings, the RexxCondition member program was NULL in
the supplied example. Before changing/adapting the code, I was wondering
whether it is truly possible for the program member to be NULL in the case
of a SYNTAX condition?

What about the members errortext, code, message, could they be NULL as
well in SYNTAX condition?

Is it safe to assume that the member conditionName will always have a
string value?

---rony

P.S.: Here is the code that uses DecodeConditionInfo(...) to create a
Rexx-like error message which then gets forwarded to the Java side, where
the line causing the crash is highlighted in bold red.

 // allocates and creates a Rexx-like error message
inline char * RgfCreateRexxlikeErrorInfo (RexxThreadContext *rtc,
RexxDirectoryObject condObj, const char * header)
{
rtc-ClearCondition();

RexxCondition cond;
rtc-DecodeConditionInfo(condObj, cond);

char *msg=(char *)RexxAllocateMemory( 4096 );
msg[0]=0;

// format message according to exception type
if (rtc-SendMessage1(cond.conditionName, EQUALS,
rtc-String(SYNTAX))==rtc-True()) // SYNTAX condition ?
{
// will only use 1024 of it
char const
*line1=rtc-CString(rtc-SendMessage0(rtc-DirectoryAt(condObj,
TRACEBACK), FIRSTITEM)) ; // first traceback line=error line

char line2[2048]=;// will only use 1024 of it
SNPRINTF(line2, 2048, Error %d running %.512s line %d:  %.1024s,
  *  (int) cond.rc,   rtc-CString(cond.program),*
(int) cond.position, rtc-CString(cond.errortext) );

char line3[2048]=;// will only use 1024 of it
SNPRINTF( line3, 2048, Error %d.%d:  %.1024s, (int)
(cond.code / 1000),
(int) (cond.code % 1000),
 rtc-CString(cond.message));

SNPRINTF( msg, 4096,
%.16s%.512s:\n%.1024s\n%.1024s\n%.1024s, DLLNAME, header, line1,
line2, line3);

}
else
{
SNPRINTF( msg, 4096, %.16s%.512s: Rexx condition [%.512s]
raised, DLLNAME, header, rtc-CString(cond.conditionName));
}

return msg;
}





--
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel
--
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] CPL V1 License superseded

2011-03-19 Thread Sahananda (Jon) Wolfers
Thanks Rick

On 19 March 2011 21:46, Rick McGuire object.r...@gmail.com wrote:

 No.  The cpl is just as valid as it ever was.  It doesn't matter.

 Rick

 Sent from my iPad

 On Mar 19, 2011, at 5:27 PM, Sahananda (Jon) Wolfers 
 sahana...@windhorse.biz wrote:

 Hi All,

 I don't know if this matters, but I notice 
 herehttp://www.opensource.org/licenses/cpl1.0.phpthat the CPL license has 
 been superseded by the Eclipse Public License.

 Does this matter?  Does it mean ooRexx will migrate?

 thanks,

 Jon


 --
 Colocation vs. Managed Hosting
 A question and answer guide to determining the best fit
 for your organization - today and in the future.
 http://p.sf.net/sfu/internap-sfd2d

 ___
 Oorexx-devel mailing list
 Oorexx-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/oorexx-devel



 --
 Colocation vs. Managed Hosting
 A question and answer guide to determining the best fit
 for your organization - today and in the future.
 http://p.sf.net/sfu/internap-sfd2d
 ___
 Oorexx-devel mailing list
 Oorexx-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/oorexx-devel


--
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] Question ad DecodeConditionInfo(...)

2011-03-19 Thread Rick McGuire


Sent from my iPad

On Mar 19, 2011, at 3:41 PM, Rony G. Flatscher rony.flatsc...@wu-wien.ac.at 
wrote:

 Sorry, after changing the code, it just occurred to me: cond.program is a 
 RexxStringObject and should never take on NULL as Jean-Louis reports, but 
 should rather be Nil()?
They most certainly can be null.  A null value indicates an absence of a value. 
 A RexxStringObject can
Never be .nil, since that would violate the type guarantee.

This is the appropriate value here.  The action of raise propagate is to use 
the current condition 
Information and reraise the condition in the caller's context as if the 
condition had been triggered at
The point of the invoking call.  Since the calling context in this situation is 
the bsf4rexx native code, 
There is no program information available.

Rick


 
 Or with other words: is it possible that the RexxStringObject members in a 
 RexxCondition structure can be NULL?
 
 ---rony
 
 
 On 19.03.2011 20:27, Rony G. Flatscher wrote:
 
 Sorry, it should read Nil in the text rather than NULL.
 
 ---rony
 
 On 19.03.2011 20:12, Rony G. Flatscher wrote:
 
 In a bug report which relates to BSF4ooRexx Jean-Louis was kind enough to 
 look into the issue and came up with an analysis in 
 https://sourceforge.net/tracker/?func=detailatid=684730aid=3205263group_id=119701.
 
 According to his findings, the RexxCondition member program was NULL in 
 the supplied example. Before changing/adapting the code, I was wondering 
 whether it is truly possible for the program member to be NULL in the 
 case of a SYNTAX condition? 
 
 What about the members errortext, code, message, could they be NULL 
 as well in SYNTAX condition?
 
 Is it safe to assume that the member conditionName will always have a 
 string value?
 
 ---rony
 
 P.S.: Here is the code that uses DecodeConditionInfo(...) to create a 
 Rexx-like error message which then gets forwarded to the Java side, where 
 the line causing the crash is highlighted in bold red.
 
 // allocates and creates a Rexx-like error message
 inline char * RgfCreateRexxlikeErrorInfo (RexxThreadContext *rtc, 
 RexxDirectoryObject condObj, const char * header)
 {
 rtc-ClearCondition();
 
 RexxCondition cond;
 rtc-DecodeConditionInfo(condObj, cond);
 
 char *msg=(char *)RexxAllocateMemory( 4096 );
 msg[0]=0;
 
 // format message according to exception type
 if (rtc-SendMessage1(cond.conditionName, EQUALS, 
 rtc-String(SYNTAX))==rtc-True()) // SYNTAX condition ?
 {
 // will only use 1024 of it
 char const 
 *line1=rtc-CString(rtc-SendMessage0(rtc-DirectoryAt(condObj, 
 TRACEBACK), FIRSTITEM)) ; // first traceback line=error line

 char line2[2048]=;// will only use 1024 of it
 SNPRINTF(line2, 2048, Error %d running %.512s line %d:  %.1024s,
 (int) cond.rc,   rtc-CString(cond.program),
 (int) cond.position, 
 rtc-CString(cond.errortext) );
 
 char line3[2048]=;// will only use 1024 of it
 SNPRINTF( line3, 2048, Error %d.%d:  %.1024s, (int) (cond.code / 
 1000),
 (int) (cond.code % 1000),
  
 rtc-CString(cond.message));
 
 SNPRINTF( msg, 4096, %.16s%.512s:\n%.1024s\n%.1024s\n%.1024s, 
 DLLNAME, header, line1, line2, line3);
 
 }
 else
 {
 SNPRINTF( msg, 4096, %.16s%.512s: Rexx condition [%.512s] raised, 
 DLLNAME, header, rtc-CString(cond.conditionName));
 }
 
 return msg;
 }
   
 
 
 --
 Colocation vs. Managed Hosting
 A question and answer guide to determining the best fit
 for your organization - today and in the future.
 http://p.sf.net/sfu/internap-sfd2d
 ___
 Oorexx-devel mailing list
 Oorexx-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/oorexx-devel
--
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] Question ad DecodeConditionInfo(...)

2011-03-19 Thread Rony G. Flatscher


On 19.03.2011 22:52, Rick McGuire wrote:

 Sent from my iPad

 On Mar 19, 2011, at 3:41 PM, Rony G. Flatscher
 rony.flatsc...@wu-wien.ac.at mailto:rony.flatsc...@wu-wien.ac.at
 wrote:

 Sorry, after changing the code, it just occurred to me:
 cond.program is a RexxStringObject and should never take on NULL as
 Jean-Louis reports, but should rather be Nil()?
 They most certainly can be null.  A null value indicates an absence of
 a value.  A RexxStringObject can
 Never be .nil, since that would violate the type guarantee.

 This is the appropriate value here.  The action of raise propagate is
 to use the current condition 
 Information and reraise the condition in the caller's context as if
 the condition had been triggered at
 The point of the invoking call.  Since the calling context in this
 situation is the bsf4rexx native code, 
 There is no program information available.
Thank you very much for clarifying this, Rick!

---rony

--
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel