diff options
author | Eduardo Chappa <chappa@washington.edu> | 2017-11-20 23:24:58 -0700 |
---|---|---|
committer | Eduardo Chappa <chappa@washington.edu> | 2017-11-20 23:24:58 -0700 |
commit | 570ada25db406ebe10d6aa454b4466fe47f34ff2 (patch) | |
tree | a7ac9f11de1490acfbce7f0ff7178da73cb79dad /pico/osdep/altedit.c | |
parent | 7fae026f633a89911e6be5bd2d7036a9face3557 (diff) | |
download | alpine-570ada25db406ebe10d6aa454b4466fe47f34ff2.tar.xz |
* Remove bell characted (\007) from status messages in Pico. This makes
it possible to translate them.
Diffstat (limited to 'pico/osdep/altedit.c')
-rw-r--r-- | pico/osdep/altedit.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/pico/osdep/altedit.c b/pico/osdep/altedit.c index f7224136..4a8f8db6 100644 --- a/pico/osdep/altedit.c +++ b/pico/osdep/altedit.c @@ -74,7 +74,7 @@ alt_editor(int f, int n) char *fn; /* tmp holder for file name */ char result[128]; /* result string */ char prmpt[128]; - int i, done = 0, ret = 0, rv, trv; + int i, done = 0, ret = 0, rv, trv, beep; pid_t child, pid; RETSIGTYPE (*ohup)(int); RETSIGTYPE (*oint)(int); @@ -82,6 +82,7 @@ alt_editor(int f, int n) int status; EML eml; + beep = 0; eml.s = f ? "speller" : "editor"; if(gmode&MDSCUR){ @@ -288,7 +289,8 @@ alt_editor(int f, int n) exit(-1); } else { /* error! */ - snprintf(result, sizeof(result), "\007Can't fork %%s: %s", errstr(errno)); + snprintf(result, sizeof(result), _("Can't fork %%s: %s"), errstr(errno)); + beep = 1; ret = -1; } @@ -334,7 +336,10 @@ alt_editor(int f, int n) ttopen(); /* reset the signals */ pico_refresh(0, 1); /* redraw */ update(); - emlwrite(result, &eml); + if(beep) + emlwwrite(result, &eml); + else + emlwrite(result, &eml); return(ret); #else /* _WINDOWS */ char eb[2 * PATH_MAX]; /* buf holding edit command */ |