[ace-users] ACE_TCHAR use in ACE_OS

Douglas C. Schmidt schmidt at dre.vanderbilt.edu
Wed Jul 18 12:44:43 CDT 2007


Hi Stew,

>I noticed that certain functions in the ACE_OS namespace mix char, wchar_t,
>and ACE_TCHAR. 

Right.

> For example, there are 2 versions of fopen:
>
> 
>
>FILE* fopen (const char *filename, const ACE_TCHAR *mode);
>
>FILE* fopen (const wchar_t *filename, const ACE_TCHAR *mode);
>
>Why is this?  Why isn't there a single fopen function defined as:
> 
>FILE* fopen (const ACE_TCHAR *filename, const ACE_TCHAR *mode);

Because some early sponsors of ACE wide character support wanted to be
able to have "mixed" wide/narrow strings in the same program!

Take care,

     Doug
-- 
Dr. Douglas C. Schmidt                       Professor and Associate Chair
Electrical Engineering and Computer Science  TEL: (615) 343-8197
Vanderbilt University                        WEB: www.dre.vanderbilt.edu/~schmidt
Nashville, TN 37203                          NET: d.schmidt at vanderbilt.edu



More information about the Ace-users mailing list