Branch: Tag:

2002-11-29

2002-11-29 00:52:48 by Martin Nilsson <mani@lysator.liu.se>

Improved _sprintf

Rev: lib/modules/ADT.pmod/History.pike:1.7
Rev: lib/modules/ADT.pmod/Relation.pmod/Binary.pike:1.5
Rev: lib/modules/ADT.pmod/Stack.pike:1.9
Rev: lib/modules/Audio.pmod/Codec.pmod:1.8
Rev: lib/modules/Audio.pmod/Format.pmod/module.pmod:1.5
Rev: lib/modules/Filesystem.pmod/System.pike:1.12
Rev: lib/modules/Filesystem.pmod/Tar.pmod:1.18
Rev: lib/modules/Filesystem.pmod/module.pmod:1.11
Rev: lib/modules/Geography.pmod/Countries.pmod:1.18
Rev: lib/modules/Geography.pmod/Position.pike:1.11
Rev: lib/modules/Locale.pmod/module.pmod:1.14
Rev: lib/modules/Parser.pmod/C.pmod:1.32
Rev: lib/modules/Parser.pmod/RCS.pike:1.27
Rev: lib/modules/Parser.pmod/XML.pmod/DOM.pmod:1.9
Rev: lib/modules/Parser.pmod/XML.pmod/NSTree.pmod:1.6
Rev: lib/modules/Parser.pmod/XML.pmod/Validating.pike:1.3

1:   #pike __REAL_VERSION__    - // $Id: Stack.pike,v 1.8 2002/06/14 00:56:33 nilsson Exp $ + // $Id: Stack.pike,v 1.9 2002/11/29 00:30:03 nilsson Exp $      //! This class implements a simple stack. Instead of adding and removing   //! elements to an array, and thus making it vary in size for every push
131:   }      string _sprintf(int t) { -  if(t=='t') return "ADT.Stack"; -  if(t=='O') return sprintf("ADT.Stack%O", _values()); -  error("Can't display ADT.Stack as %c.", t); +  return t=='O' && sprintf("%O%O", this_program, _values());   }