ensure NUL in ASCII and EBCDIC both always occurs ordinal 0
This commit is contained in:
parent
c03372e8a4
commit
efa4d0d2cf
6
shf.c
6
shf.c
@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
#include "sh.h"
|
#include "sh.h"
|
||||||
|
|
||||||
__RCSID("$MirOS: src/bin/mksh/shf.c,v 1.92 2017/04/28 11:31:53 tg Exp $");
|
__RCSID("$MirOS: src/bin/mksh/shf.c,v 1.93 2017/05/03 17:51:06 tg Exp $");
|
||||||
|
|
||||||
/* flags to shf_emptybuf() */
|
/* flags to shf_emptybuf() */
|
||||||
#define EB_READSW 0x01 /* about to switch to reading */
|
#define EB_READSW 0x01 /* about to switch to reading */
|
||||||
@ -1274,5 +1274,9 @@ ebcdic_init(void)
|
|||||||
} else
|
} else
|
||||||
ebcdic_map[i] = (unsigned short)(0x100U | ord(i));
|
ebcdic_map[i] = (unsigned short)(0x100U | ord(i));
|
||||||
}
|
}
|
||||||
|
if (ebcdic_rtt_toascii[0] || ebcdic_rtt_fromascii[0] || ebcdic_map[0]) {
|
||||||
|
write(2, "mksh: NUL not at position 0\n", 28);
|
||||||
|
exit(255);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user