X-Git-Url: https://git.dlugolecki.net.pl/?a=blobdiff_plain;f=doc%2Fusage.html;h=39a0cb3594f58e5ca6cfeb0a30d3c1e99c09f371;hb=32da62601457ba994c6b71d71470ae066fc3969b;hp=1c59ae9dc2a126295800cfeb46ea2b61cf507c86;hpb=c80fb171c952d002191509a343bb4c3747dffc35;p=gedcom-parse.git diff --git a/doc/usage.html b/doc/usage.html index 1c59ae9..39a0cb3 100644 --- a/doc/usage.html +++ b/doc/usage.html @@ -470,10 +470,12 @@ values:
-For both these parameters you can pass 0 for non-UNICODE encodings, since -that corresponds to the correct values (and is ignored anyway).  The -function returns 0 in case of success, non-zero in case of error.
+ For both these parameters you can pass 0 for non-UNICODE encodings, +since that corresponds to the correct values (and is ignored anyway).  The +function returns 0 in case of success, non-zero in case of error.  Note +that you still need to pass the correct charset value for the HEAD.CHAR tag, +otherwise you will get a warning, and the value will be forced to the correct +value.

Further, it is possible to control the kind of line terminator that is used, via the following function (also to be used before gedcom_write_open):
int gedcom_write_set_line_terminator (Enc_line_end end);
@@ -661,11 +663,23 @@ There is a macro available for use in configure.in for applications that are using autoconf to configure their sources.  The following macro checks whether the Gedcom parser library is available and whether its version is high enough:
-
AM_LIB_GEDCOM_PARSER([major,[minor,[patch]]])
+
AM_PATH_GEDCOM_PARSER([min_version,[action_if_found,[action_if_not_found,[modules]]]])
All the arguments are optional and default to 0.  E.g. to check for -version 1.34, you would put in configure.in the following statement:
-
AM_LIB_GEDCOM_PARSER(1,34)
+version 1.34.2, you would put in configure.in the following statement:
+
AM_PATH_GEDCOM_PARSER(1.34.2)
+
Note that version numbers now contains three parts (since version +0.20.0: this is also the first version in which this macro is available).
+
+The macro also sets the variables GEDCOM_CFLAGS and GEDCOM_LIBS for use in Makefiles.  Typically, this would be done as follows in a Makefile.am:
+
bin_programs   = myprg
+ myprg_SOURCES  = myprg.c foo.c bar.c
+INCLUDES       = @GEDCOM_CFLAGS@
+LDADD          = @GEDCOM_LIBS@
+If your program uses some extra modules, they can be passed as fourth argument +in the macro, so that the CFLAGS and LIBS are correctly filled in.  Currently, +the only available module is gom (the Gedcom object model).  For example:
+
AM_PATH_GEDCOM_PARSER(0.21.2, , ,gom)
To be able to use this macro in the sources of your application, you have three options:
- The last one is equal to (GEDCOM_PARSE_VERSION_MAJOR * 1000) + GEDCOM_PARSE_VERSION_MINOR.
+ The last one is equal to (GEDCOM_PARSE_VERSION_MAJOR * 1000) + GEDCOM_PARSE_VERSION_MINOR. As you see, this only checked the major and minor version, not the patch number, so this is obsolete.

Compilation and linking flags

-Similar to other libraries, the GEDCOM parse library installs a script gedcom-config to help with compilation and linking flags.
+Similar to other libraries, the GEDCOM parse library installs a script gedcom-config to help with compilation and linking flags for programs that don't use autoconf/automake.

To get compilation flags for your program, use (depending on whether you only use the callback parser, or also the GEDCOM object model): @@ -722,4 +736,6 @@ gedcom-config --libs gom



+
+
\ No newline at end of file