All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot-Users] [PATCH] Add stricmp to lib_generic/string.c
@ 2006-05-02 17:02 Alan J. Luse
  2006-05-02 19:02 ` Wolfgang Denk
  0 siblings, 1 reply; 9+ messages in thread
From: Alan J. Luse @ 2006-05-02 17:02 UTC (permalink / raw)
  To: u-boot

Add the stricmp function to lib_generic/string.c for those architectures
that do not have an optimized hardware version.

Alan J. Luse
Embedded Systems Engineer
Time America, Inc.
Suite 100, 8840 E. Chaparral Road, Scottsdale, Arizona 85250
Voice:  (480) 296-0408  Fax:  (480) 296-0444
-------------- next part --------------
A non-text attachment was scrubbed...
Name: u-boot-1.1.4.stricmp.diff
Type: application/octet-stream
Size: 907 bytes
Desc: u-boot-1.1.4.stricmp.diff
Url : http://lists.denx.de/pipermail/u-boot/attachments/20060502/481b4ece/attachment.obj 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot-Users] [PATCH] Add stricmp to lib_generic/string.c
  2006-05-02 17:02 [U-Boot-Users] [PATCH] Add stricmp to lib_generic/string.c Alan J. Luse
@ 2006-05-02 19:02 ` Wolfgang Denk
  0 siblings, 0 replies; 9+ messages in thread
From: Wolfgang Denk @ 2006-05-02 19:02 UTC (permalink / raw)
  To: u-boot

In message <5642B638DBEF6A4DBF9E9BC68144866D0276A460@tamail1.timeamerica.com> you wrote:
> 
> Add the stricmp function to lib_generic/string.c for those architectures
> that do not have an optimized hardware version.

Why should we add this? There is no code in U-Boot that uses  such  a
function.

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
A rolling stone gathers momentum.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot-Users] [PATCH] Add stricmp to lib_generic/string.c
  2006-05-03 14:34 Tim Braun
@ 2006-05-03 22:52 ` Wolfgang Denk
  0 siblings, 0 replies; 9+ messages in thread
From: Wolfgang Denk @ 2006-05-03 22:52 UTC (permalink / raw)
  To: u-boot

In message <8230E1CC35AF9F43839F3049E930169A2DCBE1@yang.LibreStream.local> you wrote:
>
> > Thanks for pointing out. I have to admit that I was not aware that we
> > even had this function. It's gone now :-)
> 
> Hold on a second.  I've been using strnicmp (because stricmp wasn't
> there) to check environment

Have you? Sorry. None of this is visible in the public  U-Boot  tree.
Sorry, strnicmp() is gone.

> variable values against strings.  Why would I force my users to start
> being case-sensitive when 
> setting up which lcd display to initialize?

Why not?

> If a particular board doesn't use it, the linker can strip it out.

I don't want code bloat. If none of the boards uses  it  (as  is  the
case right now) we don't need it, so off it goes.

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
He is truly wise who gains wisdom from another's mishap.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot-Users] [PATCH] Add stricmp to lib_generic/string.c
@ 2006-05-03 14:34 Tim Braun
  2006-05-03 22:52 ` Wolfgang Denk
  0 siblings, 1 reply; 9+ messages in thread
From: Tim Braun @ 2006-05-03 14:34 UTC (permalink / raw)
  To: u-boot

> From: Wolfgang Denk <wd@denx.de>
> Date: Wed, 03 May 2006 01:01:29 +0200
> 
> In message 
> <5642B638DBEF6A4DBF9E9BC68144866D0276A64E@tamail1.timeamerica.com> you
wrote:
> > Curiously enough I also ran a check to see where strnicmp is being
used
> > in all of U-Boot, since I was considering using it instead, and it
> > doesn't seem to be used at all either even though its already in
> > string.c.  I will avoid using it as well since its an obvious
candidate
> > for elimination.
> 
> Thanks for pointing out. I have to admit that I was not aware that we
> even had this function. It's gone now :-)

Hold on a second.  I've been using strnicmp (because stricmp wasn't
there) to check environment
variable values against strings.  Why would I force my users to start
being case-sensitive when 
setting up which lcd display to initialize?

What other standard library function allows case flexibility in
comparing user input?  (i.e. what 
would you suggest as an alternative to using strnicmp?)

If a particular board doesn't use it, the linker can strip it out.

Tim Braun, Sr. Des. Eng.
LibreStream Technologies
200-55 Rothwell Rd.
Winnipeg R3P 2M5  

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot-Users] [PATCH] Add stricmp to lib_generic/string.c
  2006-05-02 22:41 Alan J. Luse
@ 2006-05-02 23:01 ` Wolfgang Denk
  0 siblings, 0 replies; 9+ messages in thread
From: Wolfgang Denk @ 2006-05-02 23:01 UTC (permalink / raw)
  To: u-boot

In message <5642B638DBEF6A4DBF9E9BC68144866D0276A64E@tamail1.timeamerica.com> you wrote:
> 
> I rechecked where I was using it and can easily eliminate the reference
> making the patch submitted unnecessary.

Fine. Thanks.

> Curiously enough I also ran a check to see where strnicmp is being used
> in all of U-Boot, since I was considering using it instead, and it
> doesn't seem to be used at all either even though its already in
> string.c.  I will avoid using it as well since its an obvious candidate
> for elimination.

Thanks for pointing out. I have to admit that I was not aware that we
even had this function. It's gone now :-)

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
They weren't that important. They were merely at the top. The  people
who  really  run organizations are usually found several levels down,
where it's still possible to get things done.
                                      - Terry Pratchett, _Small Gods_

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot-Users] [PATCH] Add stricmp to lib_generic/string.c
@ 2006-05-02 22:41 Alan J. Luse
  2006-05-02 23:01 ` Wolfgang Denk
  0 siblings, 1 reply; 9+ messages in thread
