A
download wlite_config.h
Language: C
Copyright: (C) 2003 Red Hat, Inc.
LOC: 84
Project Info
include
Server: CentOS 5.0 i386
Type: filesystem
...entOS 5.0 i386\usr\include\
   _G_config.h
   a.out.h
   af_vfs.h
   aio.h
   aliases.h
   alloca.h
   ansidecl.h
   ar.h
   argp.h
   argz.h
   aspell.h
   assert.h
   audiofile.h
   aupvlist.h
   autosprintf.h
   autotest.h
   baudboy.h
   bdevid.h
   bfd.h
   bfdlink.h
   bitio.h
   blktaplib.h
   btr.h
   byteswap.h
   bzlib.h
   capi20.h
   capicmd.h
   capiutils.h
   ccs.h
   check.h
   cky_applet.h
   cky_base.h
   cky_card.h
   cky_factory.h
   cky_list.h
   colorname.h
   complex.h
   cpio.h
   crack.h
   crypt.h
   ctype.h
   curses.h
   db.h
   db_185.h
   db_cxx.h
   dejagnu.h
   dhcpctl.h
   dirent.h
   dis-asm.h
   dlfcn.h
   dns_sd.h
   dwarf.h
   ecpg_informix.h
   ecpgerrno.h
   ecpglib.h
   ecpgtype.h
   edsio.h
   edsio_edsio.h
   elf.h
   endian.h
   entities.h
   envz.h
   err.h
   errno.h
   error.h
   eruby.h
   esd.h
   eti.h
   event.h
   execinfo.h
   expat.h
   expat_external.h
   expect.h
   expect_comm.h
   expect_tcl.h
   fam.h
   fcntl.h
   features.h
   fenv.h
   FlexLexer.h
   fmtmsg.h
   fnmatch.h
   form.h
   fpu_control.h
   fstab.h
   ft2build.h
   fts.h
   ftw.h
   gconv.h
   gcrypt-module.h
   gcrypt.h
   gd.h
   gd_io.h
   gdbm.h
   gdcache.h
   gdfontg.h
   gdfontl.h
   gdfontmb.h
   gdfonts.h
   gdfontt.h
   gdfx.h
   gelf.h
   getopt.h
   gettext-po.h
   gif_lib.h
   glob.h
   gmp-i386.h
   gmp-mparam-i386.h
   gmp-mparam.h
   gmp.h
   gmpxx.h
   gnu-versions.h
   gpg-error.h
   gpm.h
   grp.h
   hesiod.h
   hfs.h
   icc34.h
   iconv.h
   idn-free.h
   idn-int.h
   idna.h
   ieee1284.h
   ieee754.h
   ifaddrs.h
   initreq.h
   inttypes.h
   ip6tables.h
   iptables.h
   iptables_common.h
   iwlib.h
   jconfig.h
   jerror.h
   jmorecfg.h
   jpeglib.h
   k3baudiocdtrackdrag.h
   k3baudiocdtracksource.h
   ...udiocuefilewritingjob.h
   k3baudiodatasource.h
   ...diodatasourceiterator.h
   k3baudiodecoder.h
   k3baudiodoc.h
   k3baudioencoder.h
   k3baudiofile.h
   k3baudiojob.h
   k3baudiooutputplugin.h
   k3baudiotrack.h
   k3baudiozerodata.h
   k3bbinimagewritingjob.h
   k3bblankingjob.h
   k3bbootitem.h
   k3bbusywidget.h
   k3bcdcopyjob.h
   k3bcdparanoialib.h
   k3bcdrdaowriter.h
   k3bcdrecordwriter.h
   k3bcdtext.h
   k3bcdtextvalidator.h
   k3bclonejob.h
   k3bcore.h
   k3bcuefileparser.h
   k3bcutcombobox.h
   k3bdatadoc.h
   k3bdataitem.h
   k3bdatajob.h
   ...faultexternalprograms.h
   k3bdevice.h
   k3bdevicecombobox.h
   k3bdeviceglobals.h
   k3bdevicehandler.h
   k3bdevicemanager.h
   k3bdeviceselectiondialog.h
   k3bdevicetypes.h
   k3bdiritem.h
   k3bdiskinfo.h
   k3bdoc.h
   k3bdvdcopyjob.h
   k3bdvddoc.h
   k3bdvdformattingjob.h
   k3bdvdjob.h
   k3bexceptions.h
   k3bexternalbinmanager.h
   k3bfileitem.h
   k3bglobals.h
   k3bglobalsettings.h
   k3bgrowisofswriter.h
   k3binffilewriter.h
   k3bintvalidator.h
   k3biso9660.h
   k3biso9660backend.h
   ...so9660imagewritingjob.h
   k3bisooptions.h
   k3bjob.h
   k3bjobhandler.h
   k3blistview.h
   k3blistviewitemanimator.h
   k3bmd5job.h
   k3bmixeddoc.h
   k3bmixedjob.h
   k3bmovixdoc.h
   k3bmovixdvddoc.h
   k3bmovixdvdjob.h
   k3bmovixfileitem.h
   k3bmovixjob.h
   k3bmsf.h
   k3bmsfedit.h
   k3bmultichoicedialog.h
   k3bplugin.h
   k3bpluginconfigwidget.h
   k3bpluginfactory.h
   k3bpluginmanager.h
   k3bprocess.h
   k3bprogressdialog.h
   k3bprojectplugin.h
   k3bpushbutton.h
   k3bradioaction.h
   k3bsignalwaiter.h
   k3bsimplejob.h
   k3bstdguiitems.h
   k3bstringutils.h
   k3bthread.h
   k3bthreadjob.h
   k3bthreadwidget.h
   k3bthroughputestimator.h
   k3btoc.h
   k3btocfilewriter.h
   k3btoolbox.h
   k3btrack.h
   k3bvalidators.h
   k3bvcddoc.h
   k3bvcdjob.h
   k3bvcdoptions.h
   k3bversion.h
   k3bvideodvddoc.h
   k3bvideodvdjob.h
   k3bwavefilewriter.h
   kcutlabel.h
   keyutils.h
   kommander_export.h
   kommanderfactory.h
   kommanderplugin.h
   kommanderwidget.h
   krb5.h
   langinfo.h
   lastlog.h
   lber.h
   lber_types.h
   lcms.h
   ldap.h
   ldap_cdefs.h
   ldap_features.h
   ldap_schema.h
   ldap_utf8.h
   liba2ps.h
   libaio.h
   libaudit.h
   libcman.h
   libcryptsetup.h
   libdevmapper-event.h
   libdevmapper.h
   libdlm.h
   libelf.h
   libgen.h
   libgroup.h
   libguile.h
   libiberty.h
   libintl.h
   libio.h
   libipq.h
   libmng.h
   libmng_conf.h
   libmng_types.h
   libmsrpc.h
   libpq-fe.h
   libsmbclient.h
   libvolume_id.h
   limits.h
   link.h
   locale.h
   lockdev.h
   ltdl.h
   lvm2cmd.h
   m17n-core.h
   m17n-misc.h
   m17n.h
   magic.h
   Magick++.h
   malloc.h
   mallocvar.h
   math.h
   mcheck.h
   memory.h
   menu.h
   mikmod.h
   mntent.h
   monetary.h
   mp.h
   mpf2mpfr.h
   mpfr.h
   mpfrxx.h
   mqueue.h
   mxBeeBase.h
   mxbmse.h
   mxDateTime.h
   mxh.h
   mxProxy.h
   mxQueue.h
   mxte.h
   mxTextTools.h
   mxTools.h
   nash.h
   ncurses.h
   netdb.h
   newt.h
   nfsidmap.h
   nl_types.h
   nlist.h
   nss.h
   nstring.h
   numa.h
   numaif.h
   obstack.h
   odb.h
   odbcinst.h
   odbcinstext.h
   op_config.h
   op_cpu_type.h
   op_events.h
   op_list.h
   op_sample_file.h
   op_types.h
   packer.h
   pam.h
   pammap.h
   panel.h
   paths.h
   pbm.h
   pbmfont.h
   pcap-bpf.h
   pcap-namedb.h
   pcap.h
   pcre.h
   pcre_scanner.h
   pcre_stringpiece.h
   pcrecpp.h
   pcrecpparg.h
   pcreposix.h
   pg_config.h
   pg_config_i386.h
   pg_config_manual.h
   pg_config_os.h
   pgm.h
   pgtypes_date.h
   pgtypes_error.h
   pgtypes_interval.h
   pgtypes_numeric.h
   pgtypes_timestamp.h
   pi-address.h
   pi-address.hxx
   pi-appinfo.h
   pi-appinfo.hxx
   pi-args.h
   pi-cmp.h
   pi-datebook.h
   pi-datebook.hxx
   pi-debug.h
   pi-dlp.h
   pi-dlp.hxx
   pi-expense.h
   pi-file.h
   pi-header.h
   pi-hinote.h
   pi-inet.h
   pi-macros.h
   pi-mail.h
   pi-md5.h
   pi-memo.h
   pi-memo.hxx
   pi-money.h
   pi-net.h
   pi-notepad.h
   pi-padp.h
   pi-palmpix.h
   pi-serial.h
   pi-slp.h
   pi-sockaddr.h
   pi-socket.h
   pi-source.h
   pi-sync.h
   pi-sys.h
   pi-syspkt.h
   pi-todo.h
   pi-todo.hxx
   pi-usb.h
   pi-util.h
   pi-version.h
   pm.h
   pm_config.h
   pm_gamma.h
   pm_system.h
   png.h
   pngconf.h
   pnm.h
   poll.h
   popt.h
   postgres_ext.h
   ppm.h
   ppmcmap.h
   ppmfloyd.h
   pr29.h
   printf.h
   profile.h
   ptbuildopts.h
   pthread.h
   ptlib.h
   pty.h
   pump.h
   punycode.h
   pwd.h
   re_comp.h
   regex.h
   regexp.h
   resolv.h
   rsrc.h
   sched.h
   search.h
   semaphore.h
   setjmp.h
   sgtty.h
   shadow.h
   shhopt.h
   signal.h
   slapi-plugin.h
   spawn.h
   speex.h
   speex_bits.h
   speex_callbacks.h
   speex_header.h
   speex_stereo.h
   sql.h
   sql3types.h
   sqlca.h
   sqlext.h
   sqlite3.h
   sqltypes.h
   sqlucode.h
   stab.h
   stdint.h
   stdio.h
   stdio_ext.h
   stdlib.h
   string.h
   stringprep.h
   strings.h
   stropts.h
   symcat.h
   syscall.h
   sysexits.h
   syslog.h
   tar.h
   tcl.h
   tcldbg.h
   tclDecls.h
   tclExtend.h
   tclPlatDecls.h
   tcpd.h
   term.h
   termcap.h
   termio.h
   termios.h
   tgmath.h
   thread_db.h
   tiff.h
   tiffconf-32.h
   tiffconf.h
   tiffio.h
   tiffio.hxx
   tiffvers.h
   time.h
   tix.h
   tk.h
   tkDecls.h
   tkPlatDecls.h
   tld.h
   tn5250.h
   ttyent.h
   ttylock.h
   tux.h
   tuxmodule.h
   ucontext.h
   ulimit.h
   unctrl.h
   unistd.h
   uodbc_stats.h
   usb.h
   usbpp.h
   ustat.h
   utempter.h
   utime.h
   utmp.h
   utmpx.h
   values.h
   wait.h
   wchar.h
   wctype.h
   wireless.h
   wlite_config.h
   wlite_stdlib.h
   wlite_wchar.h
   wlite_wctype.h
   wordexp.h
   xd_edsio.h
   xdelta.h
   xenctrl.h
   xenguest.h
   xf86drm.h
   xlocale.h
   xs.h
   xs_lib.h
   zconf.h
   zlib.h
   zutil.h

