/* Create a new line and append it to the line list. Fields affected: NumLines Lines */
EFI_EDITOR_LINE* FileBufferCreateLine(VOID)
/* Create a new line and append it to the line list. Fields affected: NumLines Lines */
EFI_EDITOR_LINE* FileBufferCreateLine(VOID)
{
  EFI_EDITOR_LINE  *Line;
  Line = AllocateZeroPool (sizeof (EFI_EDITOR_LINE));
  if (Line == NULL) {
    return NULL;
  }
  Line->Signature = LINE_LIST_SIGNATURE;
  Line->Size      = 0;
  Line->TotalSize = 0;
  Line->Type      = NewLineTypeDefault;
  ASSERT (CHAR_NULL == CHAR_NULL);
  Line->Buffer = CatSPrint (NULL, L"\0");
  if (Line->Buffer == NULL) {
    return NULL;
  }
  FileBuffer.NumLines++;
  InsertTailList (FileBuffer.ListHead, &Line->Link);
  if (FileBuffer.Lines == NULL) {
    FileBuffer.Lines = CR (FileBuffer.ListHead->ForwardLink, EFI_EDITOR_LINE, Link, LINE_LIST_SIGNATURE);
  }
  return Line;
}