debian/0000755000000000000000000000000011726670627007204 5ustar debian/changelog0000644000000000000000000001236011726670157011056 0ustar libvformat (1.13-10) unstable; urgency=low * Add proper versioned dependency on debhelper and remove associated lintian override. * Use version 1.0 for DEP5 copyright. * Bump Standards-Version to 3.9.3 (no changes needed). -- Thomas Preud'homme Sat, 10 Mar 2012 16:13:07 +0100 libvformat (1.13-9) unstable; urgency=low * Fix FTBFS due to --Werror=format-security hardening flag. (Closes: 643434) * debian/copyright: + Give LGPL-2.1+ its own License paragraph. * Remove dependency on autotools-dev (functionality included in dh-autoreconf) * -- Thomas Preud'homme Tue, 27 Sep 2011 17:06:56 +0200 libvformat (1.13-8) unstable; urgency=low * Convert libvformat to multiarch. * Remove useless dependency on libc6-dev. * debian/rules: + Use dpkg-buildflags to set CPPFLAGS, CFLAGS and LDFLAGS. * debian/copyright: + Document global license and copyright. * Set DM-Upload-Allowed flag. -- Thomas Preud'homme Wed, 03 Aug 2011 23:56:35 +0200 libvformat (1.13-7) unstable; urgency=low * Fix a typo in 2 manpages. * Remove unused lintian override. * Add a symbols control file and shlibs file. * Stop building transitional packages. * Exclude debian/.git-dpm and debian/gbp.conf from source package * debian/compat: + Bump debhelper compatibility from 7 to 8. * debian/rules: + Use dh-autoreconf to trigger autoreconf at build time. * debian/control: + Improve description of the package. + Bump Standard-Version from 3.8.4 to 3.9.2 (no changes needed). * debian/patches: + Update patches meta-information. + Remove 0002-Update-linux-maintainer.patch. * debian/copyright: + Convert to DEP5 candidate format. * debian/*.install: + Make use of autodest feature to simplify the files. * debian/*.dirs: + Remove empty *.dirs files. -- Thomas Preud'homme Mon, 11 Apr 2011 19:14:15 +0200 libvformat (1.13-6) unstable; urgency=low [ Thomas Preud'homme ] * New maintainer. (Closes: #535686) * Bug fixes: + Remove leading space when unfolding. (Closes: #539442 thanks to Daniele Forsi) + Correct the use of va_arg functions in the tests to make it work on all archs. * debian/control: + Rename libvformat1 into libvformat0 to match soname. (Closes: #448002) + Rename libvformat1-dev into libvformat-dev as only one version is supported. + Bump Standard-Version from 3.8.3 to 3.8.4 (no changes needed). + Add Vcs-Browser and Vcs-Git fiels. * debian/source/format: + Switch to dpkg-source 3.0 (quilt) format. * debian/compat: + Bump debhelper compatibility from 5 to 7. * Add a lintian override for ltmain.sh. -- Thomas Preud'homme Wed, 12 May 2010 19:17:34 +0200 libvformat (1.13-5) unstable; urgency=low * QA upload. * debian/copyright: + include copyright assignment. + point to a versioned license. * debian/control: + remove debhelper dependency from the runtime binary package. (Closes: #363569, LP: #441893) + build-depend on autotools-dev. + add ${misc:Depends} to all binary packages. + set maintainer to Debian QA Group. + make dependency to triggers smoother with install-info. + improve short descriptions a little. + add Homepage field, so that we don't loose track of upstream. + tighten the dependency between -dev and lib package. + update Standards-Version to 3.8.3. * delete trailing whitespace from this log. * debian/rules: + remove DH_COMPAT. + don't ignore make clean error. + remove some commented lines. + touch build-stamp, as it is not declared as a PHONY target. + link config.{sub,guess} in the configuration step. + don't incorrectly copy config.{sub,guess} from autotools-dev. + improve support for cross-compilation. * debian/compat: + add, with 5. * debian/watch: + include, with redirector to sourceforge. * doc/libvformat.texi: added info dirsection (Closes: #528907). -- Rogério Brito Mon, 19 Oct 2009 17:17:37 -0200 libvformat (1.13-4) unstable; urgency=low * Resolved ambiguity concerning redefinition of uint32_t: Closes: #336326 * Removed dependency on c2man: Closes: #313265 * Included info Files into the documentation. * Removed the CVS directories in the debian tree * Removed the libvformat.info and the texinfo.tex in the doc directory. The texinfo.tex is taken from the texinfo package. * Removed common/types.h altogether -- Mathias Palm Sun, 8 January 2006 17:03:00 +0200 libvformat (1.13-3) unstable; urgency=low * sorted the libraries and the dev-files into libs and libdevel, respectively -- Mathias Palm Thu, 15 May 2003 15:52:28 +0200 libvformat (1.13-2) unstable; urgency=low * removed package restriction to i386 Closes: #188009 * fixed a minor bug in vf_iface.h * removed include of system header files stdarg.h and times.h when running c2man (c2man cant handle __xxxx type entries) Closes: #191205 -- Mathias Palm Thu, 10 Apr 2003 14:38:17 +0200 libvformat (1.13-1) unstable; urgency=low * Initial Release. -- Mathias Palm Tue, 15 Oct 2002 19:03:07 +0200 debian/clean0000644000000000000000000000027211726670157010210 0ustar aclocal.m4 compile config.guess config.h.in config.sub configure depcomp ltmain.sh install-sh mkinstalldirs missing INSTALL Makefile.in */Makefile.in doc/texinfo.tex doc/libvformat.info debian/compat0000644000000000000000000000000211726670157010400 0ustar 9 debian/control0000644000000000000000000000237411726670157010613 0ustar Source: libvformat Section: devel Priority: optional Maintainer: Thomas Preud'homme Standards-Version: 3.9.3 Build-Depends: debhelper (>= 9), dh-autoreconf, texinfo, autotools-dev, automake, autoconf, libtool Build-Conflicts: autoconf2.13, automake1.4 DM-Upload-Allowed: yes Homepage: http://sourceforge.net/projects/vformat/ Vcs-Browser: http://git.debian.org/?p=collab-maint/libvformat.git;a=summary Vcs-Git: git://git.debian.org/collab-maint/libvformat.git Package: libvformat-dev Section: libdevel Architecture: any Depends: libvformat0 (= ${binary:Version}), ${misc:Depends} Description: library to read and write vcard files (development files) This library provides an interface to vcard files according to the definitions laid down in the rfc2426. . This package contains the development headers for the library found in libvformat0. Package: libvformat0 Section: libs Architecture: any Multi-Arch: same Pre-Depends: ${misc:Pre-Depends} Depends: ${shlibs:Depends}, ${misc:Depends} Description: library to read and write vcard files This library provides an interface to vcard files according to the definitions laid down in the rfc2426. . This package contains the shared libraries necessary to run programs compiled with libvformat. debian/copyright0000644000000000000000000000755711726670157011153 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: vFormat Upstream-Contact: Nick Marley Source: http://sourceforge.net/projects/vformat/ License: LGPL-2.1+ Files: * Copyright: 2001 Nick Marley License: LGPL-2.1+ Files: debian/* Copyright: 2002, 2003, 2006 Mathias Palm , 2010 Thomas Preud'homme License: Expat Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: . The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. . THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Files: vformat/vf_iface.h Copyright: 2001 Nick Marley License: LGPL-2+ Files: vf_iface.h Copyright: 2002 Mathias Palm License: LGPL-2+ License: LGPL-2+ THIS SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. . IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. . This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. . You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. . On Debian systems, the full text of the GNU Lesser General Public License version 2 can be found in the file `/usr/share/common-licenses/LGPL-2'. License: LGPL-2.1+ This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. . This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. . You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. . On Debian systems, the full text of the GNU Lesser General Public License version 2.1 can be found in the file `/usr/share/common-licenses/LGPL-2.1'. debian/libvformat-dev.info0000644000000000000000000000005211726670157012775 0ustar debian/tmp/usr/share/info/libvformat.info debian/libvformat-dev.install0000644000000000000000000000007411726670157013514 0ustar usr/include usr/lib/*/libvformat*.so usr/lib/*/libvformat.a debian/libvformat-dev.manpages0000644000000000000000000000004211726670157013634 0ustar debian/tmp/usr/share/man/man3/*.3 debian/libvformat0.install0000644000000000000000000000003311726670157013013 0ustar usr/lib/*/libvformat*.so.* debian/libvformat0.shlibs0000644000000000000000000000004511726670157012634 0ustar libvformat 0 libvformat0 (>= 1.13-6) debian/libvformat0.symbols0000644000000000000000000000370511726670157013046 0ustar libvformat.so.0 libvformat0 #MINVER# * Build-Depends-Package: libvformat-dev _vf_free@Base 1.13-6~ _vf_malloc@Base 1.13-6~ _vf_realloc@Base 1.13-6~ _vf_stdlib_free@Base 1.13-6~ _vf_stdlib_malloc@Base 1.13-6~ _vf_stdlib_realloc@Base 1.13-6~ add_string_to_array@Base 1.13-6~ append_to_curr_string@Base 1.13-6~ append_to_pointer@Base 1.13-6~ delete_prop_contents@Base 1.13-6~ free_string_array_contents@Base 1.13-6~ mark_property_modified@Base 1.13-6~ p_memcpy@Base 1.13-6~ p_memset@Base 1.13-6~ p_strcat@Base 1.13-6~ p_strcmp@Base 1.13-6~ p_strcpy@Base 1.13-6~ p_stricmp@Base 1.13-6~ p_stristr@Base 1.13-6~ p_strlen@Base 1.13-6~ p_strstr@Base 1.13-6~ set_string_array_entry@Base 1.13-6~ string_array_contains_string@Base 1.13-6~ vf_create_object@Base 1.13-6~ vf_date_string_to_time@Base 1.13-6~ vf_delete_object@Base 1.13-6~ vf_delete_prop@Base 1.13-6~ vf_find_charset@Base 1.13-6~ vf_find_prop_qual_index@Base 1.13-6~ vf_get_next_object@Base 1.13-6~ vf_get_next_property@Base 1.13-6~ vf_get_object_type@Base 1.13-6~ vf_get_prop_name@Base 1.13-6~ vf_get_prop_name_string@Base 1.13-6~ vf_get_prop_value@Base 1.13-6~ vf_get_prop_value_base64@Base 1.13-6~ vf_get_prop_value_object@Base 1.13-6~ vf_get_prop_value_string@Base 1.13-6~ vf_get_prop_value_time@Base 1.13-6~ vf_get_property@Base 1.13-6~ vf_get_property_ex@Base 1.13-6~ vf_is_modified@Base 1.13-6~ vf_parse_end@Base 1.13-6~ vf_parse_init@Base 1.13-6~ vf_parse_text@Base 1.13-6~ vf_period_string_to_time@Base 1.13-6~ vf_period_time_to_string@Base 1.13-6~ vf_prop_belongs_to_object@Base 1.13-6~ vf_read_file@Base 1.13-6~ vf_set_mem_functions@Base 1.13-6~ vf_set_prop_name_string@Base 1.13-6~ vf_set_prop_value@Base 1.13-6~ vf_set_prop_value_base64@Base 1.13-6~ vf_set_prop_value_object@Base 1.13-6~ vf_set_prop_value_string@Base 1.13-6~ vf_set_prop_value_time@Base 1.13-6~ vf_set_property_from_file@Base 1.13-6~ vf_stdlib_dump_alloc_info@Base 1.13-6~ vf_write_file@Base 1.13-6~ debian/patches/0000755000000000000000000000000011726670157010631 5ustar debian/patches/0001-Copy-common-types.h-to-vformat-vf_iface.h.patch0000644000000000000000000002614211726670157022107 0ustar From b76bb7e1bce4cb30f6b4b625334ce011b5a1654f Mon Sep 17 00:00:00 2001 From: Mathias Palm Date: Sun, 9 May 2010 00:37:36 +0200 Subject: Copy common/types.h to vformat/vf_iface.h Copy the content of common/types.h into vformat/vf_iface.h. Keep common/types.h because some files depends on it. Origin: vendor Forwarded: http://vformat.cvs.sourceforge.net/viewvc/vformat/build/vformat/linux/ChangeLog?revision=1.3&view=markup Last-Update: 2010-05-09 Applied-Upstream: http://vformat.cvs.sourceforge.net/viewvc/vformat/build/vformat/linux/ChangeLog?revision=1.3&view=markup --- ChangeLog | 7 +++++++ Makefile.am | 1 - configure.ac | 2 -- src/vf_access.c | 1 - src/vf_access_calendar.c | 2 -- src/vf_access_wrappers.c | 1 - src/vf_create_object.c | 1 - src/vf_delete.c | 1 - src/vf_malloc.c | 1 - src/vf_malloc_stdlib.c | 2 -- src/vf_modified.c | 1 - src/vf_parser.c | 1 - src/vf_reader.c | 1 - src/vf_search.c | 1 - src/vf_string_arrays.c | 1 - src/vf_strings.c | 1 - src/vf_writer.c | 1 - vformat/vf_iface.h | 45 ++++++++++++++++++++++++++++++++++----------- 18 files changed, 41 insertions(+), 30 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4fe7df9..407796e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2003-04-10 + + * Moved the content of common/types.h in vf_iface.h, + common/types.h is kept because of depends of sources on it. + + * included manpages and started info-files + 2002-11-22 Mathias Palm * manpages are generated from the header file and installed diff --git a/Makefile.am b/Makefile.am index 9ea4543..2bfe1c6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,3 @@ SUBDIRS = src vformat test doc -EXTRA_DIST = common/types.h vf_iface.h diff --git a/configure.ac b/configure.ac index d1b1041..744f321 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,5 @@ # Process this file with autoconf to produce a configure script. AC_INIT(libvformat, 1.13, Nick ) -AC_CONFIG_SRCDIR([vf_iface.h]) -#AC_CONFIG_HEADER([config.h]) AM_INIT_AUTOMAKE(libvformat, 1.13) AM_CONFIG_HEADER(config.h) diff --git a/src/vf_access.c b/src/vf_access.c index 7504150..5e28765 100644 --- a/src/vf_access.c +++ b/src/vf_access.c @@ -102,7 +102,6 @@ static const char vf_access_c_vss_id[] = "$Header: /cvsroot/vformat/src/vformat/ ANSI C & System-wide Header Files *============================================================================*/ -#include /*===========================================================================* Interface Header Files diff --git a/src/vf_access_calendar.c b/src/vf_access_calendar.c index 159c432..dbc8b74 100644 --- a/src/vf_access_calendar.c +++ b/src/vf_access_calendar.c @@ -52,8 +52,6 @@ static const char vf_access_calendar_c_vss_id[] = "$Header: /cvsroot/vformat/src ANSI C & System-wide Header Files *============================================================================*/ -#include - #include #include #include diff --git a/src/vf_access_wrappers.c b/src/vf_access_wrappers.c index 2eea457..ac889dc 100644 --- a/src/vf_access_wrappers.c +++ b/src/vf_access_wrappers.c @@ -79,7 +79,6 @@ static const char vf_access_wrappers_c_vss_id[] = "$Header: /cvsroot/vformat/src ANSI C & System-wide Header Files *============================================================================*/ -#include /*===========================================================================* Interface Header Files diff --git a/src/vf_create_object.c b/src/vf_create_object.c index ab540b9..2dc4376 100644 --- a/src/vf_create_object.c +++ b/src/vf_create_object.c @@ -54,7 +54,6 @@ static const char vf_create_object_c_vss_id[] = "$Header: /cvsroot/vformat/src/v ANSI C & System-wide Header Files *===========================================================================*/ -#include /*===========================================================================* Interface Header Files diff --git a/src/vf_delete.c b/src/vf_delete.c index d70b8e4..49fc9a4 100644 --- a/src/vf_delete.c +++ b/src/vf_delete.c @@ -70,7 +70,6 @@ static const char vf_delete_c_vss_id[] = "$Header: /cvsroot/vformat/src/vformat/ ANSI C & System-wide Header Files *=============================================================================*/ -#include /*============================================================================* Interface Header Files diff --git a/src/vf_malloc.c b/src/vf_malloc.c index ef405d9..4649a5f 100644 --- a/src/vf_malloc.c +++ b/src/vf_malloc.c @@ -64,7 +64,6 @@ static const char vf_malloc_c_vss_id[] = "$Header: /cvsroot/vformat/src/vformat/ ANSI C & System-wide Header Files *============================================================================*/ -#include /*============================================================================* Interface Header Files diff --git a/src/vf_malloc_stdlib.c b/src/vf_malloc_stdlib.c index 6318fa5..b592986 100644 --- a/src/vf_malloc_stdlib.c +++ b/src/vf_malloc_stdlib.c @@ -38,8 +38,6 @@ static const char vf_malloc_stdlib_c_vss_id[] = "$Header: /cvsroot/vformat/src/v ANSI C & System-wide Header Files *============================================================================*/ -#include - #include #include diff --git a/src/vf_modified.c b/src/vf_modified.c index 427698a..7cd1a5a 100644 --- a/src/vf_modified.c +++ b/src/vf_modified.c @@ -43,7 +43,6 @@ static const char vf_modified_c_vss_id[] = "$Header: /cvsroot/vformat/src/vforma ANSI C & System-wide Header Files *============================================================================*/ -#include /*============================================================================* Interface Header Files diff --git a/src/vf_parser.c b/src/vf_parser.c index bf7b789..2c7221c 100644 --- a/src/vf_parser.c +++ b/src/vf_parser.c @@ -94,7 +94,6 @@ static const char vf_parser_c_vss_id[] = "$Header: /cvsroot/vformat/src/vformat/ ANSI C & System-wide Header Files *===========================================================================*/ -#include /*============================================================================* Interface Header Files diff --git a/src/vf_reader.c b/src/vf_reader.c index 667279f..a48246c 100644 --- a/src/vf_reader.c +++ b/src/vf_reader.c @@ -84,7 +84,6 @@ static const char vf_reader_c_vss_id[] = "$Header: /cvsroot/vformat/src/vformat/ ANSI C & System-wide Header Files *=============================================================================*/ -#include #include #include diff --git a/src/vf_search.c b/src/vf_search.c index 71be484..e303eae 100644 --- a/src/vf_search.c +++ b/src/vf_search.c @@ -64,7 +64,6 @@ static const char vf_search_c_vss_id[] = "$Header: /cvsroot/vformat/src/vformat/ ANSI C & System-wide Header Files *============================================================================*/ -#include /*===========================================================================* Interface Header Files diff --git a/src/vf_string_arrays.c b/src/vf_string_arrays.c index eee27f4..3a5addd 100644 --- a/src/vf_string_arrays.c +++ b/src/vf_string_arrays.c @@ -43,7 +43,6 @@ static const char vf_string_arrays_c_vss_id[] = "$Header: /cvsroot/vformat/src/v ANSI C & System-wide Header Files *=============================================================================*/ -#include /*============================================================================* Interface Header Files diff --git a/src/vf_strings.c b/src/vf_strings.c index 204a188..05a32fa 100644 --- a/src/vf_strings.c +++ b/src/vf_strings.c @@ -60,7 +60,6 @@ static const char vf_strings_c_vss_id[] = "$Header: /cvsroot/vformat/src/vformat ANSI C & System-wide Header Files *=============================================================================*/ -#include #include #include diff --git a/src/vf_writer.c b/src/vf_writer.c index ef3298a..29b83b5 100644 --- a/src/vf_writer.c +++ b/src/vf_writer.c @@ -68,7 +68,6 @@ static const char vf_writer_c_vss_id[] = "$Header: /cvsroot/vformat/src/vformat/ ANSI C & System-wide Header Files *=============================================================================*/ -#include #include #include diff --git a/vformat/vf_iface.h b/vformat/vf_iface.h index 8dc1b62..ab5e8d9 100644 --- a/vformat/vf_iface.h +++ b/vformat/vf_iface.h @@ -28,7 +28,7 @@ FILE $Workfile: vf_iface.h $ - $Revision: 1.30 $ + $Revision: 1.31 $ $Author: monos $ ORIGINAL AUTHOR @@ -42,6 +42,9 @@ REFERENCES MODIFICATION HISTORY * $Log: vf_iface.h,v $ + * Revision 1.31 2003/04/10 12:49:16 monos + * included type defs in vf_iface.h, started info documentation + * * Revision 1.30 2002/12/07 17:25:44 monos * *** empty log message *** * @@ -135,28 +138,47 @@ MODIFICATION HISTORY #define _VF_IFACE_H_ #ifndef NORCSID -static const char vf_iface_h_vss_id[] = "$Header: /cvsroot/vformat/src/vformat/vf_iface.h,v 1.30 2002/12/07 17:25:44 monos Exp $"; +static const char vf_iface_h_vss_id[] = "$Header: /cvsroot/vformat/src/vformat/vf_iface.h,v 1.31 2003/04/10 12:49:16 monos Exp $"; #endif /*============================================================================* Public Includes *============================================================================*/ +#include +#include + +/*============================================================================* + Public defines + *============================================================================*/ -#include +#undef NULL +#define NULL 0 -#include +#undef FALSE +#define FALSE ((bool_t)(0)) -/* c2man (for producing man pages) can't handle some lines in time.h */ +#undef TRUE +#define TRUE ((bool_t)(1)) -#ifndef __C2MAN__ -#include + +/* + * Basic types. + */ +#if defined(HAVE_INTTYPES_H) +#include #else -#define time_t long int +typedef unsigned char uint8_t; +typedef unsigned short int uint16_t; +typedef unsigned int uint32_t; #endif -/*============================================================================* - Public defines - *============================================================================*/ +/* + * Please avoide 'BOOL' (from Windows) and 'bool' (from C++) - vformat is used + * extensively in pure C embedded applications where neither are relevant. + */ +typedef unsigned char bool_t; + + #if defined(__cplusplus) extern "C" { @@ -434,6 +456,7 @@ extern "C" { Public Types *============================================================================*/ + /* * Type representing "parser" - an object used to parse VOBJECTS. */ -- 1.7.6.3 debian/patches/0002-Ease-distribution-of-libvformat.patch0000644000000000000000000000303511726670157020371 0ustar From 73ac24c61c03ea6a0bcae657b4ff260a03547d27 Mon Sep 17 00:00:00 2001 From: Mathias Palm Date: Sun, 9 May 2010 00:37:48 +0200 Subject: Ease distribution of libvformat * Remove AC_PROG_RANLIB as there is no need for ranlib when libtool is used. * Remove unused AC_CONFIG_FILES. * Remove files generated when testing the library in clean rule. origin: vendor forwarded: https://sourceforge.net/tracker/?func=detail&aid=3084910&group_id=37192&atid=419516 Last-Update: 2010-10-10 --- configure.ac | 3 +-- test/Makefile.am | 6 +++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 744f321..ab68899 100644 --- a/configure.ac +++ b/configure.ac @@ -8,7 +8,6 @@ AM_CONFIG_HEADER(config.h) # AC_PROG_CC # Checks for libraries. -AC_PROG_RANLIB AC_PROG_LIBTOOL # Checks for header files. @@ -25,5 +24,5 @@ AC_FUNC_STAT AC_CHECK_FUNCS([atexit memset strstr]) AC_OUTPUT([Makefile src/Makefile vformat/Makefile test/Makefile doc/Makefile]) -AC_CONFIG_FILES([]) +#AC_CONFIG_FILES([]) diff --git a/test/Makefile.am b/test/Makefile.am index 883a1a7..407e901 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -4,4 +4,8 @@ vformat_SOURCE = testsuppt.c vformat.c vformat_LDADD = ../src/.libs/libvformat.a testsuppt.o EXTRA_DIST = testsuppt.c testsuppt.h tests/access/*.vcf tests/adhoc/*.vc* tests/spec/*.vcf tests/utf-8/*.vcf -TESTS = vformat \ No newline at end of file +TESTS = vformat + +clean-local: + find . -name *out* -exec rm -f {} ';' + rm -f *.vcf -- 1.7.6.3 debian/patches/0003-Add-sample-files.patch0000644000000000000000000002040311726670157015300 0ustar From 498a9ad6a1affbc1b1dee6032e7fce5fa5665f7e Mon Sep 17 00:00:00 2001 From: Mathias Palm Date: Sun, 9 May 2010 00:02:44 +0200 Subject: Add sample files Add sample files to test the library. Origin: vendor Forwarded: http://vformat.cvs.sourceforge.net/viewvc/vformat/build/samples/ Last-Update: 2010-10-10 Applied-Upstream: http://vformat.cvs.sourceforge.net/viewvc/vformat/build/samples/ --- samples/split_phonebook.c | 171 +++++++++++++++++++++++++++++++++++++++++++++ samples/split_phonebook.h | 66 +++++++++++++++++ 2 files changed, 237 insertions(+), 0 deletions(-) create mode 100644 samples/split_phonebook.c create mode 100644 samples/split_phonebook.h diff --git a/samples/split_phonebook.c b/samples/split_phonebook.c new file mode 100644 index 0000000..4ecc094 --- /dev/null +++ b/samples/split_phonebook.c @@ -0,0 +1,171 @@ +/****************************************************************************** + + (C) Nick Marley, 2001 - + + This software is distributed under the GNU Lesser General Public Licence. + Please read and understand the comments at the top of vf_iface.h before use! + +FILE + $Workfile$ + $Revision: 1.3 $ + $Author: tilda $ + +ORIGINAL AUTHOR + Nick Marley + +DESCRIPTION + Platform independant test harness for the vformat library functions. This + code runs various tests on the library, results are written to stdout. + +REFERENCES + (none) + +MODIFICATION HISTORY + * $Log: split_phonebook.c,v $ + * Revision 1.3 2001/10/24 18:37:38 tilda + * BASE64 bugfixes. Split reader/writer code. Start create/modify work. + * + * Revision 1.2 2001/10/24 05:29:24 tilda + * Tidy up. + * + * Revision 1.1.1.1 2001/10/16 05:49:57 tilda + * Initial Import to CVS. + * + *******************************************************************************/ + +#ifndef NORCSID +static const char split_phonebook_c_vss_id[] = "$Header: /cvsroot/vformat/build/samples/split_phonebook.c,v 1.3 2001/10/24 18:37:38 tilda Exp $"; +#endif + +/*=============================================================================* + ANSI C & System-wide Header Files + *=============================================================================*/ + +#include +#include +#include + +/*============================================================================* + Interface Header Files + *============================================================================*/ + +#include "vformat/vf_iface.h" + +/*============================================================================* + Local Header File + *============================================================================*/ + +#include "split_phonebook.h" + +/*============================================================================* + Private Defines + *============================================================================*/ +/* None */ + +/*============================================================================* + Private Data Types + *============================================================================*/ +/* None */ + +/*============================================================================* + Private Function Prototypes + *============================================================================*/ +/* None */ + +/*============================================================================* + Private Data + *============================================================================*/ +/* None */ + +/*============================================================================* + Public Function Implementations + *============================================================================*/ + + +/*----------------------------------------------------------------------------* + * NAME + * split_phonebook() + * + * DESCRIPTION + * Read in the indicated file which is assumed to be a list of VCARDs. + * The component cards are written out to individual files. + * + * RETURNS + * TRUE <=> read / written OK. + *----------------------------------------------------------------------------*/ + +bool_t split_phonebook( + const char *p_filename, + const char *p_outdir + ) +{ + VF_OBJECT_T *p_object = NULL; + bool_t ret = FALSE; + + if (vf_read_file(&p_object, p_filename)) + { + VF_OBJECT_T *p_tmp = p_object; + + ret = TRUE; + + do + { + VF_PROP_T *p_prop; + char name[256]; + + name[0] = '\0'; + + if (vf_get_property(&p_prop, p_object, FALSE, NULL, VFP_NAME, NULL)) + { + const char *p_givenname = vf_get_prop_value_string(p_prop, VFP_NAME_GIVEN); + const char *p_familyname = vf_get_prop_value_string(p_prop, VFP_NAME_FAMILY); + + if (p_familyname && p_givenname) + { + sprintf(name, "%s %s", p_givenname, p_familyname); + } + else + if (p_familyname) + { + strcpy(name, p_familyname); + } + else + if (p_givenname) + { + strcpy(name, p_givenname); + } + } + else + if (vf_get_property(&p_prop, p_object, FALSE, NULL, VFP_FULLNAME, NULL)) + { + const char *p_fullname = vf_get_prop_value_string(p_prop, VFP_NAME_GIVEN); + + if (p_fullname) + { + strcpy(name, p_fullname); + } + } + + if (name[0]) + { + char filename[_MAX_PATH]; + + sprintf(filename, "%s\\%s.vcf", p_outdir, name); + + ret &= vf_write_file(filename, p_object, FALSE); + } + } + while (ret && vf_get_next_object(&p_object)) + ; + + vf_delete_object(p_tmp, TRUE); + } + + return ret; +} + + + +/*============================================================================* + Private Function Implementations + *============================================================================*/ diff --git a/samples/split_phonebook.h b/samples/split_phonebook.h new file mode 100644 index 0000000..d4877c9 --- /dev/null +++ b/samples/split_phonebook.h @@ -0,0 +1,66 @@ +/****************************************************************************** + + (C) Nick Marley, 2001 - + + This software is distributed under the GNU Lesser General Public Licence. + Please read and understand the comments at the top of vf_iface.h before use! + +FILE + $Workfile$ + $Revision: 1.2 $ + $Author: tilda $ + +ORIGINAL AUTHOR + Nick Marley + +DESCRIPTION + Sample code for the vformat library. + +REFERENCES + (none) + +MODIFICATION HISTORY + * $Log: split_phonebook.h,v $ + * Revision 1.2 2001/10/24 05:29:24 tilda + * Tidy up. + * + * Revision 1.1.1.1 2001/10/16 05:49:57 tilda + * Initial Import to CVS. + * + *******************************************************************************/ + +#ifndef NORCSID +static const char split_phonebook_h_vss_id[] = "$Header: /cvsroot/vformat/build/samples/split_phonebook.h,v 1.2 2001/10/24 05:29:24 tilda Exp $"; +#endif + +/*=============================================================================* + Public Includes + *=============================================================================*/ +/* None */ + +/*============================================================================* + Public Defines + *============================================================================*/ +/* None */ + +/*============================================================================* + Public Functions + *============================================================================*/ + + +/*----------------------------------------------------------------------------* + * NAME + * split_phonebook() + * + * DESCRIPTION + * Read in the indicated file which is assumed to be a list of VCARDs. + * The component cards are written out to individual files. + * + * RETURNS + * TRUE <=> read / written OK. + *----------------------------------------------------------------------------*/ + +extern bool_t split_phonebook( + const char *p_filename, + const char *p_outdir + ); -- 1.7.6.3 debian/patches/0004-Provide-info-documentation.patch0000644000000000000000000007301611726670157017452 0ustar From c05fb67cf74a6231949b7917cbe766cdb7bcdca6 Mon Sep 17 00:00:00 2001 From: Mathias Palm Date: Sat, 8 May 2010 23:00:09 +0200 Subject: Provide info documentation Create texi files so that info files can be generated with texinfo. Origin: vendor Forwarded: http://vformat.cvs.sourceforge.net/viewvc/vformat/doc/ Last-Update: 2010-05-09 Applied-Upstream: http://vformat.cvs.sourceforge.net/viewvc/vformat/doc/ --- doc/Makefile.am | 6 +- doc/libvformat-1.texi | 733 +++++++++++++++++++++++++++++++++++++++++++++++++ doc/libvformat-2.texi | 79 ++++++ doc/libvformat-i.texi | 5 + doc/libvformat.texi | 51 ++++ 5 files changed, 872 insertions(+), 2 deletions(-) create mode 100644 doc/libvformat-1.texi create mode 100644 doc/libvformat-2.texi create mode 100644 doc/libvformat-i.texi create mode 100644 doc/libvformat.texi diff --git a/doc/Makefile.am b/doc/Makefile.am index 57591c5..e078504 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,8 +1,8 @@ # No automatisation found. Write me if any idea. +info_TEXINFOS = libvformat.texi +libvformat_TEXINFOS = libvformat-1.texi libvformat-2.texi libvformat-i.texi install-data-hook: - c2man -P "gcc -E -C -I.." ../vformat/vf_iface.h - $(mkinstalldirs) $(mandir)/man3 for i in *.3; do \ @@ -14,3 +14,5 @@ install-data-hook: echo " $(INSTALL_DATA) $$file $(mandir)/man3/$$inst"; \ $(INSTALL_DATA) $$file $(mandir)/man3/$$inst; \ done + + cp /usr/share/texmf/tex/texinfo/texinfo.tex . diff --git a/doc/libvformat-1.texi b/doc/libvformat-1.texi new file mode 100644 index 0000000..ec59664 --- /dev/null +++ b/doc/libvformat-1.texi @@ -0,0 +1,733 @@ +@node Functions of libvformat +@chapter Functions of libvformat +@deftypefun {VFORMATDECLSPEC bool_t} vf_parse_init ( +@multitable{VF_PROP_Taaaa}{*n_stringaaaaa}{Property to locate string from} +@item VF_PARSER_T @tab @var{**pp_parser},@tab Ptr to allocated parser. +@item VF_OBJECT_T @tab @var{pp_object} @tab The object we're parsing into. +@end multitable +) + + + +Allocate and initialise a parser. To parse a VCARD (or any vObject) +a user allocates a parser, pushes data through it using vf_parse_text() +and finally calls vf_parse_end(): + +@verbatim + + VF_PARSER_T *p_parser; + + if (vf_parse_init(&p_parser, pp_object)) + { + do + { + char buffer[...]; + int numchars; + + numchars = get_chars_from_somewhere(buffer, ...); + + ret = vf_parse_text(p_parser, buffer, numchars); + } + while (ret && (0 < charsread)) + ; + + if (!vf_parse_end(p_parser)) + { + ret = FALSE; + } + } + +@end verbatim + +A parser allocated by vf_parse_init(), must be deallocated by calling +vf_parse_end() whether or not parsing succeeds. Also, parsing may not +be complete (ie. values may be held buffered and not evaluated fully +or assigned to a VF_OBJECT_T) untill the final call to vf_parse_end() +=> after a vf_parse_init() you _must_ vf_parse_end(). + +Returns TRUE iff parser allocated successfully. + +@end deftypefun + +@deftypefun {VFORMATDECLSPEC bool_t} vf_parse_text ( +@multitable {VF_PROP_Taaaa}{*n_stringaaaaa}{Property to locate string from} +@item VF_PARSER_T @tab @var{*p_parser}, @tab The parser +@item char @tab @var{*p_chars},@tab New characters to parse into object +@item int @tab @var{numchars}@tab Number of new characters +@end multitable +) + + +Parse indicated text into the object associated with the VPARSE_T. See +notes for vf_parse_init(). + +Returns TRUE <=> allocation & syntax OK, FALSE else. + +@end deftypefun + +@deftypefun {VFORMATDECLSPEC bool_t} vf_parse_end ( + @multitable {VF_PROP_Taaaa}{*n_stringaaaaa}{Property to locate string from} + @item VF_PARSER_T @tab @var{*p_parse} @tab The parser + @end multitable + ) + + + +Ensure parse completion, release memory associated with the parser. + +Returns TRUE <=> parse complete with no error. +@end deftypefun + +@deftypefun {VFORMATDECLSPEC bool_t} vf_read_file ( +@multitable {VF_PROP_Taaaa}{*n_stringaaaaa}{Property to locate string from} +@item VF_OBJECT_T @tab @var{**pp_object},@tab Pointer to output object +@item const char @tab @var{*p_name},@tab Name of file to read +@end multitable +) + + +Reads indicated VOBJECT_T file. + +Returns TRUE <=> read OK, FALSE else. + +@end deftypefun + +@deftypefun {VFORMATDECLSPEC bool_t} vf_write_file ( +@multitable {VF_PROP_Taaaa}{*n_stringaaaaa}{Property to locate string from} +@item const char @tab @var{*p_name},@tab Output filename +@item VF_OBJECT_T @tab @var{*p_object},@tab The object to write +@item bool_t @tab @var{write_all}@tab Should write p_next as well? +@end multitable +) + + +Write indicated vobject to file. For lists of objects (eg. read from +a phonebook) the write_all parameter allows the caller to control if +the library writes the entire list or just the head item. + +Returns TRUE <=> written OK, FALSE else. + +@end deftypefun + +@deftypefun {VFORMATDECLSPEC bool_t} vf_get_next_object ( +@multitable {VF_PROP_Taaaa}{*n_stringaaaaa}{Property to locate string from} +@item VF_OBJECT_T @tab @var{**pp_object}@tab Ptr to pointer to current object +@end multitable +) + + + +Find "next" vobject. Typically called after a call to vf_read_file() +which may well read a list of objects from a file for example: + +@verbatim + if (vf_read_file(&p_object, p_filename)) + { + do + { + ... + } + while (vf_get_next_object(&p_object)) + ; + } +@end verbatim + +The value of *pp_object is updated by the call if it returns TRUE. + +Returns TRUE iff found (ie. there is a "next" object). +@end deftypefun + +@deftypefun {VFORMATDECLSPEC VF_OBJECT_T *} vf_create_object ( +@multitable {VF_PROP_Taaaa}{*n_stringaaaaa}{Property to locate string from} +@item const char @tab @var{*p_type},@tab Type of object to create +@item VF_OBJECT_T @tab @var{*p_parent}@tab Parent object if any +@end multitable +) + + +Creates an empty vformat object. + +Returns Ptr to object if created else NULL. +@end deftypefun + +@deftypefun {const VFORMATDECLSPEC char *} vf_get_object_type ( +@multitable {VF_PROP_Taaaa}{*n_stringaaaaa}{Property to locate string from} +@item VF_OBJECT_T @tab @var{*p_object}@tab Object to locate type of +@end multitable +) + + + +Return the type string identifying the indicated vformat object, the +string after the 'BEGIN' mark so 'VCARD' or 'VNOTE' etc. + +Return Ptr to string. +@end deftypefun + +@deftypefun {VFORMATDECLSPEC bool_t} vf_get_property ( +@multitable {VF_PROP_Taaaa}{*n_stringaaaaa}{Property to locate string from} +@item VF_PROP_T @tab @var{**pp_prop}, @tab Output pointer +@item VF_OBJECT_T @tab @var{*p_object}, @tab Object to add to +@item vf_get_t @tab @var{ops}, @tab Search flags +@item const char @tab @var{*p_group}, @tab Group name if any +@item const char @tab @var{*p_name}, @tab Name of tag +@item const char @tab @var{*p_qualifier}, @tab First qualifier if any +@item ... @tab @tab Subequent qualifiers +@end multitable +) + + +Basic searching function locating elements of the VOBJECT by qualified +name. The function is a varargs function (like sprintf) and the list +of arguments must be NULL terminated (hence the appearance of the +p_qualifier argument in the arglist). Valid calls might be: + +@example + vf_get_property(&p_out, p_object, VFGP_FIND, NULL, "N", NULL); + - find and return "N" properties. If there are none, return FALSE. + + vf_get_property(&p_out, p_object, VFGP_FIND, NULL, "TEL", "WORK", NULL); + - find and return "TEL" entries qualified by the "work" attribute + (ie. work phone numbers). If there are none, return FALSE. + + vf_get_property(&p_out, p_object, VFGP_GET, NULL, "TEL", "WORK", NULL); + - find and return work phone number. The entry is automatically + added if not pre-existing. + + vf_get_property(&p_out, p_object, VFGP_GET, NULL, "TEL", "WORK", NULL); + - find and return work phone numbers in the group identifier by the "ME" + identifier. The entry is automatically added if not pre-existing. + + vf_get_property(&p_out, p_object, VFGP_FIND, "ME", "*", NULL); + - effectively enumerates all entries in the "ME" group. +@end example + +A pointer to the first property matching the search criteria is returned +via the pp_prop argument. The search actually locates all such matches +and pointer to subsequent entries (if there are >1) may be found by +calling the vf_get_next_property() function. + +The tags may occur in any order _except_ that the p_name must be first. + +Note that the VF_PROP_T returned by pp_prop is an opaque type and the +functions vf_get_prop_xxxx() etc. must be used to locate real "values". + +Cached search results (the list enumerated by subsequent calls to the +vf_get_next_property() function) are maintained through the use of a +a single internal pointer therefore this method is not thread safe. + +Returns TRUE iff found/added successfully. Ptr to prop returned via pp_prop. + +@end deftypefun + +@deftypefun {VFORMATDECLSPEC bool_t} vf_get_property_ex ( +@multitable {VF_PROP_Taaaa}{*n_stringaaaaa}{Property to locate string from} +@item VF_PROP_T @tab @var{**pp_prop}, @tab Output pointer +@item VF_OBJECT_T @tab @var{*p_object}, @tab Object to search +@item vf_get_t @tab @var{ops}, @tab Search flags +@item const char @tab @var{*p_group}, @tab Group name if any +@item const char @tab @var{*p_name}, @tab Name of tag +@item const char @tab @var{*p_qualifier}, @tab First qualifier if any +@item va_list args @tab Argument list +@end multitable +) + + +The grunt behind vf_get_property(). Manages the search as described +vf_get_property() but takes the list of arguments as a va_list. +This function should be used when writing higher layer functions +which take varargs (eg. DDX functions). + +Returns TRUE iff found/added successfully. ptr to prop returned via pp_prop. + +@end deftypefun + +@deftypefun bool_t vf_get_next_property ( +@multitable {VF_PROP_Taaaa}{*n_stringaaaaa}{Property to locate string from} +@item VF_PROP_T @tab @var{**pp_prop}, @tab Output pointer +@end multitable +) + + + +Find the next property given the current search critera. User +calls vf_get_property() to locate first in a bunch of properties +and can iterate over the rest by calling vf_get_next_property(). + +Returns TRUE iff found, FALSE else. *pp_prop points to the nex property. + +@end deftypefun + +@deftypefun bool_t vf_get_prop_value ( +@multitable {VF_PROP_Taaaa}{*n_stringaaaaa}{Property to locate string from} +@item VF_PROP_T @tab @var{*p_prop}, @tab The property +@item void @tab @var{**pp_value}, @tab Pointer value +@item uint32_t @tab @var{*p_size}, @tab Integer value +@item vf_encoding_t @tab @var{*p_encoding} @tab Type of return values +@end multitable +) + +Get hold of raw fields associated with the property. These are of +rious types: + +@example +VF_ENC_VOBJECT + - *pp_value = pointer to contained VF_OBJECT_T which can be + passed back to any of the object manipulation functions. + +VF_ENC_7BIT, VF_ENC_QUOTEDPRINTABLE + - *pp_value = ptr to array of char*, *p_size = number of elts. + +VF_ENC_8BIT, VF_BASE64 + - *pp_value = ptr to bytes, *p_size = number of bytes +@end example + +Returns TRUE <=> encoding is valid, FALSE else. + + +@end deftypefun + + +@deftypefun bool_t vf_set_prop_value ( +@multitable {VF_PROP_Taaaa}{*n_stringaaaaa}{Property to locate string from} +@item VF_PROP_T @tab @var{*p_prop}, @tab The property +@item void @tab @var{*p_value}, @tab Pointer to the data +@item uint32_t @tab @var{n_param}, @tab Data size or index +@item vf_encoding_t @tab @var{encoding}, @tab Encoding in use +@item bool_t @tab @var{copy} @tab Copy the data? +@end multitable +) + +Set values associated with a property. + +Passing a value of encoding not the same as the current property +encoding will cause the property contents to be freed prior to +setting the indicated value. + +Returns TRUE <=> re-allocation success & encoding correct, FALSE else. + +@end deftypefun + +@deftypefun {char *} vf_get_prop_value_string ( +@multitable {VF_PROP_Taaaa}{*n_stringaaaaa}{Property to locate string from} +@item VF_PROP_T @tab @var{*p_prop}, @tab Property to locate string from +@item uint32_t @tab @var{n_string} @tab Index to string required +@end multitable +) + +Obtain string pointer value from VF_PROP_T. For example a property +may be defined as: + +THING;THIS=STUFF;WITH-QUALIFIERS:fred-fred-fred;gogogo;baabaabaa + +A call to vf_get_prop_value_string() specifying n_string=1 will +return a pointer to the gogogo value. + +Return NULL if out of range request, ie. n_string=3 for N:0;1;2 + +Returns Pointer to string value if value present, NULL if index too large. + +@end deftypefun + +@deftypefun bool_t vf_get_prop_value ( +@multitable {VF_PROP_Taaaa}{*n_stringaaaaa}{Property to locate string from} +@item VF_PROP_T @tab @var{*p_prop}, @tab The property +@item void @tab @var{**pp_value}, @tab Pointer value +@item vf_encoding_t @tab @var{*p_encoding}, @tab Type +of return values +@item uint32_t @tab @var{*p_size}, @tab Integer value +@end multitable +) + +Get hold of raw fields associated with the property. These are of +various types: + + VF_ENC_VOBJECT + - *pp_value = pointer to contained VF_OBJECT_T which can be + passed back to any of the object manipulation functions. + + VF_ENC_7BIT, VF_ENC_QUOTEDPRINTABLE + - *pp_value = ptr to array of char*, *p_size = number of elts. + + VF_ENC_8BIT, VF_BASE64 + - *pp_value = ptr to bytes, *p_size = number of bytes + +Returns TRUE <=> encoding is valid, FALSE else. + + +@end deftypefun + + + +@deftypefun {VFORMATDECLSPEC bool_t} vf_set_prop_value ( +@multitable {VF_PROP_Taaaa}{*n_stringaaaaa}{Property to locate string from} +@item VF_PROP_T @tab @var{*p_prop}, @tab The property +@item void @tab @var{*p_value}, @tab Pointer to the data +@item uint32_t @tab @var{n_param}, @tab Data size or index +@item vf_encoding_t @tab @var{encoding}, @tab Encoding in use +@item bool_t @tab @var{copy} @tab Copy the data? +@end multitable +) + +Set values associated with a property. + +Passing a value of encoding not the same as the current property +encoding will cause the property contents to be freed prior to +setting the indicated value. +Returns TRUE <=> re-allocation success & encoding correct, FALSE else. + + + +@end deftypefun + +@deftypefun {VFORMATDECLSPEC char *} vf_get_prop_value_string ( +@multitable {VF_PROP_Taaaa}{*n_stringaaaaa}{Property to locate string from} +@item VF_PROP_T @tab @var{*p_prop}, @tab Property to locate string from +@item uint32_t @tab @var{n_string} @tab Index to string required +@end multitable +) + +Obtain string pointer value from VF_PROP_T. For example a property +may be defined as: + +THING;THIS=STUFF;WITH-QUALIFIERS:fred-fred-fred;gogogo;baabaabaa + +A call to vf_get_prop_value_string() specifying n_string=1 will +return a pointer to the gogogo value. + +Return NULL if out of range request, ie. n_string=3 for N:0;1;2 + +Returns Pointer to string value if value present, NULL if index too large. + + + + +@end deftypefun + +@deftypefun {VFORMATDECLSPEC char *} vf_get_prop_name_string ( +@multitable {VF_PROP_Taaaa}{*n_stringaaaaa}{Property to locate string from} +@item VF_PROP_T @tab @var{*p_prop}, @tab Property to locate string from +@item uint32_t @tab @var{n_string} @tab Index to string required +@end multitable +) + + +Get n'th name string. For example a property may be defined as: +THING;THIS=STUFF;WITH-QUALIFIERS:fred-fred-fred;gogogo;baabaabaa +A call to vf_get_prop_name_string() specifying n_string=2 will +return a pointer to the WITH-QUALIFIERS value. +Return NULL if out of range request, ie. n_string=4 for X;A;B;C:foo + +Returns Pointer to string value if value present, NULL if index too large. + + +@end deftypefun + +@deftypefun {VFORMATDECLSPEC bool_t} vf_set_prop_name_string ( +@multitable {VF_PROP_Taaaa}{*n_stringaaaaa}{Property to locate string from} +@item VF_PROP_T @tab @var{*p_prop}, @tab Property we're setting a value in +@item uint32_t @tab @var{n_string}, @tab Index to string +@item const char @tab @var{*p_string} @tab Pointer to string +@end multitable +) + + + +Set n'th name string. + +Returns TRUE iff allocation OK, FALSE else. + +@end deftypefun + +@deftypefun {VFORMATDECLSPEC void} vf_get_prop_name ( +@multitable {VF_PROP_Taaaa}{*n_stringaaaaa}{Property to locate string from} +@item VF_PROP_T @tab @var{*p_prop}, @tab The property +@item char @tab @var{*p_buffer}, @tab The buffer +@item uint32_t @tab @var{bufsize} @tab Size of the buffer +@end multitable +) + + + + +Build the property name string in the indicated buffer. + +Returns (none) + + + +@end deftypefun + +@deftypefun {VFORMATDECLSPEC VF_OBJECT_T *} vf_get_prop_value_object ( +@multitable {VF_PROP_Taaaa}{*n_stringaaaaa}{Property to locate string from} +@item VF_PROP_T @tab @var{*p_prop} @tab Property to locate object from +@end multitable +) + + +Obtain object pointer value from VF_PROP_T. + +Returns Pointer to vobject value (or NULL if not found). + + +@end deftypefun + +@deftypefun {VFORMATDECLSPEC bool_t} vf_set_prop_value_object ( +@multitable {VF_PROP_Taaaa}{*n_stringaaaaa}{Property to locate string from} +@item VF_PROP_T @tab @var{*p_prop}, +@item VF_OBJECT_T @tab @var{*p_object} +@end multitable +) + + +Set the value of the indicated property to be a VOBJECT. + +Returns TRUE <=> set successfully. + + +@end deftypefun + +@deftypefun {VFORMATDECLSPEC bool_t} vf_set_prop_value_string ( +@multitable {VF_PROP_Taaaa}{*n_stringaaaaa}{Property to locate string from} +@item VF_PROP_T @tab @var{*p_prop}, @tab Property we're setting a value in +@item uint32_t @tab @var{n_string}, @tab Index to string +@item const char @tab @var{*p_string } @tab Pointer to string +@end multitable +) + +Set the value of a property. + +Returns TRUE <=> set successfully. + + + +@end deftypefun + +@deftypefun {VFORMATDECLSPEC bool_t} vf_set_prop_value_base64 ( +@multitable {VF_PROP_Taaaa}{*n_stringaaaaa}{Property to locate string from} +@item VF_PROP_T @tab @var{*p_prop}, @tab Property we're setting a value in +@item const uint8_t @tab @var{*p_data}, @tab Pointer to the binary data +@item uint32_t @tab @var{length}, @tab Length of the binary data +@item bool_t @tab @var{copy} @tab Copy or keep pointer +@end multitable +) + + + +Set the value of a property. + +Returns TRUE <=> set successfully. + + +@end deftypefun + +@deftypefun {const VFORMATDECLSPEC uint8_t *} vf_get_prop_value_base64 ( +@multitable {VF_PROP_Taaaa}{*n_stringaaaaa}{Property to locate string from} +@item VF_PROP_T @tab @var{*p_prop}, @tab Property we're setting a value in +@item uint32_t @tab @var{*p_length} @tab Length of the binary data +@end multitable +) + + + +Get a BASE64 property. Returns ptr, passes length via parameter. + +Returns Ptr to data. + + +@end deftypefun + +@deftypefun {VFORMATDECLSPEC bool_t} vf_set_property_from_file ( +@multitable {VF_PROP_Taaaa}{*n_stringaaaaa}{Property to locate string from} +@item VF_PROP_T @tab @var{*p_prop}, @tab The property +@item vf_encoding_t @tab @var{encoding}, @tab Encoding to use +@item const char @tab @var{*p_filename} @tab Source filename +@end multitable +) + + + +Loads the indicated file into memory and sets the indicated property. + +Returns TRUE iff succeded, FALSE else. + + +@end deftypefun + +@deftypefun {VFORMATDECLSPEC void} vf_delete_object ( +@multitable {VF_PROP_Taaaa}{*n_stringaaaaa}{Property to locate string from} +@item VF_OBJECT_T @tab @var{*p_object}, @tab The object to delete +@item bool_t @tab @var{all } @tab Delete all subsequent objects? +@end multitable +) + + +Cleans up the memory used by the indicated vformat object. + +Returns (none) + + +@end deftypefun + +@deftypefun {VFORMATDECLSPEC void} vf_delete_prop ( +@multitable {VF_PROP_Taaaa}{*n_stringaaaaa}{Property to locate string from} +@item VF_OBJECT_T @tab @var{*p_object}, @tab The object we're deleting from +@item VF_PROP_T @tab @var{*p_prop}, @tab The property we're removing +@item bool_t dc @tab Should property contents be deleted? +@end multitable +) + + +Deletes indicated property from the indicated object. Deletes prop +contents if dc is set. + +Returns (none) + + +@end deftypefun + +@deftypefun {VFORMATDECLSPEC bool_t} vf_find_prop_qual_index ( +@multitable {VF_PROP_Taaaa}{*n_stringaaaaa}{Property to locate string from} +@item VF_PROP_T @tab @var{*p_prop}, @tab The property we're querying +@item uint32_t @tab @var{*p_qualifier_index}, @tab Ptr to output name index +@item uint32_t @tab @var{*p_found_value_index}, @tab Ptr to output index in array +@item const char @tab @var{**pp_possible_values}, @tab Array of possible values +@item const char @tab @var{*p_token}, @tab Token searched for +@item vf_search_flags_t @tab @var{match} @tab String comparison flags +@end multitable +) + + + +Locate property qualifier given either an array of possible values +or a single token that is either present or absent. For example +if we have a property: + +NAME;THIRD;TIME;LUCKY:VALUE1;VALUE2;VALUE3 + +Then there are two possible searches. + +Firstly we can look for the property qualifier which can take values +from the array @{ "FIRST", "SECOND", THIRD" @} in which case the array +is passed as pp_possible_values and the function returns with the +values *p_found_value_index=2, p_qualifier_index=1 + +Secondly we can look for the token with value "TIME" in which case +p_token is set to "TIME" and the function returns *p_qualifier_index=2. + +Returns TRUE iff found, FALSE else. + + +@end deftypefun + +@deftypefun {VFORMATDECLSPEC bool_t} vf_is_modified ( +@multitable {VF_PROP_Taaaa}{*n_stringaaaaa}{Property to locate string from} +@item VF_OBJECT_T @tab @var{*p_object} @tab The object +@end multitable +) + + + + +Fetch status of modified flag. + +Returns TRUE iff modified since list read/write. + + +@end deftypefun + +@deftypefun {VFORMATDECLSPEC const char *} vf_find_charset ( +@multitable {VF_PROP_Taaaa}{*n_stringaaaaa}{Property to locate string from} +@item VF_PROP_T @tab @var{*p_prop} @tab The property we're querying +@end multitable +) + + + +Locate the CHARSET property which indicates the character encoding +in use - which indicates how the octet stream encoded in the VCARD +is to be decoded into characters. + +Returns Pointer to character encoding name eg. "UTF-8". + + +@end deftypefun + +@deftypefun {VFORMATDECLSPEC bool_t} vf_date_string_to_time ( +@multitable {VF_PROP_Taaaa}{*n_stringaaaaa}{Property to locate string from} +@item uint32_t @tab @var{*p_time}, @tab Output time value +@item const char @tab @var{*p_string} @tab Input string +@end multitable +) + + + +Convert calendar string to absolute time. The basic formats are +19960401, 19960401T073000Z + +Returns TRUE <=> conversion OK, FALSE else. + + +@end deftypefun + +@deftypefun {VFORMATDECLSPEC bool_t} vf_period_string_to_time ( +@multitable {VF_PROP_Taaaa}{*n_stringaaaaa}{Property to locate string from} +@item VF_ISO8601_PERIOD_T @tab @var{*p_period}, @tab Output time value +@item const char @tab @var{*p_string} @tab Input string +@end multitable +) + + +Convert period definition string to time value. The format is +P[aaaY][bbbM][cccW][dddD]T[eeeH][fffM][gggS] where 'aaa' is a +number of years, bbb months etc. + +Returns TRUE <=> conversion OK, FALSE else. + + +@end deftypefun + +@deftypefun {VFORMATDECLSPEC uint32_t} vf_period_time_to_string ( +@multitable {VF_PROP_Taaaa}{*n_stringaaaaa}{Property to locate string from} +@item char @tab @var{*p_string}, @tab Output string +@item const VF_ISO8601_PERIOD_T @tab @var{*p_period} @tab Input period value +@end multitable +) + + +Convert a VF_ISO8601_PERIOD_T to a string. + +Returns Number of characters written. + + +@end deftypefun + +@deftypefun {VFORMATDECLSPEC bool_t} vf_set_prop_value_time ( +@multitable {VF_PROP_Taaaa}{*n_stringaaaaa}{Property to locate string from} +@item VF_PROP_T @tab @var{*p_prop}, @tab The property +@item uint32_t @tab @var{n_string}, @tab Which string we're encoding to +@item const time_t @tab @var{t_value} @tab Time value +@end multitable +) + + +Set a time_t value into a VF property. + +Returns TRUE iff property added & set OK. + +@end deftypefun + +@deftypefun {VFORMATDECLSPEC bool_t} vf_get_prop_value_time ( +@multitable {VF_PROP_Taaaa}{*n_stringaaaaa}{Property to locate string from} +@item VF_PROP_T @tab @var{*p_prop}, @tab The property +@item uint32_t @tab @var{n_string}, @tab Which string we're decoding +@item time_t @tab @var{*p_t_value} @tab Pointer to output time value +@end multitable +) + + +Fetch a time_t value from a VF property. + +Returns TRUE iff foudn & converted OK. + +@end deftypefun diff --git a/doc/libvformat-2.texi b/doc/libvformat-2.texi new file mode 100644 index 0000000..0511a56 --- /dev/null +++ b/doc/libvformat-2.texi @@ -0,0 +1,79 @@ +@node Public structures +@chapter Public structures + +@defvr {Public Type} VF_PARSER_T + +Type representing "parser" - an object used to parse VOBJECTS. + +@end defvr + +@defvr {Public Type} VF_OBJECT_T + +Type representing an "object" - objects are collections of properties. + +@end defvr + +@defvr {Public Type} VF_PROP_T + +Type representing a "property" - properties associate a name & a value. + +@end defvr + +@deftp {Structure} VF_ISO8601_PERIOD_T @* + @{@* + uint32_t years@* + uint32_t months@* + uint32_t weeks@* + uint32_t days@* + uint32_t hours@* + uint32_t minutes@* + uint32_t seconds@* + @} + + +VF_ISO8601_PERIOD_T is used to encapsulate an ISO time 'period'. + +@end deftp + + +@deftypevr {Public Type} uint8_t vf_encoding_t + +vf_encoding_t enumerates the supported encodings (formats) of a +vformat object property. Each "value" has a field of this type. + +Predefined values + +@multitable {VF_ENC_QUOTEDPRINTABLE}{((vf_encoding_t)aaaa}{123456} +@item VF_ENC_UNKNOWN @tab ((vf_encoding_t)(0)) +@item VF_ENC_7BIT @tab ((vf_encoding_t)(1)) +@item VF_ENC_8BIT @tab ((vf_encoding_t)(2)) +@item VF_ENC_BASE64 @tab ((vf_encoding_t)(3)) +@item VF_ENC_QUOTEDPRINTABLE @tab ((vf_encoding_t)(4)) +@item VF_ENC_VOBJECT @tab ((vf_encoding_t)(5)) +@end multitable + +@end deftypevr + + +@deftypevr {Public Type} uint16_t vf_get_t + +vf_get_t controls the operation of vf_get_property() (qv). Controls +how far the search algorithm is prepared to go in order to return a +property ready for modification. + +Predefined values + +@multitable {VF_ENC_QUOTEDPRINTABLE}{((vf_encoding_t)aaaa}{Find & append if not present123456} +@item VFGP_FIND @tab ((vf_get_t)(0x0001)) @tab Search for property +@item VFGP_APPEND @tab ((vf_get_t)(0x0002)) @tab Append property, no search +@item VFGP_GET @tab ((vf_get_t)(0x0003)) @tab Find & append if not present +@end multitable + +@end deftypevr + +@deftypevr {Public Type} uint32_t vf_search_flags_t + +vf_search_flags_t is used to describe how string matching is performed +when searching for properties, qualifiers, values etc. + +@end deftypevr diff --git a/doc/libvformat-i.texi b/doc/libvformat-i.texi new file mode 100644 index 0000000..66d6996 --- /dev/null +++ b/doc/libvformat-i.texi @@ -0,0 +1,5 @@ +@node Function index +@unnumbered Function Index + +@printindex fn + diff --git a/doc/libvformat.texi b/doc/libvformat.texi new file mode 100644 index 0000000..c5ff663 --- /dev/null +++ b/doc/libvformat.texi @@ -0,0 +1,51 @@ +\input texinfo @c -*-texinfo-*- +@c %**start of header +@setfilename libvformat.info +@settitle libvformat +@setchapternewpage odd +@c %**end of header + +@ifinfo +This file documents libvformat + +Copyright 2001 Nick Marley + +licensed under the LGPL license. +@end ifinfo + +@c This title page illustrates only one of the +@c two methods of forming a title page. + +@dircategory Libraries +@direntry +* libvformat: (libvformat). Library to manipulate vcards +@end direntry + +@titlepage +@title libvformat +@subtitle library to access versit cards +@author Nick +@end titlepage + + +@ifnottex +@node Top, , (dir), (dir) +@top TITLE + +This document describes libvformat + +This document applies to version 1.13 +of the program named libvformat +@end ifnottex + +@menu +* Functions of libvformat:: description of interface. +* Public structures:: public structures of libvformat +* Function index:: index. +@end menu + +@include libvformat-1.texi +@include libvformat-2.texi +@include libvformat-i.texi + +@bye -- 1.7.6.3 debian/patches/0005-Add-manpages.patch0000644000000000000000000020225611726670157014524 0ustar From 905759e8a6cf637a0dbcc869f04c79110968b41c Mon Sep 17 00:00:00 2001 From: Mathias Palm Date: Sat, 8 May 2010 23:00:09 +0200 Subject: Add manpages Provides manpages instead of generating them from c2man as c2man is deprecated. Origin: vendor Bug-Debian: http://bugs.debian.org/313265 Forwarded: not-needed Last-Update: 2010-10-10 --- doc/Makefile.am | 6 +- doc/vf_create_object.3 | 63 +++++++++++++++++++ doc/vf_date_string_to_time.3 | 64 +++++++++++++++++++ doc/vf_delete_object.3 | 63 +++++++++++++++++++ doc/vf_delete_prop.3 | 69 +++++++++++++++++++++ doc/vf_find_charset.3 | 54 ++++++++++++++++ doc/vf_find_prop_qual_index.3 | 97 +++++++++++++++++++++++++++++ doc/vf_get_next_object.3 | 65 ++++++++++++++++++++ doc/vf_get_next_property.3 | 54 ++++++++++++++++ doc/vf_get_object_type.3 | 53 ++++++++++++++++ doc/vf_get_prop_name.3 | 68 +++++++++++++++++++++ doc/vf_get_prop_name_string.3 | 70 +++++++++++++++++++++ doc/vf_get_prop_value.3 | 87 ++++++++++++++++++++++++++ doc/vf_get_prop_value_base64.3 | 63 +++++++++++++++++++ doc/vf_get_prop_value_object.3 | 52 ++++++++++++++++ doc/vf_get_prop_value_string.3 | 71 +++++++++++++++++++++ doc/vf_get_prop_value_time.3 | 68 +++++++++++++++++++++ doc/vf_get_property.3 | 128 +++++++++++++++++++++++++++++++++++++++ doc/vf_get_property_ex.3 | 91 +++++++++++++++++++++++++++ doc/vf_is_modified.3 | 52 ++++++++++++++++ doc/vf_parse_end.3 | 54 ++++++++++++++++ doc/vf_parse_init.3 | 93 ++++++++++++++++++++++++++++ doc/vf_parse_text.3 | 70 +++++++++++++++++++++ doc/vf_period_string_to_time.3 | 65 ++++++++++++++++++++ doc/vf_period_time_to_string.3 | 63 +++++++++++++++++++ doc/vf_read_file.3 | 63 +++++++++++++++++++ doc/vf_set_prop_name_string.3 | 68 +++++++++++++++++++++ doc/vf_set_prop_value.3 | 82 +++++++++++++++++++++++++ doc/vf_set_prop_value_base64.3 | 73 ++++++++++++++++++++++ doc/vf_set_prop_value_object.3 | 63 +++++++++++++++++++ doc/vf_set_prop_value_string.3 | 68 +++++++++++++++++++++ doc/vf_set_prop_value_time.3 | 68 +++++++++++++++++++++ doc/vf_set_property_from_file.3 | 68 +++++++++++++++++++++ doc/vf_write_file.3 | 70 +++++++++++++++++++++ 34 files changed, 2303 insertions(+), 3 deletions(-) create mode 100644 doc/vf_create_object.3 create mode 100644 doc/vf_date_string_to_time.3 create mode 100644 doc/vf_delete_object.3 create mode 100644 doc/vf_delete_prop.3 create mode 100644 doc/vf_find_charset.3 create mode 100644 doc/vf_find_prop_qual_index.3 create mode 100644 doc/vf_get_next_object.3 create mode 100644 doc/vf_get_next_property.3 create mode 100644 doc/vf_get_object_type.3 create mode 100644 doc/vf_get_prop_name.3 create mode 100644 doc/vf_get_prop_name_string.3 create mode 100644 doc/vf_get_prop_value.3 create mode 100644 doc/vf_get_prop_value_base64.3 create mode 100644 doc/vf_get_prop_value_object.3 create mode 100644 doc/vf_get_prop_value_string.3 create mode 100644 doc/vf_get_prop_value_time.3 create mode 100644 doc/vf_get_property.3 create mode 100644 doc/vf_get_property_ex.3 create mode 100644 doc/vf_is_modified.3 create mode 100644 doc/vf_parse_end.3 create mode 100644 doc/vf_parse_init.3 create mode 100644 doc/vf_parse_text.3 create mode 100644 doc/vf_period_string_to_time.3 create mode 100644 doc/vf_period_time_to_string.3 create mode 100644 doc/vf_read_file.3 create mode 100644 doc/vf_set_prop_name_string.3 create mode 100644 doc/vf_set_prop_value.3 create mode 100644 doc/vf_set_prop_value_base64.3 create mode 100644 doc/vf_set_prop_value_object.3 create mode 100644 doc/vf_set_prop_value_string.3 create mode 100644 doc/vf_set_prop_value_time.3 create mode 100644 doc/vf_set_property_from_file.3 create mode 100644 doc/vf_write_file.3 diff --git a/doc/Makefile.am b/doc/Makefile.am index e078504..ac63498 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -3,7 +3,7 @@ info_TEXINFOS = libvformat.texi libvformat_TEXINFOS = libvformat-1.texi libvformat-2.texi libvformat-i.texi install-data-hook: - $(mkinstalldirs) $(mandir)/man3 + $(mkinstalldirs) $(DESTDIR)$(mandir)/man3 for i in *.3; do \ if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ @@ -11,8 +11,8 @@ install-data-hook: ext=`echo $$i | sed -e 's/^.*\\.//'`; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " $(INSTALL_DATA) $$file $(mandir)/man3/$$inst"; \ - $(INSTALL_DATA) $$file $(mandir)/man3/$$inst; \ + echo " $(INSTALL_DATA) $$file $(DESTDIR)$(mandir)/man3/$$inst"; \ + $(INSTALL_DATA) $$file $(DESTDIR)$(mandir)/man3/$$inst; \ done cp /usr/share/texmf/tex/texinfo/texinfo.tex . diff --git a/doc/vf_create_object.3 b/doc/vf_create_object.3 new file mode 100644 index 0000000..b9ce4a4 --- /dev/null +++ b/doc/vf_create_object.3 @@ -0,0 +1,63 @@ +.\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! +.\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! +.TH "vf_create_object" 3 "30 April 2003" "c2man vf_iface.h" +.SH "NAME" +vf_create_object \- vf_create_object() +.SH "SYNOPSIS" +.ft B +#include <../vformat/vf_iface.h> +.sp +extern VF_OBJECT_T *vf_create_object +.br +( +.br + const char *p_type, +.br + VF_OBJECT_T *p_parent +.br +); +.ft R +.SH "PARAMETERS" +.TP +.B "const char *p_type" +Type of object to create. +.TP +.B "VF_OBJECT_T *p_parent" +Parent object if any. +.SH "DESCRIPTION" +Creates an empty vformat object. +.SH "RETURNS" +Ptr to object if created else NULL. +.SH "SEE ALSO" +vf_parse_init(3), +vf_parse_text(3), +vf_parse_end(3), +vf_read_file(3), +vf_write_file(3), +vf_get_next_object(3), +vf_get_object_type(3), +vf_get_property(3), +vf_get_property_ex(3), +vf_get_next_property(3), +vf_get_prop_value(3), +vf_set_prop_value(3), +vf_get_prop_value_string(3), +vf_get_prop_name_string(3), +vf_set_prop_name_string(3), +vf_get_prop_name(3), +vf_get_prop_value_object(3), +vf_set_prop_value_object(3), +vf_set_prop_value_string(3), +vf_set_prop_value_base64(3), +vf_get_prop_value_base64(3), +vf_set_property_from_file(3), +vf_delete_object(3), +vf_delete_prop(3), +vf_find_prop_qual_index(3), +vf_is_modified(3), +vf_find_charset(3), +vf_date_string_to_time(3), +vf_period_string_to_time(3), +vf_period_time_to_string(3), +vf_set_prop_value_time(3), +vf_get_prop_value_time(3) diff --git a/doc/vf_date_string_to_time.3 b/doc/vf_date_string_to_time.3 new file mode 100644 index 0000000..0bfadb4 --- /dev/null +++ b/doc/vf_date_string_to_time.3 @@ -0,0 +1,64 @@ +.\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! +.\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! +.TH "vf_date_string_to_time" 3 "30 April 2003" "c2man vf_iface.h" +.SH "NAME" +vf_date_string_to_time \- vf_date_string_to_time() +.SH "SYNOPSIS" +.ft B +#include <../vformat/vf_iface.h> +.sp +extern bool_t vf_date_string_to_time +.br +( +.br + uint32_t *p_time, +.br + const char *p_string +.br +); +.ft R +.SH "PARAMETERS" +.TP +.B "uint32_t *p_time" +Output time value. +.TP +.B "const char *p_string" +Input string. +.SH "DESCRIPTION" +Convert calendar string to absolute time. The basic formats are +19960401, 19960401T073000Z. +.SH "RETURNS" +TRUE <=> conversion OK, FALSE else. +.SH "SEE ALSO" +vf_parse_init(3), +vf_parse_text(3), +vf_parse_end(3), +vf_read_file(3), +vf_write_file(3), +vf_get_next_object(3), +vf_create_object(3), +vf_get_object_type(3), +vf_get_property(3), +vf_get_property_ex(3), +vf_get_next_property(3), +vf_get_prop_value(3), +vf_set_prop_value(3), +vf_get_prop_value_string(3), +vf_get_prop_name_string(3), +vf_set_prop_name_string(3), +vf_get_prop_name(3), +vf_get_prop_value_object(3), +vf_set_prop_value_object(3), +vf_set_prop_value_string(3), +vf_set_prop_value_base64(3), +vf_get_prop_value_base64(3), +vf_set_property_from_file(3), +vf_delete_object(3), +vf_delete_prop(3), +vf_find_prop_qual_index(3), +vf_is_modified(3), +vf_find_charset(3), +vf_period_string_to_time(3), +vf_period_time_to_string(3), +vf_set_prop_value_time(3), +vf_get_prop_value_time(3) diff --git a/doc/vf_delete_object.3 b/doc/vf_delete_object.3 new file mode 100644 index 0000000..0597129 --- /dev/null +++ b/doc/vf_delete_object.3 @@ -0,0 +1,63 @@ +.\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! +.\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! +.TH "vf_delete_object" 3 "30 April 2003" "c2man vf_iface.h" +.SH "NAME" +vf_delete_object \- vf_delete_object() +.SH "SYNOPSIS" +.ft B +#include <../vformat/vf_iface.h> +.sp +extern void vf_delete_object +.br +( +.br + VF_OBJECT_T *p_object, +.br + bool_t all +.br +); +.ft R +.SH "PARAMETERS" +.TP +.B "VF_OBJECT_T *p_object" +The object to delete. +.TP +.B "bool_t all" +Delete all subsequent objects?. +.SH "DESCRIPTION" +Cleans up the memory used by the indicated vformat object. +.SH "RETURNS" +(None) +.SH "SEE ALSO" +vf_parse_init(3), +vf_parse_text(3), +vf_parse_end(3), +vf_read_file(3), +vf_write_file(3), +vf_get_next_object(3), +vf_create_object(3), +vf_get_object_type(3), +vf_get_property(3), +vf_get_property_ex(3), +vf_get_next_property(3), +vf_get_prop_value(3), +vf_set_prop_value(3), +vf_get_prop_value_string(3), +vf_get_prop_name_string(3), +vf_set_prop_name_string(3), +vf_get_prop_name(3), +vf_get_prop_value_object(3), +vf_set_prop_value_object(3), +vf_set_prop_value_string(3), +vf_set_prop_value_base64(3), +vf_get_prop_value_base64(3), +vf_set_property_from_file(3), +vf_delete_prop(3), +vf_find_prop_qual_index(3), +vf_is_modified(3), +vf_find_charset(3), +vf_date_string_to_time(3), +vf_period_string_to_time(3), +vf_period_time_to_string(3), +vf_set_prop_value_time(3), +vf_get_prop_value_time(3) diff --git a/doc/vf_delete_prop.3 b/doc/vf_delete_prop.3 new file mode 100644 index 0000000..ac25e96 --- /dev/null +++ b/doc/vf_delete_prop.3 @@ -0,0 +1,69 @@ +.\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! +.\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! +.TH "vf_delete_prop" 3 "30 April 2003" "c2man vf_iface.h" +.SH "NAME" +vf_delete_prop \- vf_delete_prop() +.SH "SYNOPSIS" +.ft B +#include <../vformat/vf_iface.h> +.sp +extern void vf_delete_prop +.br +( +.br + VF_OBJECT_T *p_object, +.br + VF_PROP_T *p_prop, +.br + bool_t dc +.br +); +.ft R +.SH "PARAMETERS" +.TP +.B "VF_OBJECT_T *p_object" +The object we're deleting from. +.TP +.B "VF_PROP_T *p_prop" +The property we're removing. +.TP +.B "bool_t dc" +Should property contents be deleted?. +.SH "DESCRIPTION" +Deletes indicated property from the indicated object. Deletes prop +contents if dc is set. +.SH "RETURNS" +(None) +.SH "SEE ALSO" +vf_parse_init(3), +vf_parse_text(3), +vf_parse_end(3), +vf_read_file(3), +vf_write_file(3), +vf_get_next_object(3), +vf_create_object(3), +vf_get_object_type(3), +vf_get_property(3), +vf_get_property_ex(3), +vf_get_next_property(3), +vf_get_prop_value(3), +vf_set_prop_value(3), +vf_get_prop_value_string(3), +vf_get_prop_name_string(3), +vf_set_prop_name_string(3), +vf_get_prop_name(3), +vf_get_prop_value_object(3), +vf_set_prop_value_object(3), +vf_set_prop_value_string(3), +vf_set_prop_value_base64(3), +vf_get_prop_value_base64(3), +vf_set_property_from_file(3), +vf_delete_object(3), +vf_find_prop_qual_index(3), +vf_is_modified(3), +vf_find_charset(3), +vf_date_string_to_time(3), +vf_period_string_to_time(3), +vf_period_time_to_string(3), +vf_set_prop_value_time(3), +vf_get_prop_value_time(3) diff --git a/doc/vf_find_charset.3 b/doc/vf_find_charset.3 new file mode 100644 index 0000000..7c541da --- /dev/null +++ b/doc/vf_find_charset.3 @@ -0,0 +1,54 @@ +.\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! +.\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! +.TH "vf_find_charset" 3 "30 April 2003" "c2man vf_iface.h" +.SH "NAME" +vf_find_charset \- vf_find_charset() +.SH "SYNOPSIS" +.ft B +#include <../vformat/vf_iface.h> +.sp +extern const char *vf_find_charset(VF_PROP_T *p_prop); +.ft R +.SH "PARAMETERS" +.TP +.B "VF_PROP_T *p_prop" +The property we're querying. +.SH "DESCRIPTION" +Locate the CHARSET property which indicates the character encoding +in use - which indicates how the octet stream encoded in the VCARD +is to be decoded into characters. +.SH "RETURNS" +Pointer to character encoding name eg. "UTF-8". +.SH "SEE ALSO" +vf_parse_init(3), +vf_parse_text(3), +vf_parse_end(3), +vf_read_file(3), +vf_write_file(3), +vf_get_next_object(3), +vf_create_object(3), +vf_get_object_type(3), +vf_get_property(3), +vf_get_property_ex(3), +vf_get_next_property(3), +vf_get_prop_value(3), +vf_set_prop_value(3), +vf_get_prop_value_string(3), +vf_get_prop_name_string(3), +vf_set_prop_name_string(3), +vf_get_prop_name(3), +vf_get_prop_value_object(3), +vf_set_prop_value_object(3), +vf_set_prop_value_string(3), +vf_set_prop_value_base64(3), +vf_get_prop_value_base64(3), +vf_set_property_from_file(3), +vf_delete_object(3), +vf_delete_prop(3), +vf_find_prop_qual_index(3), +vf_is_modified(3), +vf_date_string_to_time(3), +vf_period_string_to_time(3), +vf_period_time_to_string(3), +vf_set_prop_value_time(3), +vf_get_prop_value_time(3) diff --git a/doc/vf_find_prop_qual_index.3 b/doc/vf_find_prop_qual_index.3 new file mode 100644 index 0000000..9e3f6c6 --- /dev/null +++ b/doc/vf_find_prop_qual_index.3 @@ -0,0 +1,97 @@ +.\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! +.\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! +.TH "vf_find_prop_qual_index" 3 "30 April 2003" "c2man vf_iface.h" +.SH "NAME" +vf_find_prop_qual_index \- vf_find_prop_qual_index() +.SH "SYNOPSIS" +.ft B +#include <../vformat/vf_iface.h> +.sp +extern bool_t vf_find_prop_qual_index +.br +( +.br + VF_PROP_T *p_prop, +.br + uint32_t *p_qualifier_index, +.br + uint32_t *p_found_value_index, +.br + const char **pp_possible_values, +.br + const char *p_token, +.br + vf_search_flags_t match +.br +); +.ft R +.SH "PARAMETERS" +.TP +.B "VF_PROP_T *p_prop" +The property we're querying. +.TP +.B "uint32_t *p_qualifier_index" +Ptr to output name index. +.TP +.B "uint32_t *p_found_value_index" +Ptr to output index in array. +.TP +.B "const char **pp_possible_values" +Array of possible values. +.TP +.B "const char *p_token" +Token searched for. +.TP +.B "vf_search_flags_t match" +String comparison flags. +.SH "DESCRIPTION" +Locate property qualifier given either an array of possible values +or a single token that is either present or absent. For example +if we have a property: + +NAME;THIRD;TIME;LUCKY:VALUE1;VALUE2;VALUE3 + +Then there are two possible searches. + +Firstly we can look for the property qualifier which can take values +from the array { "FIRST", "SECOND", THIRD" } in which case the array +is passed as pp_possible_values and the function returns with the +values *p_found_value_index=2, p_qualifier_index=1 + +Secondly we can look for the token with value "TIME" in which case +p_token is set to "TIME" and the function returns *p_qualifier_index=2. +.SH "RETURNS" +TRUE iff found, FALSE else. +.SH "SEE ALSO" +vf_parse_init(3), +vf_parse_text(3), +vf_parse_end(3), +vf_read_file(3), +vf_write_file(3), +vf_get_next_object(3), +vf_create_object(3), +vf_get_object_type(3), +vf_get_property(3), +vf_get_property_ex(3), +vf_get_next_property(3), +vf_get_prop_value(3), +vf_set_prop_value(3), +vf_get_prop_value_string(3), +vf_get_prop_name_string(3), +vf_set_prop_name_string(3), +vf_get_prop_name(3), +vf_get_prop_value_object(3), +vf_set_prop_value_object(3), +vf_set_prop_value_string(3), +vf_set_prop_value_base64(3), +vf_get_prop_value_base64(3), +vf_set_property_from_file(3), +vf_delete_object(3), +vf_delete_prop(3), +vf_is_modified(3), +vf_find_charset(3), +vf_date_string_to_time(3), +vf_period_string_to_time(3), +vf_period_time_to_string(3), +vf_set_prop_value_time(3), +vf_get_prop_value_time(3) diff --git a/doc/vf_get_next_object.3 b/doc/vf_get_next_object.3 new file mode 100644 index 0000000..9c8efbe --- /dev/null +++ b/doc/vf_get_next_object.3 @@ -0,0 +1,65 @@ +.\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! +.\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! +.TH "vf_get_next_object" 3 "30 April 2003" "c2man vf_iface.h" +.SH "NAME" +vf_get_next_object \- vf_get_next_object() +.SH "SYNOPSIS" +.ft B +#include <../vformat/vf_iface.h> +.sp +extern bool_t vf_get_next_object(VF_OBJECT_T **pp_object); +.ft R +.SH "PARAMETERS" +.TP +.B "VF_OBJECT_T **pp_object" +Ptr to pointer to current object. +.SH "DESCRIPTION" +Find "next" vobject. Typically called after a call to vf_read_file() +which may well read a list of objects from a file for example: + +if (vf_read_file(&p_object, p_filename)) +{ +do +{ +\ ... +} +while (vf_get_next_object(&p_object)) +; +} + +The value of *pp_object is updated by the call if it returns TRUE. +.SH "RETURNS" +TRUE iff found (ie. There is a "next" object). +.SH "SEE ALSO" +vf_parse_init(3), +vf_parse_text(3), +vf_parse_end(3), +vf_read_file(3), +vf_write_file(3), +vf_create_object(3), +vf_get_object_type(3), +vf_get_property(3), +vf_get_property_ex(3), +vf_get_next_property(3), +vf_get_prop_value(3), +vf_set_prop_value(3), +vf_get_prop_value_string(3), +vf_get_prop_name_string(3), +vf_set_prop_name_string(3), +vf_get_prop_name(3), +vf_get_prop_value_object(3), +vf_set_prop_value_object(3), +vf_set_prop_value_string(3), +vf_set_prop_value_base64(3), +vf_get_prop_value_base64(3), +vf_set_property_from_file(3), +vf_delete_object(3), +vf_delete_prop(3), +vf_find_prop_qual_index(3), +vf_is_modified(3), +vf_find_charset(3), +vf_date_string_to_time(3), +vf_period_string_to_time(3), +vf_period_time_to_string(3), +vf_set_prop_value_time(3), +vf_get_prop_value_time(3) diff --git a/doc/vf_get_next_property.3 b/doc/vf_get_next_property.3 new file mode 100644 index 0000000..e6c491f --- /dev/null +++ b/doc/vf_get_next_property.3 @@ -0,0 +1,54 @@ +.\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! +.\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! +.TH "vf_get_next_property" 3 "30 April 2003" "c2man vf_iface.h" +.SH "NAME" +vf_get_next_property \- vf_get_next_property() +.SH "SYNOPSIS" +.ft B +#include <../vformat/vf_iface.h> +.sp +extern bool_t vf_get_next_property(VF_PROP_T **pp_prop); +.ft R +.SH "PARAMETERS" +.TP +.B "VF_PROP_T **pp_prop" +Output pointer. +.SH "DESCRIPTION" +Find the next property given the current search critera. User +calls vf_get_property() to locate first in a bunch of properties +and can iterate over the rest by calling vf_get_next_property(). +.SH "RETURNS" +TRUE iff found, FALSE else. *Pp_prop points to the nex property. +.SH "SEE ALSO" +vf_parse_init(3), +vf_parse_text(3), +vf_parse_end(3), +vf_read_file(3), +vf_write_file(3), +vf_get_next_object(3), +vf_create_object(3), +vf_get_object_type(3), +vf_get_property(3), +vf_get_property_ex(3), +vf_get_prop_value(3), +vf_set_prop_value(3), +vf_get_prop_value_string(3), +vf_get_prop_name_string(3), +vf_set_prop_name_string(3), +vf_get_prop_name(3), +vf_get_prop_value_object(3), +vf_set_prop_value_object(3), +vf_set_prop_value_string(3), +vf_set_prop_value_base64(3), +vf_get_prop_value_base64(3), +vf_set_property_from_file(3), +vf_delete_object(3), +vf_delete_prop(3), +vf_find_prop_qual_index(3), +vf_is_modified(3), +vf_find_charset(3), +vf_date_string_to_time(3), +vf_period_string_to_time(3), +vf_period_time_to_string(3), +vf_set_prop_value_time(3), +vf_get_prop_value_time(3) diff --git a/doc/vf_get_object_type.3 b/doc/vf_get_object_type.3 new file mode 100644 index 0000000..91cde4c --- /dev/null +++ b/doc/vf_get_object_type.3 @@ -0,0 +1,53 @@ +.\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! +.\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! +.TH "vf_get_object_type" 3 "30 April 2003" "c2man vf_iface.h" +.SH "NAME" +vf_get_object_type \- vf_get_object_type() +.SH "SYNOPSIS" +.ft B +#include <../vformat/vf_iface.h> +.sp +extern const char *vf_get_object_type(VF_OBJECT_T *p_object); +.ft R +.SH "PARAMETERS" +.TP +.B "VF_OBJECT_T *p_object" +Object to locate type of. +.SH "DESCRIPTION" +Return the type string identifying the indicated vformat object, +the string after the 'BEGIN' mark so 'VCARD' or 'VNOTE' etc. +.SH "RETURNS" +Ptr to string. +.SH "SEE ALSO" +vf_parse_init(3), +vf_parse_text(3), +vf_parse_end(3), +vf_read_file(3), +vf_write_file(3), +vf_get_next_object(3), +vf_create_object(3), +vf_get_property(3), +vf_get_property_ex(3), +vf_get_next_property(3), +vf_get_prop_value(3), +vf_set_prop_value(3), +vf_get_prop_value_string(3), +vf_get_prop_name_string(3), +vf_set_prop_name_string(3), +vf_get_prop_name(3), +vf_get_prop_value_object(3), +vf_set_prop_value_object(3), +vf_set_prop_value_string(3), +vf_set_prop_value_base64(3), +vf_get_prop_value_base64(3), +vf_set_property_from_file(3), +vf_delete_object(3), +vf_delete_prop(3), +vf_find_prop_qual_index(3), +vf_is_modified(3), +vf_find_charset(3), +vf_date_string_to_time(3), +vf_period_string_to_time(3), +vf_period_time_to_string(3), +vf_set_prop_value_time(3), +vf_get_prop_value_time(3) diff --git a/doc/vf_get_prop_name.3 b/doc/vf_get_prop_name.3 new file mode 100644 index 0000000..538c137 --- /dev/null +++ b/doc/vf_get_prop_name.3 @@ -0,0 +1,68 @@ +.\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! +.\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! +.TH "vf_get_prop_name" 3 "30 April 2003" "c2man vf_iface.h" +.SH "NAME" +vf_get_prop_name \- vf_get_prop_name() +.SH "SYNOPSIS" +.ft B +#include <../vformat/vf_iface.h> +.sp +extern void vf_get_prop_name +.br +( +.br + VF_PROP_T *p_prop, +.br + char *p_buffer, +.br + uint32_t bufsize +.br +); +.ft R +.SH "PARAMETERS" +.TP +.B "VF_PROP_T *p_prop" +The property. +.TP +.B "char *p_buffer" +The buffer. +.TP +.B "uint32_t bufsize" +Size of the buffer. +.SH "DESCRIPTION" +Build the property name string in the indicated buffer. +.SH "RETURNS" +(None) +.SH "SEE ALSO" +vf_parse_init(3), +vf_parse_text(3), +vf_parse_end(3), +vf_read_file(3), +vf_write_file(3), +vf_get_next_object(3), +vf_create_object(3), +vf_get_object_type(3), +vf_get_property(3), +vf_get_property_ex(3), +vf_get_next_property(3), +vf_get_prop_value(3), +vf_set_prop_value(3), +vf_get_prop_value_string(3), +vf_get_prop_name_string(3), +vf_set_prop_name_string(3), +vf_get_prop_value_object(3), +vf_set_prop_value_object(3), +vf_set_prop_value_string(3), +vf_set_prop_value_base64(3), +vf_get_prop_value_base64(3), +vf_set_property_from_file(3), +vf_delete_object(3), +vf_delete_prop(3), +vf_find_prop_qual_index(3), +vf_is_modified(3), +vf_find_charset(3), +vf_date_string_to_time(3), +vf_period_string_to_time(3), +vf_period_time_to_string(3), +vf_set_prop_value_time(3), +vf_get_prop_value_time(3) diff --git a/doc/vf_get_prop_name_string.3 b/doc/vf_get_prop_name_string.3 new file mode 100644 index 0000000..7d1cfee --- /dev/null +++ b/doc/vf_get_prop_name_string.3 @@ -0,0 +1,70 @@ +.\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! +.\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! +.TH "vf_get_prop_name_string" 3 "30 April 2003" "c2man vf_iface.h" +.SH "NAME" +vf_get_prop_name_string \- vf_get_prop_name_string() +.SH "SYNOPSIS" +.ft B +#include <../vformat/vf_iface.h> +.sp +extern char *vf_get_prop_name_string +.br +( +.br + VF_PROP_T *p_prop, +.br + uint32_t n_string +.br +); +.ft R +.SH "PARAMETERS" +.TP +.B "VF_PROP_T *p_prop" +Property to locate string from. +.TP +.B "uint32_t n_string" +Index to string requred. +.SH "DESCRIPTION" +Get n'th name string. For example a property may be defined as: + +THING;THIS=STUFF;WITH-QUALIFIERS:fred-fred-fred;gogogo;baabaabaa + +A call to vf_get_prop_name_string() specifying n_string=2 will +return a pointer to the WITH-QUALIFIERS value. + +Return NULL if out of range request, ie. N_string=4 for X;A;B;C:foo. +.SH "RETURNS" +Pointer to string value if value present, NULL if index too large. +.SH "SEE ALSO" +vf_parse_init(3), +vf_parse_text(3), +vf_parse_end(3), +vf_read_file(3), +vf_write_file(3), +vf_get_next_object(3), +vf_create_object(3), +vf_get_object_type(3), +vf_get_property(3), +vf_get_property_ex(3), +vf_get_next_property(3), +vf_get_prop_value(3), +vf_set_prop_value(3), +vf_get_prop_value_string(3), +vf_set_prop_name_string(3), +vf_get_prop_name(3), +vf_get_prop_value_object(3), +vf_set_prop_value_object(3), +vf_set_prop_value_string(3), +vf_set_prop_value_base64(3), +vf_get_prop_value_base64(3), +vf_set_property_from_file(3), +vf_delete_object(3), +vf_delete_prop(3), +vf_find_prop_qual_index(3), +vf_is_modified(3), +vf_find_charset(3), +vf_date_string_to_time(3), +vf_period_string_to_time(3), +vf_period_time_to_string(3), +vf_set_prop_value_time(3), +vf_get_prop_value_time(3) diff --git a/doc/vf_get_prop_value.3 b/doc/vf_get_prop_value.3 new file mode 100644 index 0000000..4b821c8 --- /dev/null +++ b/doc/vf_get_prop_value.3 @@ -0,0 +1,87 @@ +.\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! +.\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! +.TH "vf_get_prop_value" 3 "30 April 2003" "c2man vf_iface.h" +.SH "NAME" +vf_get_prop_value \- vf_get_prop_value() +.SH "SYNOPSIS" +.ft B +#include <../vformat/vf_iface.h> +.sp +extern bool_t vf_get_prop_value +.br +( +.br + VF_PROP_T *p_prop, +.br + void **pp_value, +.br + uint32_t *p_size, +.br + vf_encoding_t *p_encoding +.br +); +.ft R +.SH "PARAMETERS" +.TP +.B "VF_PROP_T *p_prop" +The property. +.TP +.B "void **pp_value" +Pointer value. +.TP +.B "uint32_t *p_size" +Integer value. +.TP +.B "vf_encoding_t *p_encoding" +Type of return values. +.SH "DESCRIPTION" +Get hold of raw fields associated with the property. These are of +various types: + +VF_ENC_VOBJECT +.br +- *Pp_value = pointer to contained VF_OBJECT_T which can be +passed back to any of the object manipulation functions. + +VF_ENC_7BIT, VF_ENC_QUOTEDPRINTABLE +.br +- *Pp_value = ptr to array of char*, *p_size = number of elts. + +VF_ENC_8BIT, VF_BASE64 +.br +- *Pp_value = ptr to bytes, *p_size = number of bytes. +.SH "RETURNS" +TRUE <=> encoding is valid, FALSE else. +.SH "SEE ALSO" +vf_parse_init(3), +vf_parse_text(3), +vf_parse_end(3), +vf_read_file(3), +vf_write_file(3), +vf_get_next_object(3), +vf_create_object(3), +vf_get_object_type(3), +vf_get_property(3), +vf_get_property_ex(3), +vf_get_next_property(3), +vf_set_prop_value(3), +vf_get_prop_value_string(3), +vf_get_prop_name_string(3), +vf_set_prop_name_string(3), +vf_get_prop_name(3), +vf_get_prop_value_object(3), +vf_set_prop_value_object(3), +vf_set_prop_value_string(3), +vf_set_prop_value_base64(3), +vf_get_prop_value_base64(3), +vf_set_property_from_file(3), +vf_delete_object(3), +vf_delete_prop(3), +vf_find_prop_qual_index(3), +vf_is_modified(3), +vf_find_charset(3), +vf_date_string_to_time(3), +vf_period_string_to_time(3), +vf_period_time_to_string(3), +vf_set_prop_value_time(3), +vf_get_prop_value_time(3) diff --git a/doc/vf_get_prop_value_base64.3 b/doc/vf_get_prop_value_base64.3 new file mode 100644 index 0000000..e9cdec5 --- /dev/null +++ b/doc/vf_get_prop_value_base64.3 @@ -0,0 +1,63 @@ +.\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! +.\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! +.TH "vf_get_prop_value_base64" 3 "30 April 2003" "c2man vf_iface.h" +.SH "NAME" +vf_get_prop_value_base64 \- vf_get_prop_value_base64() +.SH "SYNOPSIS" +.ft B +#include <../vformat/vf_iface.h> +.sp +extern const uint8_t *vf_get_prop_value_base64 +.br +( +.br + VF_PROP_T *p_prop, +.br + uint32_t *p_length +.br +); +.ft R +.SH "PARAMETERS" +.TP +.B "VF_PROP_T *p_prop" +Property we're setting a value in. +.TP +.B "uint32_t *p_length" +Length of the binary data. +.SH "DESCRIPTION" +Get a BASE64 property. Returns ptr, passes length via parameter. +.SH "RETURNS" +Ptr to data. +.SH "SEE ALSO" +vf_parse_init(3), +vf_parse_text(3), +vf_parse_end(3), +vf_read_file(3), +vf_write_file(3), +vf_get_next_object(3), +vf_create_object(3), +vf_get_object_type(3), +vf_get_property(3), +vf_get_property_ex(3), +vf_get_next_property(3), +vf_get_prop_value(3), +vf_set_prop_value(3), +vf_get_prop_value_string(3), +vf_get_prop_name_string(3), +vf_set_prop_name_string(3), +vf_get_prop_name(3), +vf_get_prop_value_object(3), +vf_set_prop_value_object(3), +vf_set_prop_value_string(3), +vf_set_prop_value_base64(3), +vf_set_property_from_file(3), +vf_delete_object(3), +vf_delete_prop(3), +vf_find_prop_qual_index(3), +vf_is_modified(3), +vf_find_charset(3), +vf_date_string_to_time(3), +vf_period_string_to_time(3), +vf_period_time_to_string(3), +vf_set_prop_value_time(3), +vf_get_prop_value_time(3) diff --git a/doc/vf_get_prop_value_object.3 b/doc/vf_get_prop_value_object.3 new file mode 100644 index 0000000..0fa3cc6 --- /dev/null +++ b/doc/vf_get_prop_value_object.3 @@ -0,0 +1,52 @@ +.\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! +.\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! +.TH "vf_get_prop_value_object" 3 "30 April 2003" "c2man vf_iface.h" +.SH "NAME" +vf_get_prop_value_object \- vf_get_prop_value_object() +.SH "SYNOPSIS" +.ft B +#include <../vformat/vf_iface.h> +.sp +extern VF_OBJECT_T *vf_get_prop_value_object(VF_PROP_T *p_prop); +.ft R +.SH "PARAMETERS" +.TP +.B "VF_PROP_T *p_prop" +Property to locate object from. +.SH "DESCRIPTION" +Obtain object pointer value from VF_PROP_T. +.SH "RETURNS" +Pointer to vobject value (or NULL if not found). +.SH "SEE ALSO" +vf_parse_init(3), +vf_parse_text(3), +vf_parse_end(3), +vf_read_file(3), +vf_write_file(3), +vf_get_next_object(3), +vf_create_object(3), +vf_get_object_type(3), +vf_get_property(3), +vf_get_property_ex(3), +vf_get_next_property(3), +vf_get_prop_value(3), +vf_set_prop_value(3), +vf_get_prop_value_string(3), +vf_get_prop_name_string(3), +vf_set_prop_name_string(3), +vf_get_prop_name(3), +vf_set_prop_value_object(3), +vf_set_prop_value_string(3), +vf_set_prop_value_base64(3), +vf_get_prop_value_base64(3), +vf_set_property_from_file(3), +vf_delete_object(3), +vf_delete_prop(3), +vf_find_prop_qual_index(3), +vf_is_modified(3), +vf_find_charset(3), +vf_date_string_to_time(3), +vf_period_string_to_time(3), +vf_period_time_to_string(3), +vf_set_prop_value_time(3), +vf_get_prop_value_time(3) diff --git a/doc/vf_get_prop_value_string.3 b/doc/vf_get_prop_value_string.3 new file mode 100644 index 0000000..4fc9a81 --- /dev/null +++ b/doc/vf_get_prop_value_string.3 @@ -0,0 +1,71 @@ +.\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! +.\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! +.TH "vf_get_prop_value_string" 3 "30 April 2003" "c2man vf_iface.h" +.SH "NAME" +vf_get_prop_value_string \- vf_get_prop_value_string() +.SH "SYNOPSIS" +.ft B +#include <../vformat/vf_iface.h> +.sp +extern char *vf_get_prop_value_string +.br +( +.br + VF_PROP_T *p_prop, +.br + uint32_t n_string +.br +); +.ft R +.SH "PARAMETERS" +.TP +.B "VF_PROP_T *p_prop" +Property to locate string from. +.TP +.B "uint32_t n_string" +Index to string requred. +.SH "DESCRIPTION" +Obtain string pointer value from VF_PROP_T. For example a property +may be defined as: + +THING;THIS=STUFF;WITH-QUALIFIERS:fred-fred-fred;gogogo;baabaabaa + +A call to vf_get_prop_value_string() specifying n_string=1 will +return a pointer to the gogogo value. + +Return NULL if out of range request, ie. N_string=3 for N:0;1;2. +.SH "RETURNS" +Pointer to string value if value present, NULL if index too large. +.SH "SEE ALSO" +vf_parse_init(3), +vf_parse_text(3), +vf_parse_end(3), +vf_read_file(3), +vf_write_file(3), +vf_get_next_object(3), +vf_create_object(3), +vf_get_object_type(3), +vf_get_property(3), +vf_get_property_ex(3), +vf_get_next_property(3), +vf_get_prop_value(3), +vf_set_prop_value(3), +vf_get_prop_name_string(3), +vf_set_prop_name_string(3), +vf_get_prop_name(3), +vf_get_prop_value_object(3), +vf_set_prop_value_object(3), +vf_set_prop_value_string(3), +vf_set_prop_value_base64(3), +vf_get_prop_value_base64(3), +vf_set_property_from_file(3), +vf_delete_object(3), +vf_delete_prop(3), +vf_find_prop_qual_index(3), +vf_is_modified(3), +vf_find_charset(3), +vf_date_string_to_time(3), +vf_period_string_to_time(3), +vf_period_time_to_string(3), +vf_set_prop_value_time(3), +vf_get_prop_value_time(3) diff --git a/doc/vf_get_prop_value_time.3 b/doc/vf_get_prop_value_time.3 new file mode 100644 index 0000000..cf446c9 --- /dev/null +++ b/doc/vf_get_prop_value_time.3 @@ -0,0 +1,68 @@ +.\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! +.\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! +.TH "vf_get_prop_value_time" 3 "30 April 2003" "c2man vf_iface.h" +.SH "NAME" +vf_get_prop_value_time \- vf_get_prop_value_time() +.SH "SYNOPSIS" +.ft B +#include <../vformat/vf_iface.h> +.sp +extern bool_t vf_get_prop_value_time +.br +( +.br + VF_PROP_T *p_prop, +.br + uint32_t n_string, +.br + long int *p_t_value +.br +); +.ft R +.SH "PARAMETERS" +.TP +.B "VF_PROP_T *p_prop" +The property. +.TP +.B "uint32_t n_string" +Which string we're decoding. +.TP +.B "long int *p_t_value" +Pointer to output time value. +.SH "DESCRIPTION" +Fetch a time_t value from a VF property. +.SH "RETURNS" +TRUE iff foudn & converted OK. +.SH "SEE ALSO" +vf_parse_init(3), +vf_parse_text(3), +vf_parse_end(3), +vf_read_file(3), +vf_write_file(3), +vf_get_next_object(3), +vf_create_object(3), +vf_get_object_type(3), +vf_get_property(3), +vf_get_property_ex(3), +vf_get_next_property(3), +vf_get_prop_value(3), +vf_set_prop_value(3), +vf_get_prop_value_string(3), +vf_get_prop_name_string(3), +vf_set_prop_name_string(3), +vf_get_prop_name(3), +vf_get_prop_value_object(3), +vf_set_prop_value_object(3), +vf_set_prop_value_string(3), +vf_set_prop_value_base64(3), +vf_get_prop_value_base64(3), +vf_set_property_from_file(3), +vf_delete_object(3), +vf_delete_prop(3), +vf_find_prop_qual_index(3), +vf_is_modified(3), +vf_find_charset(3), +vf_date_string_to_time(3), +vf_period_string_to_time(3), +vf_period_time_to_string(3), +vf_set_prop_value_time(3) diff --git a/doc/vf_get_property.3 b/doc/vf_get_property.3 new file mode 100644 index 0000000..828e414 --- /dev/null +++ b/doc/vf_get_property.3 @@ -0,0 +1,128 @@ +.\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! +.\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! +.TH "vf_get_property" 3 "30 April 2003" "c2man vf_iface.h" +.SH "NAME" +vf_get_property \- vf_get_property() +.SH "SYNOPSIS" +.ft B +#include <../vformat/vf_iface.h> +.sp +extern bool_t vf_get_property +.br +( +.br + VF_PROP_T **pp_prop, +.br + VF_OBJECT_T *p_object, +.br + vf_get_t ops, +.br + const char *p_group, +.br + const char *p_name, +.br + const char *p_qualifier, +.br + ... +.br +); +.ft R +.SH "PARAMETERS" +.TP +.B "VF_PROP_T **pp_prop" +Output pointer. +.TP +.B "VF_OBJECT_T *p_object" +Object to add to. +.TP +.B "vf_get_t ops" +Search flags. +.TP +.B "const char *p_group" +Group name if any. +.TP +.B "const char *p_name" +Name of tag. +.TP +.B "const char *p_qualifier" +First qualifier if any. +.TP +.B "..." +Subequent qualifiers. +.SH "DESCRIPTION" +Basic searching function locating elements of the VOBJECT by qualified +name. The function is a varargs function (like sprintf) and the list +of arguments must be NULL terminated (hence the appearance of the +p_qualifier argument in the arglist). Valid calls might be: + +vf_get_property(&p_out, p_object, VFGP_FIND, NULL, "N", NULL); +.br +- Find and return "N" properties. If there are none, return FALSE. + +Vf_get_property(&p_out, p_object, VFGP_FIND, NULL, "TEL", "WORK", NULL); +.br +- Find and return "TEL" entries qualified by the "work" attribute +(ie. Work phone numbers). If there are none, return FALSE. + +Vf_get_property(&p_out, p_object, VFGP_GET, NULL, "TEL", "WORK", NULL); +.br +- Find and return work phone number. The entry is automatically +added if not pre-existing. + +Vf_get_property(&p_out, p_object, VFGP_GET, NULL, "TEL", "WORK", NULL); +.br +- Find and return work phone numbers in the group identifier by the "ME" +identifier. The entry is automatically added if not pre-existing. + +Vf_get_property(&p_out, p_object, VFGP_FIND, "ME", "*", NULL); +.br +- Effectively enumerates all entries in the "ME" group. + +A pointer to the first property matching the search criteria is returned +via the pp_prop argument. The search actually locates all such matches +and pointer to subsequent entries (if there are >1) may be found by +calling the vf_get_next_property() function. + +The tags may occur in any order _except_ that the p_name must be first. + +Note that the VF_PROP_T returned by pp_prop is an opaque type and the +functions vf_get_prop_xxxx() etc. Must be used to locate real "values". + +Cached search results (the list enumerated by subsequent calls to the +vf_get_next_property() function) are maintained through the use of a +a single internal pointer therefore this method is not thread safe. +.SH "RETURNS" +TRUE iff found/added successfully. Ptr to prop returned via pp_prop. +.SH "SEE ALSO" +vf_parse_init(3), +vf_parse_text(3), +vf_parse_end(3), +vf_read_file(3), +vf_write_file(3), +vf_get_next_object(3), +vf_create_object(3), +vf_get_object_type(3), +vf_get_property_ex(3), +vf_get_next_property(3), +vf_get_prop_value(3), +vf_set_prop_value(3), +vf_get_prop_value_string(3), +vf_get_prop_name_string(3), +vf_set_prop_name_string(3), +vf_get_prop_name(3), +vf_get_prop_value_object(3), +vf_set_prop_value_object(3), +vf_set_prop_value_string(3), +vf_set_prop_value_base64(3), +vf_get_prop_value_base64(3), +vf_set_property_from_file(3), +vf_delete_object(3), +vf_delete_prop(3), +vf_find_prop_qual_index(3), +vf_is_modified(3), +vf_find_charset(3), +vf_date_string_to_time(3), +vf_period_string_to_time(3), +vf_period_time_to_string(3), +vf_set_prop_value_time(3), +vf_get_prop_value_time(3) diff --git a/doc/vf_get_property_ex.3 b/doc/vf_get_property_ex.3 new file mode 100644 index 0000000..9937b3f --- /dev/null +++ b/doc/vf_get_property_ex.3 @@ -0,0 +1,91 @@ +.\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! +.\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! +.TH "vf_get_property_ex" 3 "30 April 2003" "c2man vf_iface.h" +.SH "NAME" +vf_get_property_ex \- vf_get_property_ex() +.SH "SYNOPSIS" +.ft B +#include <../vformat/vf_iface.h> +.sp +extern bool_t vf_get_property_ex +.br +( +.br + VF_PROP_T **pp_prop, +.br + VF_OBJECT_T *p_object, +.br + vf_get_t ops, +.br + const char *p_group, +.br + const char *p_name, +.br + const char *p_qualifier, +.br + char args +.br +); +.ft R +.SH "PARAMETERS" +.TP +.B "VF_PROP_T **pp_prop" +Output pointer. +.TP +.B "VF_OBJECT_T *p_object" +Object to search. +.TP +.B "vf_get_t ops" +Search flags. +.TP +.B "const char *p_group" +Group name if any. +.TP +.B "const char *p_name" +Name of tag. +.TP +.B "const char *p_qualifier" +First qualifier if any. +.TP +.B "char args" +Argument list. +.SH "DESCRIPTION" +The grunt behind vf_get_property(). Manages the search as described +vf_get_property() but takes the list of arguments as a va_list. +This function should be used when writing higher layer functions +which take varargs (eg. DDX functions). +.SH "RETURNS" +TRUE iff found/added successfully. Ptr to prop returned via pp_prop. +.SH "SEE ALSO" +vf_parse_init(3), +vf_parse_text(3), +vf_parse_end(3), +vf_read_file(3), +vf_write_file(3), +vf_get_next_object(3), +vf_create_object(3), +vf_get_object_type(3), +vf_get_property(3), +vf_get_next_property(3), +vf_get_prop_value(3), +vf_set_prop_value(3), +vf_get_prop_value_string(3), +vf_get_prop_name_string(3), +vf_set_prop_name_string(3), +vf_get_prop_name(3), +vf_get_prop_value_object(3), +vf_set_prop_value_object(3), +vf_set_prop_value_string(3), +vf_set_prop_value_base64(3), +vf_get_prop_value_base64(3), +vf_set_property_from_file(3), +vf_delete_object(3), +vf_delete_prop(3), +vf_find_prop_qual_index(3), +vf_is_modified(3), +vf_find_charset(3), +vf_date_string_to_time(3), +vf_period_string_to_time(3), +vf_period_time_to_string(3), +vf_set_prop_value_time(3), +vf_get_prop_value_time(3) diff --git a/doc/vf_is_modified.3 b/doc/vf_is_modified.3 new file mode 100644 index 0000000..9dab0df --- /dev/null +++ b/doc/vf_is_modified.3 @@ -0,0 +1,52 @@ +.\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! +.\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! +.TH "vf_is_modified" 3 "30 April 2003" "c2man vf_iface.h" +.SH "NAME" +vf_is_modified \- vf_is_modified() +.SH "SYNOPSIS" +.ft B +#include <../vformat/vf_iface.h> +.sp +extern bool_t vf_is_modified(VF_OBJECT_T *p_object); +.ft R +.SH "PARAMETERS" +.TP +.B "VF_OBJECT_T *p_object" +The object. +.SH "DESCRIPTION" +Fetch status of modified flag. +.SH "RETURNS" +TRUE iff modified since list read/write. +.SH "SEE ALSO" +vf_parse_init(3), +vf_parse_text(3), +vf_parse_end(3), +vf_read_file(3), +vf_write_file(3), +vf_get_next_object(3), +vf_create_object(3), +vf_get_object_type(3), +vf_get_property(3), +vf_get_property_ex(3), +vf_get_next_property(3), +vf_get_prop_value(3), +vf_set_prop_value(3), +vf_get_prop_value_string(3), +vf_get_prop_name_string(3), +vf_set_prop_name_string(3), +vf_get_prop_name(3), +vf_get_prop_value_object(3), +vf_set_prop_value_object(3), +vf_set_prop_value_string(3), +vf_set_prop_value_base64(3), +vf_get_prop_value_base64(3), +vf_set_property_from_file(3), +vf_delete_object(3), +vf_delete_prop(3), +vf_find_prop_qual_index(3), +vf_find_charset(3), +vf_date_string_to_time(3), +vf_period_string_to_time(3), +vf_period_time_to_string(3), +vf_set_prop_value_time(3), +vf_get_prop_value_time(3) diff --git a/doc/vf_parse_end.3 b/doc/vf_parse_end.3 new file mode 100644 index 0000000..80daf5c --- /dev/null +++ b/doc/vf_parse_end.3 @@ -0,0 +1,54 @@ +.\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! +.\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! +.TH "vf_parse_end" 3 "30 April 2003" "c2man vf_iface.h" +.SH "NAME" +vf_parse_end \- vf_parse_end() +.SH "SYNOPSIS" +.ft B +#include <../vformat/vf_iface.h> +.sp +extern bool_t vf_parse_end(VF_PARSER_T *p_parse); +.ft R +.SH "PARAMETERS" +.TP +.B "VF_PARSER_T *p_parse" +The parser. +.SH "DESCRIPTION" +Ensure parse completion, release memory associated with the parser. + +See notes for vf_parse_init(). +.SH "RETURNS" +TRUE <=> parse complete with no error. +.SH "SEE ALSO" +vf_parse_init(3), +vf_parse_text(3), +vf_read_file(3), +vf_write_file(3), +vf_get_next_object(3), +vf_create_object(3), +vf_get_object_type(3), +vf_get_property(3), +vf_get_property_ex(3), +vf_get_next_property(3), +vf_get_prop_value(3), +vf_set_prop_value(3), +vf_get_prop_value_string(3), +vf_get_prop_name_string(3), +vf_set_prop_name_string(3), +vf_get_prop_name(3), +vf_get_prop_value_object(3), +vf_set_prop_value_object(3), +vf_set_prop_value_string(3), +vf_set_prop_value_base64(3), +vf_get_prop_value_base64(3), +vf_set_property_from_file(3), +vf_delete_object(3), +vf_delete_prop(3), +vf_find_prop_qual_index(3), +vf_is_modified(3), +vf_find_charset(3), +vf_date_string_to_time(3), +vf_period_string_to_time(3), +vf_period_time_to_string(3), +vf_set_prop_value_time(3), +vf_get_prop_value_time(3) diff --git a/doc/vf_parse_init.3 b/doc/vf_parse_init.3 new file mode 100644 index 0000000..3ffcc51 --- /dev/null +++ b/doc/vf_parse_init.3 @@ -0,0 +1,93 @@ +.\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! +.\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! +.TH "vf_parse_init" 3 "30 April 2003" "c2man vf_iface.h" +.SH "NAME" +vf_parse_init \- vf_parse_init() +.SH "SYNOPSIS" +.ft B +#include <../vformat/vf_iface.h> +.sp +extern bool_t vf_parse_init +.br +( +.br + VF_PARSER_T **pp_parser, +.br + VF_OBJECT_T **pp_object +.br +); +.ft R +.SH "PARAMETERS" +.TP +.B "VF_PARSER_T **pp_parser" +Ptr to allocated parser. +.TP +.B "VF_OBJECT_T **pp_object" +The object we're parsing into. +.SH "DESCRIPTION" +Allocate and initialise a parser. To parse a VCARD (or any vObject) +a user allocates a parser, pushes data through it using vf_parse_text() +and finally calls vf_parse_end(): + +VF_PARSER_T *p_parser; + +if (vf_parse_init(&p_parser, pp_object)) +{ +do +{ +char buffer[...]; +Int numchars; + +numchars = get_chars_from_somewhere(buffer, ...); + +Ret = vf_parse_text(p_parser, buffer, numchars); +} +while (ret && (0 < charsread)) +; + +if (!vf_parse_end(p_parser)) +{ +ret = FALSE; +} +} + +A parser allocated by vf_parse_init(), must be deallocated by calling +vf_parse_end() whether or not parsing succeeds. Also, parsing may not +be complete (ie. Values may be held buffered and not evaluated fully +or assigned to a VF_OBJECT_T) untill the final call to vf_parse_end() +=> after a vf_parse_init() you _must_ vf_parse_end(). +.SH "RETURNS" +TRUE iff parser allocated successfully. +.SH "SEE ALSO" +vf_parse_text(3), +vf_parse_end(3), +vf_read_file(3), +vf_write_file(3), +vf_get_next_object(3), +vf_create_object(3), +vf_get_object_type(3), +vf_get_property(3), +vf_get_property_ex(3), +vf_get_next_property(3), +vf_get_prop_value(3), +vf_set_prop_value(3), +vf_get_prop_value_string(3), +vf_get_prop_name_string(3), +vf_set_prop_name_string(3), +vf_get_prop_name(3), +vf_get_prop_value_object(3), +vf_set_prop_value_object(3), +vf_set_prop_value_string(3), +vf_set_prop_value_base64(3), +vf_get_prop_value_base64(3), +vf_set_property_from_file(3), +vf_delete_object(3), +vf_delete_prop(3), +vf_find_prop_qual_index(3), +vf_is_modified(3), +vf_find_charset(3), +vf_date_string_to_time(3), +vf_period_string_to_time(3), +vf_period_time_to_string(3), +vf_set_prop_value_time(3), +vf_get_prop_value_time(3) diff --git a/doc/vf_parse_text.3 b/doc/vf_parse_text.3 new file mode 100644 index 0000000..0c21fc7 --- /dev/null +++ b/doc/vf_parse_text.3 @@ -0,0 +1,70 @@ +.\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! +.\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! +.TH "vf_parse_text" 3 "30 April 2003" "c2man vf_iface.h" +.SH "NAME" +vf_parse_text \- vf_parse_text() +.SH "SYNOPSIS" +.ft B +#include <../vformat/vf_iface.h> +.sp +extern bool_t vf_parse_text +.br +( +.br + VF_PARSER_T *p_parse, +.br + char *p_chars, +.br + int numchars +.br +); +.ft R +.SH "PARAMETERS" +.TP +.B "VF_PARSER_T *p_parse" +The parser. +.TP +.B "char *p_chars" +New characters to parse into object. +.TP +.B "int numchars" +Number of new characters. +.SH "DESCRIPTION" +Parse indicated text into the object associated with the VPARSE_T. + +See notes for vf_parse_init(). +.SH "RETURNS" +TRUE <=> allocation & syntax OK, FALSE else. +.SH "SEE ALSO" +vf_parse_init(3), +vf_parse_end(3), +vf_read_file(3), +vf_write_file(3), +vf_get_next_object(3), +vf_create_object(3), +vf_get_object_type(3), +vf_get_property(3), +vf_get_property_ex(3), +vf_get_next_property(3), +vf_get_prop_value(3), +vf_set_prop_value(3), +vf_get_prop_value_string(3), +vf_get_prop_name_string(3), +vf_set_prop_name_string(3), +vf_get_prop_name(3), +vf_get_prop_value_object(3), +vf_set_prop_value_object(3), +vf_set_prop_value_string(3), +vf_set_prop_value_base64(3), +vf_get_prop_value_base64(3), +vf_set_property_from_file(3), +vf_delete_object(3), +vf_delete_prop(3), +vf_find_prop_qual_index(3), +vf_is_modified(3), +vf_find_charset(3), +vf_date_string_to_time(3), +vf_period_string_to_time(3), +vf_period_time_to_string(3), +vf_set_prop_value_time(3), +vf_get_prop_value_time(3) diff --git a/doc/vf_period_string_to_time.3 b/doc/vf_period_string_to_time.3 new file mode 100644 index 0000000..56682f2 --- /dev/null +++ b/doc/vf_period_string_to_time.3 @@ -0,0 +1,65 @@ +.\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! +.\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! +.TH "vf_period_string_to_time" 3 "30 April 2003" "c2man vf_iface.h" +.SH "NAME" +vf_period_string_to_time \- vf_period_string_to_time() +.SH "SYNOPSIS" +.ft B +#include <../vformat/vf_iface.h> +.sp +extern bool_t vf_period_string_to_time +.br +( +.br + VF_ISO8601_PERIOD_T *p_period, +.br + const char *p_string +.br +); +.ft R +.SH "PARAMETERS" +.TP +.B "VF_ISO8601_PERIOD_T *p_period" +Output time value. +.TP +.B "const char *p_string" +Input string. +.SH "DESCRIPTION" +Convert period definition string to time value. The format is +P[aaaY][bbbM][cccW][dddD]T[eeeH][fffM][gggS] where 'aaa' is a +number of years, bbb months etc. +.SH "RETURNS" +TRUE <=> conversion OK, FALSE else. +.SH "SEE ALSO" +vf_parse_init(3), +vf_parse_text(3), +vf_parse_end(3), +vf_read_file(3), +vf_write_file(3), +vf_get_next_object(3), +vf_create_object(3), +vf_get_object_type(3), +vf_get_property(3), +vf_get_property_ex(3), +vf_get_next_property(3), +vf_get_prop_value(3), +vf_set_prop_value(3), +vf_get_prop_value_string(3), +vf_get_prop_name_string(3), +vf_set_prop_name_string(3), +vf_get_prop_name(3), +vf_get_prop_value_object(3), +vf_set_prop_value_object(3), +vf_set_prop_value_string(3), +vf_set_prop_value_base64(3), +vf_get_prop_value_base64(3), +vf_set_property_from_file(3), +vf_delete_object(3), +vf_delete_prop(3), +vf_find_prop_qual_index(3), +vf_is_modified(3), +vf_find_charset(3), +vf_date_string_to_time(3), +vf_period_time_to_string(3), +vf_set_prop_value_time(3), +vf_get_prop_value_time(3) diff --git a/doc/vf_period_time_to_string.3 b/doc/vf_period_time_to_string.3 new file mode 100644 index 0000000..ffdfe5c --- /dev/null +++ b/doc/vf_period_time_to_string.3 @@ -0,0 +1,63 @@ +.\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! +.\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! +.TH "vf_period_time_to_string" 3 "30 April 2003" "c2man vf_iface.h" +.SH "NAME" +vf_period_time_to_string \- vf_period_time_to_string() +.SH "SYNOPSIS" +.ft B +#include <../vformat/vf_iface.h> +.sp +extern uint32_t vf_period_time_to_string +.br +( +.br + char *p_string, +.br + const VF_ISO8601_PERIOD_T *p_period +.br +); +.ft R +.SH "PARAMETERS" +.TP +.B "char *p_string" +Output string. +.TP +.B "const VF_ISO8601_PERIOD_T *p_period" +Input period value. +.SH "DESCRIPTION" +Convert a VF_ISO8601_PERIOD_T to a string. +.SH "RETURNS" +Number of characters written. +.SH "SEE ALSO" +vf_parse_init(3), +vf_parse_text(3), +vf_parse_end(3), +vf_read_file(3), +vf_write_file(3), +vf_get_next_object(3), +vf_create_object(3), +vf_get_object_type(3), +vf_get_property(3), +vf_get_property_ex(3), +vf_get_next_property(3), +vf_get_prop_value(3), +vf_set_prop_value(3), +vf_get_prop_value_string(3), +vf_get_prop_name_string(3), +vf_set_prop_name_string(3), +vf_get_prop_name(3), +vf_get_prop_value_object(3), +vf_set_prop_value_object(3), +vf_set_prop_value_string(3), +vf_set_prop_value_base64(3), +vf_get_prop_value_base64(3), +vf_set_property_from_file(3), +vf_delete_object(3), +vf_delete_prop(3), +vf_find_prop_qual_index(3), +vf_is_modified(3), +vf_find_charset(3), +vf_date_string_to_time(3), +vf_period_string_to_time(3), +vf_set_prop_value_time(3), +vf_get_prop_value_time(3) diff --git a/doc/vf_read_file.3 b/doc/vf_read_file.3 new file mode 100644 index 0000000..406736d --- /dev/null +++ b/doc/vf_read_file.3 @@ -0,0 +1,63 @@ +.\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! +.\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! +.TH "vf_read_file" 3 "30 April 2003" "c2man vf_iface.h" +.SH "NAME" +vf_read_file \- vf_read_file() +.SH "SYNOPSIS" +.ft B +#include <../vformat/vf_iface.h> +.sp +extern bool_t vf_read_file +.br +( +.br + VF_OBJECT_T **pp_object, +.br + const char *p_name +.br +); +.ft R +.SH "PARAMETERS" +.TP +.B "VF_OBJECT_T **pp_object" +Pointer to output object. +.TP +.B "const char *p_name" +Name of file to read. +.SH "DESCRIPTION" +Reads indicated VOBJECT_T file. +.SH "RETURNS" +TRUE <=> read OK, FALSE else. +.SH "SEE ALSO" +vf_parse_init(3), +vf_parse_text(3), +vf_parse_end(3), +vf_write_file(3), +vf_get_next_object(3), +vf_create_object(3), +vf_get_object_type(3), +vf_get_property(3), +vf_get_property_ex(3), +vf_get_next_property(3), +vf_get_prop_value(3), +vf_set_prop_value(3), +vf_get_prop_value_string(3), +vf_get_prop_name_string(3), +vf_set_prop_name_string(3), +vf_get_prop_name(3), +vf_get_prop_value_object(3), +vf_set_prop_value_object(3), +vf_set_prop_value_string(3), +vf_set_prop_value_base64(3), +vf_get_prop_value_base64(3), +vf_set_property_from_file(3), +vf_delete_object(3), +vf_delete_prop(3), +vf_find_prop_qual_index(3), +vf_is_modified(3), +vf_find_charset(3), +vf_date_string_to_time(3), +vf_period_string_to_time(3), +vf_period_time_to_string(3), +vf_set_prop_value_time(3), +vf_get_prop_value_time(3) diff --git a/doc/vf_set_prop_name_string.3 b/doc/vf_set_prop_name_string.3 new file mode 100644 index 0000000..82e55ac --- /dev/null +++ b/doc/vf_set_prop_name_string.3 @@ -0,0 +1,68 @@ +.\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! +.\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! +.TH "vf_set_prop_name_string" 3 "30 April 2003" "c2man vf_iface.h" +.SH "NAME" +vf_set_prop_name_string \- vf_set_prop_name_string() +.SH "SYNOPSIS" +.ft B +#include <../vformat/vf_iface.h> +.sp +extern bool_t vf_set_prop_name_string +.br +( +.br + VF_PROP_T *p_prop, +.br + uint32_t n_string, +.br + const char *p_string +.br +); +.ft R +.SH "PARAMETERS" +.TP +.B "VF_PROP_T *p_prop" +Property we're setting a value in. +.TP +.B "uint32_t n_string" +Index to string. +.TP +.B "const char *p_string" +Pointer to string. +.SH "DESCRIPTION" +Set n'th name string. +.SH "RETURNS" +TRUE iff allocation OK, FALSE else. +.SH "SEE ALSO" +vf_parse_init(3), +vf_parse_text(3), +vf_parse_end(3), +vf_read_file(3), +vf_write_file(3), +vf_get_next_object(3), +vf_create_object(3), +vf_get_object_type(3), +vf_get_property(3), +vf_get_property_ex(3), +vf_get_next_property(3), +vf_get_prop_value(3), +vf_set_prop_value(3), +vf_get_prop_value_string(3), +vf_get_prop_name_string(3), +vf_get_prop_name(3), +vf_get_prop_value_object(3), +vf_set_prop_value_object(3), +vf_set_prop_value_string(3), +vf_set_prop_value_base64(3), +vf_get_prop_value_base64(3), +vf_set_property_from_file(3), +vf_delete_object(3), +vf_delete_prop(3), +vf_find_prop_qual_index(3), +vf_is_modified(3), +vf_find_charset(3), +vf_date_string_to_time(3), +vf_period_string_to_time(3), +vf_period_time_to_string(3), +vf_set_prop_value_time(3), +vf_get_prop_value_time(3) diff --git a/doc/vf_set_prop_value.3 b/doc/vf_set_prop_value.3 new file mode 100644 index 0000000..d41e4c9 --- /dev/null +++ b/doc/vf_set_prop_value.3 @@ -0,0 +1,82 @@ +.\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! +.\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! +.TH "vf_set_prop_value" 3 "30 April 2003" "c2man vf_iface.h" +.SH "NAME" +vf_set_prop_value \- vf_set_prop_value() +.SH "SYNOPSIS" +.ft B +#include <../vformat/vf_iface.h> +.sp +extern bool_t vf_set_prop_value +.br +( +.br + VF_PROP_T *p_prop, +.br + void *p_value, +.br + uint32_t n_param, +.br + vf_encoding_t encoding, +.br + bool_t copy +.br +); +.ft R +.SH "PARAMETERS" +.TP +.B "VF_PROP_T *p_prop" +The property. +.TP +.B "void *p_value" +Pointer to the data. +.TP +.B "uint32_t n_param" +Data size or index. +.TP +.B "vf_encoding_t encoding" +Encoding in use. +.TP +.B "bool_t copy" +Copy the data?. +.SH "DESCRIPTION" +Set values associated with a property. + +Passing a value of encoding not the same as the current property +encoding will cause the property contents to be freed prior to +setting the indicated value. +.SH "RETURNS" +TRUE <=> re-allocation success & encoding correct, FALSE else. +.SH "SEE ALSO" +vf_parse_init(3), +vf_parse_text(3), +vf_parse_end(3), +vf_read_file(3), +vf_write_file(3), +vf_get_next_object(3), +vf_create_object(3), +vf_get_object_type(3), +vf_get_property(3), +vf_get_property_ex(3), +vf_get_next_property(3), +vf_get_prop_value(3), +vf_get_prop_value_string(3), +vf_get_prop_name_string(3), +vf_set_prop_name_string(3), +vf_get_prop_name(3), +vf_get_prop_value_object(3), +vf_set_prop_value_object(3), +vf_set_prop_value_string(3), +vf_set_prop_value_base64(3), +vf_get_prop_value_base64(3), +vf_set_property_from_file(3), +vf_delete_object(3), +vf_delete_prop(3), +vf_find_prop_qual_index(3), +vf_is_modified(3), +vf_find_charset(3), +vf_date_string_to_time(3), +vf_period_string_to_time(3), +vf_period_time_to_string(3), +vf_set_prop_value_time(3), +vf_get_prop_value_time(3) diff --git a/doc/vf_set_prop_value_base64.3 b/doc/vf_set_prop_value_base64.3 new file mode 100644 index 0000000..70821f1 --- /dev/null +++ b/doc/vf_set_prop_value_base64.3 @@ -0,0 +1,73 @@ +.\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! +.\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! +.TH "vf_set_prop_value_base64" 3 "30 April 2003" "c2man vf_iface.h" +.SH "NAME" +vf_set_prop_value_base64 \- vf_set_prop_value_base64() +.SH "SYNOPSIS" +.ft B +#include <../vformat/vf_iface.h> +.sp +extern bool_t vf_set_prop_value_base64 +.br +( +.br + VF_PROP_T *p_prop, +.br + const uint8_t *p_data, +.br + uint32_t length, +.br + bool_t copy +.br +); +.ft R +.SH "PARAMETERS" +.TP +.B "VF_PROP_T *p_prop" +Property we're setting a value in. +.TP +.B "const uint8_t *p_data" +Pointer to the binary data. +.TP +.B "uint32_t length" +Length of the binary data. +.TP +.B "bool_t copy" +Copy or keep pointer. +.SH "DESCRIPTION" +Set the value of a property. +.SH "RETURNS" +TRUE <=> set successfully. +.SH "SEE ALSO" +vf_parse_init(3), +vf_parse_text(3), +vf_parse_end(3), +vf_read_file(3), +vf_write_file(3), +vf_get_next_object(3), +vf_create_object(3), +vf_get_object_type(3), +vf_get_property(3), +vf_get_property_ex(3), +vf_get_next_property(3), +vf_get_prop_value(3), +vf_set_prop_value(3), +vf_get_prop_value_string(3), +vf_get_prop_name_string(3), +vf_set_prop_name_string(3), +vf_get_prop_name(3), +vf_get_prop_value_object(3), +vf_set_prop_value_object(3), +vf_set_prop_value_string(3), +vf_get_prop_value_base64(3), +vf_set_property_from_file(3), +vf_delete_object(3), +vf_delete_prop(3), +vf_find_prop_qual_index(3), +vf_is_modified(3), +vf_find_charset(3), +vf_date_string_to_time(3), +vf_period_string_to_time(3), +vf_period_time_to_string(3), +vf_set_prop_value_time(3), +vf_get_prop_value_time(3) diff --git a/doc/vf_set_prop_value_object.3 b/doc/vf_set_prop_value_object.3 new file mode 100644 index 0000000..85d96c2 --- /dev/null +++ b/doc/vf_set_prop_value_object.3 @@ -0,0 +1,63 @@ +.\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! +.\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! +.TH "vf_set_prop_value_object" 3 "30 April 2003" "c2man vf_iface.h" +.SH "NAME" +vf_set_prop_value_object \- vf_set_prop_value_object() +.SH "SYNOPSIS" +.ft B +#include <../vformat/vf_iface.h> +.sp +extern bool_t vf_set_prop_value_object +.br +( +.br + VF_PROP_T *p_prop, +.br + VF_OBJECT_T *p_object +.br +); +.ft R +.SH "PARAMETERS" +.TP +.B "VF_PROP_T *p_prop" +Not Documented. +.TP +.B "VF_OBJECT_T *p_object" +Not Documented. +.SH "DESCRIPTION" +Set the value of the indicated property to be a VOBJECT. +.SH "RETURNS" +TRUE <=> set successfully. +.SH "SEE ALSO" +vf_parse_init(3), +vf_parse_text(3), +vf_parse_end(3), +vf_read_file(3), +vf_write_file(3), +vf_get_next_object(3), +vf_create_object(3), +vf_get_object_type(3), +vf_get_property(3), +vf_get_property_ex(3), +vf_get_next_property(3), +vf_get_prop_value(3), +vf_set_prop_value(3), +vf_get_prop_value_string(3), +vf_get_prop_name_string(3), +vf_set_prop_name_string(3), +vf_get_prop_name(3), +vf_get_prop_value_object(3), +vf_set_prop_value_string(3), +vf_set_prop_value_base64(3), +vf_get_prop_value_base64(3), +vf_set_property_from_file(3), +vf_delete_object(3), +vf_delete_prop(3), +vf_find_prop_qual_index(3), +vf_is_modified(3), +vf_find_charset(3), +vf_date_string_to_time(3), +vf_period_string_to_time(3), +vf_period_time_to_string(3), +vf_set_prop_value_time(3), +vf_get_prop_value_time(3) diff --git a/doc/vf_set_prop_value_string.3 b/doc/vf_set_prop_value_string.3 new file mode 100644 index 0000000..47cb2d7 --- /dev/null +++ b/doc/vf_set_prop_value_string.3 @@ -0,0 +1,68 @@ +.\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! +.\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! +.TH "vf_set_prop_value_string" 3 "30 April 2003" "c2man vf_iface.h" +.SH "NAME" +vf_set_prop_value_string \- vf_set_prop_value_string() +.SH "SYNOPSIS" +.ft B +#include <../vformat/vf_iface.h> +.sp +extern bool_t vf_set_prop_value_string +.br +( +.br + VF_PROP_T *p_prop, +.br + uint32_t n_string, +.br + const char *p_string +.br +); +.ft R +.SH "PARAMETERS" +.TP +.B "VF_PROP_T *p_prop" +Property we're setting a value in. +.TP +.B "uint32_t n_string" +Index to string. +.TP +.B "const char *p_string" +Pointer to string. +.SH "DESCRIPTION" +Set the value of a property. +.SH "RETURNS" +TRUE <=> set successfully. +.SH "SEE ALSO" +vf_parse_init(3), +vf_parse_text(3), +vf_parse_end(3), +vf_read_file(3), +vf_write_file(3), +vf_get_next_object(3), +vf_create_object(3), +vf_get_object_type(3), +vf_get_property(3), +vf_get_property_ex(3), +vf_get_next_property(3), +vf_get_prop_value(3), +vf_set_prop_value(3), +vf_get_prop_value_string(3), +vf_get_prop_name_string(3), +vf_set_prop_name_string(3), +vf_get_prop_name(3), +vf_get_prop_value_object(3), +vf_set_prop_value_object(3), +vf_set_prop_value_base64(3), +vf_get_prop_value_base64(3), +vf_set_property_from_file(3), +vf_delete_object(3), +vf_delete_prop(3), +vf_find_prop_qual_index(3), +vf_is_modified(3), +vf_find_charset(3), +vf_date_string_to_time(3), +vf_period_string_to_time(3), +vf_period_time_to_string(3), +vf_set_prop_value_time(3), +vf_get_prop_value_time(3) diff --git a/doc/vf_set_prop_value_time.3 b/doc/vf_set_prop_value_time.3 new file mode 100644 index 0000000..68af0f9 --- /dev/null +++ b/doc/vf_set_prop_value_time.3 @@ -0,0 +1,68 @@ +.\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! +.\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! +.TH "vf_set_prop_value_time" 3 "30 April 2003" "c2man vf_iface.h" +.SH "NAME" +vf_set_prop_value_time \- vf_set_prop_value_time() +.SH "SYNOPSIS" +.ft B +#include <../vformat/vf_iface.h> +.sp +extern bool_t vf_set_prop_value_time +.br +( +.br + VF_PROP_T *p_prop, +.br + uint32_t n_string, +.br + const long int t_value +.br +); +.ft R +.SH "PARAMETERS" +.TP +.B "VF_PROP_T *p_prop" +The property. +.TP +.B "uint32_t n_string" +Which string we're encoding to. +.TP +.B "const long int t_value" +Time value. +.SH "DESCRIPTION" +Set a time_t value into a VF property. +.SH "RETURNS" +TRUE iff property added & set OK. +.SH "SEE ALSO" +vf_parse_init(3), +vf_parse_text(3), +vf_parse_end(3), +vf_read_file(3), +vf_write_file(3), +vf_get_next_object(3), +vf_create_object(3), +vf_get_object_type(3), +vf_get_property(3), +vf_get_property_ex(3), +vf_get_next_property(3), +vf_get_prop_value(3), +vf_set_prop_value(3), +vf_get_prop_value_string(3), +vf_get_prop_name_string(3), +vf_set_prop_name_string(3), +vf_get_prop_name(3), +vf_get_prop_value_object(3), +vf_set_prop_value_object(3), +vf_set_prop_value_string(3), +vf_set_prop_value_base64(3), +vf_get_prop_value_base64(3), +vf_set_property_from_file(3), +vf_delete_object(3), +vf_delete_prop(3), +vf_find_prop_qual_index(3), +vf_is_modified(3), +vf_find_charset(3), +vf_date_string_to_time(3), +vf_period_string_to_time(3), +vf_period_time_to_string(3), +vf_get_prop_value_time(3) diff --git a/doc/vf_set_property_from_file.3 b/doc/vf_set_property_from_file.3 new file mode 100644 index 0000000..fc0d43f --- /dev/null +++ b/doc/vf_set_property_from_file.3 @@ -0,0 +1,68 @@ +.\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! +.\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! +.TH "vf_set_property_from_file" 3 "30 April 2003" "c2man vf_iface.h" +.SH "NAME" +vf_set_property_from_file \- vf_set_property_from_file() +.SH "SYNOPSIS" +.ft B +#include <../vformat/vf_iface.h> +.sp +extern bool_t vf_set_property_from_file +.br +( +.br + VF_PROP_T *p_prop, +.br + vf_encoding_t encoding, +.br + const char *p_filename +.br +); +.ft R +.SH "PARAMETERS" +.TP +.B "VF_PROP_T *p_prop" +The property. +.TP +.B "vf_encoding_t encoding" +Encoding to use. +.TP +.B "const char *p_filename" +Source filename. +.SH "DESCRIPTION" +Loads the indicated file into memory and sets the indicated property. +.SH "RETURNS" +TRUE iff succeded, FALSE else. +.SH "SEE ALSO" +vf_parse_init(3), +vf_parse_text(3), +vf_parse_end(3), +vf_read_file(3), +vf_write_file(3), +vf_get_next_object(3), +vf_create_object(3), +vf_get_object_type(3), +vf_get_property(3), +vf_get_property_ex(3), +vf_get_next_property(3), +vf_get_prop_value(3), +vf_set_prop_value(3), +vf_get_prop_value_string(3), +vf_get_prop_name_string(3), +vf_set_prop_name_string(3), +vf_get_prop_name(3), +vf_get_prop_value_object(3), +vf_set_prop_value_object(3), +vf_set_prop_value_string(3), +vf_set_prop_value_base64(3), +vf_get_prop_value_base64(3), +vf_delete_object(3), +vf_delete_prop(3), +vf_find_prop_qual_index(3), +vf_is_modified(3), +vf_find_charset(3), +vf_date_string_to_time(3), +vf_period_string_to_time(3), +vf_period_time_to_string(3), +vf_set_prop_value_time(3), +vf_get_prop_value_time(3) diff --git a/doc/vf_write_file.3 b/doc/vf_write_file.3 new file mode 100644 index 0000000..ebc0b74 --- /dev/null +++ b/doc/vf_write_file.3 @@ -0,0 +1,70 @@ +.\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! +.\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! +.TH "vf_write_file" 3 "30 April 2003" "c2man vf_iface.h" +.SH "NAME" +vf_write_file \- vf_write_file() +.SH "SYNOPSIS" +.ft B +#include <../vformat/vf_iface.h> +.sp +extern bool_t vf_write_file +.br +( +.br + const char *p_name, +.br + VF_OBJECT_T *p_object, +.br + bool_t write_all +.br +); +.ft R +.SH "PARAMETERS" +.TP +.B "const char *p_name" +Outpt filename. +.TP +.B "VF_OBJECT_T *p_object" +The object to write. +.TP +.B "bool_t write_all" +Should write p_next as well?. +.SH "DESCRIPTION" +Write indicated vobject to file. For lists of objects (eg. Read from +a phonebook) the write_all parameter allows the caller to control if +the library writes the entire list or just the head item. +.SH "RETURNS" +TRUE <=> written OK, FALSE else. +.SH "SEE ALSO" +vf_parse_init(3), +vf_parse_text(3), +vf_parse_end(3), +vf_read_file(3), +vf_get_next_object(3), +vf_create_object(3), +vf_get_object_type(3), +vf_get_property(3), +vf_get_property_ex(3), +vf_get_next_property(3), +vf_get_prop_value(3), +vf_set_prop_value(3), +vf_get_prop_value_string(3), +vf_get_prop_name_string(3), +vf_set_prop_name_string(3), +vf_get_prop_name(3), +vf_get_prop_value_object(3), +vf_set_prop_value_object(3), +vf_set_prop_value_string(3), +vf_set_prop_value_base64(3), +vf_get_prop_value_base64(3), +vf_set_property_from_file(3), +vf_delete_object(3), +vf_delete_prop(3), +vf_find_prop_qual_index(3), +vf_is_modified(3), +vf_find_charset(3), +vf_date_string_to_time(3), +vf_period_string_to_time(3), +vf_period_time_to_string(3), +vf_set_prop_value_time(3), +vf_get_prop_value_time(3) -- 1.7.6.3 debian/patches/0006-Remove-leading-space-when-unfolding.patch0000644000000000000000000000255311726670157021113 0ustar From 792e010c299c4483d0fac836dba8119e6112c165 Mon Sep 17 00:00:00 2001 From: Daniele Forsi Date: Sun, 9 May 2010 19:34:56 +0200 Subject: Remove leading space when unfolding According to RFC 2425 paragraph 5.8.1, the leading whitespace on folded lines must be removed when unfolding happens. Origin: vendor, http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=testcase.c;att=1;bug=539442 Bug-Debian: http://bugs.debian.org/539442 Forwarded: https://sourceforge.net/tracker/?func=detail&aid=3084903&group_id=37192&atid=419516 Last-Update: 2010-12-23 Applied-Upstream: http://vformat.cvs.sourceforge.net/viewvc/vformat/src/vformat/src/vf_parser.c?revision=1.26&view=markup --- src/vf_parser.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vf_parser.c b/src/vf_parser.c index 2c7221c..1197154 100644 --- a/src/vf_parser.c +++ b/src/vf_parser.c @@ -333,9 +333,9 @@ bool_t vf_parse_text( /* Ignore */ } else - if (SPACE == c) + if ((SPACE == c) || (TAB == c)) { - ok = append_to_curr_string(&(p_parse->prop.value.v.s), NULL, &c, 1); + /* Ignore leading white space characters when unfolding */ p_parse->state = _VF_STATE_RFC822VALUE; } -- 1.7.6.3 debian/patches/0007-Cast-NULL-in-void-in-functions-using-va_arg.patch0000644000000000000000000000431511726670157022240 0ustar From a20a232e48b80958b977e3be96f6a859ba61260c Mon Sep 17 00:00:00 2001 From: Thomas Preud'homme Date: Wed, 12 May 2010 18:39:30 +0200 Subject: Cast NULL in void * in functions using va_arg NULL isn't necessary a zero value. For instance, on AMD64 architecture, a null pointer is 0x7fff00000000. Usually things works automagically as the compiler always cast NULL and 0 in void * if stored in a pointer variable. But with functions with variable number of arguments the compiler can't know the type of the arguments and thus don't make the cast. In consequences, NULL and 0 must be cast explicitely in void * if the parameter is a pointer. Origin: vendor Forwarded: https://sourceforge.net/tracker/?func=detail&aid=3084905&group_id=37192&atid=419516 Last-Update: 2010-12-23 Applied-Upstream: http://vformat.cvs.sourceforge.net/viewvc/vformat/build/vformat/vformat.c?revision=1.22&view=markup --- test/vformat.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/vformat.c b/test/vformat.c index b4a753d..40c299e 100644 --- a/test/vformat.c +++ b/test/vformat.c @@ -489,19 +489,19 @@ static void check_extract_fields( } printf(" Looking for {%s, %s}...\n", p_array[0], p_array[1]); - if (vf_get_property(&p_tmp, p_object, VFGP_FIND, NULL, p_array[0], p_array[1], NULL)) + if (vf_get_property(&p_tmp, p_object, VFGP_FIND, NULL, p_array[0], p_array[1], (void *) NULL)) { print_search_results(p_tmp); } printf(" Looking for {%s, %s}...\n", p_array[0], p_array[2]); - if (vf_get_property(&p_tmp, p_object, VFGP_FIND, NULL, p_array[0], p_array[2], NULL)) + if (vf_get_property(&p_tmp, p_object, VFGP_FIND, NULL, p_array[0], p_array[2], (void *) NULL)) { print_search_results(p_tmp); } printf(" Looking for {%s, %s, %s}...\n", p_array[0], p_array[1], p_array[2]); - if (vf_get_property(&p_tmp, p_object, VFGP_FIND, NULL, p_array[0], p_array[1], p_array[2], NULL)) + if (vf_get_property(&p_tmp, p_object, VFGP_FIND, NULL, p_array[0], p_array[1], p_array[2], (void *) NULL)) { print_search_results(p_tmp); } -- 1.7.6.3 debian/patches/0008-Fix-typo-in-manpage-and-source.patch0000644000000000000000000000475411726670157020040 0ustar From 4f9b820244bfb52e58a11871986e7159e636d57e Mon Sep 17 00:00:00 2001 From: Thomas Preud'homme Date: Wed, 11 Aug 2010 10:45:08 +0200 Subject: Fix typo in manpage and source Two function declarations suffer from a mispell: requred instead of required. As a consequences, these typo are also found in the manpages generated by c2man. Origin: vendor Forworded: https://sourceforge.net/tracker/?func=detail&aid=3084926&group_id=37192&atid=419516 Last-Update: 2010-12-23 Applied-Upstream: http://vformat.cvs.sourceforge.net/viewvc/vformat/src/vformat/vf_iface.h?revision=1.41&view=markup --- doc/vf_get_prop_name_string.3 | 2 +- doc/vf_get_prop_value_string.3 | 2 +- vformat/vf_iface.h | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/vf_get_prop_name_string.3 b/doc/vf_get_prop_name_string.3 index 7d1cfee..aa3bf3b 100644 --- a/doc/vf_get_prop_name_string.3 +++ b/doc/vf_get_prop_name_string.3 @@ -23,7 +23,7 @@ extern char *vf_get_prop_name_string Property to locate string from. .TP .B "uint32_t n_string" -Index to string requred. +Index to string required. .SH "DESCRIPTION" Get n'th name string. For example a property may be defined as: diff --git a/doc/vf_get_prop_value_string.3 b/doc/vf_get_prop_value_string.3 index 4fc9a81..afc6f66 100644 --- a/doc/vf_get_prop_value_string.3 +++ b/doc/vf_get_prop_value_string.3 @@ -23,7 +23,7 @@ extern char *vf_get_prop_value_string Property to locate string from. .TP .B "uint32_t n_string" -Index to string requred. +Index to string required. .SH "DESCRIPTION" Obtain string pointer value from VF_PROP_T. For example a property may be defined as: diff --git a/vformat/vf_iface.h b/vformat/vf_iface.h index ab5e8d9..12c5f22 100644 --- a/vformat/vf_iface.h +++ b/vformat/vf_iface.h @@ -906,7 +906,7 @@ extern VFORMATDECLSPEC bool_t vf_set_prop_value( extern VFORMATDECLSPEC char *vf_get_prop_value_string( VF_PROP_T *p_prop, /* Property to locate string from */ - uint32_t n_string /* Index to string requred */ + uint32_t n_string /* Index to string required */ ); @@ -931,7 +931,7 @@ extern VFORMATDECLSPEC char *vf_get_prop_value_string( extern VFORMATDECLSPEC char *vf_get_prop_name_string( VF_PROP_T *p_prop, /* Property to locate string from */ - uint32_t n_string /* Index to string requred */ + uint32_t n_string /* Index to string required */ ); -- 1.7.6.3 debian/patches/0009-Fix-errors-returned-by-Werror-format-security.patch0000644000000000000000000000205011726670157023144 0ustar From 7351ad6cb7afaa8ffaab60f44d696fe81b6a3471 Mon Sep 17 00:00:00 2001 From: Thomas Preud'homme Date: Tue, 27 Sep 2011 16:54:46 +0200 Subject: Fix errors returned by -Werror=format-security Option -Werror=format-security of gcc returns several error with regards to szEndOfLine. Using "\r\n" instead of the ascii codes 0x0D, 0x0A and 0x00 avoid the error. Origin: vendor Bug-Debian: http://bugs.debian.org/643434 Forwarded: no Last-Updated: 2011-09-27 --- src/vf_writer.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/vf_writer.c b/src/vf_writer.c index 29b83b5..3d5ad16 100644 --- a/src/vf_writer.c +++ b/src/vf_writer.c @@ -144,7 +144,7 @@ static bool_t write_vobject_to_file( Private Data *============================================================================*/ -static const char szEndOfLine[3] = { 0x0D, 0x0A, 0x00 }; +static const char szEndOfLine[] = "\r\n"; /*============================================================================* Public Function Implementations -- 1.7.6.3 debian/patches/series0000644000000000000000000000060311726670157012045 0ustar 0001-Copy-common-types.h-to-vformat-vf_iface.h.patch 0002-Ease-distribution-of-libvformat.patch 0003-Add-sample-files.patch 0004-Provide-info-documentation.patch 0005-Add-manpages.patch 0006-Remove-leading-space-when-unfolding.patch 0007-Cast-NULL-in-void-in-functions-using-va_arg.patch 0008-Fix-typo-in-manpage-and-source.patch 0009-Fix-errors-returned-by-Werror-format-security.patch debian/rules0000755000000000000000000000070411726670157010263 0ustar #!/usr/bin/make -f # Sample debian/rules that uses debhelper. # GNU copyright 1997 to 1999 by Joey Hess. export CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS) export CFLAGS:=$(shell dpkg-buildflags --get CFLAGS) export LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS) %: dh $@ --with autotools_dev,autoreconf clean: rm -f build dh clean --with autoreconf build: dh build --with autoreconf touch build # Suggested by policy 3.8.4 section 4.9 debian/source/0000755000000000000000000000000011726670157010502 5ustar debian/source/format0000644000000000000000000000001411726670157011710 0ustar 3.0 (quilt) debian/watch0000644000000000000000000000007111726670157010231 0ustar version=3 http://sf.net/vformat/libvformat-(.*)\.tar\.gz