/*
 * $Package: wlite $ $Version: 0.8.1 $
 *
 * Copyright (C) 2003  Red Hat, Inc.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 * Original Author: Adrian Havill <havill@redhat.com>
 *
 * Contributors:
 */

#ifndef WLITE_CONFIG_H_
#define WLITE_CONFIG_H_

/*
 * if set to non-zero, utf8 versions of wcwidth in the library must be called
 * by their proper identifiers, which always begin with a "wlite_" prefix (e.g.
 * "wlite_wcwidth"). If it is zero, calls to some wide character functions in
 * <wchar.h>, <wctype.h>, and <stdlib.h> will be redefined by the preprocessor
 * to use this libraries equivalents, if available.
 */
#ifndef WLITE_REDEF_STDC
#define WLITE_REDEF_STDC                  !0
#endif

/* if the below is zero then wide family functions will not work on wchar_t
 * values > 0xFFFF.
 *
 * XXX: a BIG savings in data memory is obtained by setting to zero
 */
#ifndef WLITE_XBMP_CHAR
#define WLITE_XBMP_CHAR                   !0
#endif

/*
 * when set to non-zero, will squeeze four byte UTF-8 representing U-10000 to
 * U-10FFFF into two wide chars via surrogates and back.
 *
 * XXX: this setting is forced to non-zero if WLITE_XBMP_CHAR is zero
 */
