]> git.donarmstrong.com Git - biopieces.git/blob - code_c/Maasha/src/test_file_buffer.c
updateing to idba hybrid
[biopieces.git] / code_c / Maasha / src / test_file_buffer.c
1 #include "common.h"
2 #include "filesys.h"
3
4
5 int main( int argc, char *argv[] )
6 {
7     struct file_buffer *buffer;
8     char               *line;
9     char                c;
10
11     buffer = read_open_buffer( argv[ 1 ] );
12
13     while ( ( line = buffer_gets( buffer ) ) ) {
14         printf( "LINE->%s<-", line );
15     }
16
17 /*
18     while ( ( c = buffer_getc( buffer ) ) )
19     {
20         if ( c == '\n' ) {
21             printf( "CHAR->\\n\n" );
22         } else {
23             printf( "CHAR->%c\n", c );
24         }
25     }
26 */     
27     buffer_destroy( buffer );
28
29     return 0;
30 }
31
32
33
34 /*
35 #define SUBSTR_SIZE 15
36
37 int main()
38 {
39     char *string="foobarfoobarfoobarfoobarfoobarfoobarfoobarfoobar";
40     char substr[ SUBSTR_SIZE + 1 ];
41     int i;
42     int j;
43
44     for ( i = 0; i < strlen( string ) - SUBSTR_SIZE + 1; i++ )
45     {
46         for ( j = 0; j < SUBSTR_SIZE; j++ ) {
47             substr[ j ] = string[ i + j ];
48         } 
49
50         substr[ j ] = '\0';
51     
52         printf( "substr->%s\n", substr ); 
53     }gg
54     
55     return 0;
56 }
57
58 */