Branch: Tag:

2004-11-05

2004-11-05 03:34:28 by Martin Stjernholm <mast@lysator.liu.se>

Added %x to Pike_vsnprintf.

Rev: src/error.c:1.137

2:   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: error.c,v 1.136 2004/10/30 11:41:08 mast Exp $ + || $Id: error.c,v 1.137 2004/11/05 03:34:28 mast Exp $   */      #define NO_PIKE_SHORTHAND
266:    }    break;    +  case 'x': +  { +  char buf[12]; +  int pos=0; +  sprintf(buf, "%x", va_arg(args, int)); +  while( --size>0 && buf[pos]!=0 ) +  str++[0]=buf[pos++]; +  } +  break; +     case '%':    str++[0]='%';    size--;