only one digits instance, thank you very much
This commit is contained in:
parent
8a0c68a184
commit
3630e1f7dc
5
sh.h
5
sh.h
@ -134,7 +134,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef EXTERN
|
||||
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.343 2009/09/19 21:54:46 tg Exp $");
|
||||
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.344 2009/09/20 13:08:11 tg Exp $");
|
||||
#endif
|
||||
#define MKSH_VERSION "R39 2009/09/19"
|
||||
|
||||
@ -359,6 +359,9 @@ EXTERN const char *safe_prompt; /* safe prompt if PS1 substitution fails */
|
||||
EXTERN const char initvsn[] I__("KSH_VERSION=@(#)MIRBSD KSH " MKSH_VERSION);
|
||||
#define KSH_VERSION (initvsn + /* "KSH_VERSION=@(#)" */ 16)
|
||||
|
||||
EXTERN const char digits_uc[] I__("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ");
|
||||
EXTERN const char digits_lc[] I__("0123456789abcdefghijklmnopqrstuvwxyz");
|
||||
|
||||
/*
|
||||
* Evil hack for const correctness due to API brokenness
|
||||
*/
|
||||
|
5
shf.c
5
shf.c
@ -22,7 +22,7 @@
|
||||
|
||||
#include "sh.h"
|
||||
|
||||
__RCSID("$MirOS: src/bin/mksh/shf.c,v 1.31 2009/08/08 13:08:53 tg Exp $");
|
||||
__RCSID("$MirOS: src/bin/mksh/shf.c,v 1.32 2009/09/20 13:08:12 tg Exp $");
|
||||
|
||||
/* flags to shf_emptybuf() */
|
||||
#define EB_READSW 0x01 /* about to switch to reading */
|
||||
@ -907,8 +907,7 @@ shf_vfprintf(struct shf *shf, const char *fmt, va_list args)
|
||||
case 'p':
|
||||
case 'x': {
|
||||
const char *digits = (flags & FL_UPPER) ?
|
||||
"0123456789ABCDEF" :
|
||||
"0123456789abcdef";
|
||||
digits_uc : digits_lc;
|
||||
do {
|
||||
*--cp = digits[lnum & 0xf];
|
||||
lnum >>= 4;
|
||||
|
5
var.c
5
var.c
@ -22,7 +22,7 @@
|
||||
|
||||
#include "sh.h"
|
||||
|
||||
__RCSID("$MirOS: src/bin/mksh/var.c,v 1.87 2009/09/06 17:42:15 tg Exp $");
|
||||
__RCSID("$MirOS: src/bin/mksh/var.c,v 1.88 2009/09/20 13:08:12 tg Exp $");
|
||||
|
||||
/*
|
||||
* Variables
|
||||
@ -339,8 +339,7 @@ str_val(struct tbl *vp)
|
||||
* in the mksh_uari_t + 1 (NUL) */
|
||||
char strbuf[1 + 2 + 1 + 8 * sizeof(mksh_uari_t) + 1];
|
||||
const char *digits = (vp->flag & UCASEV_AL) ?
|
||||
"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" :
|
||||
"0123456789abcdefghijklmnopqrstuvwxyz";
|
||||
digits_uc : digits_lc;
|
||||
mksh_uari_t n;
|
||||
int base;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user