--- projects/libstatgrab/src/libstatgrab/tools.c 2004/04/07 21:08:40 1.51 +++ projects/libstatgrab/src/libstatgrab/tools.c 2004/04/08 10:56:13 1.52 @@ -18,7 +18,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA * 02111-1307 USA * - * $Id: tools.c,v 1.51 2004/04/07 21:08:40 tdb Exp $ + * $Id: tools.c,v 1.52 2004/04/08 10:56:13 tdb Exp $ */ #ifdef HAVE_CONFIG_H @@ -30,7 +30,6 @@ #include #include #include -#include #ifdef ALLBSD #include #endif @@ -266,7 +265,7 @@ static int build_mapping(){ #endif - +#if defined(LINUX) || defined(CYGWIN) char *sg_f_read_line(FILE *f, const char *string){ /* Max line length. 8k should be more than enough */ static char line[8192]; @@ -291,7 +290,17 @@ char *sg_get_string_match(char *line, regmatch_t *matc return match_string; } +long long sg_get_ll_match(char *line, regmatch_t *match){ + char *ptr; + long long num; + ptr=line+match->rm_so; + num=atoll(ptr); + + return num; +} +#endif + #ifndef HAVE_ATOLL static long long atoll(const char *s) { long long value = 0; @@ -428,16 +437,6 @@ int sg_update_string(char **dest, const char *src) { strcpy(new, src); *dest = new; return 0; -} - -long long sg_get_ll_match(char *line, regmatch_t *match){ - char *ptr; - long long num; - - ptr=line+match->rm_so; - num=atoll(ptr); - - return num; } #if (defined(FREEBSD) && !defined(FREEBSD5)) || defined(DFBSD)