Changeset 6480ae14408dabfad215b4f1369579f864f4b558
- Timestamp:
- 03/12/09 20:08:51
(9 years ago)
- Author:
- Theo Schlossnagle <jesus@omniti.com>
- git-committer:
- Theo Schlossnagle <jesus@omniti.com> 1236888531 +0000
- git-parent:
[7c400ba6b80290ad1c0c8c72b3f437ebcd6bc972]
- git-author:
- Theo Schlossnagle <jesus@omniti.com> 1236888531 +0000
- Message:
fixes #105... it's a hack, but it appears to work... loses invalid sequences, but I think that's the desired outcome... luckily
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
r84d6f13 |
r6480ae1 |
|
337 | 337 | ncct->el = el_init("noitd", ncct->pty_master, NULL, |
---|
338 | 338 | e->fd, e, e->fd, e); |
---|
339 | | el_set(ncct->el, EL_USERDATA, ncct); |
---|
340 | | el_set(ncct->el, EL_EDITOR, "emacs"); |
---|
341 | | el_set(ncct->el, EL_HIST, history, ncct->hist); |
---|
| 339 | if(el_set(ncct->el, EL_USERDATA, ncct)) { |
---|
| 340 | noitL(noit_error, "Cannot set userdata on noitedit session\n"); |
---|
| 341 | goto socket_error; |
---|
| 342 | } |
---|
| 343 | if(el_set(ncct->el, EL_EDITOR, "emacs")) |
---|
| 344 | noitL(noit_error, "Cannot set emacs mode on console\n"); |
---|
| 345 | if(el_set(ncct->el, EL_HIST, history, ncct->hist)) |
---|
| 346 | noitL(noit_error, "Cannot set history on console\n"); |
---|
342 | 347 | if(!noit_hash_retrieve(ac->config, |
---|
343 | 348 | "line_protocol", strlen("line_protocol"), |
---|
r2c4eb5b |
r6480ae1 |
|
161 | 161 | #ifdef notdef /* XXX */ |
---|
162 | 162 | #define EL el->el_line |
---|
163 | | (void) fprintf(el->el_errlfile, |
---|
164 | | "\nD(b: %x(%s) c: %x(%s) last: %x(%s) limit: %x(%s)\n", |
---|
| 163 | (void) el->el_err_printf(el, |
---|
| 164 | "\r\nD(b: %x(%s) c: %x(%s) last: %x(%s) limit: %x(%s)\r\n", |
---|
165 | 165 | EL.buffer, EL.buffer, EL.cursor, EL.cursor, EL.lastchar, |
---|
166 | 166 | EL.lastchar, EL.limit, EL.limit); |
---|
… | … | |
736 | 736 | if (el->el_history.eventno < 0) { |
---|
737 | 737 | #ifdef DEBUG_EDIT |
---|
738 | | (void) fprintf(el->el_errfile, |
---|
| 738 | (void) el->el_err_printf(el, |
---|
739 | 739 | "e_prev_search_hist(): eventno < 0;\n"); |
---|
740 | 740 | #endif |
---|
… | … | |
762 | 762 | while (hp != NULL) { |
---|
763 | 763 | #ifdef SDEBUG |
---|
764 | | (void) fprintf(el->el_errfile, "Comparing with \"%s\"\n", hp); |
---|
| 764 | (void) el->el_err_printf(el, "Comparing with \"%s\"\n", hp); |
---|
765 | 765 | #endif |
---|
766 | 766 | if ((strncmp(hp, el->el_line.buffer, (size_t) |
---|
… | … | |
776 | 776 | |
---|
777 | 777 | if (!found) { |
---|
778 | | #ifdef SDEBUG |
---|
| 778 | #ifdef SDEBUG} |
---|
779 | 779 | (void) fprintf(el->el_errfile, "not found\n"); |
---|
780 | 780 | #endif |
---|
re06b23e |
r6480ae1 |
|
136 | 136 | char **el_display; /* Real screen image = what is there */ |
---|
137 | 137 | char **el_vdisplay; /* Virtual screen image = what we see */ |
---|
| 138 | key_node_t *el_keystate; /* last char keystate progression */ |
---|
138 | 139 | el_line_t el_line; /* The current line information */ |
---|
139 | 140 | el_state_t el_state; /* Current editor state */ |
---|
r2c4eb5b |
r6480ae1 |
|
70 | 70 | #include <string.h> |
---|
71 | 71 | #include <stdlib.h> |
---|
| 72 | #include <errno.h> |
---|
72 | 73 | |
---|
73 | 74 | #include "noitedit/el.h" |
---|
… | … | |
180 | 181 | key_get(EditLine *el, char *ch, key_value_t *val) |
---|
181 | 182 | { |
---|
182 | | |
---|
183 | | return (node_trav(el, el->el_key.map, ch, val)); |
---|
| 183 | #ifdef DEBUG_KEY |
---|
| 184 | (void) el->el_err_printf(el, "key_get (%p) [%02x]\r\n", |
---|
| 185 | el->el_keystate, *ch); |
---|
| 186 | #endif |
---|
| 187 | return (node_trav(el, el->el_keystate ? el->el_keystate : el->el_key.map, ch, val)); |
---|
184 | 188 | } |
---|
185 | 189 | |
---|
… | … | |
197 | 201 | if (key[0] == '\0') { |
---|
198 | 202 | (void) el->el_err_printf(el, |
---|
199 | | "key_add: Null extended-key not allowed.\n"); |
---|
| 203 | "key_add: Null extended-key not allowed.\r\n"); |
---|
200 | 204 | return; |
---|
201 | 205 | } |
---|
202 | 206 | if (ntype == XK_CMD && val->cmd == ED_SEQUENCE_LEAD_IN) { |
---|
203 | 207 | (void) el->el_err_printf(el, |
---|
204 | | "key_add: sequence-lead-in command not allowed\n"); |
---|
| 208 | "key_add: sequence-lead-in command not allowed\r\n"); |
---|
205 | 209 | return; |
---|
206 | 210 | } |
---|
… | … | |
242 | 246 | if (key[0] == '\0') { |
---|
243 | 247 | (void) el->el_err_printf(el, |
---|
244 | | "key_delete: Null extended-key not allowed.\n"); |
---|
| 248 | "key_delete: Null extended-key not allowed.\r\n"); |
---|
245 | 249 | return (-1); |
---|
246 | 250 | } |
---|
… | … | |
268 | 272 | if (node_lookup(el, key, el->el_key.map, 1) <= -1) |
---|
269 | 273 | /* key is not bound */ |
---|
270 | | (void) el->el_err_printf(el, "Unbound extended key \"%s\"\n", |
---|
| 274 | (void) el->el_err_printf(el, "Unbound extended key \"%s\"\r\n", |
---|
271 | 275 | key); |
---|
272 | 276 | return; |
---|
… | … | |
281 | 285 | node_trav(EditLine *el, key_node_t *ptr, char *ch, key_value_t *val) |
---|
282 | 286 | { |
---|
283 | | |
---|
| 287 | el->el_keystate = NULL; |
---|
284 | 288 | if (ptr->ch == *ch) { |
---|
285 | 289 | /* match found */ |
---|
… | … | |
287 | 291 | /* key not complete so get next char */ |
---|
288 | 292 | if (el_getc(el, ch) != 1) { /* if EOF or error */ |
---|
| 293 | if(errno == EAGAIN) { |
---|
| 294 | el->el_keystate = ptr; |
---|
| 295 | val->cmd = ED_UNASSIGNED; |
---|
| 296 | return (XK_CMD); |
---|
| 297 | } |
---|
289 | 298 | val->cmd = ED_END_OF_FILE; |
---|
290 | 299 | return (XK_CMD); |
---|
… | … | |
537 | 546 | (void) el->el_err_printf(el, |
---|
538 | 547 | "Some extended keys too long for internal print buffer"); |
---|
539 | | (void) el->el_err_printf(el, " \"%s...\"\n", el->el_key.buf); |
---|
| 548 | (void) el->el_err_printf(el, " \"%s...\"\r\n", el->el_key.buf); |
---|
540 | 549 | return (0); |
---|
541 | 550 | } |
---|
… | … | |
543 | 552 | #ifdef DEBUG_EDIT |
---|
544 | 553 | (void) el->el_err_printf(el, |
---|
545 | | "node_enum: BUG!! Null ptr passed\n!"); |
---|
| 554 | "node_enum: BUG!! Null ptr passed\r\n!"); |
---|
546 | 555 | #endif |
---|
547 | 556 | return (-1); |
---|
r04662ba |
r6480ae1 |
|
75 | 75 | |
---|
76 | 76 | if (el->el_line.cursor > el->el_line.lastchar) |
---|
77 | | (void) fprintf(el->el_errfile, "cursor > lastchar\r\n"); |
---|
| 77 | (void) el->el_err_printf(el, "cursor > lastchar\r\n"); |
---|
78 | 78 | if (el->el_line.cursor < el->el_line.buffer) |
---|
79 | | (void) fprintf(el->el_errfile, "cursor < buffer\r\n"); |
---|
| 79 | (void) el->el_err_printf(el, "cursor < buffer\r\n"); |
---|
80 | 80 | if (el->el_line.cursor > el->el_line.limit) |
---|
81 | | (void) fprintf(el->el_errfile, "cursor > limit\r\n"); |
---|
| 81 | (void) el->el_err_printf(el, "cursor > limit\r\n"); |
---|
82 | 82 | if (el->el_line.lastchar > el->el_line.limit) |
---|
83 | | (void) fprintf(el->el_errfile, "lastchar > limit\r\n"); |
---|
| 83 | (void) el->el_err_printf(el, "lastchar > limit\r\n"); |
---|
84 | 84 | if (el->el_line.limit != &el->el_line.buffer[EL_BUFSIZ - 2]) |
---|
85 | | (void) fprintf(el->el_errfile, "limit != &buffer[EL_BUFSIZ-2]\r\n"); |
---|
| 85 | (void) el->el_err_printf(el, "limit != &buffer[EL_BUFSIZ-2]\r\n"); |
---|
86 | 86 | } |
---|
87 | 87 | #endif /* DEBUG_EDIT */ |
---|
… | … | |
364 | 364 | |
---|
365 | 365 | #ifdef DEBUG_READ |
---|
366 | | (void) fprintf(el->el_errfile, "Turning raw mode on\n"); |
---|
| 366 | (void) el->el_err_printf(el, "Turning raw mode on\r\n"); |
---|
367 | 367 | #endif /* DEBUG_READ */ |
---|
368 | 368 | if (tty_rawmode(el) < 0)/* make sure the tty is set up correctly */ |
---|
… | … | |
370 | 370 | |
---|
371 | 371 | #ifdef DEBUG_READ |
---|
372 | | (void) fprintf(el->el_errfile, "Reading a character\n"); |
---|
| 372 | (void) el->el_err_printf(el, "Reading a character\r\n"); |
---|
373 | 373 | #endif /* DEBUG_READ */ |
---|
374 | 374 | num_read = read_char(el, cp); |
---|
375 | 375 | #ifdef DEBUG_READ |
---|
376 | | (void) fprintf(el->el_errfile, "Got it [%02x]\n", (unsigned char)*cp); |
---|
| 376 | (void) el->el_err_printf(el, "Got it(%d) [%02x]\r\n", |
---|
| 377 | (int)num_read, (unsigned char)*cp); |
---|
377 | 378 | #endif /* DEBUG_READ */ |
---|
378 | 379 | return (num_read); |
---|
… | … | |
385 | 386 | if ((int) cmdnum >= el->el_map.nfunc) { /* BUG CHECK command */ |
---|
386 | 387 | #ifdef DEBUG_EDIT |
---|
387 | | (void) fprintf(el->el_errfile, |
---|
| 388 | (void) el->el_err_printf(el, |
---|
388 | 389 | "ERROR: illegal command from key 0%o\r\n", ch); |
---|
389 | 390 | #endif /* DEBUG_EDIT */ |
---|
… | … | |
398 | 399 | break; |
---|
399 | 400 | if (b->name) |
---|
400 | | (void) fprintf(el->el_errfile, |
---|
401 | | "Executing %s\n", b->name); |
---|
| 401 | (void) el->el_err_printf(el, |
---|
| 402 | "Executing %s\r\n", b->name); |
---|
402 | 403 | else |
---|
403 | | (void) fprintf(el->el_errfile, |
---|
404 | | "Error command = %d\n", cmdnum); |
---|
| 404 | (void) el->el_err_printf(el, |
---|
| 405 | "Error command = %d\r\n", cmdnum); |
---|
405 | 406 | } |
---|
406 | 407 | #endif /* DEBUG_READ */ |
---|
… | … | |
455 | 456 | case CC_FATAL: /* fatal error, reset to known state */ |
---|
456 | 457 | #ifdef DEBUG_READ |
---|
457 | | (void) fprintf(el->el_errfile, |
---|
458 | | "*** editor fatal ERROR ***\r\n\n"); |
---|
| 458 | (void) el->el_err_printf(el, |
---|
| 459 | "*** editor fatal ERROR ***\r\n\r\n"); |
---|
459 | 460 | #endif /* DEBUG_READ */ |
---|
460 | 461 | /* put (real) cursor in a known place */ |
---|
… | … | |
469 | 470 | default: /* functions we don't know about */ |
---|
470 | 471 | #ifdef DEBUG_READ |
---|
471 | | (void) fprintf(el->el_errfile, |
---|
472 | | "*** editor ERROR ***\r\n\n"); |
---|
| 472 | (void) el->el_err_printf(el, |
---|
| 473 | "*** editor ERROR ***\r\n\r\n"); |
---|
473 | 474 | #endif /* DEBUG_READ */ |
---|
474 | 475 | el->el_state.argument = 1; |
---|
… | … | |
589 | 590 | if ((num = read_getcmd(el, &cmdnum, &ch)) != OKCMD) { |
---|
590 | 591 | #ifdef DEBUG_READ |
---|
591 | | (void) fprintf(el->el_errfile, |
---|
592 | | "Returning from el_gets %d\n", num); |
---|
| 592 | (void) el->el_err_printf(el, |
---|
| 593 | "Returning from el_gets %d\r\n", num); |
---|
593 | 594 | #endif /* DEBUG_READ */ |
---|
594 | 595 | if(num == EAGAINCMD) { |
---|
rd5a973a |
r6480ae1 |
|
313 | 313 | if (!EL_CAN_UP) { |
---|
314 | 314 | (void) el->el_err_printf(el, |
---|
315 | | "WARNING: Your terminal cannot move up.\n"); |
---|
| 315 | "WARNING: Your terminal cannot move up.\r\n"); |
---|
316 | 316 | (void) el->el_err_printf(el, |
---|
317 | | "Editing may be odd for long lines.\n"); |
---|
| 317 | "Editing may be odd for long lines.\r\n"); |
---|
318 | 318 | } |
---|
319 | 319 | if (!EL_CAN_CEOL) |
---|
320 | | (void) el->el_err_printf(el, "no clear EOL capability.\n"); |
---|
| 320 | (void) el->el_err_printf(el, "no clear EOL capability.\r\n"); |
---|
321 | 321 | if (!EL_CAN_DELETE) |
---|
322 | | (void) el->el_err_printf(el, "no delete char capability.\n"); |
---|
| 322 | (void) el->el_err_printf(el, "no delete char capability.\r\n"); |
---|
323 | 323 | if (!EL_CAN_INSERT) |
---|
324 | | (void) el->el_err_printf(el, "no insert char capability.\n"); |
---|
| 324 | (void) el->el_err_printf(el, "no insert char capability.\r\n"); |
---|
325 | 325 | #endif /* DEBUG_SCREEN */ |
---|
326 | 326 | } |
---|
… | … | |
431 | 431 | if (el->el_term.t_loc + 3 >= TC_BUFSIZE) { |
---|
432 | 432 | (void) el->el_err_printf(el, |
---|
433 | | "Out of termcap string space.\n"); |
---|
| 433 | "Out of termcap string space.\r\n"); |
---|
434 | 434 | return; |
---|
435 | 435 | } |
---|
… | … | |
724 | 724 | if (!EL_CAN_DELETE) { |
---|
725 | 725 | #ifdef DEBUG_EDIT |
---|
726 | | (void) el->el_err_printf(el, " ERROR: cannot delete \n"); |
---|
| 726 | (void) el->el_err_printf(el, " ERROR: cannot delete \r\n"); |
---|
727 | 727 | #endif /* DEBUG_EDIT */ |
---|
728 | 728 | return; |
---|
… | … | |
766 | 766 | if (!EL_CAN_INSERT) { |
---|
767 | 767 | #ifdef DEBUG_EDIT |
---|
768 | | (void) el->el_err_printf(el, " ERROR: cannot insert \n"); |
---|
| 768 | (void) el->el_err_printf(el, " ERROR: cannot insert \r\n"); |
---|
769 | 769 | #endif /* DEBUG_EDIT */ |
---|
770 | 770 | return; |
---|
… | … | |
926 | 926 | if (i == -1) |
---|
927 | 927 | (void) el->el_err_printf(el, |
---|
928 | | "Cannot read termcap database;\n"); |
---|
| 928 | "Cannot read termcap database;\r\n"); |
---|
929 | 929 | else if (i == 0) |
---|
930 | 930 | (void) el->el_err_printf(el, |
---|
931 | | "No entry for terminal type \"%s\";\n", term); |
---|
| 931 | "No entry for terminal type \"%s\";\r\n", term); |
---|
932 | 932 | (void) el->el_err_printf(el, |
---|
933 | | "using dumb terminal settings.\n"); |
---|
| 933 | "using dumb terminal settings.\r\n"); |
---|
934 | 934 | Val(T_co) = 80; /* do a dumb terminal */ |
---|
935 | 935 | Val(T_pt) = Val(T_km) = Val(T_li) = 0; |
---|
… | … | |
1358 | 1358 | else { |
---|
1359 | 1359 | (void) el->el_err_printf(el, |
---|
1360 | | "settc: Bad value `%s'.\n", how); |
---|
| 1360 | "settc: Bad value `%s'.\r\n", how); |
---|
1361 | 1361 | return (-1); |
---|
1362 | 1362 | } |
---|
… | … | |
1372 | 1372 | if (*ep != '\0') { |
---|
1373 | 1373 | (void) el->el_err_printf(el, |
---|
1374 | | "settc: Bad value `%s'.\n", how); |
---|
| 1374 | "settc: Bad value `%s'.\r\n", how); |
---|
1375 | 1375 | return (-1); |
---|
1376 | 1376 | } |
---|
… | … | |
1478 | 1478 | if (!silent) |
---|
1479 | 1479 | (void) el->el_err_printf(el, |
---|
1480 | | "echotc: Termcap parameter `%s' not found.\n", |
---|
| 1480 | "echotc: Termcap parameter `%s' not found.\r\n", |
---|
1481 | 1481 | *argv); |
---|
1482 | 1482 | return (-1); |
---|
… | … | |
1509 | 1509 | if (verbose) |
---|
1510 | 1510 | (void) el->el_err_printf(el, |
---|
1511 | | "echotc: Warning: unknown termcap %% `%c'.\n", |
---|
| 1511 | "echotc: Warning: unknown termcap %% `%c'.\r\n", |
---|
1512 | 1512 | *cap); |
---|
1513 | 1513 | /* This is bad, but I won't complain */ |
---|
… | … | |
1521 | 1521 | if (!silent) |
---|
1522 | 1522 | (void) el->el_err_printf(el, |
---|
1523 | | "echotc: Warning: Extra argument `%s'.\n", |
---|
| 1523 | "echotc: Warning: Extra argument `%s'.\r\n", |
---|
1524 | 1524 | *argv); |
---|
1525 | 1525 | return (-1); |
---|
… | … | |
1532 | 1532 | if (!silent) |
---|
1533 | 1533 | (void) el->el_err_printf(el, |
---|
1534 | | "echotc: Warning: Missing argument.\n"); |
---|
| 1534 | "echotc: Warning: Missing argument.\r\n"); |
---|
1535 | 1535 | return (-1); |
---|
1536 | 1536 | } |
---|
… | … | |
1540 | 1540 | if (!silent) |
---|
1541 | 1541 | (void) el->el_err_printf(el, |
---|
1542 | | "echotc: Bad value `%s' for rows.\n", |
---|
| 1542 | "echotc: Bad value `%s' for rows.\r\n", |
---|
1543 | 1543 | *argv); |
---|
1544 | 1544 | return (-1); |
---|
… | … | |
1549 | 1549 | if (!silent) |
---|
1550 | 1550 | (void) el->el_err_printf(el, |
---|
1551 | | "echotc: Warning: Extra argument `%s'.\n", |
---|
| 1551 | "echotc: Warning: Extra argument `%s'.\r\n", |
---|
1552 | 1552 | *argv); |
---|
1553 | 1553 | return (-1); |
---|
… | … | |
1559 | 1559 | if (verbose) |
---|
1560 | 1560 | (void) el->el_err_printf(el, |
---|
1561 | | "echotc: Warning: Too many required arguments (%d).\n", |
---|
| 1561 | "echotc: Warning: Too many required arguments (%d).\r\n", |
---|
1562 | 1562 | arg_need); |
---|
1563 | 1563 | /* FALLTHROUGH */ |
---|
… | … | |
1574 | 1574 | if (!silent) |
---|
1575 | 1575 | (void) el->el_err_printf(el, |
---|
1576 | | "echotc: Bad value `%s' for cols.\n", |
---|
| 1576 | "echotc: Bad value `%s' for cols.\r\n", |
---|
1577 | 1577 | *argv); |
---|
1578 | 1578 | return (-1); |
---|
… | … | |
1583 | 1583 | if (!silent) |
---|
1584 | 1584 | (void) el->el_err_printf(el, |
---|
1585 | | "echotc: Warning: Missing argument.\n"); |
---|
| 1585 | "echotc: Warning: Missing argument.\r\n"); |
---|
1586 | 1586 | return (-1); |
---|
1587 | 1587 | } |
---|
… | … | |
1590 | 1590 | if (!silent) |
---|
1591 | 1591 | (void) el->el_err_printf(el, |
---|
1592 | | "echotc: Bad value `%s' for rows.\n", |
---|
| 1592 | "echotc: Bad value `%s' for rows.\r\n", |
---|
1593 | 1593 | *argv); |
---|
1594 | 1594 | return (-1); |
---|
… | … | |
1598 | 1598 | if (!silent) |
---|
1599 | 1599 | (void) el->el_err_printf(el, |
---|
1600 | | "echotc: Bad value `%s'.\n", *argv); |
---|
| 1600 | "echotc: Bad value `%s'.\r\n", *argv); |
---|
1601 | 1601 | return (-1); |
---|
1602 | 1602 | } |
---|
… | … | |
1605 | 1605 | if (!silent) |
---|
1606 | 1606 | (void) el->el_err_printf(el, |
---|
1607 | | "echotc: Warning: Extra argument `%s'.\n", |
---|
| 1607 | "echotc: Warning: Extra argument `%s'.\r\n", |
---|
1608 | 1608 | *argv); |
---|
1609 | 1609 | return (-1); |
---|
r9cd7979 |
r6480ae1 |
|
480 | 480 | #ifdef DEBUG_TTY |
---|
481 | 481 | (void) el->el_err_printf(el, |
---|
482 | | "tty_setup: tty_getty: %s\n", strerror(errno)); |
---|
| 482 | "tty_setup: tty_getty: %s\r\n", strerror(errno)); |
---|
483 | 483 | #endif /* DEBUG_TTY */ |
---|
484 | 484 | return (-1); |
---|
… | … | |
529 | 529 | #ifdef DEBUG_TTY |
---|
530 | 530 | (void) el->el_err_printf(el, |
---|
531 | | "tty_setup: tty_setty: %s\n", |
---|
| 531 | "tty_setup: tty_setty: %s\r\n", |
---|
532 | 532 | strerror(errno)); |
---|
533 | 533 | #endif /* DEBUG_TTY */ |
---|
… | … | |
816 | 816 | if (tty_getty(el, &el->el_tty.t_ts) == -1) { |
---|
817 | 817 | #ifdef DEBUG_TTY |
---|
818 | | (void) el->el_err_printf(el, "tty_rawmode: tty_getty: %s\n", |
---|
| 818 | (void) el->el_err_printf(el, "tty_rawmode: tty_getty: %s\r\n", |
---|
819 | 819 | strerror(errno)); |
---|
820 | 820 | #endif /* DEBUG_TTY */ |
---|
… | … | |
946 | 946 | if (tty_setty(el, &el->el_tty.t_ed) == -1) { |
---|
947 | 947 | #ifdef DEBUG_TTY |
---|
948 | | (void) el->el_err_printf(el, "tty_rawmode: tty_setty: %s\n", |
---|
| 948 | (void) el->el_err_printf(el, "tty_rawmode: tty_setty: %s\r\n", |
---|
949 | 949 | strerror(errno)); |
---|
950 | 950 | #endif /* DEBUG_TTY */ |
---|
… | … | |
972 | 972 | #ifdef DEBUG_TTY |
---|
973 | 973 | (void) el->el_err_printf(el, |
---|
974 | | "tty_cookedmode: tty_setty: %s\n", |
---|
| 974 | "tty_cookedmode: tty_setty: %s\r\n", |
---|
975 | 975 | strerror(errno)); |
---|
976 | 976 | #endif /* DEBUG_TTY */ |
---|
… | … | |
1007 | 1007 | if (tty_setty(el, &el->el_tty.t_qu) == -1) { |
---|
1008 | 1008 | #ifdef DEBUG_TTY |
---|
1009 | | (void) el_err_printf(el, "QuoteModeOn: tty_setty: %s\n", |
---|
| 1009 | (void) el_err_printf(el, "QuoteModeOn: tty_setty: %s\r\n", |
---|
1010 | 1010 | strerror(errno)); |
---|
1011 | 1011 | #endif /* DEBUG_TTY */ |
---|
… | … | |
1028 | 1028 | if (tty_setty(el, &el->el_tty.t_ed) == -1) { |
---|
1029 | 1029 | #ifdef DEBUG_TTY |
---|
1030 | | (void) el->el_err_printf(el, "QuoteModeOff: tty_setty: %s\n", |
---|
| 1030 | (void) el->el_err_printf(el, "QuoteModeOff: tty_setty: %s\r\n", |
---|
1031 | 1031 | strerror(errno)); |
---|
1032 | 1032 | #endif /* DEBUG_TTY */ |
---|
… | … | |
1076 | 1076 | default: |
---|
1077 | 1077 | (void) el->el_err_printf(el, |
---|
1078 | | "%s: Unknown switch `%c'.\n", |
---|
| 1078 | "%s: Unknown switch `%c'.\r\n", |
---|
1079 | 1079 | name, argv[0][1]); |
---|
1080 | 1080 | return (-1); |
---|
… | … | |
1137 | 1137 | if (!m->m_name) { |
---|
1138 | 1138 | (void) el->el_err_printf(el, |
---|
1139 | | "%s: Invalid argument `%s'.\n", name, d); |
---|
| 1139 | "%s: Invalid argument `%s'.\r\n", name, d); |
---|
1140 | 1140 | return (-1); |
---|
1141 | 1141 | } |
---|
… | … | |
1177 | 1177 | m->m_name, s[i] + 'A' - 1); |
---|
1178 | 1178 | if (i % 5 == 0) |
---|
1179 | | (void) el->el_err_printf(el, "\n"); |
---|
1180 | | } |
---|
1181 | | (void) el->el_err_printf(el, "\n"); |
---|
| 1179 | (void) el->el_err_printf(el, "\r\n"); |
---|
| 1180 | } |
---|
| 1181 | (void) el->el_err_printf(el, "\r\n"); |
---|
1182 | 1182 | } |
---|
1183 | 1183 | #endif /* notyet */ |
---|