egcs, REVIEW FOR SUBMISSION, vfprintf.c ...

Eric Dana edana@bgs.com
Sat Apr 4 11:01:00 GMT 1998


Kaveh,

   Here is a small patch to allow 'll' prefixes stand for double
width (ex: %lld). I've also made a portable _doprint()/_doscan()
replacement for many UNIX's (original based on netbsd and freebsd
work). Your welcome to look at the code.

Eric Dana
Principal Software Engineer
BMC Inc.

-------------------------cut here-------------
*** vfprintf.c.orig	Fri Apr  3 09:52:05 1998
--- vfprintf.c	Fri Apr  3 09:55:26 1998
***************
*** 102,108 ****
  		  short_width = 1;
  		  break;
  		case 'l':
! 		  long_width++;
  		  break;
  		case 'L':
  		  double_width = 1;
--- 102,114 ----
  		  short_width = 1;
  		  break;
  		case 'l':
! 		  if (*(ptr+1) == 'l')     /* test for 'll' == double width */
! 		    {
! 		       double_width = 1;
! 		       ptr++;
! 		    }
! 		  else
! 		    long_width++;
  		  break;
  		case 'L':
  		  double_width = 1;



More information about the Gcc mailing list