# include # include # include # include # include # include "partial_digest.h" int main ( ); void timestamp ( ); /******************************************************************************/ int main ( ) /******************************************************************************/ /* Purpose: partial_digest_test() tests partial_digest(). Licensing: This code is distributed under the MIT license. Modified: 09 January 2018 Author: John Burkardt */ { timestamp ( ); printf ( "\n" ); printf ( "partial_digest_test():\n" ); printf ( " C version\n" ); printf ( " Test partial_digest().\n" ); find_distances_test ( ); i4_uniform_ab_test ( ); i4vec_max_last_test ( ); i4vec_print_test ( ); partial_digest_recur_test01 ( ); /* Terminate. */ printf ( "\n" ); printf ( "partial_digest_test():\n" ); printf ( " Normal end of execution.\n" ); printf ( "\n" ); timestamp ( ); return 0; } /******************************************************************************/ void timestamp ( ) /******************************************************************************/ /* Purpose: timestamp() prints the current YMDHMS date as a time stamp. Example: 31 May 2001 09:45:54 AM Licensing: This code is distributed under the MIT license. Modified: 24 September 2003 Author: John Burkardt */ { # define TIME_SIZE 40 static char time_buffer[TIME_SIZE]; const struct tm *tm; time_t now; now = time ( NULL ); tm = localtime ( &now ); strftime ( time_buffer, TIME_SIZE, "%d %B %Y %I:%M:%S %p", tm ); fprintf ( stdout, "%s\n", time_buffer ); return; # undef TIME_SIZE }