Lines Matching refs:buf
139 int get_line( FILE *f, char *buf, size_t len )
143 ret = fgets( buf, len, f );
147 if( strlen( buf ) && buf[strlen(buf) - 1] == '\n' )
148 buf[strlen(buf) - 1] = '\0';
149 if( strlen( buf ) && buf[strlen(buf) - 1] == '\r' )
150 buf[strlen(buf) - 1] = '\0';
155 int parse_arguments( char *buf, size_t len, char *params[50] )
158 char *cur = buf;
159 char *p = buf, *q;
163 while( *p != '\0' && p < buf + len )
173 if( p + 1 < buf + len )
219 char buf[10] = "xxxxxxxxx";
222 ret = mbedtls_snprintf( buf, n, "%s", "123" );
226 if( strncmp( ref_buf, buf, sizeof( buf ) ) != 0 ||
228 memcmp( buf + n, ref + n, sizeof( buf ) - n ) != 0 )
261 char buf[5000];
355 if( ( ret = get_line( file, buf, sizeof(buf) ) ) != 0 )
357 mbedtls_fprintf( stdout, "%s%.66s", test_errors ? "\n" : "", buf );
359 for( i = strlen( buf ) + 1; i < 67; i++ )
366 if( ( ret = get_line( file, buf, sizeof(buf) ) ) != 0 )
368 cnt = parse_arguments( buf, strlen(buf), params );
393 if( ( ret = get_line( file, buf, sizeof(buf) ) ) != 0 )
395 cnt = parse_arguments( buf, strlen(buf), params );
469 if( ( ret = get_line( file, buf, sizeof(buf) ) ) != 0 )
471 if( strlen(buf) != 0 )
474 (int) strlen(buf) );