Commit Graph

13 Commits

Author SHA1 Message Date
Daryl McDaniel 24903bc48a StdLib: Some deployed versions of the Simple Text Input Protocol randomly return either NUL characters or Scan Codes when just typing normal text. These changes filter out NUL characters and make Scan Code and error handling more robust.
StdLibPrivateInternalFiles/Include/Device/Console.h: Change UnGetKey, in the ConInstance structure, from an EFI_INPUT_KEY structure to a CHAR16 variable.

Include/sys/termios.h: Add CHAR_SUB and CHAR_ESC for translation of '^Z' and the Escape Scan Code into the EOF and ESC characters, respectively.

LibC/Uefi/Devices/Console/daConsole.c:  Add da_ConRawRead() function to simplify the read logic. Discard NUL characters from the input stream.  In Blocking mode, retry until a non-NUL character is received.  In NonBlocking mode, a NUL causes an EAGAIN error to be returned.  Translate the Escape Scan Code into an ESC character.  If Scan Codes are ignored, retry if in Blocking mode else return an EAGAIN error.  UnGetKey becomes a single wide character instead of a structure.
    Change da_Poll() to use da_ConRawRead().

LibC/Uefi/InteractiveIO/IIOutilities.c:  BUG fix.  Return the processed input character instead of the raw character.  Allows EOF propagation.

LibC/Uefi/InteractiveIO/CanonRead.c:  Enable EOF propagation.

LibC/Uefi/InteractiveIO/IIOechoCtrl.h:  Use symbols defined in termios.h instead of hard-coded constant numbers.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by:  Daryl McDaniel  <daryl.mcdaniel@intel.com>
Reviewed-by:  Jaben Carsey <Jaben.carsey@intel.com>
Reviewed-by:  Erik Bjorge <erik.c.bjorge@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16254 6f19259b-4bc3-4df7-8a09-765794883524
2014-10-28 19:20:48 +00:00
darylm503 e575c101d8 StdLib: Add internal use only header for interactive I/O.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by:  daryl.mcdaniel@intel.com
Reviewed-by:    erik.c.bjorge@intel.com
Reviewed-by:    leroy.p.leahy@intel.com
Reviewed-by:    lee.g.rosenbaum@intel.com
Reviewed-by:    jaben.carsey@intel.com




git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13988 6f19259b-4bc3-4df7-8a09-765794883524
2012-12-11 21:03:57 +00:00
darylm503 a9c12422ff StdLib, StdLibPrivateInternalFiles: Clean up comments, Remove debugging code, Define MAX_OUTPUT, the Maximum number of bytes in a single terminal output operation.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Daryl McDaniel <daryl.mcdaniel@intel.com>
Reviewed-by: Jaben Carsey <jcarsey@intel.com>


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13735 6f19259b-4bc3-4df7-8a09-765794883524
2012-09-20 21:01:21 +00:00
darylm503 a7a8363d86 StdLib: Add multi-byte character support. The normal "narrow" character set is now UTF-8 instead of ASCII.
Add library classes which are required by StdLib, but not commonly defined in Platform DSC files, to StdLib.inc.
Modify MB_LEN_MAX to be 4, the maximum length of UTF-8 characters.
Adjust size of internal buffers to be multiples of MB_LEN_MAX instead of assuming 1-byte characters.
Make the XYoffset object public and move its declaration into EfiSysCall.h.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: daryl.mcdaniel@intel.com
Reviewed-by: erik.c.bjorge@intel.com
Reviewed-by: lee.g.rosenbaum@intel.com
Reviewed-by: leroy.p.leahy@intel.com


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13457 6f19259b-4bc3-4df7-8a09-765794883524
2012-06-15 19:58:39 +00:00
darylm503 d78fab6b4e EADK (StdLib, AppPkg, StdLibPrivateInternalFiles): Python Beta Release.
Clean up and clearly differentiate required and optional items in configuration files.
Enable the system command and synchronize configuration options between all CPU architectures.
Replace the UEFI_ENV macro with UEFI_C_SOURCE to align with Linux and Posix conventions.
Update copyrights and versions and make minor cosmetic enhancements to files.
Fix compiler-specific build errors.
Add Python-specific ReadMe file.

