X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Ftinfo%2Fdoalloc.c;h=0bda12cae8be07c4fce3661a583e5e557d1994b9;hp=fe2a009d19b474dbc5b46e28cebcbe9bd18d4ce3;hb=5c90fc94a5ac426a5e51732720767d5f0041830d;hpb=46722468f47c2b77b3987729b4bcf2321cccfd01 diff --git a/ncurses/tinfo/doalloc.c b/ncurses/tinfo/doalloc.c index fe2a009d..0bda12ca 100644 --- a/ncurses/tinfo/doalloc.c +++ b/ncurses/tinfo/doalloc.c @@ -1,5 +1,6 @@ /**************************************************************************** - * Copyright (c) 1998,2000 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,9 +40,9 @@ #include -MODULE_ID("$Id: doalloc.c,v 1.8 2002/08/31 21:48:11 Philippe.Blain Exp $") +MODULE_ID("$Id: doalloc.c,v 1.13 2020/08/30 00:27:15 tom Exp $") -NCURSES_EXPORT(void *) +void * _nc_doalloc(void *oldp, size_t amount) { void *newp; @@ -56,20 +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) { - dst = typeMalloc(char, strlen(src) + 1); - if (dst != 0) { - (void) strcpy(dst, src); - } - } else { - dst = 0; - } - return dst; -} -#endif