2929/**
3030* Prints the TAP version.
3131*/
32- void print_version () {
32+ static void print_version ( void ) {
3333 printf ( "TAP version 13\n" );
3434}
3535
@@ -39,7 +39,7 @@ void print_version() {
3939* @param total total number of tests
4040* @param passing total number of passing tests
4141*/
42- void print_summary ( int total , int passing ) {
42+ static void print_summary ( int total , int passing ) {
4343 printf ( "#\n" );
4444 printf ( "1..%d\n" , total ); // TAP plan
4545 printf ( "# total %d\n" , total );
@@ -53,7 +53,7 @@ void print_summary( int total, int passing ) {
5353*
5454* @param elapsed elapsed time in seconds
5555*/
56- void print_results ( double elapsed ) {
56+ static void print_results ( double elapsed ) {
5757 double rate = (double )ITERATIONS / elapsed ;
5858 printf ( " ---\n" );
5959 printf ( " iterations: %d\n" , ITERATIONS );
@@ -67,18 +67,18 @@ void print_results( double elapsed ) {
6767*
6868* @return clock time
6969*/
70- double tic () {
70+ static double tic ( void ) {
7171 struct timeval now ;
7272 gettimeofday ( & now , NULL );
7373 return (double )now .tv_sec + (double )now .tv_usec /1.0e6 ;
7474}
7575
7676/**
77- * Generates a random double on the interval [0,1] .
77+ * Generates a random number on the interval [0,1) .
7878*
79- * @return random double
79+ * @return random number
8080*/
81- double rand_double () {
81+ static double rand_double ( void ) {
8282 int r = rand ();
8383 return (double )r / ( (double )RAND_MAX + 1.0 );
8484}
@@ -88,7 +88,7 @@ double rand_double() {
8888*
8989* @return elapsed time in seconds
9090*/
91- double benchmark () {
91+ static double benchmark ( void ) {
9292 double elapsed ;
9393 double re ;
9494 double im ;
0 commit comments