angband-import / angband-trac

Test importing Trac events into Angband
0 stars 0 forks source link

Minimise usage of standard string functions #57

Open angband-import opened 4 years ago

angband-import commented 4 years ago

Reported by takkaria on 21 Mar 2007 15:20 UTC To fix:

  1. grep for sprintf(), strcat(), strcpy(), strncpy(), etc
  2. replace with Angband's own versions.
angband-import commented 4 years ago

Comment by takkaria on 25 Mar 2007 13:11 UTC Rough counts:

angband-import commented 4 years ago

Comment by takkaria on 25 Mar 2007 13:43 UTC [52dda4a] (SVN r11) fixes strcat().

strncpy() is just used by two main- files, so we can leave that.

angband-import commented 4 years ago

Modified by takkaria on 26 Mar 2007 15:38 UTC

angband-import commented 4 years ago

Comment by takkaria on 20 Apr 2007 11:47 UTC Moving to 3.0.9 for completion.

angband-import commented 4 years ago

Comment by andrewdoull on 10 May 2007 12:48 UTC Shouldn't we use the OpenBSD strlcpy() and strlcat() instead of rolling our own as per the following white paper?

http://www.gratisoft.us/todd/papers/strlcpy.html

I don't know if a BSD-type license is compatible with Angband though.

angband-import commented 4 years ago

Comment by pmac on 10 May 2007 21:47 UTC This is an excellent idea, so long as appropriate HAVE_STRLCPY is added to appropriate config files.
Also: there's no need to worry about licensing; the specifications are public, so just rename my_strcat, my_strcpy appropriately.

BTW: I've got this done, but it is all mixed up with the dirent stuff.

angband-import commented 4 years ago

Comment by takkaria on 13 May 2007 20:54 UTC I have a patch that takes them down to:

This has the nice side-effect of compiling without linker warnings on OpenBSD, which tells you off for using strcpy() and sprintf(). Will commit when SVN is back up.

angband-import commented 4 years ago

Modified by takkaria on 3 Jun 2007 16:07 UTC

angband-import commented 4 years ago

Modified by takkaria on 7 Jul 2007 19:16 UTC

angband-import commented 4 years ago

Comment by takkaria on 14 Jul 2007 20:31 UTC Should we stop using sprintf() in strnfmt() and do it ourselves?

angband-import commented 4 years ago

Comment by anonymous on 27 Aug 2007 06:43 UTC Taken care of in my local copy of main-gtk.c (which should eventually be in svn). A lot of the changes I made were in code that originally came from main-x11.c, so it shouldn't be too hard to get rid of them there, as well...

angband-import commented 4 years ago

Modified by magnate on 24 Dec 2010 12:38 UTC

angband-import commented 4 years ago

Comment by magnate on 23 Oct 2011 07:57 UTC These are all underlying or uncontroversial issues, unconnected with the experimental nature of v4 - therefore re-setting to V milestone.

angband-import commented 4 years ago

Modified by takkaria on 27 Apr 2013 23:05 UTC