diff options
author | Michael McConville <mmcconville@mykolab.com> | 2015-12-05 17:42:40 -0500 |
---|---|---|
committer | Michael McConville <mmcconville@mykolab.com> | 2015-12-05 17:42:40 -0500 |
commit | 3a1d84cfc0988a3dbdba7a440571e987cb68973a (patch) | |
tree | ba21703f11c3ee99a7c8e5b8d1a161d0a9b21f2c /to.do | |
parent | a562291415922732e22cd23cd330901ffa57db45 (diff) |
Replace copy_unsigned_string() with xstrdup().
Like copy_string(), copy_unsigned_string() is just a clone of the
stlib's strdup(). We only use it twice. I'm pretty confident that char
signedness is irrelevant in this case.
Diffstat (limited to 'to.do')
-rw-r--r-- | to.do/unicode/flexdef.h | 3 | ||||
-rw-r--r-- | to.do/unicode/misc.c | 23 |
2 files changed, 0 insertions, 26 deletions
diff --git a/to.do/unicode/flexdef.h b/to.do/unicode/flexdef.h index 3e90343..8efa775 100644 --- a/to.do/unicode/flexdef.h +++ b/to.do/unicode/flexdef.h @@ -841,9 +841,6 @@ extern void check_char PROTO((int c)); /* Replace upper-case letter to lower-case. */ extern Char clower PROTO((int)); -/* Returns a dynamically allocated copy of a (potentially) unsigned string. */ -extern Char *copy_unsigned_string PROTO((register Char *)); - /* Shell sort a character array. */ extern void cshell PROTO((wchar_t[], int, int)); diff --git a/to.do/unicode/misc.c b/to.do/unicode/misc.c index b5b032d..d56d811 100644 --- a/to.do/unicode/misc.c +++ b/to.do/unicode/misc.c @@ -193,29 +193,6 @@ register int c; } -/* copy_unsigned_string - - * returns a dynamically allocated copy of a (potentially) unsigned string - */ - -Char *copy_unsigned_string( str ) -register Char *str; - { - register Char *c; - Char *copy; - - /* find length */ - for ( c = str; *c; ++c ) - ; - - copy = allocate_Character_array( c - str + 1 ); - - for ( c = copy; (*c++ = *str++) != 0; ) - ; - - return copy; - } - - /* cshell - shell sort a character array in increasing order * * synopsis |