ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/libstatgrab/src/statgrab/statgrab.c
(Generate patch)

Comparing projects/libstatgrab/src/statgrab/statgrab.c (file contents):
Revision 1.36 by tdb, Sat Sep 24 13:29:25 2005 UTC vs.
Revision 1.37 by ats, Fri Mar 17 13:23:05 2006 UTC

# Line 121 | Line 121 | void add_stat(stat_type type, void *stat, ...) {
121                          break;
122                  partlen = strlen(part);
123                  memcpy(p, part, partlen);
124 <                p += partlen;
124 >
125 >                /* Replace spaces and dots with underscores. */
126 >                while (partlen-- > 0) {
127 >                        if (*p == ' ' || *p == '.')
128 >                                *p = '_';
129 >                        p++;
130 >                }
131 >
132                  *p++ = '.';
133          }
134          va_end(ap);
135          *--p = '\0';
129
130        /* Replace spaces with underscores. */
131        for (p = name; *p != '\0'; p++) {
132                if (*p == ' ')
133                        *p = '_';
134        }
136  
137          /* Stretch the stats array if necessary. */
138          if (num_stats >= alloc_stats) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines