num_get<>::do_get patch (fixed version)

Ryszard Kabatek rysio@rumcajs.chemie.uni-halle.de
Thu Dec 30 07:30:00 GMT 1999


Ooops! I just looked into the C9X draft. The format parameter
of sscanf for long long is 'll' not 'L'. Both are supported
by glibc, but 'll' is portable.
Now the complete (fixed) patch again. See attachment.


1999-04-23  Ryszard Kabatek  <kabatek@chemie.uni-halle.de>

	* bits/locfacets.tcc (num_get<>::do_get):
	  Fix the sscanf format parameter 
	  for long long 'll' (as in C9X) instead of 'l'.
          Fix the order of sscanf format parameters: "%dl" --> "%ld".
	  Change the type of the local variable '__conv' from 'string'
	  to 'const char*' and adapt the change.


BTW. The implementation of num_get<> uses a lot of string objects.
A byte array (char buf[256] or so) would be enough for any numeric type.


Ryszard Kabatek
Martin-Luther University Halle-Wittenberg, Department of Physical Chemistry
Geusaer Str. 88, 06217 Merseburg, Germany
Tel. +49 3461 46 2487 Fax. +49 3461 46 2129


More information about the Libstdc++ mailing list