- * Copyright (c) 2003-2002,2011 Free Software Foundation, Inc. *
+ * Copyright 2020 Thomas E. Dickey *
+ * Copyright 2003-2011,2016 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 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
mbstate_t state;
T((T_CALLED("slk_wset(%d, %s, %d)"), i, _nc_viswbuf(astr), format));
if (astr != 0) {
mbstate_t state;
T((T_CALLED("slk_wset(%d, %s, %d)"), i, _nc_viswbuf(astr), format));
if (astr != 0) {
if ((arglen = wcsrtombs(NULL, &str, (size_t) 0, &state)) != (size_t) -1) {
if ((arglen = wcsrtombs(NULL, &str, (size_t) 0, &state)) != (size_t) -1) {
if ((mystr = (char *) _nc_doalloc(0, arglen + 1)) != 0) {
str = astr;
if (wcsrtombs(mystr, &str, arglen, &state) != (size_t) -1) {
if ((mystr = (char *) _nc_doalloc(0, arglen + 1)) != 0) {
str = astr;
if (wcsrtombs(mystr, &str, arglen, &state) != (size_t) -1) {