ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/libstatgrab/src/libstatgrab/tools.c
Revision: 1.2
Committed: Wed Mar 5 12:41:19 2003 UTC (21 years, 2 months ago) by pajs
Content type: text/plain
Branch: MAIN
Changes since 1.1: +1 -2 lines
Log Message:
Working linux diskio stats. Fixed bug in tools.c

File Contents

# Content
1 #include <stdio.h>
2 #include <string.h>
3
4 char *f_read_line(FILE *f, const char *string){
5 /* Max line length. 8k should be more than enough */
6 static char line[8192];
7
8 while((fgets(line, sizeof(line), f))!=NULL){
9 if(strncmp(string, line, strlen(string))==0){
10 return line;
11 }
12 }
13
14 return NULL;
15 }