#ifndef WLITE_GENERATE_SURROGATES
#define WLITE_GENERATE_SURROGATES          0
#endif

/*
 * if set to non-zero, <wctype.h> related classification and transformation
 * functions will be augmented (in a portable way) to support transformations
 * and classifications useful for CJK UTF-8 users.
 *
 * XXX: a savings in data memory is obtained by setting to zero
 */
#ifndef WLITE_EXTENSIONS
#define WLITE_EXTENSIONS                  !0
#endif

/*
 * if WLITE_AMBI_LOCALE is non-zero, characters that are considered to have
 * ambiguous width will be resolved by examining the locale settings of the
 * environment; if the environment is a CJKV locale, ambiguous characters will
 * have a monospace width of two-- otherwise, their width will be one.
 *
 * XXX: a savings in data memory is obtained if WLITE_AMBI_LOCALE is zero
 * XXX: if WLITE_AMBI_LOCALE is zero, WLITE_LC_ALL determines ambiguous width
 */
#ifndef WLITE_AMBI_LOCALE
#define WLITE_AMBI_LOCALE                 !0
#endif

/*
 * if WLITE_ENVIRONMENT is zero, wlite_*() functions will be sensitive to the
 * setting of WLITE_LC_ALL. if WLITE_ENVIRONMENT's positive, wlite_*() functions
 * will be sensitive to the value returned by setlocale(). if WLITE_ENVIRONMENT
 * is negative, wlite_*() functions will be sensitive to environment variables
 * such as "LC_COLLATE", "LC_TIME", and "LC_CTYPE"; LANG and LC_ALL settings are
 * ignored.
 *
 * XXX: a non-positive value results in non-standard behavior, but for
 *      performance/space reasons (setlocale() is often a very expensive
 *      function & environment variables may not be available or reliable on
 *      certain hosts), environmental variables or hard-coding the
 *      locale may be used.
 */
