cvs commit: hugs98/src strutil.c strutil.h

Sigbjorn Finne sof at glass.cse.ogi.edu
Fri Nov 28 18:20:38 EST 2003


sof         2003/11/28 18:20:38 PST

  Modified files:
    src                  strutil.c strutil.h 
  Log:
  Added basic StringBuilder abstraction to better support
  the dynamic construction of char* values. The following
  functions are on offer:
  
  extern StringBuilder* newStringBuilder   Args((unsigned int sz));
  extern void           freeStringBuilder  Args((StringBuilder* b));
  extern Bool           prependString      Args((StringBuilder* b, char* str));
  extern Bool           appendString       Args((StringBuilder* b,  char* str));
  extern Bool           appendStringFormat Args((StringBuilder* b, char* fmt, char* arg));
  extern char*          toString           Args((StringBuilder* b));
  
  See opts.h (and opts.c) for documentation as to what the individual
  APIs does.
  
  Note that these new functions on purpose breaks the codebase
  convention of declaring functions K&R style. Radical stuff.
  
  Revision  Changes    Path
  1.4       +221 -0    hugs98/src/strutil.c
  1.3       +71 -0     hugs98/src/strutil.h


More information about the Cvs-hugs mailing list