Lines Matching refs:Data

114   LineEditor::InternalData *Data;  in ElGetPromptFn()  local
115 if (el_get(EL, EL_CLIENTDATA, &Data) == 0) in ElGetPromptFn()
116 return Data->LE->getPrompt().c_str(); in ElGetPromptFn()
125 LineEditor::InternalData *Data; in ElCompletionFn() local
126 if (el_get(EL, EL_CLIENTDATA, &Data) == 0) { in ElCompletionFn()
127 if (!Data->ContinuationOutput.empty()) { in ElCompletionFn()
129 FILE *Out = Data->Out; in ElCompletionFn()
132 ::fwrite(Data->ContinuationOutput.c_str(), in ElCompletionFn()
133 Data->ContinuationOutput.size(), 1, Out); in ElCompletionFn()
137 std::string Prevs(Data->PrevCount, '\02'); in ElCompletionFn()
140 Data->ContinuationOutput.clear(); in ElCompletionFn()
146 LineEditor::CompletionAction Action = Data->LE->getCompletionAction( in ElCompletionFn()
168 raw_string_ostream OS(Data->ContinuationOutput); in ElCompletionFn()
183 OS << Data->LE->getPrompt() in ElCompletionFn()
188 Data->PrevCount = LI->lastchar - LI->cursor; in ElCompletionFn()
202 Data(new InternalData) { in LineEditor()
206 Data->LE = this; in LineEditor()
207 Data->Out = Out; in LineEditor()
209 Data->Hist = ::history_init(); in LineEditor()
210 assert(Data->Hist); in LineEditor()
212 Data->EL = ::el_init(ProgName.str().c_str(), In, Out, Err); in LineEditor()
213 assert(Data->EL); in LineEditor()
215 ::el_set(Data->EL, EL_PROMPT, ElGetPromptFn); in LineEditor()
216 ::el_set(Data->EL, EL_EDITOR, "emacs"); in LineEditor()
217 ::el_set(Data->EL, EL_HIST, history, Data->Hist); in LineEditor()
218 ::el_set(Data->EL, EL_ADDFN, "tab_complete", "Tab completion function", in LineEditor()
220 ::el_set(Data->EL, EL_BIND, "\t", "tab_complete", NULL); in LineEditor()
221 ::el_set(Data->EL, EL_BIND, "^r", "em-inc-search-prev", in LineEditor()
223 ::el_set(Data->EL, EL_BIND, "^w", "ed-delete-prev-word", in LineEditor()
225 ::el_set(Data->EL, EL_BIND, "\033[3~", "ed-delete-next-char", in LineEditor()
227 ::el_set(Data->EL, EL_CLIENTDATA, Data.get()); in LineEditor()
230 ::history(Data->Hist, &HE, H_SETSIZE, 800); in LineEditor()
231 ::history(Data->Hist, &HE, H_SETUNIQUE, 1); in LineEditor()
238 ::history_end(Data->Hist); in ~LineEditor()
239 ::el_end(Data->EL); in ~LineEditor()
240 ::fwrite("\n", 1, 1, Data->Out); in ~LineEditor()
246 ::history(Data->Hist, &HE, H_SAVE, HistoryPath.c_str()); in saveHistory()
253 ::history(Data->Hist, &HE, H_LOAD, HistoryPath.c_str()); in loadHistory()
260 const char *Line = ::el_gets(Data->EL, &LineLen); in readLine()
273 ::history(Data->Hist, &HE, H_ENTER, Line); in readLine()
289 : Prompt((ProgName + "> ").str()), Data(new InternalData) { in LineEditor()
290 Data->In = In; in LineEditor()
291 Data->Out = Out; in LineEditor()
295 ::fwrite("\n", 1, 1, Data->Out); in ~LineEditor()
302 ::fprintf(Data->Out, "%s", Prompt.c_str()); in readLine()
307 char *Res = ::fgets(Buf, sizeof(Buf), Data->In); in readLine()