version 1.74, 2015/12/08 12:56:55 |
version 1.75, 2016/02/11 19:21:04 |
Line 50 __RCSID("$NetBSD$"); |
|
Line 50 __RCSID("$NetBSD$"); |
|
#include <stdlib.h> |
#include <stdlib.h> |
#include <stdarg.h> |
#include <stdarg.h> |
#include <ctype.h> |
#include <ctype.h> |
|
#ifdef WIDECHAR |
#include <locale.h> |
#include <locale.h> |
#include <langinfo.h> |
#include <langinfo.h> |
|
#endif |
|
|
#include "el.h" |
#include "el.h" |
|
|
/* el_init(): |
/* el_init(): |
Line 93 el_init_fd(const char *prog, FILE *fin, |
|
Line 96 el_init_fd(const char *prog, FILE *fin, |
|
* Initialize all the modules. Order is important!!! |
* Initialize all the modules. Order is important!!! |
*/ |
*/ |
el->el_flags = 0; |
el->el_flags = 0; |
#ifdef WIDECHAR |
|
if (setlocale(LC_CTYPE, NULL) != NULL){ |
if (setlocale(LC_CTYPE, NULL) != NULL){ |
if (strcmp(nl_langinfo(CODESET), "UTF-8") == 0) |
if (strcmp(nl_langinfo(CODESET), "UTF-8") == 0) |
el->el_flags |= CHARSET_IS_UTF8; |
el->el_flags |= CHARSET_IS_UTF8; |
} |
} |
#endif |
|
|
|
if (terminal_init(el) == -1) { |
if (terminal_init(el) == -1) { |
el_free(el->el_prog); |
el_free(el->el_prog); |
Line 207 FUN(el,set)(EditLine *el, int op, ...) |
|
Line 208 FUN(el,set)(EditLine *el, int op, ...) |
|
el_pfunc_t p = va_arg(ap, el_pfunc_t); |
el_pfunc_t p = va_arg(ap, el_pfunc_t); |
int c = va_arg(ap, int); |
int c = va_arg(ap, int); |
|
|
rv = prompt_set(el, p, c, op, 1); |
rv = prompt_set(el, p, (Char)c, op, 1); |
break; |
break; |
} |
} |
|
|