aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--e-util/ChangeLog5
-rw-r--r--e-util/e-xml-utils.c92
-rw-r--r--e-util/e-xml-utils.h5
3 files changed, 8 insertions, 94 deletions
diff --git a/e-util/ChangeLog b/e-util/ChangeLog
index c8250bfab4..158ce2e383 100644
--- a/e-util/ChangeLog
+++ b/e-util/ChangeLog
@@ -28,6 +28,11 @@
the uses of fsync() in evo are pretty irrelevant. Just #define
fsync() away on Win32.
+ * e-xml-utils.c (e_xml_get_child_by_name, e_xml_save_file): Remove
+ these functions that are now in libedataserver/e-xml-utils.c
+
+ * e-xml-utils.h: Include libedataserver/e-xml-utils.h.
+
2005-12-12 Irene Huang <Irene.Huang@sun.com>
reviewed by: Veerapuram Varadhan <vvaradhan@novell.com>
diff --git a/e-util/e-xml-utils.c b/e-util/e-xml-utils.c
index 5ac741a278..f761225d8b 100644
--- a/e-util/e-xml-utils.c
+++ b/e-util/e-xml-utils.c
@@ -44,22 +44,6 @@
#include "e-util.h"
#include "e-xml-utils.h"
-xmlNode *
-e_xml_get_child_by_name (const xmlNode *parent, const xmlChar *child_name)
-{
- xmlNode *child;
-
- g_return_val_if_fail (parent != NULL, NULL);
- g_return_val_if_fail (child_name != NULL, NULL);
-
- for (child = parent->xmlChildrenNode; child != NULL; child = child->next) {
- if (xmlStrcmp (child->name, child_name) == 0) {
- return child;
- }
- }
- return NULL;
-}
-
/* Returns the first child with the name child_name and the "lang"
* attribute that matches the current LC_MESSAGES, or else, the first
* child with the name child_name and no "lang" attribute.
@@ -448,79 +432,3 @@ e_xml_get_translated_string_prop_by_name (const xmlNode *parent, const xmlChar *
return ret_val;
}
-
-int
-e_xml_save_file (const char *filename, xmlDocPtr doc)
-{
- char *filesave, *xmlbuf;
- size_t n, written = 0;
- int ret, fd, size;
- int errnosave;
- ssize_t w;
-
- {
- gchar *dirname = g_path_get_dirname (filename);
- gchar *basename = g_path_get_basename (filename);
- gchar *savebasename = g_strconcat (".#", basename, NULL);
-
- g_free (basename);
- filesave = g_build_filename (dirname, savebasename, NULL);
- g_free (savebasename);
- g_free (dirname);
- }
-
- fd = g_open (filesave, O_WRONLY | O_CREAT | O_TRUNC, 0600);
- if (fd == -1) {
- g_free (filesave);
- return -1;
- }
-
- xmlDocDumpFormatMemory (doc, (xmlChar **) &xmlbuf, &size, TRUE);
- if (size <= 0) {
- close (fd);
- g_unlink (filesave);
- g_free (filesave);
- errno = ENOMEM;
- return -1;
- }
-
- n = (size_t) size;
- do {
- do {
- w = write (fd, xmlbuf + written, n - written);
- } while (w == -1 && errno == EINTR);
-
- if (w > 0)
- written += w;
- } while (w != -1 && written < n);
-
- xmlFree (xmlbuf);
-
- if (written < n || fsync (fd) == -1) {
- errnosave = errno;
- close (fd);
- g_unlink (filesave);
- g_free (filesave);
- errno = errnosave;
- return -1;
- }
-
- while ((ret = close (fd)) == -1 && errno == EINTR)
- ;
-
- if (ret == -1) {
- g_free (filesave);
- return -1;
- }
-
- if (g_rename (filesave, filename) == -1) {
- errnosave = errno;
- g_unlink (filesave);
- g_free (filesave);
- errno = errnosave;
- return -1;
- }
- g_free (filesave);
-
- return 0;
-}
diff --git a/e-util/e-xml-utils.h b/e-util/e-xml-utils.h
index 6c39ee6f79..501a643fea 100644
--- a/e-util/e-xml-utils.h
+++ b/e-util/e-xml-utils.h
@@ -25,12 +25,13 @@
#define __E_XML_UTILS__
#include <glib.h>
+
#include <libxml/tree.h>
+#include <libedataserver/e-xml-utils.h>
+
G_BEGIN_DECLS
-xmlNode *e_xml_get_child_by_name (const xmlNode *parent,
- const xmlChar *child_name);
/* lang set to NULL means use the current locale. */
xmlNode *e_xml_get_child_by_name_by_lang (const xmlNode *parent,
const xmlChar *child_name,
onware blocking decomissioning imlibbapt2014-12-251-1/+0 * Remove abandonware blocking decomissioning imlibbapt2014-12-251-1/+0 * Add japanese/font-ipamjm, Japanese TrueType fonts distributed byhrs2014-11-231-0/+1 * - Repocopy japanese/rubygem-jpmobile to japanese/rubygem-jpmobile4tota2014-09-281-0/+1 * Add new port japanese/latex-jlistingmarino2014-09-201-0/+1 * Remove expired portsrene2014-09-201-1/+0 * Remove four unrelated staged portsmarino2014-09-101-1/+0 * Remove unstaged japanese/prime and 3 of its dependencies (2 unstaged)marino2014-09-071-4/+0 * Remove unstaged tcl/tk 8.0 and two affected staged portsmarino2014-09-071-4/+0 * Connect ng-canna to the buildbapt2014-09-021-0/+1 * Remove non staged ports without pending PR from j*bapt2014-09-021-12/+0 * Remove ports related to Adobe Reader.hrs2014-08-301-2/+0 * Finish some removalsantoine2014-07-231-1/+0 * Remove japanese/teTeXbapt2014-07-231-1/+0 * Remove some teTeX bitsbapt2014-07-231-2/+0 * Decomission a couple of japanese teTeX portsbapt2014-07-231-4/+0 * Replace japaneses/xdvik with texlive version directlybapt2014-07-231-1/+0 * Removed unmaintained upstream xemacs ports and dependenciesbapt2014-07-011-2/+0 * Add migemo.el, Japanese incremental search tool for Emacs.nobutaka2014-06-281-0/+1 * - Remove editors/emacs21, and editors/emacs22 as they're no longer maintainedashish2014-06-271-4/+0 * add a new port japanese/font-ricty-discorddaichi2014-06-271-0/+1 * Remove localized bugzilla ports for which the master port expired:rene2014-06-211-2/+0 * Removed some expired ports:garga2014-05-161-1/+0 * Remove expired ports:rene2014-04-181-1/+0 * Remove expired ports:rene2014-04-111-2/+0 * perl 5.0 is gone long ago, port is unmaintained and messybapt2014-04-081-1/+0 * Remove expired ports:rene2014-04-021-3/+0 * Move {mail,japanese}/p5-Mail-SpamAssassin to &/spamassassin, in the name ofadamw2014-03-121-1/+1 * Remove expired ports:rene2014-03-101-4/+0 * Remove expired ports:rene2014-02-281-1/+0 * Remove expired ports:rene2014-02-261-1/+0 * Koruri Japanese TrueType fonts.swills2014-02-131-0/+1 * japanese/grep: remove, no longer usefulbapt2014-02-061-1/+0 * Remove expired ports:rene2013-11-181-1/+0 * 2013-10-21 devel/rubygem-ruby-debug-base: Does not work with Ruby 1.9tabthorpe2013-10-221-1/+0 * - update to latest release [1]ohauer2013-10-181-1/+1 * 2013-10-10 audio/ruby-vorbisfile: Does not work with Ruby 1.9tabthorpe2013-10-111-4/+0 * Remove xchat1, upstream support has been abandonned for a while and it is pro...bapt2013-09-161-1/+0 * Remove unmaintained japanese/texfamily{,-vfn2a} and japanese/dvi2dvi.hrs2013-09-061-3/+0 * - remove expired bugzilla3 portsohauer2013-08-301-1/+0 * KDE3 and QT3 expired on 2013-07-01, remove these ports.rene2013-07-271-1/+0 * - connect japanese/bugzilla44ohauer2013-06-211-0/+1 * - Rename japanese/jisx0213-fonts with japanese/font-jisx0213.hrs2013-05-081-1/+1 * TeXLive mega commit. The following ports have been added:hrs2013-05-061-0/+1 * - Trim old-style header.hrs2013-05-031-2/+0 * Google droped SCIM support from Mozc.daichi2013-03-091-1/+0 * - remove german, french and japanese localization of www/MT. They wererm2013-02-241-1/+0 * japanese/vflib||2013-02-06|Has expired: No more public distfilesbapt2013-02-061-1/+0 * 2012-11-26 emulators/gcube: No more public distfilesbapt2012-11-281-1/+0 * 2012-11-27 devel/p5-SPOPS: Depend on the expired p5-Class-Fieldsbapt2012-11-281-1/+0 * 2012-11-27 graphics/morpheus: Depends on the expired gtkglareabapt2012-11-281-2/+0 * 2012-10-20 lang/ironpython: No more public distfilesbapt2012-10-261-4/+0 * Gjiten is a Japanese dictionary program for GNOME.culot2012-09-161-0/+1 * - disconnect japanese/postgresqlXX-man from the buildrm2012-09-151-4/+0 * - Remove net/asterisk16, net/asterisk16-addons, japanese/asterisk16-soundsflo2012-08-221-1/+0 * Re-inrtoduce GNOME SUICA Viewer.ume2012-08-131-0/+1 * fcitx-anthy provides Anthy, the most popular Japanese input methodscheidell2012-07-271-0/+1 * - Copy japanese/bugzilla to japanese/bugzilla42 according totota2012-07-261-0/+1 * - Update Calligra to 2.4.3.avilla2012-07-051-0/+1 * - Remove koffice-i18n ports, as they are not very useful withoutavilla2012-05-311-1/+0 * The KDE/FreeBSD team is pleased to announce Calligra Suite 2.4.2, KDEavilla2012-05-311-1/+0 * Add fcitx-mozc , mozc engine for Fcitx.daichi2012-05-221-0/+1 * - Add a new port: japanese/font-rictytota2012-05-021-0/+1 * - upgrade to 3.5.2bapt2012-04-231-0/+1 * databases/pgtcl contains pgtclng, but MOVED entry doesn't mention this becausecrees2012-03-221-1/+0 * ajaxzip2 (Japanese ZIP code utility) ZIP data.kuriyama2012-03-041-0/+1 * ajaxzip2 (Japanese ZIP code utility) core scripts.kuriyama2012-03-041-0/+1 * - fix sort order in few category Makefilesrm2012-02-231-1/+1 * - Add a new port: japanese/myrurematota2012-02-201-0/+1 * Add port japanese/libskk: A library to deal with Japanese kana-to-kanji conve...scheidell2012-02-031-0/+1 * Remove expired unmaintained ports:rene2012-01-011-1/+0 * japanese/ruby-refe||2011-12-21|Has been broken for 11 monthspgollucci2011-12-221-1/+0 * Remove expired port.crees2011-11-281-1/+0 * Remove expired portscrees2011-11-281-3/+0 * - Reconnect plain2, it was resurrectedpav2011-11-181-0/+1 * - Reconnect dvi2tty, it was resurrectedpav2011-11-181-0/+1 * Remove ports@ ports that have been DEPRECATED for at least 1 monthdougb2011-11-021-2/+0 * The KDE/FreeBSD team is pleased to announce KDE Software Compilationavilla2011-10-171-0/+1 * - Add a new port: japanese/wordpresstota2011-10-161-0/+1 * As previously advertised, complete removal of vulnerable ports thatdougb2011-10-151-2/+0 * As previously advertised, remove ports that previously had beendougb2011-09-301-1/+0 * 2011-09-01 korean/hlatexfonts-ocf: No more public distfilesbapt2011-09-071-1/+0 * Add cmigemo-dict, Dictionary for C/Migemo Japanese incremental search tool.nobutaka2011-08-231-0/+1 * Add cmigemo, C implementation of Migemo Japanese incremental search tool.nobutaka2011-08-231-0/+1 * - Use deskutils/ical instead of this port [1]tota2011-08-151-1/+0 * Removing old ruby stuffbapt2011-08-031-1/+0 * Remove some expired portsbapt2011-08-021-1/+0 * Bye bye abandonwares (part 3)bapt2011-08-011-22/+0 * Add japanese/font-migu, another Japanese font set based on MigMix.hrs2011-07-181-0/+1 * 2011-07-01 math/femlab: No more distfile, looks like abandonwaremiwi2011-07-021-1/+0 * Add japanese/mozc-el port.maho2011-06-281-0/+1 * - Update to 3.6.5tota2011-06-111-0/+1 * Remove expired ports:rene2011-06-021-1/+0 * - Add a new port: japanese/jacode.pltota2011-05-301-0/+1 * Remove unmaintained expired nvi related portsbapt2011-05-021-3/+0 * Removed ports that depends on iiimf expired ports + they are abandonwarebapt2011-05-021-2/+0 * Remove most expired ports:rene2011-04-191-2/+0 * - Connect japanese/asterisk14-sounds to the buildtota2011-04-091-0/+1 * Tegaki:miwi2011-02-051-0/+1 * Tegaki Main program:miwi2011-02-051-0/+1 * Tegaki GTK Fontend:miwi2011-02-051-0/+1 * Tegaki Pythonlib:miwi2011-02-051-0/+1 * Zinnia is a simple, customizable and portable online hand recognition systemmiwi2011-02-051-0/+1 * Zinnia is a simple, customizable and portable online hand recognition systemmiwi2011-02-051-0/+1 * Zinnia is a simple, customizable and portable online hand recognition systemmiwi2011-02-051-0/+1 * Remove expired ports:rene2011-02-051-1/+0 * Add font-motoya-al for two free Japanese TrueType fonts by MOTOYA Co.,Ltd.,hrs2011-01-151-0/+1 * Garbage collect expired port:rene2010-12-161-1/+0 * - Update to 1.6.0.nobutaka2010-11-271-2/+0 * - Unbreak INDEXgarga2010-10-181-1/+0 * japanese/p5-jcode.pl is a duplicate port of japanese/jcode.plpgollucci2010-10-101-1/+0 * - Add a new port: japanese/rubygem-jpmobile-terminfotota2010-09-191-0/+1 * - Add a new port: japanese/rubygem-jpmobile-ipaddressestota2010-09-191-0/+1 * - Remove japanese/tdiary-devel, doesn't make sense to keep -devel porttota2010-09-121-1/+0 * audio/audacious-crossfade||2010-09-08|Broken for 6+ months, unmaintainedpgollucci2010-09-081-1/+0 * Add japanese/font-migmix, a Japanese TrueType fontset which consists ofhrs2010-08-011-0/+1 * - Add a new port japanese/asterisk16-soundstota2010-07-281-0/+1 * Add a new port scim-mozc:daichi2010-06-261-0/+1 * Add a new port: mozc-tooldaichi2010-06-261-0/+1 * Add a new port: mozc-serverdaichi2010-06-261-0/+1 * Add a new port: mozc-additionsdaichi2010-06-261-0/+1 * Connect gimp-help portsmakc2010-06-151-0/+1 * Add new port japanese/ibus-mozcdaichi2010-05-231-0/+1 * Encode::JP::Emoji - Emoji encodings and cross-mapping tables in pure Perl.kuriyama2010-05-191-0/+1 * - Fix name typo: japanese/asterisk-sound to japanese/asterisk-soundstota2010-03-261-1/+1 * Add japanese/font-ipaex, new font series based on IPA fonts which containhrs2010-03-021-0/+1 * - Remove stardict2-dict-jawen2010-02-251-1/+0 * - Connect and update stardict-dict-jawen2010-02-251-0/+1 * New port -- GNOME Edy Viewerume2010-02-221-0/+1 * New port -- GNOME SUICA Viewerume2010-02-221-0/+1 * Add japanese/font-takao:hrs2010-02-201-0/+1 * Add ja-roundcube 0.3.1-ja, is a local patch for roundcube 0.3.1.nork2010-02-141-0/+1 * Add migemo-emacs23, a slave port of japanese/migemo for emacs23.nobutaka2010-01-281-0/+1 * - remove broken/expired ports@ portspgollucci2010-01-181-1/+0 * SKK engine for IBus.wen2010-01-051-0/+1 * The KDE FreeBSD team is proud to announce the release of KOffice2 suite for F...fluffy2009-12-221-0/+1 * New port: japanese/font-mona-ipa, a combined TrueType font ofhrs2009-11-301-0/+1 * Add japanese Slaveport of MovableTypearved2009-10-061-0/+1 * - Add new port japanese/tdiary-devel at 2.3.3tota2009-09-121-0/+1 * 2009-07-07 audio/gai-album: abandoned project, does not buildmiwi2009-07-071-1/+0 * - Update to 11.0.140395tabthorpe2009-06-141-0/+1 * Remove japanese/slirc. The port has been BROKEN of over 4 monthserwin2009-06-131-1/+0 * Convert Japanese characters.kuriyama2009-06-071-0/+1 * Add japanese/font-ipa-uigothic, a Japanese font "IPAUIGothic"hrs2009-06-031-0/+1 * OCR engine for Japanese languageamdmi32009-06-011-0/+1 * japanese/font-std, chinese/font-std, and dependency fixups duehrs2009-05-311-0/+1 * Ports for Japanese fonts have been reorganized in the following way:hrs2009-05-311-7/+8 * jd - a 2ch browserbeat2009-05-231-0/+1 * HTML::MobileJp is html tag generator for Japanese mobile phone.miwi2009-05-011-0/+1 * Add new port japanese/ibus-anthy,daichi2009-04-301-0/+1 * Japanese Mobile Phone Carrier doesn't feed any informationmiwi2009-04-271-0/+1 * Add acroread9, Adobe Reader 9.1.0. For changes since Adobe Readerhrs2009-03-291-0/+1 * 2009-02-21 japanese/ruby-tk: uses old Tk, not required with newver versionsstas2009-03-091-1/+0 * Add p5-Encode-JP-Mobile 0.25, perl extension for encoding for mobilekuriyama2009-01-231-0/+1 * icanna is a connector program between yc.el and Canna serveramdmi32009-01-131-0/+1 * Add ja-awffull port, which is supported for Japanese search words (EUC-JP/Shi...nork2008-12-311-0/+1 * - remove japenese/msdosfs: only for 5.x [1]pgollucci2008-12-281-1/+0 * 2008-09-19 japanese/escpf: Has been broken for more than 6 monthsmiwi2008-12-081-1/+0 * Remove japanese/magicpoint and merge Japanese character supporthrs2008-11-081-1/+0 * - Simplify japanese/jvim3-* variants into a single japanese/jvim3.hrs2008-10-281-8/+0 * Remove japanese/jvim and japanese/jvim-* variants because theyhrs2008-10-271-8/+0 * - Simplify japanese/onew-* variants into a single japanese/onew.hrs2008-10-271-7/+1 * - Simplify japanese/kinput2-* variants into a single japanese/kinput2.hrs2008-10-271-15/+1 * - Separate the server part and the library part from japanese/Canna, andhrs2008-10-271-1/+2 * - Separate the server part and the library part from japanese/sj3, andhrs2008-10-271-1/+2 * Remove japanese/xjman and japanese/xjman-3. These are no longerhrs2008-10-051-2/+0 * Remove ports of Adobe Reader 7 and the localized versions because ofhrs2008-09-061-1/+0 * * print/ghostscript-* and related ports have been renamed in thehrs2008-09-061-1/+0 * - Update to 1.8.0 and support emacs22pav2008-08-251-0/+1 * Remove japanese/lyx and japanese/lyx-doc because these are nohrs2008-08-191-2/+0 * The KDE FreeBSD team is proud to announce the release of KDE 4.1.0miwi2008-08-101-0/+1 * Remove japanese/kterm16c because japanese/kterm now supports thehrs2008-07-241-1/+0 * Remove japanese/samba and suggest samba3 instead, after iterwin2008-07-221-1/+0 * - Resurrect japanese/lynxpav2008-06-191-0/+1 * - Delete expired port japanese/vje30: depends on forbidden port misc/compat3xpav2008-06-191-1/+0 * - Delete expired japanese/lynx port: Leaves behind config file on deinstallpav2008-06-191-1/+0 * Remove japanese/motoya-ttfonts. The EULA is too restrictive forhrs2008-05-311-1/+0 * [MAINTAINER] japanese/latex-japanese: change portname to platex-japaneseedwin2008-05-261-1/+1 * Remove japanese/kochi-cidfonts. This CID-keyed font is suspectedhrs2008-05-251-1/+0 * Add Ume Font, another free Japanese TrueType font based onhrs2008-05-251-0/+1 * Remove japanese/truetypefonts. This TrueType font is suspectedhrs2008-05-251-1/+0 * Add port japanese/p5-Lingua-JA-Kana:sat2008-05-161-0/+1 * Remove japanese/epson-ttfonts. The EULA is too restrictive forhrs2008-05-131-1/+0 * The original babel package for LaTeX does not have an option Japanese.miwi2008-03-151-0/+1 * This plugin provides many convenient functionsmiwi2008-02-171-0/+1 * This is a python bindings for MeCab.clsung2008-01-241-0/+1 * Add Adobe Reader 8.1.1 and localized versions (total 15hrs2008-01-051-0/+1 * The free Adobe Flex 2 SDK includes the technologies developers need tokuriyama2007-12-151-0/+1 * This module implements a DateTime::Format modulemiwi2007-12-121-0/+1 * Remove expired Emacs ports and the surrounding expired ports:vd2007-10-141-15/+0 * Remove expired leaf port:vd2007-10-111-1/+0 * 2007-08-22 java/jdk11-doc: Obsolete version of jdkmiwi2007-09-191-1/+0 * New port: japanese/p5-Mail-SpamAssassinedwin2007-09-071-0/+1 * New port: japanese/ochushaedwin2007-09-071-0/+1 * As promised, remove net-im/gaim, and all dependent ports. Gaim has beenmarcus2007-09-071-1/+0 * [new port] japanese/asterisk-sounds-jp Japanese sound files for Asteriskedwin2007-09-071-0/+1 * 2007-08-19 mail/mew3-emacs20: emacs20 and related ports are obsolete; please ...miwi2007-08-191-9/+0 * 2007-08-19 www/emacs-w3m-emacs20: emacs20 and related ports are obsolete; ple...miwi2007-08-191-1/+0 * - Add japanese/lookup-emacs21 as a slave to japanese/lookupsem2007-08-091-0/+1 * Add migemo-emacs22, Japanese incremental search tool for emacs.nobutaka2007-08-041-0/+1 * Add ja-postgresql81-man 8.1.5 and ja-postgresql82-man 8.2.4,nork2007-07-161-0/+2 * Exuberant Ctags with Japanese language support.miwi2007-06-101-0/+1 * Japan traditionally used an "era" system since 645. In modern daysmiwi2007-06-041-0/+1 * Remove japanese/addttfont and japanese/p5-mkres. These ports have beenhrs2007-06-031-2/+0 * Lingua::JA::Summarize::Extract is a summary generator formiwi2007-04-161-0/+1 * 2007-03-27 emulators/kmamerun: Project was abandoned 4 years ago and expects ...miwi2007-04-111-2/+0 * New port -- uim-tomoe-gtk is an UIM helper program for Tomoe.ume2007-04-091-0/+1 * Remove dvipdfm temporarily to unbreak the INDEX build.hrs2007-04-081-1/+0 * Migrate japanese/ptex{,-base,-tetex} to japanese/ptex; the old versionhrs2007-04-081-2/+0 * - Remove expired, long time broken portspav2007-03-291-3/+0 * Remove expired ports:gabor2007-03-101-2/+0 * Mr. Lou Ohshiba is a Japanese comedian.gabor2007-02-181-0/+1 * Add qt4, a multiplatform C++ application frameworklofi2007-02-061-0/+1 * Add port japanese/japana:sat2007-02-04