TianoCore EDK2 master
Loading...
Searching...
No Matches
FileImage.c File Reference
#include "HexEditor.h"

Go to the source code of this file.

Functions

EFI_STATUS HFileImageInit (VOID)
 
EFI_STATUS HFileImageBackup (VOID)
 
EFI_STATUS HFileImageCleanup (VOID)
 
EFI_STATUS HFileImageSetFileName (IN CONST CHAR16 *Str)
 
EFI_STATUS HFileImageRead (IN CONST CHAR16 *FileName, IN BOOLEAN Recover)
 
EFI_STATUS HFileImageSave (IN CHAR16 *FileName)
 

Variables

EFI_HANDLE HImageHandleBackup
 
HEFI_EDITOR_BUFFER_IMAGE HBufferImage
 
BOOLEAN HBufferImageNeedRefresh
 
BOOLEAN HBufferImageOnlyLineNeedRefresh
 
BOOLEAN HBufferImageMouseNeedRefresh
 
HEFI_EDITOR_GLOBAL_EDITOR HMainEditor
 
HEFI_EDITOR_FILE_IMAGE HFileImage
 
HEFI_EDITOR_FILE_IMAGE HFileImageBackupVar
 
HEFI_EDITOR_BUFFER_IMAGE HFileImageConst
 

Detailed Description

Functions to deal with file buffer.

Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file FileImage.c.

Function Documentation

◆ HFileImageBackup()

EFI_STATUS HFileImageBackup ( VOID  )

Backup function for HFileImage. Only a few fields need to be backup. This is for making the file buffer refresh as few as possible.

Return values
EFI_SUCCESSThe operation was successful.
EFI_OUT_OF_RESOURCESA memory allocation failed.

Definition at line 64 of file FileImage.c.

◆ HFileImageCleanup()

EFI_STATUS HFileImageCleanup ( VOID  )

Cleanup function for HFileImage.

Return values
EFI_SUCCESSThe operation was successful.

Definition at line 83 of file FileImage.c.

◆ HFileImageInit()

EFI_STATUS HFileImageInit ( VOID  )

Initialization function for HFileImage

Return values
EFI_SUCCESSThe operation was successful.

Definition at line 38 of file FileImage.c.

◆ HFileImageRead()

EFI_STATUS HFileImageRead ( IN CONST CHAR16 *  FileName,
IN BOOLEAN  Recover 
)

Read a file from disk into HBufferImage.

Parameters
[in]FileNamefilename to read.
[in]Recoverif is for recover, no information print.
Return values
EFI_SUCCESSThe operation was successful.
EFI_OUT_OF_RESOURCESA memory allocation failed.
EFI_LOAD_ERRORA load error occurred.

Definition at line 137 of file FileImage.c.

◆ HFileImageSave()

EFI_STATUS HFileImageSave ( IN CHAR16 *  FileName)

Save lines in HBufferImage to disk.

Parameters
[in]FileNameThe file name.
Return values
EFI_SUCCESSThe operation was successful.
EFI_OUT_OF_RESOURCESA memory allocation failed.
EFI_LOAD_ERRORA load error occurred.

Definition at line 250 of file FileImage.c.

◆ HFileImageSetFileName()

EFI_STATUS HFileImageSetFileName ( IN CONST CHAR16 *  Str)

Set FileName field in HFileImage

Parameters
[in]StrFile name to set.
Return values
EFI_SUCCESSThe operation was successful.
EFI_OUT_OF_RESOURCESA memory allocation failed.

Definition at line 102 of file FileImage.c.

Variable Documentation

◆ HBufferImage

HEFI_EDITOR_BUFFER_IMAGE HBufferImage
extern

Definition at line 27 of file BufferImage.c.

◆ HBufferImageMouseNeedRefresh

BOOLEAN HBufferImageMouseNeedRefresh
extern

Definition at line 69 of file BufferImage.c.

◆ HBufferImageNeedRefresh

BOOLEAN HBufferImageNeedRefresh
extern

Definition at line 62 of file BufferImage.c.

◆ HBufferImageOnlyLineNeedRefresh

BOOLEAN HBufferImageOnlyLineNeedRefresh
extern

Definition at line 67 of file BufferImage.c.

◆ HFileImage

Definition at line 20 of file FileImage.c.

◆ HFileImageBackupVar

HEFI_EDITOR_FILE_IMAGE HFileImageBackupVar

Definition at line 21 of file FileImage.c.

◆ HFileImageConst

HEFI_EDITOR_BUFFER_IMAGE HFileImageConst
Initial value:
= {
0,
}
#define NULL
Definition: Base.h:319
#define FALSE
Definition: Base.h:307

Definition at line 26 of file FileImage.c.

◆ HMainEditor

HEFI_EDITOR_GLOBAL_EDITOR HMainEditor
extern

Definition at line 38 of file MainHexEditor.c.