StdLib/Include: Minor changes in preparation for Interactive I/O (TTY) functionality.

StdLib/Include/
  stdlib.h
    Update MB_CUR_MAX to 3, the max. size of a MBCS character.
    Improve comments for wcstombs()
    Declare implementation-specific MBCS utility functions:
      OneWcToMcLen()    Determine the number of bytes needed to represent
                        a Wide character as a MBCS character.
      EstimateWtoM()    Determine the number of bytes needed to represent
                        a Wide character string as a MBCS string.
      CountMbcsChars()  Determine the number of characters in a MBCS string.

  wchar.h
    Improve comments.

StdLib/Include/sys/
  fcntl.h
    Define new Open flags.
    Remove obsolete and commented-out lines.

  termios.h
    Add Intel Copyright notice and Open-Source License.
    Change c_cc index macros into enumerated values.
    Clean up flag definitions for visual alignment as well as UEFI relevance.
    Move c_ispeed and c_ospeed termios members to end for better alignment.
    Comment out declarations for functions not yet implemented.
    Add an enum defining values for the UEFI extended function keys.

Contributed-under: TianoCore Contribution Agreement 1.0
Reviewed-by: erik.c.bjorge@intel.com
Reviewed-by: jaben.carsey@intel.com


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13741 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
darylm503
2012-09-25 22:01:58 +00:00
parent 9fa90bb491
commit c352b29843
4 changed files with 254 additions and 220 deletions

View File

@@ -1415,10 +1415,16 @@ int mbsinit(const mbstate_t *ps);
where internal is the mbstate_t object for the mbrlen function, except that
the expression designated by ps is evaluated only once.
@return The mbrlen function returns a value between zero and n,
inclusive, (size_t)(-2), or (size_t)(-1).
@param[in] s Pointer to a multibyte character sequence.
@param[in] n Maximum number of bytes to examine.
@param[in] pS Pointer to the conversion state object.
@retval 0 The next n or fewer characters complete a NUL.
@retval 1..n The number of bytes that complete the multibyte character.
@retval -2 The next n bytes contribute to an incomplete (but potentially valid) multibyte character.
@retval -1 An encoding error occurred.
**/
size_t mbrlen(const char * __restrict S, size_t n, mbstate_t * __restrict ps);
size_t mbrlen(const char * __restrict S, size_t n, mbstate_t * __restrict pS);
/** Restartable Multibyte to Wide character conversion.
If S is a null pointer, the mbrtowc function is equivalent to the call:<BR>