[BACK]Return to vis.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / lib / libc / gen

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/lib/libc/gen/vis.c between version 1.62 and 1.63

version 1.62, 2014/09/08 17:35:01 version 1.63, 2014/09/26 01:21:07
Line 104  static wchar_t *do_svis(wchar_t *, wint_
Line 104  static wchar_t *do_svis(wchar_t *, wint_
 #define xtoa(c)         L"0123456789abcdef"[c]  #define xtoa(c)         L"0123456789abcdef"[c]
 #define XTOA(c)         L"0123456789ABCDEF"[c]  #define XTOA(c)         L"0123456789ABCDEF"[c]
   
 #define MAXEXTRAS       10  #define MAXEXTRAS       30
   
   static const wchar_t char_shell[] = L"'`\";&<>()|{}]\\$!^~";
   static const wchar_t char_glob[] = L"*?[#";
   
 #if !HAVE_NBTOOL_CONFIG_H  #if !HAVE_NBTOOL_CONFIG_H
 #ifndef __NetBSD__  #ifndef __NetBSD__
Line 318  makeextralist(int flags, const char *src
Line 321  makeextralist(int flags, const char *src
         if (mbstowcs(dst, src, len) == (size_t)-1) {          if (mbstowcs(dst, src, len) == (size_t)-1) {
                 size_t i;                  size_t i;
                 for (i = 0; i < len; i++)                  for (i = 0; i < len; i++)
                         dst[i] = (wint_t)(u_char)src[i];                          dst[i] = (wchar_t)(u_char)src[i];
                 d = dst + len;                  d = dst + len;
         } else          } else
                 d = dst + wcslen(dst);                  d = dst + wcslen(dst);
   
         if (flags & VIS_GLOB) {          if (flags & VIS_GLOB)
                 *d++ = L'*';                  for (const wchar_t *s = char_glob; *s; *d++ = *s++)
                 *d++ = L'?';                          continue;
                 *d++ = L'[';  
                 *d++ = L'#';          if (flags & VIS_SHELL)
         }                  for (const wchar_t *s = char_shell; *s; *d++ = *s++)
                           continue;
   
         if (flags & VIS_SP) *d++ = L' ';          if (flags & VIS_SP) *d++ = L' ';
         if (flags & VIS_TAB) *d++ = L'\t';          if (flags & VIS_TAB) *d++ = L'\t';

Legend:
Removed from v.1.62  
changed lines
  Added in v.1.63

CVSweb <webmaster@jp.NetBSD.org>