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