#ifndef WLITE_ENVIRONMENT
#define WLITE_ENVIRONMENT                 +1
#endif

/*
 * WLITE_LC_ALL specifies the locale that wlite_*() functions are affected by.
 * 
 * XXX: WLITE_LC_ALL is ignored if WLITE_ENVIRONMENT is non-zero
 */
#ifndef WLITE_LC_ALL
#define WLITE_LC_ALL                       C
#endif

/*
 * not really legal as you're not using the shortest possible sequence to
 * generate a Unicode character, but some overly-literal encoding converters do
 * generate them. 6 byte utf-8 hi/lo surrogate combinations are never written;
 * characters >U+FFFF are always written with 4 utf-8 bytes.
 *
 * XXX: WLITE_READ_6_BYTE_UTF8_SURROGATE is ignored if WLITE_XBMP_CHAR is zero
 */
#ifndef WLITE_READ_6_BYTE_UTF8_SURROGATE
#define WLITE_READ_6_BYTE_UTF8_SURROGATE  !0
#endif

/*
 * the width of U+FFFD depends on the substitute glyph (if any) used to
 * represent it. If you use "?" (ala Netscape and Mozilla), or a middle dot or
 * small filled rectangle (ala Windows), the width is one. If you use something
 * like the replacement glyphs <http://crl.nmsu.edu/~mleisher/lr.html> or the
 * ideograph replacement character (U+3013) (which is convenient because it
 * already exists in most legacy CJK fonts), or a square with four hex symbols
 * compressed in it, the width is probably two.
 */
