Print this page
remove support for non-ANSI compilation

Split Close
Expand all
Collapse all
          --- old/usr/src/head/widec.h
          +++ new/usr/src/head/widec.h
↓ open down ↓ 12 lines elided ↑ open up ↑
  13   13   *
  14   14   * When distributing Covered Code, include this CDDL HEADER in each
  15   15   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  16   16   * If applicable, add the following below this CDDL HEADER, with the
  17   17   * fields enclosed by brackets "[]" replaced with your own identifying
  18   18   * information: Portions Copyright [yyyy] [name of copyright owner]
  19   19   *
  20   20   * CDDL HEADER END
  21   21   */
  22   22  /*
       23 + * Copyright 2014 Garrett D'Amore <garrett@damore.org>
       24 + *
  23   25   * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
  24   26   * Use is subject to license terms.
  25   27   */
  26   28  
  27   29  /*      Copyright (c) 1986 AT&T */
  28   30  /*        All Rights Reserved   */
  29   31  
  30   32  
  31   33  /*      This module is created for NLS on Jun.04.86             */
  32   34  
  33   35  #ifndef _WIDEC_H
  34   36  #define _WIDEC_H
  35   37  
  36      -#pragma ident   "%Z%%M% %I%     %E% SMI"
  37      -
  38   38  #include <sys/feature_tests.h>
  39   39  
  40      -#if defined(__STDC__)
  41   40  #include <stdio.h>      /* For definition of FILE */
  42      -#endif
  43   41  #include <euc.h>
  44   42  #include <wchar.h>
  45   43  
  46   44  #ifdef  __cplusplus
  47   45  extern "C" {
  48   46  #endif
  49   47  
  50      -#if defined(__STDC__)
  51   48  /* Character based input and output functions */
  52   49  extern wchar_t  *getws(wchar_t *);
  53   50  extern int      putws(const wchar_t *);
  54   51  
  55   52  #if !defined(__lint)
  56   53  #define getwc(p)        fgetwc(p)
  57   54  #define putwc(x, p)     fputwc((x), (p))
  58   55  #define getwchar()      getwc(stdin)
  59   56  #define putwchar(x)     putwc((x), stdout)
  60   57  #endif
↓ open down ↓ 26 lines elided ↑ open up ↑
  87   84  extern long     wstol(const wchar_t *, wchar_t **, int);
  88   85  extern int      wscasecmp(const wchar_t *, const wchar_t *);
  89   86  extern int      wsncasecmp(const wchar_t *, const wchar_t *, size_t);
  90   87  extern int      wsprintf(wchar_t *, const char *, ...);
  91   88  #if defined(_LONGLONG_TYPE)
  92   89  extern long long        wstoll(const wchar_t *, wchar_t **, int);
  93   90  #endif  /* defined(_LONGLONG_TYPE) */
  94   91  
  95   92  #endif /* !defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX) */
  96   93  
  97      -#else   /* !defined(__STDC__) */
  98      -/* Character based input and output functions */
  99      -extern wchar_t          *getws();
 100      -extern int              putws();
 101      -
 102      -#ifndef getwc
 103      -#define getwc(p)        fgetwc(p)
 104      -#endif
 105      -#ifndef putwc
 106      -#define putwc(x, p)     fputwc((x), (p))
 107      -#endif
 108      -#ifndef getwchar
 109      -#define getwchar()      getwc(stdin)
 110      -#endif
 111      -#ifndef putwchar
 112      -#define putwchar(x)     putwc((x), stdout)
 113      -#endif
 114      -
 115      -/* wchar_t string operation functions */
 116      -extern wchar_t  *strtows();
 117      -extern wchar_t  *wscpy();
 118      -extern wchar_t  *wsncpy();
 119      -extern wchar_t  *wscat();
 120      -extern wchar_t  *wsncat();
 121      -extern wchar_t  *wschr();
 122      -extern wchar_t  *wsrchr();
 123      -extern wchar_t  *wspbrk();
 124      -extern wchar_t  *wstok();
 125      -
 126      -extern int      wscmp();
 127      -extern int      wsncmp();
 128      -extern int      wslen();
 129      -extern int      wsspn();
 130      -extern int      wscspn();
 131      -extern int      wscoll();
 132      -extern int      wsxfrm();
 133      -
 134      -extern char     *wstostr();
 135      -extern wchar_t  *wsdup();
 136      -extern int      wscol();
 137      -extern double   wstod();
 138      -extern long     wstol();
 139      -extern int      wscasecmp();
 140      -extern int      wsncasecmp();
 141      -extern int      wsprintf();
 142      -#if defined(_LONGLONG_TYPE)
 143      -extern long long        wstoll();
 144      -#endif  /* defined(_LONGLONG_TYPE) */
 145      -
 146      -#endif  /* !defined(__STDC__) */
 147      -
 148   94  /* Returns the code set number for the process code c. */
 149   95  #define WCHAR_SHIFT     7
 150   96  #define WCHAR_S_MASK    0x7f
 151   97  #define wcsetno(c) \
 152   98          (((c)&0x20000000)?(((c)&0x10000000)?1:3):(((c)&0x10000000)?2:0))
 153   99  
 154  100  /* Aliases... */
 155  101  #define windex          wschr
 156  102  #define wrindex         wsrchr
 157  103  
↓ open down ↓ 23 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX