[TextEditor_mcc] Re: latest "improvements"

  • From: Ilkka Lehtoranta <ilkleht@xxxxxxxxxxx>
  • To: texteditor_mcc@xxxxxxxxxxxxx
  • Date: Tue, 18 Apr 2006 19:28:41 +0300 (EEST)

On Tue, 18 Apr 2006, Jens Langner wrote:

> Gunther Nikl schrieb:
> 
> > Hello Jens!
> > 
> >>   * mccheader.c: added support for OS4/newlib use and slightly reintroduced
> >>     some of the parts previously stripped by Gunther. We really should 
> >> prefer
> >>     code readability instead of minimizing passages.
> 
> >   - USED_VAR on global data is stupid!
> 
> First of all. USED_VAR doesn't hurt/break the code, does it?
> Are you refering to the const __abox__ variable? Are you sure that it
> won't be stripped by GCC4.x in case USED_VAR is removed? If so, I
> perfectly accept the change, but here I just readded USED_VAR as I found
> it to be more security to explicitly state that this variable shouldn't
> be touched and by explicitly having USED_VAR there a developer might
> more easily understand it, hence a better readability.

I have no idea about this (although I doubt it is stripped by GCC 4 unless 
using -s option) but missing __abox__ in library code is not critical: it 
only differentiates between PowerUp libraries and native libraries in 
SegTracker. It is highly recommended of couse.

However I'm more concerned about newlib usage. To my knowledge in some 
(all?) OS4 versions newlib.library sets process->pr_CLibData context 
pointer. Will texteditor-mcc really work with clib2 programs too, or am I 
missing something? Although it maybe isnt relevant for simple functions 
like strncpy() but...?

Which also reminds me about another thing... what about replacing 
strncpy() by robust non-braindamaged stccpy() ? I know newlib (and maybe 
clib2 neither) dont implement it but strncpy() is highly inefficient.



  Ilkka

_____________________________________________________________________________
TextEditor ML   - //www.freelists.org/list/texteditor_mcc
Listserver help - mailto:texteditor_mcc-request@xxxxxxxxxxxxx?Subject=HELP
Bugtracker......: http://sourceforge.net/tracker/?atid=731469&group_id=135025

Other related posts: