summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Mitz <mitza-oci@users.noreply.github.com>2009-06-23 20:14:18 +0000
committerAdam Mitz <mitza-oci@users.noreply.github.com>2009-06-23 20:14:18 +0000
commit6828ec7d89523bcec041171244cb6bb117bc4ffe (patch)
tree1317b9cb656a2b2ed8fda535c44d81918f082fae
parent7e0817da817f779d12e555ce1e3b0074a3d331e4 (diff)
downloadATCD-6828ec7d89523bcec041171244cb6bb117bc4ffe.tar.gz
ChangeLogTag: Tue Jun 23 20:12:51 UTC 2009 Adam Mitz <mitza@ociweb.com>
-rw-r--r--ACE/ChangeLog17
-rw-r--r--ACE/ace/Argv_Type_Converter.cpp20
-rw-r--r--ACE/ace/OS_NS_ctype.inl4
-rw-r--r--ACE/ace/OS_NS_stdio.cpp38
4 files changed, 24 insertions, 55 deletions
diff --git a/ACE/ChangeLog b/ACE/ChangeLog
index d26e7c459c0..8cbb8510d22 100644
--- a/ACE/ChangeLog
+++ b/ACE/ChangeLog
@@ -1,3 +1,18 @@
+Tue Jun 23 20:12:51 UTC 2009 Adam Mitz <mitza@ociweb.com>
+
+ * ace/Argv_Type_Converter.cpp:
+
+ Allow a 0-length argv list (argc == 0), argv[0] may not be valid.
+
+ * ace/OS_NS_ctype.inl:
+
+ This WinCE/Mobile work-around applies to Win32 w/ wchar as well.
+
+ * ace/OS_NS_stdio.cpp:
+
+ Removed the check for Unicode BOM in ACE_OS::fopen(). This was only
+ checked in Win32 builds with ACE_USES_WCHAR. This resolves bug#3705.
+
Tue Jun 23 15:09:50 UTC 2009 Phil Mesnier <mesnier_p@ociweb.com>
* NEWS:
@@ -5,7 +20,7 @@ Tue Jun 23 15:09:50 UTC 2009 Phil Mesnier <mesnier_p@ociweb.com>
* docs/Download.html:
* etc/index.html:
Post release updates.
-
+
Mon Jun 22 09:33:40 CDT 2009 Phil Mesnier <mesnier_p@ociweb.com>
* ACE version 5.7 released.
diff --git a/ACE/ace/Argv_Type_Converter.cpp b/ACE/ace/Argv_Type_Converter.cpp
index e16076818a4..178d25d9156 100644
--- a/ACE/ace/Argv_Type_Converter.cpp
+++ b/ACE/ace/Argv_Type_Converter.cpp
@@ -108,11 +108,10 @@ ACE_Argv_Type_Converter::initialize (void)
void
ACE_Argv_Type_Converter::align_char_with_wchar (void)
{
- int wchar_argv_index = 0;
- wchar_t* match_argv = this->wchar_argv_[0]; // pick the initial entry
-
- while (wchar_argv_index < this->saved_argc_)
+ for (int wchar_argv_index = 0; wchar_argv_index < this->saved_argc_;
+ ++wchar_argv_index)
{
+ wchar_t *match_argv = this->wchar_argv_[wchar_argv_index];
// if n'th entries of both argv lists are different
if (ACE_OS::strcmp (this->char_argv_[wchar_argv_index],
ACE_TEXT_ALWAYS_CHAR (match_argv)) != 0)
@@ -132,9 +131,6 @@ ACE_Argv_Type_Converter::align_char_with_wchar (void)
}
}
}
-
- // move to the next wchar argv list entry
- match_argv = this->wchar_argv_[++wchar_argv_index];
}
this->cleanup ();
@@ -143,11 +139,10 @@ ACE_Argv_Type_Converter::align_char_with_wchar (void)
void
ACE_Argv_Type_Converter::align_wchar_with_char (void)
{
- int char_argv_index = 0;
- char* match_argv = this->char_argv_[0]; // pick the initial entry
-
- while (char_argv_index < saved_argc_)
+ for (int char_argv_index = 0; char_argv_index < saved_argc_;
+ ++char_argv_index)
{
+ char* match_argv = this->char_argv_[char_argv_index];
// if n'th entries of both argv lists are different
if (ACE_OS::strcmp (
ACE_TEXT_ALWAYS_CHAR (this->wchar_argv_[char_argv_index]),
@@ -168,9 +163,6 @@ ACE_Argv_Type_Converter::align_wchar_with_char (void)
}
}
}
-
- // move to the next wchar argv list entry
- match_argv = this->char_argv_[++char_argv_index];
}
this->cleanup();
diff --git a/ACE/ace/OS_NS_ctype.inl b/ACE/ace/OS_NS_ctype.inl
index dce7425a0a6..a9df50a9027 100644
--- a/ACE/ace/OS_NS_ctype.inl
+++ b/ACE/ace/OS_NS_ctype.inl
@@ -123,9 +123,9 @@ ACE_INLINE int
ACE_OS::ace_isprint (ACE_TCHAR c)
{
#if defined (ACE_USES_WCHAR)
-# if defined (_WIN32_WCE) && (_WIN32_WCE <= 0x600)
+# if (defined (_WIN32_WCE) && (_WIN32_WCE <= 0x600)) || defined (ACE_WIN32)
/* WinCE 6 and earlier have the bug that for tab (\t) the
- * iswprint returns true instead of false
+ * iswprint returns true instead of false. Win32 has this problem too.
*/
if (c == 0x9)
{
diff --git a/ACE/ace/OS_NS_stdio.cpp b/ACE/ace/OS_NS_stdio.cpp
index 1e5c75dce85..5e53976c5bd 100644
--- a/ACE/ace/OS_NS_stdio.cpp
+++ b/ACE/ace/OS_NS_stdio.cpp
@@ -74,38 +74,6 @@ ACE_OS::ace_flock_t::dump (void) const
/*****************************************************************************/
-#if defined (ACE_USES_WCHAR)
-void ACE_OS::checkUnicodeFormat (FILE* fp)
-{
- if (fp != 0)
- {
- // Due to the ACE_TCHAR definition, all default input files, such as
- // svc.conf, have to be in Unicode format (small endian) on WinCE
- // because ACE has all 'char' converted into ACE_TCHAR.
- // However, for TAO, ASCII files, such as IOR file, can still be read
- // and be written without any error since given buffers are all in 'char'
- // type instead of ACE_TCHAR. Therefore, it is user's reponsibility to
- // select correct buffer type.
-
- // At this point, check if the file is Unicode or not.
- ACE_UINT16 first_two_bytes = 0;
- size_t const numRead =
- ACE_OS::fread(&first_two_bytes, sizeof (first_two_bytes), 1, fp);
-
- if (numRead <= 1)
- {
- if ((first_two_bytes != 0xFFFE) && // not a small endian Unicode file
- (first_two_bytes != 0xFEFF)) // not a big endian Unicode file
- {
- // set file pointer back to the beginning
- ACE_OS::fseek(fp, 0, SEEK_SET);
- }
- }
- // if it is a Unicode file, file pointer will be right next to the first
- // two-bytes
- }
-}
-#endif // ACE_USES_WCHAR
#if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)
namespace
@@ -193,9 +161,6 @@ ACE_OS::fopen (const char *filename,
# endif /* defined(ACE_HAS_NONCONST_FDOPEN) && !defined (ACE_USES_WCHAR)) */
if (fp != 0)
{
-# if defined (ACE_USES_WCHAR)
- checkUnicodeFormat(fp);
-# endif // ACE_USES_WCHAR
return fp;
}
::_close (fd);
@@ -251,9 +216,6 @@ ACE_OS::fopen (const wchar_t *filename,
# endif /* defined(ACE_HAS_NONCONST_FDOPEN) && !defined (ACE_USES_WCHAR)) */
if (fp != 0)
{
-# if defined (ACE_USES_WCHAR)
- checkUnicodeFormat(fp);
-# endif // ACE_USES_WCHAR
return fp;
}
::_close (fd);