X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Ftinfo%2Fdoalloc.c;h=f0c8141ad05ecd5994da1933740f66c741436368;hp=a2aea950e0a64975ced2d692b03e05efa39defa8;hb=9b4c4abadc0a29999c5ddad5aa8d769fee28d687;hpb=8b06e371ed1bce3dd6f37138e6becb5e1a562fe0 diff --git a/ncurses/tinfo/doalloc.c b/ncurses/tinfo/doalloc.c index a2aea950..f0c8141a 100644 --- a/ncurses/tinfo/doalloc.c +++ b/ncurses/tinfo/doalloc.c @@ -1,5 +1,6 @@ /**************************************************************************** - * Copyright (c) 1998-2000,2012 Free Software Foundation, Inc. * + * Copyright 2020 Thomas E. Dickey * + * Copyright 1998-2002,2012 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -39,7 +40,7 @@ #include -MODULE_ID("$Id: doalloc.c,v 1.10 2012/02/22 22:34:31 tom Exp $") +MODULE_ID("$Id: doalloc.c,v 1.12 2020/02/02 23:34:34 tom Exp $") NCURSES_EXPORT(void *) _nc_doalloc(void *oldp, size_t amount) @@ -56,21 +57,3 @@ _nc_doalloc(void *oldp, size_t amount) } return newp; } - -#if !HAVE_STRDUP -NCURSES_EXPORT(char *) -_nc_strdup(const char *src) -{ - char *dst; - if (src != 0) { - size_t need = strlen(src) + 1; - dst = typeMalloc(char, need); - if (dst != 0) { - _nc_STRCPY(dst, src, need); - } - } else { - dst = 0; - } - return dst; -} -#endif