use new MKSH_WITH_TEXTMODE for several of the #ifdefs

This commit is contained in:
mirabilos
2017-04-02 16:41:01 +02:00
parent 7fb9d283c5
commit a6619d1ef2
5 changed files with 10 additions and 10 deletions

4
shf.c
View File

@@ -518,7 +518,7 @@ shf_getse(char *buf, ssize_t bsize, struct shf *shf)
shf->rnleft -= ncopy;
buf += ncopy;
bsize -= ncopy;
#ifdef __OS2__
#ifdef MKSH_WITH_TEXTMODE
if (end && buf > orig_buf + 1 && buf[-2] == '\r') {
buf--;
bsize++;
@@ -526,7 +526,7 @@ shf_getse(char *buf, ssize_t bsize, struct shf *shf)
}
#endif
} while (!end && bsize);
#ifdef __OS2__
#ifdef MKSH_WITH_TEXTMODE
if (!bsize && buf[-1] == '\r') {
int c = shf_getc(shf);
if (c == '\n')