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

Comparing projects/libstatgrab/src/libstatgrab/tools.c (file contents):
Revision 1.59 by ats, Sat Nov 6 14:55:53 2004 UTC vs.
Revision 1.60 by tdb, Sat Nov 6 19:09:00 2004 UTC

# Line 294 | Line 294 | char *sg_get_string_match(char *line, regmatch_t *matc
294          return match_string;
295   }
296  
297 < long long sg_get_ll_match(char *line, regmatch_t *match){
298 <        char *ptr;
299 <        long long num;
300 <
301 <        ptr=line+match->rm_so;
302 <        num=atoll(ptr);
303 <
304 <        return num;
305 < }
306 < #endif
307 <
297 > /* FIXME do Linux and Cygwin always have atoll? */
298   #ifndef HAVE_ATOLL
299   static long long atoll(const char *s) {
300          long long value = 0;
# Line 322 | Line 312 | static long long atoll(const char *s) {
312                  s++;
313          }
314          return (isneg ? -value : value);
315 + }
316 + #endif
317 +
318 + long long sg_get_ll_match(char *line, regmatch_t *match){
319 +        char *ptr;
320 +        long long num;
321 +
322 +        ptr=line+match->rm_so;
323 +        num=atoll(ptr);
324 +
325 +        return num;
326   }
327   #endif
328  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines