X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=StdLibPrivateInternalFiles%2FInclude%2FMainData.h;h=fcb28e3255bea545829e3811f9784dedf7219b5a;hb=d967d6d96fc18d7a53d32223f5813b12cda19e8d;hp=7788cb8310b6d52d8a7d7302eaa2aa0db74ac64e;hpb=2aa62f2bc9a9654687b377d9ca8a8c2c860a3852;p=mirror_edk2.git diff --git a/StdLibPrivateInternalFiles/Include/MainData.h b/StdLibPrivateInternalFiles/Include/MainData.h index 7788cb8310..fcb28e3255 100644 --- a/StdLibPrivateInternalFiles/Include/MainData.h +++ b/StdLibPrivateInternalFiles/Include/MainData.h @@ -1,24 +1,29 @@ /** @file Global data for the program environment. - Copyright (c) 2010, Intel Corporation. All rights reserved.
- This program and the accompanying materials are licensed and made available under - the terms and conditions of the BSD License that accompanies this distribution. - The full text of the license may be found at + Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.
+ This program and the accompanying materials are licensed and made available + under the terms and conditions of the BSD License which accompanies this + distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php. THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ #include -#include +#include +#include +#include #include #include -#include -#include #include -#include "Efi/Console.h" +#include + +#include +#include + +#include "Device/Console.h" /* ################## Type Declarations ################################# */ @@ -52,28 +57,24 @@ typedef void __xithandler_t(void); ** three explicit spaces, two explicit colons, a newline, ** and a trailing ASCII nul). */ -#define ASCTIME_BUFLEN (3 * 2 + 5 * INT_STRLEN_MAXIMUM(int) + 3 + 2 + 1 + 1) - -struct __filedes { - EFI_FILE_HANDLE FileHandle; - UINT32 State; // In use if non-zero - int Oflags; // From the open call - int Omode; // From the open call - int RefCount; // Reference count of opens - int SocProc; // Placeholder: socket owner process or process group. - UINT16 MyFD; // Which FD this is. -}; +#define ASCTIME_BUFLEN ((2 * 3) + (5 * INT_STRLEN_MAXIMUM(int)) + 3 + 2 + 1 + 1) + +struct __filedes; /* Forward Reference */ +struct stat; /* Forward Reference so I don't have to include */ struct __MainData { // File descriptors struct __filedes fdarray[OPEN_MAX]; // Low-level File abstractions for the stdin, stdout, stderr streams - ConInstance StdIo[3]; + ConInstance *StdIo[3]; // Signal Handlers __sighandler_t *sigarray[SIG_LAST]; // Pointers to signal handlers - void (*cleanup)(void); // Cleanup Function Pointer + char *NArgV[ARGC_MAX]; // Narrow character argv array + char *NCmdLine; // Narrow character version of command line arguments. + + void (*cleanup)(void); // Stdio Cleanup Function Pointer __xithandler_t *atexit_handler[ATEXIT_MAX]; // Array of handlers for atexit. clock_t AppStartTime; // Set in Main.c and used for time.h @@ -81,11 +82,15 @@ struct __MainData { int num_atexit; ///< Number of registered atexit handlers. CHAR16 UString[UNICODE_STRING_MAX]; + CHAR16 UString2[UNICODE_STRING_MAX]; struct tm BDTime; // Broken-down time structure for localtime. EFI_TIME TimeBuffer; // Used by mk char ASgetenv[ASCII_STRING_MAX]; // Only modified by getenv char ASasctime[ASCTIME_BUFLEN]; // Only modified by asctime + jmp_buf MainExit; ///< Save environment used for implementing _Exit() + int ExitValue; ///< Value being returned by _Exit() + BOOLEAN aborting; // Ensures cleanup function only called once when aborting. };