From ae72fcc7930fb4dcb554dac037610d5905b7b418 Mon Sep 17 00:00:00 2001 From: Peter Verthez <Peter.Verthez@advalvas.be> Date: Mon, 30 Dec 2002 09:34:12 +0000 Subject: [PATCH] Documentation for new function to update timestamp. --- doc/gom.html | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/doc/gom.html b/doc/gom.html index 7358ad1..4ab405a 100644 --- a/doc/gom.html +++ b/doc/gom.html @@ -126,7 +126,12 @@ tags is. Each element of the linked list has:<br> This way, none of the information in the GEDCOM file is lost, even the non-standard information.<br> <br> <hr width="100%" size="2"> -<h2><a name="Other_functions"></a>Modifying the object model</h2> +<h2><a name="Other_functions"></a>Modifying the object model</h2>Currently, there are only functions available to modify strings in the model (and the date manipulation functions described <a href="interface.html#date_value">here</a>). + In principle it is possible to add new records, notes, ... yourself, +but you have to know what you are doing, because you should keep the model +consistent. In the next release, functions will be available to add, +remove and modify anything in the model.<br> + <h3><a name="Manipulating_strings"></a>Manipulating strings<br> </h3> There are some functions available to retrieve and change strings in the @@ -175,9 +180,16 @@ the current locale); in that case the target data variable is not modified.<br> </h2> Writing the current object model to a file is simply done using the following function:<br> <blockquote><code>int <b>gom_write_file</b> (const char* filename, int* total_conv_fails);<br></code></blockquote> -This writes the model to the file <code>filename</code>. The second parameter can return the total number of conversion failures (pass <code>NULL</code><code></code> if you're not interested).<br> -<br> -The functions in <a href="usage.html#Controlling_some_settings">this section</a> can be used before <code>gom_write_file</code> to control some settings.<br> +This writes the model to the file <code>filename</code>. The second parameter can return the total number of conversion failures (pass <code>NULL</code><code></code> if you're not interested). The functions in <a href="usage.html#Controlling_some_settings">this section</a> can be used before <code>gom_write_file</code> to control some settings.<br> +<br> +Before you write the file, you can update the timestamp in the header using the following function:<br> +<blockquote><code>int <b>gom_header_update_timestamp</b> (time_t tval);<br></code></blockquote> +This sets the <code>date</code> and <code>time</code> fields of the header to the time indicated by <code>tval</code>. + The function returns 0 on success, non-zero if an error occurred. Typically, +the function would be used as follows, to set the current time in the timestamp:<br> +<blockquote><code>int result;<br> +result = gom_header_update_timestamp(time(NULL));</code><br> +</blockquote> <hr width="100%" size="2"><br> <pre><font size="-1">$Id$<br>$Name$</font><br></pre> @@ -195,4 +207,5 @@ The functions in <a href="usage.html#Controlling_some_settings">this section</a> <br> <br> <br> +<br> </body></html> \ No newline at end of file -- 2.30.2