/[global]/global/libutil/strmake.c
ViewVC logotype

Diff of /global/libutil/strmake.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.7 by shigio, Sun Nov 28 01:04:58 2004 UTC revision 1.8 by shigio, Sat Apr 2 01:27:52 2005 UTC
# Line 47  strmake(p, lim) Line 47  strmake(p, lim)
47          const char *p;          const char *p;
48          const char *lim;          const char *lim;
49  {  {
50          static STRBUF *sb;          STATIC_STRBUF(sb);
51          const char *c;          const char *c;
52    
53          if (sb == NULL)          strbuf_init(sb);
                 sb = strbuf_open(0);  
         strbuf_reset(sb);  
54          for (; *p; p++) {          for (; *p; p++) {
55                  for (c = lim; *c; c++)                  for (c = lim; *c; c++)
56                          if (*p == *c)                          if (*p == *c)
# Line 90  strtrim(p, flag, len) Line 88  strtrim(p, flag, len)
88          int flag;          int flag;
89          int *len;          int *len;
90  {  {
91          static STRBUF *sb;          STATIC_STRBUF(sb);
92          int cut_off = -1;          int cut_off = -1;
93    
94          if (sb == NULL)          strbuf_init(sb);
                 sb = strbuf_open(0);  
         strbuf_reset(sb);  
95          /*          /*
96           * Delete blanks of the head.           * Delete blanks of the head.
97           */           */

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26