diff options
Diffstat (limited to 'Src/prompt.c')
-rw-r--r-- | Src/prompt.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Src/prompt.c b/Src/prompt.c index d15b7c0d4..e51ce2451 100644 --- a/Src/prompt.c +++ b/Src/prompt.c @@ -663,12 +663,20 @@ putpromptchar(int doprint, int endchar, unsigned int *txtchangep) break; case 'L': addbufspc(DIGBUFSIZE); +#if defined(ZLONG_IS_LONG_LONG) && defined(PRINTF_HAS_LLD) + sprintf(bv->bp, "%lld", shlvl); +#else sprintf(bv->bp, "%ld", (long)shlvl); +#endif bv->bp += strlen(bv->bp); break; case '?': addbufspc(DIGBUFSIZE); +#if defined(ZLONG_IS_LONG_LONG) && defined(PRINTF_HAS_LLD) + sprintf(bv->bp, "%lld", lastval); +#else sprintf(bv->bp, "%ld", (long)lastval); +#endif bv->bp += strlen(bv->bp); break; case '%': @@ -764,7 +772,11 @@ putpromptchar(int doprint, int endchar, unsigned int *txtchangep) if (funcstack->tp == FS_EVAL) lineno--; addbufspc(DIGBUFSIZE); +#if defined(ZLONG_IS_LONG_LONG) && defined(PRINTF_HAS_LLD) + sprintf(bv->bp, "%lld", flineno); +#else sprintf(bv->bp, "%ld", (long)flineno); +#endif bv->bp += strlen(bv->bp); break; } @@ -772,7 +784,11 @@ putpromptchar(int doprint, int endchar, unsigned int *txtchangep) /* FALLTHROUGH */ case 'i': addbufspc(DIGBUFSIZE); +#if defined(ZLONG_IS_LONG_LONG) && defined(PRINTF_HAS_LLD) + sprintf(bv->bp, "%lld", lineno); +#else sprintf(bv->bp, "%ld", (long)lineno); +#endif bv->bp += strlen(bv->bp); break; case 'x': |