1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-24 15:04:13 +00:00
cde/src/cmd/ksh93/include
hyenias 88a6baa1a7
Fix floating point numerics having precision of 0 with assignments (#149)
Issuing typeset floating point numerics having a precision of 0
failed as the precision/size was being overwritten with the string
length of the value, e.g. 'typeset -F0 x=5.67' would result in
'typeset -F 4 x=5.6700' as len('5.67') is 4.

src/cmd/ksh93/include/nval.h:

- Created a symbolic name of NV_FLTSIZEZERO to respresent a float
  having a precision/size of 0. NV_FLTSIZEZERO needs to be a
  negative value.

src/cmd/ksh93/bltins/typeset.c:

- In b_typeset(), added code to set tdata.argnum to NV_FLTSIZEZERO
  for E, F, X options.

- In setall(), adjusted code to allow for tp->argnum to be negative.

src/cmd/ksh93/sh/name.c: nv_newattr():

- Adjusted option value only change code to handle NV_FLTSIZEZERO as
  well as changed to directly setting np->nvsize instead of using
  nv_setsize(np,size) as nv_setsize might contain conflicting and/or
  redundant code.

- Added missing conditional check of '!(newatts&NV_INTEGER)' to
  constrain the size==0 code block to justified strings as
  NV_LJUST, NV_RJUST, or NV_ZFILL are only valid for strings if
  NV_INTEGER is not set. This code block was mistakenly setting
  the precision/size value to the length of the value of an
  assignment for floats whereas it should only be performing
  auto assignment length for justified strings.
2020-11-26 13:50:30 +00:00
..
argnod.h 4 typo fixes: be use => be used 2020-07-05 07:48:01 +02:00
builtins.h Remove SHOPT_BASH; keep &> redir operator, '-o posix' option 2020-09-01 06:19:19 +01:00
defs.h Streamline some shell state flaggery 2020-10-02 23:58:21 +02:00
edit.h include/edit.h: cleanup: rm unused Edit_t struct members 2020-09-16 06:38:53 +02:00
fault.h Remove legacy code for older libast versions 2020-09-04 02:31:39 +02:00
fcin.h Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
history.h Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
io.h Fix: Closing a FD within a comsub broke output (rhbz#1116072) 2020-09-27 04:46:24 +02:00
jobs.h Fix crash in backtick comsubs with job control on (rhbz#825520) 2020-09-23 01:56:09 +02:00
lexstates.h Fix 80 typos in comments 2020-06-12 01:45:12 +02:00
name.h Multiple 'whence' and path search fixes 2020-09-20 07:56:09 +02:00
national.h Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
nval.h Fix floating point numerics having precision of 0 with assignments (#149) 2020-11-26 13:50:30 +00:00
path.h Fix $PWD breakage on fork; cd; exec (rhbz#1168611) 2020-09-26 23:00:05 +02:00
regress.h Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
shell.h Remove SH_SUBSHELL option vestiges 2020-10-01 16:58:03 +02:00
shlex.h Remove SHOPT_BASH; keep &> redir operator, '-o posix' option 2020-09-01 06:19:19 +01:00
shnodes.h Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
shtable.h Reinstate 'r' and 'history' as preset aliases for interactive ksh 2020-09-11 21:35:45 +02:00
streval.h Remove legacy code for older libast versions 2020-09-04 02:31:39 +02:00
terminal.h Fixes for implicit declaration warnings 2020-06-14 09:55:08 -04:00
test.h restore 'test --man --' oddness (re: fa6a180f) 2020-08-31 23:43:22 +01:00
timeout.h Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
ulimit.h Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
variables.h Add ${.sh.pid} as an alternative to $BASHPID (#109) 2020-08-07 02:53:25 +01:00
version.h Fix floating point numerics having precision of 0 with assignments (#149) 2020-11-26 13:50:30 +00:00