From patchwork Thu Nov 30 01:48:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yaakov Selkowitz X-Patchwork-Id: 120063 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp96399qgn; Wed, 29 Nov 2017 17:49:06 -0800 (PST) X-Google-Smtp-Source: AGs4zMaGAdb1Zi4FUSld4E/O2pbV3yWHu23qi4iB1mexrH9SZBlYzrAYzBQ7cPebuQC5ihV4DdUw X-Received: by 10.84.174.1 with SMTP id q1mr902363plb.220.1512006546718; Wed, 29 Nov 2017 17:49:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512006546; cv=none; d=google.com; s=arc-20160816; b=VQ4bS0CaDC0uB+LAYeKZwQvRdZmXbQvIeW5mv6CRGewDvWqQ1B//83vpUR+OYgUMZZ /hqFluW7p48C0gRuaLIdhpIOdVdZdSHI3wJqeigEc90tNgn3g8uXMUv2u5sllTIdfEzW hUjS1DuIFQS72Pl30tft3ohDEiHIcTJTOokUNItijBQdN3Ug5aUhVKsF81K5byjPqlAf LyukhDmXwy02gx7+nuWXi4KV/K/Osb+3FAP92oHXphN56aXQoVHbY1qi1DOl6tx/kJYq cEx8C36HMbVJliqUmvwcMxf69vizNpJmyLj3AGXh2yQRKIsyA6p8F6Y9MC3Zew9bjppz UzAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:to:from:delivered-to:sender:list-help :list-post:list-archive:list-subscribe:list-unsubscribe:list-id :precedence:mailing-list:dkim-signature:domainkey-signature :arc-authentication-results; bh=FRM7O7K1C+Be/UumabG7HD6zfMyWEsmNYJz39E3NrPg=; b=Qfd1WI6iEGpCLt6WG5j3b3HnyQWuczUsVJdGzvLk1HfiYpM1LFdRF/iwsf3725uWqX bVdbTwWOBzzgZQelC55DVl2OTKYXkejTStY2CSlrkq80iDzaC/vxsYEbHvaYlF0xnNkI t53ouCFPihMYBAN+uT/X/ZJQKBs6xuky4+LLt1O6WVFO4ZEJDHfd7JCvaqvI3txH7xIn daD9RRUaG27yOhM9R6YFGjDxWBWk7TWpX5xZMBMypAbTbgyWXB/wHGTEC8KLUWRH34bj hmYTn1vyU56LG6KZJvo1mTsqk441sxncN7WrQXoxfbkXNBEjAbMKTIpz7EbRwViKu4gW lKoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=TSqfFDp2; spf=pass (google.com: domain of newlib-return-15410-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=newlib-return-15410-patch=linaro.org@sourceware.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id c10si2187403pgn.248.2017.11.29.17.49.06 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Nov 2017 17:49:06 -0800 (PST) Received-SPF: pass (google.com: domain of newlib-return-15410-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=TSqfFDp2; spf=pass (google.com: domain of newlib-return-15410-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=newlib-return-15410-patch=linaro.org@sourceware.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id; q=dns; s= default; b=pCOX1gHh9oVENklD8oDDdgDwr9v1NNMCFi527nJdLwZKoM2HLzxFj joMIX4gur51vnZrkp90d0YxC3CPfuIwh7XSpOh0a85VtjpiLguv4ksEmK4Ewf3ZG q6Am0sj/MosPPfcmhZMj3U9J3wMS8AKzKiwl2kBs7QMEgZ9LaO46og= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id; s=default; bh=L+LT3MyaRhcqSdNsyTF5fGaYNnM=; b=TSqfFDp2xb+luUSDh4f0M+XuvaJZ 5AiCQ53GEpJOKPo+DOZvf5eOc/vCCG0EWMgzC08C7biuCbyvYGJRjeTSGXYhGluq MgaAwAsMt2BMa89uzljJVhMQZsdjr5QwHZ3swnaE8fnKR4PI4BYE8jOBBvuUUDgU OsWCXfAUzm1qSxc= Received: (qmail 78550 invoked by alias); 30 Nov 2017 01:48:52 -0000 Mailing-List: contact newlib-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: newlib-owner@sourceware.org Delivered-To: mailing list newlib@sourceware.org Received: (qmail 78515 invoked by uid 89); 30 Nov 2017 01:48:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.7 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KB_WAM_FROM_NAME_SINGLEWORD, SPF_HELO_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=RETURNS X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 30 Nov 2017 01:48:40 +0000 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 442038008D for ; Thu, 30 Nov 2017 01:48:39 +0000 (UTC) Received: from localhost.localdomain (ovpn-116-45.phx2.redhat.com [10.3.116.45]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DE9D05D964 for ; Thu, 30 Nov 2017 01:48:38 +0000 (UTC) From: Yaakov Selkowitz To: newlib@sourceware.org Subject: [PATCH] string: add wmempcpy Date: Wed, 29 Nov 2017 19:48:29 -0600 Message-Id: <20171130014829.19408-1-yselkowi@redhat.com> Signed-off-by: Yaakov Selkowitz --- newlib/libc/include/wchar.h | 4 +++ newlib/libc/string/Makefile.am | 5 +-- newlib/libc/string/Makefile.in | 67 +++++++++++++++++++--------------------- newlib/libc/string/wcstrings.tex | 4 +++ newlib/libc/string/wmempcpy.c | 43 ++++++++++++++++++++++++++ 5 files changed, 85 insertions(+), 38 deletions(-) create mode 100644 newlib/libc/string/wmempcpy.c -- 2.15.0 diff --git a/newlib/libc/include/wchar.h b/newlib/libc/include/wchar.h index 25ee9a880..16e28f41d 100644 --- a/newlib/libc/include/wchar.h +++ b/newlib/libc/include/wchar.h @@ -186,6 +186,10 @@ int _EXFUN(wmemcmp, (const wchar_t *, const wchar_t *, size_t)); wchar_t *_EXFUN(wmemcpy, (wchar_t *__restrict, const wchar_t *__restrict, size_t)); wchar_t *_EXFUN(wmemmove, (wchar_t *, const wchar_t *, size_t)); +#if __GNU_VISIBLE +wchar_t *_EXFUN(wmempcpy, (wchar_t *__restrict, const wchar_t *__restrict, + size_t)); +#endif wchar_t *_EXFUN(wmemset, (wchar_t *, wchar_t, size_t)); long _EXFUN(wcstol, (const wchar_t *__restrict, wchar_t **__restrict, int)); diff --git a/newlib/libc/string/Makefile.am b/newlib/libc/string/Makefile.am index a21e3d55d..49de080e1 100644 --- a/newlib/libc/string/Makefile.am +++ b/newlib/libc/string/Makefile.am @@ -125,7 +125,8 @@ ELIX_4_SOURCES = \ wcscoll_l.c \ wcsncasecmp.c \ wcsncasecmp_l.c \ - wcsxfrm_l.c + wcsxfrm_l.c \ + wmempcpy.c endif !ELIX_LEVEL_3 endif !ELIX_LEVEL_2 endif !ELIX_LEVEL_1 @@ -164,6 +165,6 @@ wmemcmp.def wmemcpy.def wmemmove.def wmemset.def \ memmem.def memrchr.def rawmemchr.def strchrnul.def \ strcasecmp_l.def strcoll_l.def strncasecmp_l.def strxfrm_l.def \ wcscasecmp_l.def wcscoll_l.def wcsncasecmp_l.def wcsxfrm_l.def \ -strverscmp.def strnstr.def +strverscmp.def strnstr.def wmempcpy.def CHAPTERS = strings.tex wcstrings.tex diff --git a/newlib/libc/string/Makefile.in b/newlib/libc/string/Makefile.in index 13dee83e0..a73d2fe7b 100644 --- a/newlib/libc/string/Makefile.in +++ b/newlib/libc/string/Makefile.in @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.12.2 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2012 Free Software Foundation, Inc. - +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -53,11 +54,15 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ DIST_COMMON = $(srcdir)/../../Makefile.shared $(srcdir)/Makefile.in \ - $(srcdir)/Makefile.am $(top_srcdir)/../../mkinstalldirs + $(srcdir)/Makefile.am subdir = string ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/../acinclude.m4 \ - $(top_srcdir)/configure.in +am__aclocal_m4_deps = $(top_srcdir)/../../libtool.m4 \ + $(top_srcdir)/../../ltoptions.m4 \ + $(top_srcdir)/../../ltsugar.m4 \ + $(top_srcdir)/../../ltversion.m4 \ + $(top_srcdir)/../../lt~obsolete.m4 \ + $(top_srcdir)/../acinclude.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs @@ -132,7 +137,8 @@ am__objects_1 = lib_a-bcopy.$(OBJEXT) lib_a-bzero.$(OBJEXT) \ @ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-wcscoll_l.$(OBJEXT) \ @ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-wcsncasecmp.$(OBJEXT) \ @ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-wcsncasecmp_l.$(OBJEXT) \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-wcsxfrm_l.$(OBJEXT) +@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-wcsxfrm_l.$(OBJEXT) \ +@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-wmempcpy.$(OBJEXT) @USE_LIBTOOL_FALSE@am_lib_a_OBJECTS = $(am__objects_1) \ @USE_LIBTOOL_FALSE@ $(am__objects_2) $(am__objects_3) lib_a_OBJECTS = $(am_lib_a_OBJECTS) @@ -171,7 +177,8 @@ am__objects_4 = bcopy.lo bzero.lo explicit_bzero.lo ffsl.lo ffsll.lo \ @ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ wcscoll_l.lo \ @ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ wcsncasecmp.lo \ @ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ wcsncasecmp_l.lo \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ wcsxfrm_l.lo +@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ wcsxfrm_l.lo \ +@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ wmempcpy.lo @USE_LIBTOOL_TRUE@am_libstring_la_OBJECTS = $(am__objects_4) \ @USE_LIBTOOL_TRUE@ $(am__objects_5) $(am__objects_6) libstring_la_OBJECTS = $(am_libstring_la_OBJECTS) @@ -258,10 +265,8 @@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NEWLIB_CFLAGS = @NEWLIB_CFLAGS@ NM = @NM@ @@ -290,7 +295,6 @@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ aext = @aext@ @@ -458,7 +462,8 @@ GENERAL_SOURCES = \ @ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ wcscoll_l.c \ @ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ wcsncasecmp.c \ @ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ wcsncasecmp_l.c \ -@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ wcsxfrm_l.c +@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ wcsxfrm_l.c \ +@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ wmempcpy.c @ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_TRUE@ELIX_4_SOURCES = @ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_TRUE@ELIX_4_SOURCES = @@ -500,7 +505,7 @@ wmemcmp.def wmemcpy.def wmemmove.def wmemset.def \ memmem.def memrchr.def rawmemchr.def strchrnul.def \ strcasecmp_l.def strcoll_l.def strncasecmp_l.def strxfrm_l.def \ wcscasecmp_l.def wcscoll_l.def wcsncasecmp_l.def wcsxfrm_l.def \ -strverscmp.def strnstr.def +strverscmp.def strnstr.def wmempcpy.def CHAPTERS = strings.tex wcstrings.tex all: all-am @@ -548,14 +553,12 @@ lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES) $(EXTRA_lib_a_DEPENDENCIES) clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; \ - locs=`for p in $$list; do echo $$p; done | \ - sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ - sort -u`; \ - test -z "$$locs" || { \ - echo rm -f $${locs}; \ - rm -f $${locs}; \ - } + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done libstring.la: $(libstring_la_OBJECTS) $(libstring_la_DEPENDENCIES) $(EXTRA_libstring_la_DEPENDENCIES) $(libstring_la_LINK) $(am_libstring_la_rpath) $(libstring_la_OBJECTS) $(libstring_la_LIBADD) $(LIBS) @@ -1198,6 +1201,12 @@ lib_a-wcsxfrm_l.o: wcsxfrm_l.c lib_a-wcsxfrm_l.obj: wcsxfrm_l.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-wcsxfrm_l.obj `if test -f 'wcsxfrm_l.c'; then $(CYGPATH_W) 'wcsxfrm_l.c'; else $(CYGPATH_W) '$(srcdir)/wcsxfrm_l.c'; fi` +lib_a-wmempcpy.o: wmempcpy.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-wmempcpy.o `test -f 'wmempcpy.c' || echo '$(srcdir)/'`wmempcpy.c + +lib_a-wmempcpy.obj: wmempcpy.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-wmempcpy.obj `if test -f 'wmempcpy.c'; then $(CYGPATH_W) 'wmempcpy.c'; else $(CYGPATH_W) '$(srcdir)/wmempcpy.c'; fi` + mostlyclean-libtool: -rm -f *.lo @@ -1253,20 +1262,6 @@ GTAGS: && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" -cscopelist: $(HEADERS) $(SOURCES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP)'; \ - case "$(srcdir)" in \ - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ - *) sdir=$(subdir)/$(srcdir) ;; \ - esac; \ - for i in $$list; do \ - if test -f "$$i"; then \ - echo "$(subdir)/$$i"; \ - else \ - echo "$$sdir/$$i"; \ - fi; \ - done >> $(top_builddir)/cscope.files - distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags check-am: @@ -1377,7 +1372,7 @@ uninstall-am: .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLIBRARIES clean-noinstLTLIBRARIES \ - cscopelist ctags distclean distclean-compile distclean-generic \ + ctags distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi dvi-am html html-am info \ info-am install install-am install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ diff --git a/newlib/libc/string/wcstrings.tex b/newlib/libc/string/wcstrings.tex index 5b9c22069..161b35cb5 100644 --- a/newlib/libc/string/wcstrings.tex +++ b/newlib/libc/string/wcstrings.tex @@ -10,6 +10,7 @@ declarations are in @file{wchar.h}. * wmemcmp:: Compare two wide-character memory areas * wmemcpy:: Copy wide-character memory regions * wmemmove:: Move possibly overlapping wide-character memory +* wmempcpy:: Copy wide-character memory regions and locate end * wmemset:: Set an area of memory to a specified wide character * wcscat:: Concatenate wide-character strings * wcschr:: Search for wide character in string @@ -49,6 +50,9 @@ declarations are in @file{wchar.h}. @page @include string/wmemmove.def +@page +@include string/wmempcpy.def + @page @include string/wmemset.def diff --git a/newlib/libc/string/wmempcpy.c b/newlib/libc/string/wmempcpy.c new file mode 100644 index 000000000..a3b2ce637 --- /dev/null +++ b/newlib/libc/string/wmempcpy.c @@ -0,0 +1,43 @@ +/* +FUNCTION + <>---copy wide characters in memory and return end pointer + +SYNOPSIS + #define _GNU_SOURCE + #include + wchar_t *wmempcpy(wchar_t *<[d]>, + const wchar_t *<[s]>, size_t <[n]>); + +DESCRIPTION + The <> function copies <[n]> wide characters from the object + pointed to by <[s]> to the object pointed to be <[d]>. This function + is not affected by locale and all wchar_t values are treated + identically. The null wide character and wchar_t values not + corresponding to valid characters are not treated specially. + + If <[n]> is zero, <[d]> and <[s]> must be a valid pointers, and the + function copies zero wide characters. + +RETURNS + <> returns a pointer to the wide character following the + last wide character copied to the <[out]> region. + +PORTABILITY +<> is a GNU extension. + +No supporting OS subroutines are required. +*/ + +#define _GNU_SOURCE +#include <_ansi.h> +#include +#include + +wchar_t * +_DEFUN (wmempcpy, (d, s, n), + wchar_t *__restrict d _AND + _CONST wchar_t *__restrict s _AND + size_t n) +{ + return (wchar_t *) mempcpy (d, s, n * sizeof (wchar_t)); +}