added a couple comment lines to top of generated calibration files
authorFrank Mori Hess <fmhess@speakeasy.net>
Thu, 6 Mar 2003 19:18:18 +0000 (19:18 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Thu, 6 Mar 2003 19:18:18 +0000 (19:18 +0000)
comedi_calibrate/save_cal.c

index 10facc4356266e8a49e061a6818dd844a6da8ca4..61e9979d90171440374161e4f45dd955d97f0528 100644 (file)
@@ -27,6 +27,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 #include <unistd.h>
 #include <stdlib.h>
 #include <assert.h>
+#include <time.h>
 
 #include <comedilib.h>
 
@@ -93,7 +94,11 @@ int write_calibration_perl_hash( FILE *file, comedi_t *dev,
        saved_calibration_t settings[], unsigned int num_settings )
 {
        int i;
+       time_t now;
 
+       now = time( NULL );
+       fprintf( file, "#calibration file generated by comedi_calibrate\n"
+               "#%s\n", ctime( &now ) );
        fprintf( file, "{\n" );
        fprintf( file, "\tdriver_name => \"%s\",\n", comedi_get_driver_name( dev ) );
        fprintf( file, "\tboard_name => \"%s\",\n", comedi_get_board_name( dev ) );