From: Alan J. Luse @ 2006-05-02 22:41 UTC (permalink / raw)
  To: u-boot

 

> -----Original Message-----
> From: wd at denx.de [mailto:wd at denx.de] 
> Sent: Tuesday, 02 May 2006 3:35 PM
> To: Alan J. Luse
> Cc: u-boot-users at lists.sourceforge.net
> Subject: Re: [U-Boot-Users] [PATCH] Add stricmp to 
> lib_generic/string.c 
> 
> In message 
> <5642B638DBEF6A4DBF9E9BC68144866D0276A59D@tamail1.timeamerica.
> com> you wrote:
> >
> > > Why should we add this? There is no code in U-Boot that 
> uses  such  a
> > > function.
> > 
> > An upcoming submission uses stricmp.  I can wait and submit this
> > addition at that time if you like.
> 
> Try to avoid stricmp(). I will tend to reject it because it adds code
> size for very little benefit.
> 
> Best regards,
> 
> Wolfgang Denk
> 

Wolfgang-

I rechecked where I was using it and can easily eliminate the reference
making the patch submitted unnecessary.

Curiously enough I also ran a check to see where strnicmp is being used
in all of U-Boot, since I was considering using it instead, and it
doesn't seem to be used at all either even though its already in
string.c.  I will avoid using it as well since its an obvious candidate
for elimination.

Regards,

Alan J. Luse
Embedded Systems Engineer
Time America, Inc.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot-Users] [PATCH] Add stricmp to lib_generic/string.c
  2006-05-02 20:27 Alan J. Luse
@ 2006-05-02 22:34 ` Wolfgang Denk
  0 siblings, 0 replies; 9+ messages in thread
From: Wolfgang Denk @ 2006-05-02 22:34 UTC (permalink / raw)
  To: u-boot

In message <5642B638DBEF6A4DBF9E9BC68144866D0276A59D@tamail1.timeamerica.com> you wrote:
>
> > Why should we add this? There is no code in U-Boot that uses  such  a
> > function.
> 
> An upcoming submission uses stricmp.  I can wait and submit this
> addition at that time if you like.

Try to avoid stricmp(). I will tend to reject it because it adds code
size for very little benefit.

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
:       I've tried (in vi) "g/[a-z]\n[a-z]/s//_/"...but that doesn't
: cut it.  Any ideas?  (I take it that it may be a two-pass sort of solution).
In the first pass, install perl. :-) Larry Wall <6849@jpl-devvax.JPL.NASA.GOV>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot-Users] [PATCH] Add stricmp to lib_generic/string.c
@ 2006-05-02 20:27 Alan J. Luse
  2006-05-02 22:34 ` Wolfgang Denk
  0 siblings, 1 reply; 9+ messages in thread
From: Alan J. Luse @ 2006-05-02 20:27 UTC (permalink / raw)
  To: u-boot

> 
> > Add the stricmp function to lib_generic/string.c for those 
> architectures
> > that do not have an optimized hardware version.
> 
> Why should we add this? There is no code in U-Boot that uses  such  a
> function.
> 
> Best regards,
> 
> Wolfgang Denk
> 

An upcoming submission uses stricmp.  I can wait and submit this
addition at that time if you like.

Alan J. Luse
Embedded Systems Engineer
Time America, Inc.
Suite 100, 8840 E. Chaparral Road, Scottsdale, Arizona 85250
Voice:  (480) 296-0408  Fax:  (480) 296-0444

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot-Users] [PATCH] Add stricmp to lib_generic/string.c
@ 2006-05-02 17:14 Alan J. Luse
  0 siblings, 0 replies; 9+ messages in thread
From: Alan J. Luse @ 2006-05-02 17:14 UTC (permalink / raw)
  To: u-boot

Previous submission neglected to add stricmp to include/linux/string.h
as well.  Attached patch includes complete change to both files.  Please
discard/disregard previous patch.

Add the stricmp function to lib_generic/string.c for those architectures
that do not have an optimized hardware version.

Alan J. Luse
Embedded Systems Engineer
Time America, Inc.
Suite 100, 8840 E. Chaparral Road, Scottsdale, Arizona 85250
Voice:  (480) 296-0408  Fax:  (480) 296-0444
-------------- next part --------------
A non-text attachment was scrubbed...
Name: u-boot-1.1.4.stricmp.diff
Type: application/octet-stream
Size: 1416 bytes
Desc: u-boot-1.1.4.stricmp.diff
Url : http://lists.denx.de/pipermail/u-boot/attachments/20060502/d657e08a/attachment.obj 

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2006-05-03 22:52 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-02 17:02 [U-Boot-Users] [PATCH] Add stricmp to lib_generic/string.c Alan J. Luse
2006-05-02 19:02 ` Wolfgang Denk
2006-05-02 17:14 Alan J. Luse
2006-05-02 20:27 Alan J. Luse
2006-05-02 22:34 ` Wolfgang Denk
2006-05-02 22:41 Alan J. Luse
2006-05-02 23:01 ` Wolfgang Denk
2006-05-03 14:34 Tim Braun
2006-05-03 22:52 ` Wolfgang Denk

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.