~n-muench/ubuntu/precise/open-vm-tools/open-vm-tools.raring-precise.backport

« back to all changes in this revision

Viewing changes to lib/misc/codeset.c

  • Committer: Package Import Robot
  • Author(s): Nate Muench
  • Date: 2012-01-23 16:09:45 UTC
  • mfrom: (1.4.6) (2.4.26 sid)
  • Revision ID: package-import@ubuntu.com-20120123160945-b6s0r1vkcovucpf3
Tags: 2011.12.20-562307-0ubuntu1
* Merge latest upstream git tag. Fixes building on Precise
  (LP: #898289, LP: #905612)

* Items merged from Debian unstable:
  - debian/control:
    + open-vm-tools recommends open-vm-dkms. (LP: #598933)
    + open-vm-tools now suggests open-vm-toolbox. (LP: #604998)
  (From 2011.08.21-471295-1 release)
  - Updating maintainer and uploaders fields.
  - Removing vcs fields.
  - Removing references to Daniel's old email address.
  - Updating years in copyright file.
  - Updating to standards version 3.9.2.
  - Updating to debhelper version 8.
  - Switching to source format 3.0 (quilt).
  - Removing manual chrpath setting.
  - Removing exclusion from plugins from debhelper shlibs.
  - Rediffing kvers.patch.
  (From 2011.09.23-491607-1 release)
  - Marking binary architecture-dependend packages as linux and kfreebsd
  only.
  - Removing liburiparser-dev from build-depends as upstream dropped
  unity support.
  - Building with libproc-dev on amd64 again.
  - Dropping disabling of dnet support.
  (From 2011.09.23-491607-2 release)
  - Adding doxygen to build-depends for api documentation.
  - Adding libcunit1-dev to build-depends for test suites.
  - Minimizing rules file.
  - Adding open-vm-tools-dev package, containing only the api
    documentation for now.
  (From 2011.09.23-491607-3 release)
  - Sorting overrides in rules alphabetically.
  - Compacting copyright file.
  - Adding udev rule to set timeout for vmware scsi devices
  (From 2011.12.20-562307-1 release)
  - Adding patch to correct typo in upstreams dkms configuration

* Remaining Changes:
  - Remove Stable part of version numbering.
  - debian folder:
    + Re-added open-vm-dkms.postinst & open-vm-dkms.prerm.
      * Allows dkms modules to compile upon installation.
  - debian/control:
    + Re-add open-vm-source and make into a transitional package
      for open-vm-toolbox.
    + Return dependancies that were moved to open-vm-tools back to
      open-vm-toolbox.
  - debian/rules and debian/open-vm-toolbox.lintian-overrides:
    + Make vmware-user-suid-wrapper suid-root
  - debian/rules:
    + Added CFLAGS field with -Wno-deprecated-declarations
      * Will suppress issues with glib 2.31 or later.
    + Add line to copy vmware-xdg-detect-de into place.
    + Install vmware-user.desktop through toolbox package.
  - debian/open-vm-tools.init:
    + Re-add 'modprobe [-r] vmblock'.
    + Add 'modprobe [-r] vmxnet'.
      * Incase it's not loaded during boot.
    + Remove and re-add pcnet32 module
      * Will be done before (remove) and after (readd) vmxnet module
        is added.
      * If vmxnet doesn't exist (aka modules fail to build), pcnet32 can be
        still used for network connectivity.
      * Workaround until a better fix can be done.
  - Re-add gnome-session to debian/local/xautostart.conf
  - Manpages removed (from debian/manpages):
    + vmmemctl.9
    + vmxnet3.9
    + Remove references to manpages that have been removed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
74
74
#include "vmware.h"
75
75
#include "vm_product.h"
76
76
#include "vm_atomic.h"
77
 
#include "unicode/ucnv.h"
78
 
#include "unicode/udata.h"
79
 
#include "unicode/putil.h"
 
77
#if !defined(NO_ICU)
 
78
#  include "unicode/ucnv.h"
 
79
#  include "unicode/udata.h"
 
80
#  include "unicode/putil.h"
 
81
#endif
80
82
#include "file.h"
81
83
#include "util.h"
82
84
#include "codeset.h"
137
139
 * Functions
138
140
 */
139
141
 
 
142
#if !defined NO_ICU
 
143
 
140
144
#ifdef _WIN32
141
145
 
142
146
/*
274
278
 
275
279
#endif // _WIN32
276
280
 
 
281
#endif // !NO_ICU
 
282
 
277
283
 
278
284
/*
279
285
 *-----------------------------------------------------------------------------
383
389
CodeSet_Init(const char *icuDataDir) // IN: ICU data file location in Current code page.
384
390
                                     //     Default is used if NULL.
385
391
{
 
392
#ifdef NO_ICU
 
393
   /* Nothing required if not using ICU. */
 
394
   return TRUE;
 
395
#else // NO_ICU
386
396
   DynBuf dbpath;
387
397
#ifdef _WIN32
388
398
   DWORD attribs;
690
700
   DynBuf_Destroy(&dbpath);
691
701
 
692
702
   return ret;
 
703
#endif
693
704
}
694
705
 
695
706
 
840
851
/*
841
852
 *-----------------------------------------------------------------------------
842
853
 *
843
 
 * CodeSet_GetCurrentCodeSet --
844
 
 *
845
 
 *    Return native code set name. Always calls down to
846
 
 *    CodeSetOld_GetCurrentCodeSet. See there for more details.
847
 
 *
848
 
 * Results:
849
 
 *    See CodeSetOld_GetCurrentCodeSet.
850
 
 *
851
 
 * Side effects:
852
 
 *    See CodeSetOld_GetCurrentCodeSet.
853
 
 *
854
 
 *-----------------------------------------------------------------------------
855
 
 */
856
 
 
857
 
const char *
858
 
CodeSet_GetCurrentCodeSet(void)
859
 
{
860
 
   return CodeSetOld_GetCurrentCodeSet();
861
 
}
862
 
 
863
 
 
864
 
/*
865
 
 *-----------------------------------------------------------------------------
866
 
 *
867
854
 * CodeSet_GenericToGenericDb --
868
855
 *
869
856
 *    Append the content of a buffer (that uses the specified encoding) to a
887
874
                           unsigned int flags,  // IN
888
875
                           DynBuf *db)          // IN/OUT
889
876
{
 
877
#if defined(NO_ICU)
 
878
   return CodeSetOld_GenericToGenericDb(codeIn, bufIn, sizeIn, codeOut,
 
879
                                        flags, db);
 
880
#else
890
881
   Bool result = FALSE;
891
882
   UErrorCode uerr;
892
883
   const char *bufInCur;
1055
1046
   }
1056
1047
 
1057
1048
   return result;
 
1049
#endif
1058
1050
}
1059
1051
 
1060
1052
 
1604
1596
Bool
1605
1597
CodeSet_IsEncodingSupported(const char *name) // IN
1606
1598
{
 
1599
#if defined(NO_ICU)
 
1600
   return CodeSetOld_IsEncodingSupported(name);
 
1601
#else
1607
1602
   UConverter *cv;
1608
1603
   UErrorCode uerr;
1609
1604
 
1626
1621
   }
1627
1622
 
1628
1623
   return FALSE;
 
1624
#endif
1629
1625
}
1630
1626
 
1631
1627
 
1651
1647
                 size_t size,       // IN: length of string
1652
1648
                 const char *code)  // IN: encoding
1653
1649
{
 
1650
#if defined(NO_ICU)
 
1651
   return CodeSetOld_Validate(buf, size, code);
 
1652
#else
1654
1653
   UConverter *cv;
1655
1654
   UErrorCode uerr;
1656
1655
 
1685
1684
   ucnv_close(cv);
1686
1685
 
1687
1686
   return uerr == U_BUFFER_OVERFLOW_ERROR;
 
1687
#endif
1688
1688
}
1689
1689