mirror of https://github.com/tildeclub/ex-vi.git
* Multibyte sequences that correspond to an unprintable character are now
printed as multiple octal escape sequences.
This commit is contained in:
parent
68f1c288d4
commit
cd48bf2e60
2
Changes
2
Changes
|
@ -19,6 +19,8 @@ Release ...
|
|||
characters now.
|
||||
* Handle character case conversions with the '~' vi command correctly if the
|
||||
length of the converted multibyte sequence is smaller than the original one.
|
||||
* Multibyte sequences that correspond to an unprintable character are now
|
||||
printed as multiple octal escape sequences.
|
||||
* Fixed an old vi bug: If a vi command that yanked or deleted part of a line
|
||||
was followed by an ex command that also yanked or deleted some text, a
|
||||
following 'p' vi command pasted the text affected by the former vi command.
|
||||
|
|
18
ex_subr.c
18
ex_subr.c
|
@ -73,7 +73,7 @@
|
|||
|
||||
#ifndef lint
|
||||
#ifdef DOSCCS
|
||||
static char sccsid[] = "@(#)ex_subr.c 1.32 (gritter) 12/2/04";
|
||||
static char sccsid[] = "@(#)ex_subr.c 1.33 (gritter) 1/12/05";
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -560,6 +560,22 @@ printof(int c)
|
|||
char *nums = "01234567";
|
||||
int d;
|
||||
|
||||
#ifdef MB
|
||||
if (mb_cur_max > 1 && (c & INVBIT) == 0 && c & ~0177) {
|
||||
char mb[MB_LEN_MAX];
|
||||
int i, n, x = EOF;
|
||||
if ((n = wctomb(mb, c & TRIM)) <= 0) {
|
||||
n = 1;
|
||||
*mb = 0;
|
||||
}
|
||||
for (i = 0; i < n; i++) {
|
||||
x = printof(mb[i] | INVBIT);
|
||||
if (i+1 < n)
|
||||
normchar(x);
|
||||
}
|
||||
return x;
|
||||
}
|
||||
#endif /* MB */
|
||||
c &= 0377;
|
||||
if (c < 040 || c == DELETE) {
|
||||
normchar('^');
|
||||
|
|
|
@ -70,12 +70,12 @@
|
|||
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
||||
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Sccsid @(#)ex_version.c 1.112 (gritter) 1/11/05
|
||||
* Sccsid @(#)ex_version.c 1.113 (gritter) 1/12/05
|
||||
*/
|
||||
|
||||
#include "ex.h"
|
||||
|
||||
static char *versionstring = "@(#)Version 4.0 (gritter) 1/11/05";
|
||||
static char *versionstring = "@(#)Version 4.0 (gritter) 1/12/05";
|
||||
|
||||
void
|
||||
printver(void)
|
||||
|
|
Loading…
Reference in New Issue