#ifndef WLITE_FFFD_WIDTH
#define WLITE_FFFD_WIDTH                   2
#endif

/*****************************************************************************/

#include <stddef.h>

/* XXX: it seems that gcc either has problems with bit-shift operators if
 * WLITE_BITARRAY_N_ > 32 and the architecture is 32 bits, so keep
 * WLITE_ARRAY_* bits <= 32 to avoid using 64-bit types (i.e. "uint64_t")
 * with "<<" and ">>".
 */
#include <stdint.h>
#define WLITE_BITARRAY_N_                 32U
typedef uint32_t wlite_bitarray_t_;
#if WLITE_XBMP_CHAR
typedef wchar_t wlite_wc_t_;
#else
typedef unsigned short wlite_wc_t_;
#endif

typedef int (*wlite_cmp_t_)(const void*,const void*);
typedef struct { wlite_wc_t_ from, to; } wlite_map_t_;

int wlite_map_t_cmp_(const void*, const void*);
int wlite_wc_t_cmp_(const void*, const void*);
int wlite_locale_cmp_(const void*, const void*);
long long wlite_widetoll_(const wchar_t*,wchar_t**,unsigned);
int wlite_strcmp_(const char*, const char*);
char *wlite_memcpy_(char*,const char*,size_t);
void *wlite_bsearch_(const void*,const void*,size_t,size_t,wlite_cmp_t_);
void wlite_0_mbstate_(void*);

#define WLITE_ID2STR_(identifier) #identifier

#define WLITE_MBS_SHIFT_STATES_ 0

#define WLITE_MBSTATE_INCOMPLETE_ 1
#define WLITE_MBSTATE_ERROR_      2
#define WLITE_MBSTATE_SURROGATE_  4

#if WLITE_ENVIRONMENT
    #if WLITE_ENVIRONMENT > 0
        #include <locale.h>
        #define WLITE_GET_LOCALE(category) setlocale((category),NULL)
    #else
        #include <stdlib.h>
        #define WLITE_GET_LOCALE(category) getenv(#category)
    #endif
#elif defined WLITE_LC_ALL
    #define WLITE_GET_LOCALE(category) WLITE_ID2STR_(WLITE_LC_ALL)
#else
    #define WLITE_GET_LOCALE(category) NULL
#endif

#define WLITE_LOCALE_CMP_(category, value) \
            wlite_locale_cmp_(WLITE_GET_LOCALE(category),(value))

#define WLITE_IS_CJK_(category) ( \
               WLITE_LOCALE_CMP_((category),"zh*") == 0 \
            || WLITE_LOCALE_CMP_((category),"ja*") == 0 \
            || WLITE_LOCALE_CMP_((category),"ko*") == 0 \
        )
#define WLITE_IS_POSIX_(category) ( \
               WLITE_LOCALE_CMP_((category),"C") == 0 \
            || WLITE_LOCALE_CMP_((category),"POSIX") == 0 \
        )

#if __STDC_VERSION__ >= 199409L
    #include <wchar.h>  /* WCHAR_MAX, WCHAR_MIN */

    #if WLITE_XBMP_CHAR && WCHAR_MAX < WLITE_WCHAR_MAX
        #error WLITE_XBMP_CHAR is set & wide characters are only two bytes wide
    #endif
#endif

#endif

About Koders | Resources | Downloads | Support | Black Duck | Terms of Service | DMCA | Privacy Policy | Contact Us