# include # include # include # include # include "ppc_ll.h" # include "ppc_truss.h" # include "ppc_truss_io.h" # include "ppc_truss_to_eps.h" int main ( ); void timestamp ( ); /******************************************************************************/ int main ( ) /******************************************************************************/ /* Purpose: ppc_truss_to_eps_test() tests ppc_truss_to_eps(). Modified: 01 May 2021 Author: John Burkardt */ { char *epsfile = "cantilever.eps"; int labels = TR_PLOT_WITH_LABELS; struct truss *truss; timestamp ( ); printf ( "\n" ); printf ( "ppc_truss_to_eps_test():\n" ); printf ( " C version\n" ); printf ( " ppc_truss_to_eps() makes an Encapsulated PostScript image\n" ); printf ( " of a truss structure under a load.\n" ); truss = read_truss ( stdin ); ppc_truss_to_eps ( truss, epsfile, labels ); /* Terminate. */ printf ( "\n" ); printf ( "ppc_truss_to_eps_test():\n" ); printf ( " Normal end of execution.\n" ); timestamp ( ); return EXIT_SUCCESS; } /******************************************************************************/ void timestamp ( ) /******************************************************************************/ /* Purpose: timestamp() prints the current YMDHMS date as a time stamp. Example: 17 June 2014 09:45:54 AM Licensing: This code is distributed under the MIT license. Modified: 01 May 2021 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 ); printf ( "%s\n", time_buffer ); return; # undef TIME_SIZE }