Print this page
make: use the more modern wchar routines, not widec.h

@@ -168,11 +168,11 @@
         /*
          * First figure out how long the string is.
          * If the len argument is -1 we count the chars here.
          */
         if (len == FIND_LENGTH) {
-                length = wslen(name);
+                length = wcslen(name);
         } else {
                 length = len;
         }
 
         Wstring ws;

@@ -679,22 +679,22 @@
  */
 void
 append_string(register wchar_t *from, register String to, register int length)
 {
         if (length == FIND_LENGTH) {
-                length = wslen(from);
+                length = wcslen(from);
         }
         if (to->buffer.start == NULL) {
                 expand_string(to, 32 + length);
         }
         if (to->buffer.end - to->text.p <= length) {
                 expand_string(to,
                               (to->buffer.end - to->buffer.start) * 2 +
                               length);
         }
         if (length > 0) {
-                (void) wsncpy(to->text.p, from, length);
+                (void) wcsncpy(to->text.p, from, length);
                 to->text.p += length;
         }
         *(to->text.p) = (int) nul_char;
 }
 

@@ -765,11 +765,11 @@
          * Get more memory, copy the string and free the old buffer if
          * it is was malloc()'ed.
          */
         expandstring_count++;
         p = ALLOC_WC(length);
-        (void) wscpy(p, string->buffer.start);
+        (void) wcscpy(p, string->buffer.start);
         string->text.p = p + (string->text.p - string->buffer.start);
         string->text.end = p + (string->text.end - string->buffer.start);
         string->buffer.end = p + length;
         if (string->free_after_use) {
                 retmem(string->buffer.start);