home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / Libraries / Libsprintf / libsprintf.README < prev    next >
Encoding:
Text File  |  1995-11-15  |  1.3 KB  |  33 lines  |  [TEXT/SPM ]

  1. /*
  2.     About libsprintf
  3.     
  4.     I like the sprintf function.  I think it is very valuable for building strings on the
  5.     fly, including conversions, padding, etc.  IMHO, it is a very useful function.
  6.     
  7.     However, to use sprintf normally means that you have to add one of the ANSI
  8.     libraries to a project; that means that you also have to include the overhead
  9.     that ANSI can add, just to access this really useful function.
  10.     
  11.     I needed a sprintf function to implement a syslog library, but I didn't want the
  12.     overhead of the ANSI libraries getting in the way.
  13.     
  14.     Libsprintf removes these restrictions.  As a standalone piece of code, it is
  15.     easy and cheap to add this library to a project without encurring any additional
  16.     overhead.
  17.     
  18.     And by adding the code directly to the project, you get the extra advantage of
  19.     speed (The sample program shows timing differences between symantec's sprintf
  20.     from the ANSI library and the libsprintf standalone code - a time savings of 30%).
  21.     
  22.     Two versions of each application are provided; one with the 'register' keyword
  23.     specified in the code, and one that ignores the 'register' keyword.  This can
  24.     help determine if the automatic register assignment by the compiler is 'smart'
  25.     or not.
  26.     
  27.     See the copyright in libsprintf.c.  See the code to see how everything is handled.
  28.     
  29.     Dave Nebinger
  30.     dnebing@epix.net
  31. */
  32.  
  33.