LLDB  mainline
Classes | Namespaces | Macros | Typedefs | Functions
Editline.cpp File Reference
#include <iomanip>
#include <iostream>
#include <limits.h>
#include "lldb/Host/ConnectionFileDescriptor.h"
#include "lldb/Host/Editline.h"
#include "lldb/Host/FileSystem.h"
#include "lldb/Host/Host.h"
#include "lldb/Utility/FileSpec.h"
#include "lldb/Utility/LLDBAssert.h"
#include "lldb/Utility/SelectHelper.h"
#include "lldb/Utility/Status.h"
#include "lldb/Utility/StreamString.h"
#include "lldb/Utility/StringList.h"
#include "lldb/Utility/Timeout.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Threading.h"
Include dependency graph for Editline.cpp:

Go to the source code of this file.

Classes

class  lldb_private::line_editor::EditlineHistory
 

Namespaces

 lldb_private
 Enumerations for broadcasting.
 
 lldb_private::line_editor
 

Macros

#define ESCAPE   "\x1b"
 
#define ANSI_FAINT   ESCAPE "[2m"
 
#define ANSI_UNFAINT   ESCAPE "[22m"
 
#define ANSI_CLEAR_BELOW   ESCAPE "[J"
 
#define ANSI_CLEAR_RIGHT   ESCAPE "[K"
 
#define ANSI_SET_COLUMN_N   ESCAPE "[%dG"
 
#define ANSI_UP_N_ROWS   ESCAPE "[%dA"
 
#define ANSI_DOWN_N_ROWS   ESCAPE "[%dB"
 
#define EditLineConstString(str)   str
 
#define EditLineStringFormatSpec   "%s"
 
#define history_w   history
 
#define history_winit   history_init
 
#define history_wend   history_end
 
#define HistoryW   History
 
#define HistEventW   HistEvent
 
#define LineInfoW   LineInfo
 
#define el_wgets   el_gets
 
#define el_wgetc   el_getc
 
#define el_wpush   el_push
 
#define el_wparse   el_parse
 
#define el_wset   el_set
 
#define el_wget   el_get
 
#define el_wline   el_line
 
#define el_winsertstr   el_insertstr
 
#define el_wdeletestr   el_deletestr
 

Typedefs

typedef std::weak_ptr< EditlineHistorylldb_private::line_editor::EditlineHistoryWP
 

Functions

bool IsOnlySpaces (const EditLineStringType &content)
 
EditLineStringType CombineLines (const std::vector< EditLineStringType > &lines)
 
std::vector< EditLineStringType > SplitLines (const EditLineStringType &input)
 
EditLineStringType FixIndentation (const EditLineStringType &line, int indent_correction)
 
int GetIndentation (const EditLineStringType &line)
 
bool IsInputPending (FILE *file)
 
static void PrintCompletion (FILE *output_file, size_t start, size_t end, StringList &completions, StringList &descriptions)
 Prints completions and their descriptions to the given file. More...
 

Macro Definition Documentation

◆ ANSI_CLEAR_BELOW

#define ANSI_CLEAR_BELOW   ESCAPE "[J"

Definition at line 54 of file Editline.cpp.

Referenced by PrintCompletion().

◆ ANSI_CLEAR_RIGHT

#define ANSI_CLEAR_RIGHT   ESCAPE "[K"

Definition at line 55 of file Editline.cpp.

◆ ANSI_DOWN_N_ROWS

#define ANSI_DOWN_N_ROWS   ESCAPE "[%dB"

Definition at line 58 of file Editline.cpp.

◆ ANSI_FAINT

#define ANSI_FAINT   ESCAPE "[2m"

Definition at line 52 of file Editline.cpp.

◆ ANSI_SET_COLUMN_N

#define ANSI_SET_COLUMN_N   ESCAPE "[%dG"

Definition at line 56 of file Editline.cpp.

◆ ANSI_UNFAINT

#define ANSI_UNFAINT   ESCAPE "[22m"

Definition at line 53 of file Editline.cpp.

◆ ANSI_UP_N_ROWS

#define ANSI_UP_N_ROWS   ESCAPE "[%dA"

Definition at line 57 of file Editline.cpp.

◆ EditLineConstString

#define EditLineConstString (   str)    str

Definition at line 67 of file Editline.cpp.

Referenced by PrintCompletion().

◆ EditLineStringFormatSpec

#define EditLineStringFormatSpec   "%s"

Definition at line 68 of file Editline.cpp.

◆ el_wdeletestr

#define el_wdeletestr   el_deletestr

Definition at line 87 of file Editline.cpp.

◆ el_wget

#define el_wget   el_get

Definition at line 84 of file Editline.cpp.

◆ el_wgetc

#define el_wgetc   el_getc

Definition at line 80 of file Editline.cpp.

◆ el_wgets

#define el_wgets   el_gets

Definition at line 79 of file Editline.cpp.

Referenced by PrintCompletion().

◆ el_winsertstr

#define el_winsertstr   el_insertstr

Definition at line 86 of file Editline.cpp.

◆ el_wline

#define el_wline   el_line

Definition at line 85 of file Editline.cpp.

Referenced by PrintCompletion().

◆ el_wparse

#define el_wparse   el_parse

Definition at line 82 of file Editline.cpp.

◆ el_wpush

#define el_wpush   el_push

Definition at line 81 of file Editline.cpp.

Referenced by PrintCompletion().

◆ el_wset

#define el_wset   el_set

Definition at line 83 of file Editline.cpp.

Referenced by PrintCompletion().

◆ ESCAPE

#define ESCAPE   "\x1b"

Definition at line 51 of file Editline.cpp.

Referenced by PrintCompletion().

◆ HistEventW

#define HistEventW   HistEvent

Definition at line 76 of file Editline.cpp.

◆ history_w

#define history_w   history

◆ history_wend

#define history_wend   history_end

◆ history_winit

#define history_winit   history_init

Definition at line 73 of file Editline.cpp.

◆ HistoryW

#define HistoryW   History

Definition at line 75 of file Editline.cpp.

◆ LineInfoW

#define LineInfoW   LineInfo

Definition at line 77 of file Editline.cpp.

Referenced by PrintCompletion().

Function Documentation

◆ CombineLines()

EditLineStringType CombineLines ( const std::vector< EditLineStringType > &  lines)

Definition at line 99 of file Editline.cpp.

Referenced by PrintCompletion().

◆ FixIndentation()

EditLineStringType FixIndentation ( const EditLineStringType &  line,
int  indent_correction 
)

Definition at line 122 of file Editline.cpp.

◆ GetIndentation()

int GetIndentation ( const EditLineStringType &  line)

Definition at line 131 of file Editline.cpp.

◆ IsInputPending()

bool IsInputPending ( FILE *  file)

◆ IsOnlySpaces()

bool IsOnlySpaces ( const EditLineStringType &  content)

Definition at line 91 of file Editline.cpp.

◆ PrintCompletion()

static void PrintCompletion ( FILE *  output_file,
size_t  start,
size_t  end,
StringList completions,
StringList descriptions 
)
static

◆ SplitLines()

std::vector<EditLineStringType> SplitLines ( const EditLineStringType &  input)

Definition at line 107 of file Editline.cpp.

Referenced by PrintCompletion().