Signed-off-by: darylm503
Reviewed-by: geekboy15a
Reviewed-by: jljusten
Reviewed-by: leegrosenbaum


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13119 6f19259b-4bc3-4df7-8a09-765794883524
2012-03-24 01:19:06 +00:00
darylm503 feb1422b3a StdLib: Move the declarations for ffs() and bzero() from extern.h to strings.h.
Signed-off-by: darylm503
Reviewed-by: jljusten


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12654 6f19259b-4bc3-4df7-8a09-765794883524
2011-11-03 00:35:55 +00:00
darylm503 f45df7a607 StdLib: Make the vfscanf function public.
Signed-off-by: darylm503
Reviewed-by: geekboy15a


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12653 6f19259b-4bc3-4df7-8a09-765794883524
2011-11-03 00:19:10 +00:00
darylm503 5c5e4a12de StdLib: Revise the meaning of several feature macros.
Feature macros, defined in StdLibPrivateInternalFiles/Include/LibConfig.h are defined to cause the named feature to be included.  When originally added, several features were guarded using reversed logic.

Signed-off-by: darylm503
Reviewed-by: geekboy15a


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12652 6f19259b-4bc3-4df7-8a09-765794883524
2011-11-03 00:01:24 +00:00
darylm503 d711a4860a StdLib: Add directory access functions to PosixLib.
Update <dirent.h> and <sys/dirent.h> to latest version.
Enable the tempnam function.
Fix assignments within predicate expressions so that it is clear where assignment is intended and where comparison occurs.
Remove internal.h and DirFunctions.c with its non-portable opendir, closedir, and readdir functions.
Add modified versions of the NetBSD opendir, closedir, and readdir functions.
Fix the declaration of stat() to be standards compliant and consistent with code.

Clean up indentation and declarations of non-existent objects.


Signed-off-by: darylm503
Reviewed-by: lgrosenb
Reviewed-by: lpleahy
Reviewed-by: jljusten


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12649 6f19259b-4bc3-4df7-8a09-765794883524
2011-11-02 19:24:19 +00:00
darylm503 76beedc09c StdLib: Change the last argument of the ioctl helper functions to va_list* from void*.
Functions which call these helper functions always pass the last parameter as a va_list argument.
Add a conditional block around a MSFT-only pragma so that stringlist.c will compile with GCC.
Comment-out the Socket Library components within StdLib.dsc.  These components are still in development.

Signed-off-by: darylm503
Reviewed by:   geekboy15A

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12369 6f19259b-4bc3-4df7-8a09-765794883524
2011-09-16 23:16:56 +00:00
darylm503 f766dd76fd Changes so that Argv points to narrow-character versions of the command-line arguments.
Fix "long double" handling and differences between MSFT and GCC compilers.
Fix compliance issues with ISO/IEC 9899:199409
New Function declarations:
	setenv(), fparseln(), GetFileNameFromPath(), rename()


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12060 6f19259b-4bc3-4df7-8a09-765794883524
2011-07-30 00:25:54 +00:00
darylm503 b00771f50a Add device abstraction code for the UEFI Console and UEFI Shell-based file systems.
Make argv use narrow characters instead of wide characters.
Add setenv functionality.


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11907 6f19259b-4bc3-4df7-8a09-765794883524
2011-06-28 02:27:55 +00:00
darylm503 2aa62f2bc9 Standard Libraries for EDK II.
This set of three packages: AppPkg, StdLib, StdLibPrivateInternalFiles; contains the implementation of libraries based upon non-UEFI standards such as ISO/IEC-9899, the library portion of the C Language Standard, POSIX, etc.

AppPkg contains applications that make use of the standard libraries defined in the StdLib Package.

StdLib contains header (include) files and the implementations of the standard libraries.

StdLibPrivateInternalFiles contains files for the exclusive use of the library implementations in StdLib.  These files should never be directly referenced from applications or other code.


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11600 6f19259b-4bc3-4df7-8a09-765794883524
2011-04-27 21:42:16 +00:00