/* ------------- init_html_file --------- * * Purpose : * This function creates the specified html file * and writes out the initial html codes. * * Notes : * Returns 1 if unable to open the file * * Note that the file pointer is input / output * * Modification History * Date Author Description * 10/27/2000 D. Derrig Creation * * --------------------------------------- */ int /* Returned status */ init_html_file ( FILE* *htmlp, /* The file pointer */ const char filename[ ], /* File name */ char title [ ]) { /* HTML title */ /* Open the specified file for writing */ *htmlp = fopen (filename, "w"); if (*htmlp == NULL) return 1; else { /* Output the html codes */ fprintf (*htmlp, "\n"); fprintf (*htmlp, "\n"); fprintf (*htmlp, " %s \n", title); fprintf (*htmlp, "\n"); fprintf (*htmlp, "\n"); return 0; } } /* --------------- create_html_table ---- * * Purpose : * This function issues the html codes to * create the named table * * Notes : * * Modification History * Date Author Description * 10/27/2000 D. Derrig Creation * * --------------------------------------- */ void create_html_table (FILE* htmlp, /* The filepointer */ char tablename [ ]) /* The table name */ { fprintf (htmlp, "\n"); fprintf (htmlp, "\n", tablename); } /* ----------- create_html_row -------------- * * Purpose : * This function outputs the html codes to * create a row * * Notes : * * * Modification History * Date Author Description * 10/27/2000 D. Derrig Creation * * --------------------------------------- */ void create_html_row (FILE* htmlp) /* HTML file pointer */ { fprintf (htmlp, "\n"); } /* -------------- put_into_html_header_row ----- * * Purpose : * This function outputs a string * into the current header row * * Notes : * * * Modification History * Date Author Description * 10/27/2000 D. Derrig Creation * * --------------------------------------- */ void put_into_html_header_row (FILE* htmlp, /* HTML file pointer */ char header[ ]) /* String to put into the header row */ { fprintf (htmlp, "\n", header); } /* ----------- put_string_into_html_data_row ------------ * * Purpose : * This function outputs a string * into the current data row * * Notes : * * Modification History * Date Author Description * 10/27/2000 D. Derrig Creation * * --------------------------------------- */ void put_string_into_html_data_row (FILE* htmlp, /* HTML file pointer */ char data [ ]) /* String to put into data row */ { fprintf (htmlp, "\n", data); } /* ----------- put_double_into_html_data_row ------------ * * Purpose : * This function outputs a double * into the current data row * * Notes : * * Modification History * Date Author Description * 10/27/2000 D. Derrig Creation * * --------------------------------------- */ void put_double_into_html_data_row (FILE* htmlp, /* HTML file pointer */ double data) /* Double to put into data row */ { fprintf (htmlp, "\n", data); } /* ----------- put_int_into_html_data_row ------------ * * Purpose : * This function outputs an integer * into the current data row * * Notes : * * Modification History * Date Author Description * 10/27/2000 D. Derrig Creation * * --------------------------------------- */ void put_int_into_html_data_row (FILE* htmlp, /* HTML file pointer */ int data) /* Integer to put into data row */ { fprintf (htmlp, "\n", data); } /* ----------- close_html_row ------------ * * Purpose : * This function closes the current row * * Notes : * * Modification History * Date Author Description * 10/27/2000 D. Derrig Creation * * --------------------------------------- */ void close_html_row (FILE* htmlp) /* HTML File pointer */ { fprintf (htmlp, "\n"); } /* ----------- close_html_table ----------- * * Purpose : * This function closes the current table * * Notes : * * Modification History * Date Author Description * 10/27/2000 D. Derrig Creation * * --------------------------------------- */ void close_html_table (FILE* htmlp) /* HTML file pointer */ { fprintf (htmlp,"

%s

%s %s %6.3lf %d
\n"); } /* ------------- close_html_file ------------ * * Purpose : * This function outputs the terminating HTML * codes and closes the HTML file * * Notes : * * Note that file pointer is input / output * * Modification History * Date Author Description * 10/27/2000 D. Derrig Creation * * --------------------------------------- */ void close_html_file (FILE* *htmlp) /* File pointer */ { fprintf (*htmlp, "\n"); fprintf (*htmlp, "\n"); fclose (*htmlp); }