ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/frameCount/src/frameCount.c
(Generate patch)

Comparing trunk/frameCount/src/frameCount.c (file contents):
Revision 35 by mmeineke, Fri Jul 19 00:01:59 2002 UTC vs.
Revision 36 by mmeineke, Fri Jul 19 00:48:45 2002 UTC

# Line 1 | Line 1
1   #include <stdlib.h>
2   #include <stdio.h>
3  
4 < int main(int argc, char *argv[] ){
4 > #include "frameCount.h"
5  
6 +
7 + int frameCount( char* in_name ){
8 +
9          FILE *in_file;
10          int nFrames = 0;
11          int i, j, k;
12          int lineNum = 0;
13 <        char readBuffer[1000];
13 >        char readBuffer[2000];
14          
15 <
13 <        if( argc != 2 ){
14 <                printf( "I need a dump file to read.\n" );
15 <                exit(8);
16 <        }
17 <        
18 <        in_file = fopen( argv[1], "r" );
15 >        in_file = fopen( in_name, "r" );
16          if( in_file == NULL ){
17 <                printf( "Error opening \"%s\"\n", argv[1] );
17 >                printf( "Error opening \"%s\"\n", in_name );
18                  exit(8);
19          }
20          
# Line 57 | Line 54 | int main(int argc, char *argv[] ){
54                  lineNum++;
55          }
56  
60        printf( "file \"%s\" has %d frames.\n", argv[1], nFrames );
61        
57          fclose( in_file );
58          
59 <        return 0;
59 >        return nFrames;
60   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines