Hello community,
here is the log from the commit of package rarian
checked in at Thu Sep 20 14:29:02 CEST 2007.
--------
--- GNOME/rarian/rarian.changes 2007-09-14 03:13:56.000000000 +0200
+++ /mounts/work_src_done/STABLE/rarian/rarian.changes 2007-09-19 15:08:06.000000000 +0200
@@ -1,0 +2,14 @@
+Wed Sep 19 15:03:59 CEST 2007 - sbrabec@suse.cz
+
+- Updated to version 0.6.0:
+ * Only export required symbols
+ * Fix build on OSX and Solaris
+ * Various crash fixes in .document files
+ * Make sk-config return decent results when OMF reading is
+ enabled
+ * Fix silly spelling errors
+ * Fix copyright headers
+ * Fallback languages now work correctly
+ * Fix potential off-by-one issue in sk-preinstall
+
+-------------------------------------------------------------------
Old:
----
rarian-0.5.6-identifier-basename-crash.patch
rarian-0.5.8.tar.bz2
New:
----
rarian-0.6.0.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rarian.spec ++++++
--- /var/tmp/diff_new_pack.hY5023/_old 2007-09-20 14:28:41.000000000 +0200
+++ /var/tmp/diff_new_pack.hY5023/_new 2007-09-20 14:28:41.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package rarian (Version 0.5.8)
+# spec file for package rarian (Version 0.6.0)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -13,11 +13,10 @@
Name: rarian
BuildRequires: docbook_4 gcc-c++ intltool libxslt-devel perl-XML-Parser pkg-config sgml-skel
Summary: Rarian is designed to be a replacement for scrollkeeper.
-Version: 0.5.8
-Release: 3
-Source0: rarian-%{version}.tar.bz2
+Version: 0.6.0
+Release: 1
+Source0: %{name}-%{version}.tar.bz2
Patch1: rarian-0.5.6-reg-parse-bugs.patch
-Patch2: rarian-0.5.6-identifier-basename-crash.patch
Patch3: rarian-0.5.6-docs-from-desktop-entries-and-bundles.patch
License: GPL v2 or later, LGPL v2 or later
Group: Development/Libraries/C and C++
@@ -63,7 +62,6 @@
%setup -q
#%setup -q -a 1
%patch1 -p1
-%patch2 -p1
%patch3 -p1
%build
@@ -96,8 +94,18 @@
%{_libdir}/lib*.*a
%{_libdir}/lib*.so
%{_libdir}/pkgconfig/*.pc
-
%changelog
+* Wed Sep 19 2007 - sbrabec@suse.cz
+- Updated to version 0.6.0:
+ * Only export required symbols
+ * Fix build on OSX and Solaris
+ * Various crash fixes in .document files
+ * Make sk-config return decent results when OMF reading is
+ enabled
+ * Fix silly spelling errors
+ * Fix copyright headers
+ * Fallback languages now work correctly
+ * Fix potential off-by-one issue in sk-preinstall
* Fri Sep 14 2007 - hpj@suse.de
- Add --disable-scrollkeeper-compat flag, so we don't get binaries
that conflict with scrollkeeper's.
++++++ rarian-0.5.6-reg-parse-bugs.patch ++++++
--- /var/tmp/diff_new_pack.hY5023/_old 2007-09-20 14:28:41.000000000 +0200
+++ /var/tmp/diff_new_pack.hY5023/_new 2007-09-20 14:28:41.000000000 +0200
@@ -1,7 +1,6 @@
-diff -upr rarian-0.5.6-pre/librarian/rarian-reg-utils.c rarian-0.5.6-post/librarian/rarian-reg-utils.c
---- rarian-0.5.6-pre/librarian/rarian-reg-utils.c 2007-07-31 12:16:06.000000000 -0500
-+++ rarian-0.5.6-post/librarian/rarian-reg-utils.c 2007-09-09 21:35:30.000000000 -0500
-@@ -89,6 +89,10 @@ rrn_reg_parse_file (char *filename)
+--- rarian-0.6.0/librarian/rarian-reg-utils.c
++++ rarian-0.6.0/librarian/rarian-reg-utils.c
+@@ -89,6 +89,10 @@
}
file = fopen (filename, "r");
@@ -12,7 +11,24 @@
buf = malloc (sizeof (char) * 1024);
while (fgets (buf, 1023, file)) {
-@@ -97,13 +101,18 @@ rrn_reg_parse_file (char *filename)
+@@ -157,6 +161,8 @@
+ }
+ }
+ free (buf);
++ fclose (file);
++
+ if (sect) {
+ if (rrn_reg_add_sect (reg, sect) == 1) {
+ sect->prev = NULL;
+@@ -229,6 +235,7 @@
+ free (tmp);
+ free (tmp2);
+ }
++
+ return reg;
+ }
+
+@@ -607,13 +614,18 @@
char *tmp;
char *result = NULL;
tmp = strdup (buf);
@@ -34,20 +50,3 @@
}
real = buf;
while (*real && isspace(*real) && *real != '\n') {
-@@ -152,6 +161,8 @@ rrn_reg_parse_file (char *filename)
- }
- }
- free (buf);
-+ fclose (file);
-+
- if (sect) {
- if (rrn_reg_add_sect (reg, sect) == 1) {
- sect->prev = NULL;
-@@ -224,6 +235,7 @@ rrn_reg_parse_file (char *filename)
- free (tmp);
- free (tmp2);
- }
-+
- return reg;
- }
-
++++++ rarian-0.5.8.tar.bz2 -> rarian-0.6.0.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/rarian-0.5.8/ChangeLog new/rarian-0.6.0/ChangeLog
--- old/rarian-0.5.8/ChangeLog 2007-08-13 22:37:34.000000000 +0200
+++ new/rarian-0.6.0/ChangeLog 2007-09-12 20:01:59.000000000 +0200
@@ -1,3 +1,77 @@
+== 0.6.0 ==
+
+2007-09-12 Don Scorgie
+
+ * configure.ac:
+ * NEWS:
+ Version 0.6.0
+
+2007-09-11 Don Scorgie
+
+ * librarian/Makefile.am:
+ * librarian/rarian-reg-utils.c:
+ * librarian/rarian-reg-full.c:
+ * librarian/rarian-omf.cpp:
+ * librarian/rarian-man.c:
+ * librarian/rarian-language.c:
+ * librarian/rarian-info.c:
+ * librarian/rarian-main.c:
+ Only export required symbols
+ (bug #12147 and bug #11969 -
+ based on patch by Daniel Macks)
+
+ * util/rarian-sk-get-cl.cpp:
+ #include to fix build on OSX
+ (bug #12359)
+
+ * librarian/rarian-reg-utils.c:
+ * librarian/rarian-reg-full.c:
+ Fix crash when identifier is NULL
+ Fix negative indexes into rrn_strndup
+ (bug #12226 - Hans Petter Jansson)
+
+ * util/rarian-sk-config.in:
+ When OMF reading is enabled, return sensible results for
+ OMF dir in config
+ (bug #12212)
+
+ * librarian/rarian-reg-utils.c:
+ Fix crash on EOF in .document files
+ (bug #12131 - Hans Petter Jansson)
+
+ * rarian.pc.in:
+ Fix building on Solaris due to missing carriage return
+ (bug #12043)
+
+ * README:
+ * data/beanstalk.document:
+ * data/beanstalk-climbing.section:
+ * docs/license.xhtml:
+ * docs/rar-skcompat.xhtml:
+ * docs/rar-mdf.xhtml:
+ * docs/rar-lib.xhtml:
+ s/you're/your/ in relevant places
+ (bug #12008)
+
+ * librarian/rarian-omf.h:
+ * librarian/rarian-omf.cpp:
+ * librarian/rarian-utils.c:
+ * librarian/rarian-utils.h:
+ * librarian/rarian-language.c:
+ * librarian/rarian-language.c:
+ Fix copyright headers
+
+ * librarian/rarian-language.c:
+ Add language fallbacks (LANGUAGE to LC_ALL to LANG to C)
+ Explode languages to get correct fallbacks
+ (GNOME bug #474556)
+
+2007-08-23 Don Scorgie
+
+ * util/rarian-sk-preinstall.cpp:
+ Fix off-by-one error in preinstall
+ (fixes bug #12052 - Ghee Teo)
+
2007-08-13 Don Scorgie
* configure.ac:
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/rarian-0.5.8/configure new/rarian-0.6.0/configure
--- old/rarian-0.5.8/configure 2007-08-13 22:38:20.000000000 +0200
+++ new/rarian-0.6.0/configure 2007-09-12 20:03:27.000000000 +0200
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.60 for rarian 0.5.8.
+# Generated by GNU Autoconf 2.60 for rarian 0.6.0.
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
@@ -711,8 +711,8 @@
# Identity of this package.
PACKAGE_NAME='rarian'
PACKAGE_TARNAME='rarian'
-PACKAGE_VERSION='0.5.8'
-PACKAGE_STRING='rarian 0.5.8'
+PACKAGE_VERSION='0.6.0'
+PACKAGE_STRING='rarian 0.6.0'
PACKAGE_BUGREPORT=''
ac_unique_file="util/rarian-example.c"
@@ -1394,7 +1394,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures rarian 0.5.8 to adapt to many kinds of systems.
+\`configure' configures rarian 0.6.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1464,7 +1464,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of rarian 0.5.8:";;
+ short | recursive ) echo "Configuration of rarian 0.6.0:";;
esac
cat <<\_ACEOF
@@ -1575,7 +1575,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-rarian configure 0.5.8
+rarian configure 0.6.0
generated by GNU Autoconf 2.60
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1589,7 +1589,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by rarian $as_me 0.5.8, which was
+It was created by rarian $as_me 0.6.0, which was
generated by GNU Autoconf 2.60. Invocation command line was
$ $0 $@
@@ -2282,7 +2282,7 @@
# Define the identity of the package.
PACKAGE='rarian'
- VERSION='0.5.8'
+ VERSION='0.6.0'
cat >>confdefs.h <<_ACEOF
@@ -21445,7 +21445,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by rarian $as_me 0.5.8, which was
+This file was extended by rarian $as_me 0.6.0, which was
generated by GNU Autoconf 2.60. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -21498,7 +21498,7 @@
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-rarian config.status 0.5.8
+rarian config.status 0.6.0
configured by $0, generated by GNU Autoconf 2.60,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/rarian-0.5.8/configure.ac new/rarian-0.6.0/configure.ac
--- old/rarian-0.5.8/configure.ac 2007-08-13 22:37:00.000000000 +0200
+++ new/rarian-0.6.0/configure.ac 2007-09-12 20:00:33.000000000 +0200
@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
-AC_INIT(rarian, 0.5.8)
+AC_INIT(rarian, 0.6.0)
AC_CONFIG_SRCDIR([util/rarian-example.c])
AC_CONFIG_HEADER([config.h])
AM_INIT_AUTOMAKE ([1.9 foreign dist-bzip2 dist-gzip])
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/rarian-0.5.8/data/beanstalk-climbing.section new/rarian-0.6.0/data/beanstalk-climbing.section
--- old/rarian-0.5.8/data/beanstalk-climbing.section 2007-08-13 22:31:46.000000000 +0200
+++ new/rarian-0.6.0/data/beanstalk-climbing.section 2007-09-11 20:59:58.000000000 +0200
@@ -1,7 +1,7 @@
# Several sections from the Beanstalk manual
[Section]
-SectionName=Climbing you're beanstalk
+SectionName=Climbing your beanstalk
SectionIdentifier=Climbing
SectionDocument=org.gnome.beanstalk
SectionPath=/opt/gnome-cvs/share/gnome/help/C/beanstalk-climbing.xml
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/rarian-0.5.8/data/beanstalk.document new/rarian-0.6.0/data/beanstalk.document
--- old/rarian-0.5.8/data/beanstalk.document 2007-08-13 22:31:46.000000000 +0200
+++ new/rarian-0.6.0/data/beanstalk.document 2007-09-11 20:59:28.000000000 +0200
@@ -22,7 +22,7 @@
SectionPath=/usr/share/gnome/help/beanstalk/C/Growing.xml
[Section]
-SectionName=Looking after you're beanstalk
+SectionName=Looking after your beanstalk
SectionName[de]=Um dich kümmernd, Bohnenstange sein
SectionIdentifier=Care
# Path is relative to top-doc
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/rarian-0.5.8/docs/rar-lib.xhtml new/rarian-0.6.0/docs/rar-lib.xhtml
--- old/rarian-0.5.8/docs/rar-lib.xhtml 2007-08-13 22:31:45.000000000 +0200
+++ new/rarian-0.6.0/docs/rar-lib.xhtml 2007-09-11 21:00:57.000000000 +0200
@@ -20,7 +20,7 @@
<h2>Including the library</h2>
-<p>You can include the library in you're application by using
+<p>You can include the library in your application by using
pkg-config to set the correct include and lib flags. The name to
check for is "rarian". You should check for exact versions at this
stage as Rarian API is liable to change in future releases.</p>
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/rarian-0.5.8/docs/rar-mdf.xhtml new/rarian-0.6.0/docs/rar-mdf.xhtml
--- old/rarian-0.5.8/docs/rar-mdf.xhtml 2007-08-13 22:31:45.000000000 +0200
+++ new/rarian-0.6.0/docs/rar-mdf.xhtml 2007-09-11 21:01:37.000000000 +0200
@@ -37,7 +37,7 @@
<p>DocPath[de]=file:///usr/share/fdo/help/beanstalk/de/beanstalk.html</p>
<p>DocType=application/xhtml+xml</p>
<p>Comment=Beanstalk provides access to golden eggs. Climb it and find
-you're destiny</p>
+your destiny</p>
<p>Comment[de]=German language not known. Sorry.</p>
</quote>
@@ -109,7 +109,7 @@
<dd>This is used when moving from scrollkeeper. The scrollkeeper
translation utilities form a new-style identifier of the form
"org.scrollkeeper.<scrollkeeper-seriesid>". In order to ensure
-you're new document is picked up in it's place, you must specify this
+your new document is picked up in it's place, you must specify this
field in the form of: <p>x-DocHeritage=org.scrollkeeper.<seriesid></p>
</dd>
<dt>x-Scrollkeeper-omf-loc</dt>
@@ -117,7 +117,7 @@
compatibility to provide the location of the scrollkeeper omf files.</dd>
</dl>
-<h2>Making you're meta-data files accessible</h2>
+<h2>Making your meta-data files accessible</h2>
<p>By default, Rarian will pick up meta-data files found in the "help"
subdirectory of the XDG_DATA_DIRS environment variable. If this
environment variable is not set, Rarian will default to checking in
@@ -134,16 +134,16 @@
suffix ".document". For example, the example file presented above
would be named "beanstalk.document".</p>
-<h3>Accessing you're documentation</h3>
+<h3>Accessing your documentation</h3>
<p><strong>Note:</strong> This section is due for heavy revision once
several things come together. It is aimed at GNOME documentation
currently. Once the XDG help spec is implemented / supported, this
will become obsolete</p>
-<p>Having written you're documentation, copied you're meta-data file
-to the correct location, you now have several options to access you're
-documentation from you're application:</p>
+<p>Having written your documentation, copied your meta-data file
+to the correct location, you now have several options to access your
+documentation from your application:</p>
<ul>
<li>Use libgnome-provided help functions.</li>
<li>Call "yelp" from the command line, with the parameter
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/rarian-0.5.8/docs/rar-skcompat.xhtml new/rarian-0.6.0/docs/rar-skcompat.xhtml
--- old/rarian-0.5.8/docs/rar-skcompat.xhtml 2007-08-13 22:31:45.000000000 +0200
+++ new/rarian-0.6.0/docs/rar-skcompat.xhtml 2007-09-11 21:02:05.000000000 +0200
@@ -97,9 +97,9 @@
</pre>
<p>Basically, it's easier to copy this example and modify it to suit
-you're needs than to try and write your own.</p>
+your needs than to try and write your own.</p>
-<p>Normally, the name of you're omf files (after installation) should
+<p>Normally, the name of your omf files (after installation) should
be <package name>-<langcode>.omf. Before installation,
you can name it whatever you want. However, I'd recommend:</p>
<pre><package name>-<langcode>.omf.in</pre>
@@ -114,7 +114,7 @@
<h2>Installing documentation</h2>
<p>Scrollkeeper installation is a little ... quirky. First, copy
-you're actual documentation to where you want. To install the
+your actual documentation to where you want. To install the
meta-data, fist run <em>scrollkeeper-preinstall</em> using the
arguments like:</p>
<pre>scrollkeeper-preinstall <installed doc name> <current omf name> <new omf name></pre>
@@ -125,7 +125,7 @@
<p>After that, you can now copy the newly generated omf file into
<prefix>/share/omf/<name>/ where <name> is generally
-the name of you're package. Repeat this procedure for each language.</p>
+the name of your package. Repeat this procedure for each language.</p>
<p>Afterward, you can now run <em>scrollkeeper-update</em>. This has
a few options you must specify to get the correct behaviour. This
@@ -136,7 +136,7 @@
<p>Should get you reasonably close. (If using Rarian, this will be
sufficient).</p>
-<p>And that's it. You'll probably want to put this stuff in you're
+<p>And that's it. You'll probably want to put this stuff in your
makefiles. I have no idea how to do all this. I'd recommend looking
for other packages that use scrollkeeper and adapt their stuff. (It's
like the old autoconf joke - only 2 people have ever written a
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/rarian-0.5.8/librarian/Makefile.am new/rarian-0.6.0/librarian/Makefile.am
--- old/rarian-0.5.8/librarian/Makefile.am 2007-08-13 22:31:46.000000000 +0200
+++ new/rarian-0.6.0/librarian/Makefile.am 2007-09-11 21:32:52.000000000 +0200
@@ -28,3 +28,4 @@
endif
librarian_la_CFLAGS = -DDATADIR=\""$(datadir)"\" -DSYSCONFDIR=\""$(sysconfdir)"\"
+librarian_la_LDFLAGS = -export-symbols-regex "^rrn_.*"
\ No newline at end of file
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/rarian-0.5.8/librarian/Makefile.in new/rarian-0.6.0/librarian/Makefile.in
--- old/rarian-0.5.8/librarian/Makefile.in 2007-08-13 22:38:23.000000000 +0200
+++ new/rarian-0.6.0/librarian/Makefile.in 2007-09-12 20:03:30.000000000 +0200
@@ -81,6 +81,9 @@
librarian_la-rarian-info.lo librarian_la-rarian-man.lo \
$(am__objects_1)
librarian_la_OBJECTS = $(am_librarian_la_OBJECTS)
+librarian_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+ $(CXXFLAGS) $(librarian_la_LDFLAGS) $(LDFLAGS) -o $@
DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
@@ -231,6 +234,7 @@
rarian-utils.h rarian-utils.c rarian-info.h rarian-info.c \
rarian-man.c rarian-man.h $(am__append_1)
librarian_la_CFLAGS = -DDATADIR=\""$(datadir)"\" -DSYSCONFDIR=\""$(sysconfdir)"\"
+librarian_la_LDFLAGS = -export-symbols-regex "^rrn_.*"
all: all-am
.SUFFIXES:
@@ -292,7 +296,7 @@
rm -f "$${dir}/so_locations"; \
done
librarian.la: $(librarian_la_OBJECTS) $(librarian_la_DEPENDENCIES)
- $(CXXLINK) -rpath $(libdir) $(librarian_la_OBJECTS) $(librarian_la_LIBADD) $(LIBS)
+ $(librarian_la_LINK) -rpath $(libdir) $(librarian_la_OBJECTS) $(librarian_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/rarian-0.5.8/librarian/rarian-info.c new/rarian-0.6.0/librarian/rarian-info.c
--- old/rarian-0.5.8/librarian/rarian-info.c 2007-08-13 22:31:46.000000000 +0200
+++ new/rarian-0.6.0/librarian/rarian-info.c 2007-09-11 21:23:30.000000000 +0200
@@ -50,7 +50,7 @@
static char *current_path = NULL;
RrnInfoEntry *current_entry = NULL;
-void
+static void
set_category (const char *new_cat)
{
char *stripped = strdup (new_cat);
@@ -93,7 +93,7 @@
return;
}
-void
+static void
process_initial_entry (const char *line)
{
char *tmp = (char *) line;
@@ -153,7 +153,7 @@
}
}
-void
+static void
process_add_desc (const char *line)
{
char *current;
@@ -174,7 +174,7 @@
free (cpy);
}
-int
+static int
process_check_file()
{
char *filename = NULL;
@@ -349,7 +349,7 @@
}
-void
+static void
free_entry (RrnInfoEntry *entry)
{
if (entry->name)
@@ -370,7 +370,7 @@
}
-void
+static void
process_add_entry (void)
{
InfoLink *link = NULL;
@@ -389,7 +389,7 @@
}
}
-void
+static void
process_info_dir (const char *dir)
{
@@ -463,7 +463,7 @@
free (filename);
}
-void
+static void
sanity_check_categories ()
{
char **cats = categories;
@@ -507,7 +507,7 @@
categories = new_cats;
}
-void
+static void
rrn_info_init (void)
{
char *default_dirs = "/usr/info:/usr/share/info:/usr/local/info:/usr/local/share/info";
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/rarian-0.5.8/librarian/rarian-language.c new/rarian-0.6.0/librarian/rarian-language.c
--- old/rarian-0.5.8/librarian/rarian-language.c 2007-08-13 22:31:46.000000000 +0200
+++ new/rarian-0.6.0/librarian/rarian-language.c 2007-09-11 21:38:31.000000000 +0200
@@ -2,22 +2,21 @@
* rarian-language.c
* This file is part of Rarian
*
- * Copyright (C) 2006 - Don Scorgie
+ * Copyright (C) 2006 - Don Scorgie
*
- * Rarian is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * Rarian 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.
*
* Rarian 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 General Public License for more details.
+ * 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 General Public License
- * along with Rarian; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor,
- * Boston, MA 02110-1301 USA
+ * 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
*/
#include
@@ -30,6 +29,10 @@
typedef struct _Lang Lang;
+#ifndef FALSE
+#define FALSE 0
+#define TRUE !FALSE
+#endif
struct _Lang
{
@@ -41,62 +44,137 @@
static Lang *lang_list;
static int nlangs = 0 ;
+static int
+check_lang (char *lang)
+{
+ Lang *iter = lang_list;
+
+ while (iter) {
+ if (!strcmp (iter->base, lang))
+ return TRUE;
+ iter = iter->next;
+ }
+ return FALSE;
+}
+
+static void
+add_lang (char *language)
+{
+ Lang *lang = NULL;
+
+ lang = malloc (sizeof (Lang));
+ lang->base = language;
+ lang->prev = NULL;
+ if (lang_list) {
+ lang->next = lang_list;
+ lang_list->prev = lang;
+ } else {
+ lang->next = NULL;
+ }
+ lang_list = lang;
+
+}
+
void
rrn_language_init (char *lang)
{
- char *loc = NULL;
- char *current = NULL;
- char *tmp = NULL;
- Lang *iter = lang_list;
+ char *loc = NULL;
+ char *current = NULL;
+ char *tmp = NULL;
+ Lang *iter = lang_list;
+
+ if (lang == NULL) {
+ loc = getenv ("LANGUAGE");
+ if (!loc || !strcmp (loc, "")) {
+ loc = getenv ("LC_ALL");
+ }
+ if (!loc || !strcmp (loc, "")) {
+ loc = getenv ("LANG");
+ }
+
+ } else {
+ loc = strdup (lang);
+ }
+ nlangs = 0;
+
+ if (!loc || !strcmp (loc, "")) {
+ loc = strdup("C");
+ }
+
+ current = loc;
+ do {
+ Lang *lang;
+ char *at_mod;
+ char *dot_mod;
+ char *ter_mod;
+ char *full_lang = NULL;
+ char *exploded = NULL;
+
+ tmp = strchr (current, ':');
+
+ if (tmp)
+ full_lang = rrn_strndup (current, tmp-current);
+ else
+ full_lang = strdup (current);
+
+ at_mod = strrchr (full_lang, '@');
+ dot_mod = strrchr (full_lang, '.');
+ ter_mod = strrchr (full_lang, '_');
+
+ /* Full lang first */
+ if (!check_lang (full_lang)) {
+ add_lang (full_lang);
+ }
- if (lang == NULL) {
- loc = getenv ("LANGUAGE");
- } else {
- loc = strdup (lang);
+ /* Lang sans modifier */
+ if (at_mod) {
+ exploded = rrn_strndup (full_lang, at_mod - full_lang);
+ if (!check_lang (exploded)) {
+ add_lang (exploded);
+ }
}
- nlangs = 0;
- if (!loc || !strcmp (loc, "")) {
- loc = strdup("C");
- }
+ /* Lang sans modifier and codeset */
+ if (dot_mod) {
+ exploded = rrn_strndup (full_lang, dot_mod - full_lang);
+ if (!check_lang (exploded)) {
+ add_lang (exploded);
+ }
+ }
- current = loc;
- do {
- Lang *lang;
- tmp = strchr (current, ':');
-
- lang = malloc (sizeof (Lang));
- if (tmp)
- lang->base = rrn_strndup (current, tmp-current);
- else
- lang->base = strdup (current);
- lang->prev = NULL;
- if (lang_list) {
- lang->next = lang_list;
- lang_list->prev = lang;
- } else {
- lang->next = NULL;
- }
- lang_list = lang;
- if (tmp)
- current = tmp+1;
- else
- current = NULL;
- } while (current);
- iter = lang_list;
+ /* Lang sans modifier, codeset and territory */
+ if (ter_mod) {
+ exploded = rrn_strndup (full_lang, ter_mod - full_lang);
+ if (!check_lang (exploded)) {
+ add_lang (exploded);
+ }
+ }
- while (iter) {
- Lang *tmp = iter->next;
- nlangs += 1;
+ if (tmp)
+ current = tmp+1;
+ else
+ current = NULL;
+ } while (current);
+
+ tmp = strdup ("C");
+ if (!check_lang (tmp)) {
+ add_lang (tmp);
+ }
+
+ iter = lang_list;
+ while (iter) {
+ Lang *tmp = iter->next;
+ nlangs += 1;
+
+ iter->next = iter->prev;
+ iter->prev = tmp;
+ if (iter->prev == NULL) {
+ lang_list = iter;
+ }
+ iter = iter->prev;
+ }
+ iter = lang_list;
- iter->next = iter->prev;
- iter->prev = tmp;
- if (iter->prev == NULL) {
- lang_list = iter;
- }
- iter = iter->prev;
- }
- iter = lang_list;
}
int
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/rarian-0.5.8/librarian/rarian-language.h new/rarian-0.6.0/librarian/rarian-language.h
--- old/rarian-0.5.8/librarian/rarian-language.h 2007-08-13 22:31:46.000000000 +0200
+++ new/rarian-0.6.0/librarian/rarian-language.h 2007-09-11 20:54:22.000000000 +0200
@@ -2,22 +2,21 @@
* rarian-language.h
* This file is part of Rarian
*
- * Copyright (C) 2006 - Don Scorgie
+ * Copyright (C) 2006 - Don Scorgie
*
- * Rarian is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * Rarian 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.
*
* Rarian 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 General Public License for more details.
+ * 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 General Public License
- * along with Rarian; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor,
- * Boston, MA 02110-1301 USA
+ * 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
*/
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/rarian-0.5.8/librarian/rarian-main.c new/rarian-0.6.0/librarian/rarian-main.c
--- old/rarian-0.5.8/librarian/rarian-main.c 2007-08-13 22:31:46.000000000 +0200
+++ new/rarian-0.6.0/librarian/rarian-main.c 2007-09-11 21:21:30.000000000 +0200
@@ -65,16 +65,16 @@
/* Function Prototypes */
-void rrn_init (void);
-void scan_directories (void);
-void scan_directory (char *dir);
-void process_file (char *filename);
-void process_section (char *filename);
-void insert_orphans (void);
-void reverse_children (void);
-void process_locale_dirs (char * dir);
+static void rrn_init (void);
+static void scan_directories (void);
+static void scan_directory (char *dir);
+static void process_file (char *filename);
+static void process_section (char *filename);
+static void insert_orphans (void);
+static void reverse_children (void);
+static void process_locale_dirs (char * dir);
#if ENABLE_OMF_READ
-void process_omf_dir (char *dir);
+static void process_omf_dir (char *dir);
#endif
void
@@ -87,7 +87,7 @@
rrn_init ();
}
-void
+static void
rrn_init (void)
{
scan_directories ();
@@ -167,7 +167,7 @@
return NULL;
}
-void
+static void
scan_directories (void)
{
char *cur_path = NULL;
@@ -251,7 +251,7 @@
reverse_children ();
}
-void
+static void
process_locale_dirs (char * dir)
{
DIR *dirp = NULL;
@@ -270,7 +270,7 @@
}
-void
+static void
scan_directory (char *dir)
{
DIR * dirp = NULL;
@@ -317,7 +317,7 @@
free (path);
}
-int
+static int
handle_duplicate (RrnReg *reg)
{
Link *iter;
@@ -343,7 +343,7 @@
}
#if ENABLE_OMF_READ
-void
+static void
process_omf_dir (char *dir)
{
char *path;
@@ -454,7 +454,7 @@
}
#endif
-void
+static void
process_section (char *filename)
{
RrnSect *sect = NULL;
@@ -479,7 +479,7 @@
}
}
-void
+static void
process_file (char *filename)
{
RrnReg *reg;
@@ -511,7 +511,7 @@
}
}
-void
+static void
insert_orphans ()
{
Link *sect = orphans_head;
@@ -547,7 +547,7 @@
}
}
-RrnSect *
+static RrnSect *
reverse_child (RrnSect *child)
{
RrnSect *local_tail = NULL;
@@ -567,7 +567,7 @@
}
}
-void
+static void
reverse_children ()
{
Link *iter = head;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/rarian-0.5.8/librarian/rarian-man.c new/rarian-0.6.0/librarian/rarian-man.c
--- old/rarian-0.5.8/librarian/rarian-man.c 2007-08-13 22:31:46.000000000 +0200
+++ new/rarian-0.6.0/librarian/rarian-man.c 2007-09-11 21:25:34.000000000 +0200
@@ -79,7 +79,7 @@
* 2 = ndbm
*/
-void
+static void
setup_man_path ()
{
int outfd[2];
@@ -171,7 +171,7 @@
}
#if 0
#ifdef HAVE_LIBGDBM
-void
+static void
setup_gdbm (char *name)
{
gdbm_handle = gdbm_open(name, 0, GDBM_READER, 0666, 0);
@@ -186,7 +186,7 @@
#endif
#ifdef HAVE_LIBNDBM
-void
+static void
setup_ndbm (char *name)
{
char *trunc;
@@ -206,7 +206,7 @@
#endif
#endif
-char *strrstr (char *s, char *wanted)
+static char *strrstr (char *s, char *wanted)
{
char *scan;
char *first;
@@ -229,7 +229,7 @@
-char *
+static char *
get_name_for_file (char *filename, char **subsect)
{
char *suffix;
@@ -267,7 +267,7 @@
}
-int
+static int
check_for_dup (RrnManEntry *reg, int entry)
{
ManLink *iter = manhead[entry];
@@ -281,7 +281,7 @@
return FALSE;
}
-int
+static int
find_key (char *sect)
{
int i;
@@ -292,7 +292,7 @@
return i;
}
-void
+static void
process_dir(char *dir)
{
char **dir_iter;
@@ -372,7 +372,7 @@
free (path);
}
-void
+static void
setup_default()
{
char **path_iter;
@@ -416,7 +416,7 @@
free (langs);
}
-void
+static void
rrn_man_init (void)
{
char *default_dirs = "/var/cache/man:/usr/man";
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/rarian-0.5.8/librarian/rarian-omf.cpp new/rarian-0.6.0/librarian/rarian-omf.cpp
--- old/rarian-0.5.8/librarian/rarian-omf.cpp 2007-08-13 22:31:46.000000000 +0200
+++ new/rarian-0.6.0/librarian/rarian-omf.cpp 2007-09-11 21:26:25.000000000 +0200
@@ -2,22 +2,21 @@
* rarian-omf.cpp
* This file is part of Rarian
*
- * Copyright (C) 2006 - Don scorgie
+ * Copyright (C) 2006 - Don Scorgie
*
- * Rarian is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * Rarian 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.
*
* Rarian 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 General Public License for more details.
+ * 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 General Public License
- * along with Rarian; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor,
- * Boston, MA 02110-1301 USA
+ * 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
*/
@@ -52,7 +51,7 @@
REG_CATEGORIES
};
-void
+static void
get_attribute (TiXmlElement *elem, ElemType e, RrnReg *reg)
{
TiXmlAttribute* pAttrib=elem->FirstAttribute();
@@ -90,7 +89,7 @@
}
}
-void
+static void
get_text (TiXmlNode* pElement, ElemType e, RrnReg *reg)
{
@@ -110,7 +109,7 @@
}
-int
+static int
process_node (TiXmlNode *pParent, RrnReg *reg)
{
TiXmlNode* pChild;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/rarian-0.5.8/librarian/rarian-omf.h new/rarian-0.6.0/librarian/rarian-omf.h
--- old/rarian-0.5.8/librarian/rarian-omf.h 2007-08-13 22:31:46.000000000 +0200
+++ new/rarian-0.6.0/librarian/rarian-omf.h 2007-09-11 20:55:53.000000000 +0200
@@ -2,22 +2,21 @@
* rarian-omf.h
* This file is part of Rarian
*
- * Copyright (C) 2006 - Don scorgie
+ * Copyright (C) 2006 - Don Scorgie
*
- * Rarian is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * Rarian 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.
*
* Rarian 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 General Public License for more details.
+ * 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 General Public License
- * along with Rarian; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor,
- * Boston, MA 02110-1301 USA
+ * 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
*/
#ifndef RARIAN_OMF_H__
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/rarian-0.5.8/librarian/rarian-reg-full.c new/rarian-0.6.0/librarian/rarian-reg-full.c
--- old/rarian-0.5.8/librarian/rarian-reg-full.c 2007-08-13 22:31:46.000000000 +0200
+++ new/rarian-0.6.0/librarian/rarian-reg-full.c 2007-09-11 21:36:55.000000000 +0200
@@ -30,18 +30,17 @@
#include "rarian-utils.h"
-void process_line_full (char *line, RrnRegFull *reg);
-void process_pair_full (RrnRegFull *reg, char *key, char *value);
+static void process_line_full (char *line, RrnRegFull *reg);
+static void process_pair_full (RrnRegFull *reg, char *key, char *value);
-void process_sect_line_full (char *line, RrnSectFull *sect);
-void process_sect_pair_full (RrnSectFull *sect, char *key, char *value);
-int rrn_reg_add_sect_full (RrnRegFull *reg, RrnSectFull *sect);
-RrnListEntry *rrn_full_add_field (RrnListEntry *current, char *text,
- char *lang);
-RrnSectFull * rrn_sect_new_full ();
-void rrn_sect_free_full (RrnSectFull *sect);
-void process_path_full (RrnRegFull *reg);
-void process_section_path_full (RrnListEntry *owner_paths, RrnSectFull *section);
+static void process_sect_line_full (char *line, RrnSectFull *sect);
+static void process_sect_pair_full (RrnSectFull *sect, char *key,
+ char *value);
+static int rrn_reg_add_sect_full (RrnRegFull *reg, RrnSectFull *sect);
+static RrnSectFull * rrn_sect_new_full ();
+static void rrn_sect_free_full (RrnSectFull *sect);
+static void process_path_full (RrnRegFull *reg);
+static void process_section_path_full (RrnListEntry *owner_paths, RrnSectFull *section);
RrnRegFull *
rrn_reg_new_full ()
@@ -172,12 +171,12 @@
sep = strrchr (filename, '/');
last = strrchr (filename, '.');
- if (!last || !sep) {
+ if (!last || !sep || last < sep) {
fprintf (stderr, "Error: Can't cut put basename properly\n");
rrn_reg_free_full (reg);
return NULL;
}
- basename = rrn_strndup (last+1, sep-last+1);
+ basename = rrn_strndup (sep + 1, last - (sep + 1));
reg->identifier = malloc (sizeof (char)*(strlen(basename)+11));
sprintf (reg->identifier, "org.other.%s", basename);
free (basename);
@@ -190,7 +189,7 @@
return reg;
}
-void
+static void
process_line_full (char *line, RrnRegFull *reg)
{
char *ret = NULL;
@@ -218,7 +217,7 @@
return;
}
-char *
+static char *
find_language (char *key)
{
char *lbrace = NULL, *rbrace = NULL;
@@ -261,7 +260,7 @@
}
-char **
+static char **
process_categories_full (char *cat_string)
{
char **result = NULL;
@@ -297,7 +296,7 @@
return result;
}
-void
+static void
process_pair_full (RrnRegFull *reg, char *key, char *value)
{
char *lang = NULL;
@@ -378,7 +377,7 @@
return sect;
}
-RrnSectFull *
+static RrnSectFull *
find_sect_full (RrnSectFull *start, char *id)
{
RrnSectFull *ret = start;
@@ -392,7 +391,7 @@
return NULL;
}
-void
+static void
rrn_reg_add_sections_full (RrnRegFull *reg, RrnSectFull *sects)
{
RrnSectFull *real_orphans = NULL;
@@ -425,7 +424,7 @@
return;
}
-int
+static int
rrn_sects_add_sect_full (RrnSectFull *current, RrnSectFull *sect)
{
char *cur_sect = NULL;
@@ -455,7 +454,7 @@
return 0;
}
-int
+static int
rrn_reg_add_sect_full (RrnRegFull *reg, RrnSectFull *sect)
{
if (!sect->owner || !strcmp (reg->identifier, sect->owner)) {
@@ -570,7 +569,7 @@
return orphaned_sections;
}
-void
+static void
process_sect_line_full (char *line, RrnSectFull *sect)
{
char *ret = NULL;
@@ -599,7 +598,7 @@
}
-void
+static void
process_sect_pair_full (RrnSectFull *sect, char *key, char *value)
{
char *lang = NULL;
@@ -620,7 +619,7 @@
return;
}
-void
+static void
process_path_full (RrnRegFull *reg)
{
char *prefix = NULL;
@@ -650,7 +649,7 @@
}
}
-void
+static void
process_section_path_full (RrnListEntry *owner_paths, RrnSectFull *section)
{
char *tmp = NULL;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/rarian-0.5.8/librarian/rarian-reg-utils.c new/rarian-0.6.0/librarian/rarian-reg-utils.c
--- old/rarian-0.5.8/librarian/rarian-reg-utils.c 2007-08-13 22:31:46.000000000 +0200
+++ new/rarian-0.6.0/librarian/rarian-reg-utils.c 2007-09-11 21:31:05.000000000 +0200
@@ -30,13 +30,13 @@
#include "rarian-utils.h"
-void process_line (char *line, RrnReg *reg);
-void process_pair (RrnReg *reg, char *key, char *value);
-void process_sect_line (char *line, RrnSect *sect);
-void process_sect_pair (RrnSect *sect, char *key, char *value);
-int rrn_reg_add_sect (RrnReg *reg, RrnSect *sect);
-void process_path (RrnReg *reg);
-char * process_section_path (char *owner_path, RrnSect *section);
+static void process_line (char *line, RrnReg *reg);
+static void process_pair (RrnReg *reg, char *key, char *value);
+static void process_sect_line (char *line, RrnSect *sect);
+static void process_sect_pair (RrnSect *sect, char *key, char *value);
+static int rrn_reg_add_sect (RrnReg *reg, RrnSect *sect);
+static void process_path (RrnReg *reg);
+static char * process_section_path (char *owner_path, RrnSect *section);
RrnReg *
@@ -97,13 +97,18 @@
char *tmp;
char *result = NULL;
tmp = strdup (buf);
- buf = fgets (buf, 1023, file);
+ if (fgets (buf, 1023, file)) {
result = malloc (sizeof (char) * (strlen(tmp)+strlen(buf)+2));
strcpy (result, tmp);
strcat (result, buf);
free (tmp);
free (buf);
- buf = result;
+ buf = result;
+ } else {
+ free (buf);
+ buf = tmp;
+ break;
+ }
}
real = buf;
while (*real && isspace(*real) && *real != '\n') {
@@ -182,12 +187,12 @@
sep = strrchr (filename, '/');
last = strrchr (filename, '.');
- if (!last || !sep) {
+ if (!last || !sep || last < sep) {
fprintf (stderr, "Error: Can't cut put basename properly\n");
rrn_reg_free (reg);
return NULL;
}
- basename = rrn_strndup (last+1, sep-last+1);
+ basename = rrn_strndup (sep + 1, last - (sep + 1));
reg->identifier = malloc (sizeof (char)*(strlen(basename)+11));
sprintf (reg->identifier, "org.other.%s", basename);
free (basename);
@@ -227,7 +232,7 @@
return reg;
}
-void
+static void
process_line (char *line, RrnReg *reg)
{
char *ret = NULL;
@@ -259,7 +264,7 @@
return;
}
-void
+static void
process_field (char **current, char **lang, char *key, char *value)
{
char *lbrace = NULL, *rbrace = NULL, *l = NULL;
@@ -295,7 +300,7 @@
free (l);
}
-char **
+static char **
process_categories (char *cat_string)
{
char **result = NULL;
@@ -334,7 +339,7 @@
return result;
}
-void
+static void
process_pair (RrnReg *reg, char *key, char *value)
{
if (!strncmp (key, "Name", 4) || !strncmp (key, "name", 4)) {
@@ -654,7 +659,7 @@
return orphaned_sections;
}
-void
+static void
process_sect_line (char *line, RrnSect *sect)
{
char *ret = NULL;
@@ -683,7 +688,7 @@
}
-void
+static void
process_sect_pair (RrnSect *sect, char *key, char *value)
{
if (!strncmp (key, "SectionName", 11) || !strncmp (key, "sectionname", 11)) {
@@ -700,7 +705,7 @@
return;
}
-void
+static void
process_path (RrnReg *reg)
{
char *prefix = NULL;
@@ -743,7 +748,7 @@
}
-char *
+static char *
process_section_path (char *owner_path, RrnSect *section)
{
char *tmp = NULL;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/rarian-0.5.8/librarian/rarian-utils.c new/rarian-0.6.0/librarian/rarian-utils.c
--- old/rarian-0.5.8/librarian/rarian-utils.c 2007-08-13 22:31:46.000000000 +0200
+++ new/rarian-0.6.0/librarian/rarian-utils.c 2007-09-11 20:55:11.000000000 +0200
@@ -2,22 +2,21 @@
* rarian-utils.c
* This file is part of Rarian
*
- * Copyright (C) 2006 - Don Scorgie
+ * Copyright (C) 2006 - Don Scorgie
*
- * Rarian is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * Rarian 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.
*
* Rarian 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 General Public License for more details.
+ * 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 General Public License
- * along with Rarian; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor,
- * Boston, MA 02110-1301 USA
+ * 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
*/
#include
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/rarian-0.5.8/librarian/rarian-utils.h new/rarian-0.6.0/librarian/rarian-utils.h
--- old/rarian-0.5.8/librarian/rarian-utils.h 2007-08-13 22:31:46.000000000 +0200
+++ new/rarian-0.6.0/librarian/rarian-utils.h 2007-09-11 20:54:49.000000000 +0200
@@ -2,22 +2,21 @@
* rarian-utils.h
* This file is part of Rarian
*
- * Copyright (C) 2006 - Don Scorgie
+ * Copyright (C) 2006 - Don Scorgie
*
- * Rarian is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * Rarian 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.
*
* Rarian 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 General Public License for more details.
+ * 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 General Public License
- * along with Rarian; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor,
- * Boston, MA 02110-1301 USA
+ * 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
*/
#ifndef __RARIAN_UTILS_H
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/rarian-0.5.8/NEWS new/rarian-0.6.0/NEWS
--- old/rarian-0.5.8/NEWS 2007-08-13 22:36:37.000000000 +0200
+++ new/rarian-0.6.0/NEWS 2007-09-12 20:00:25.000000000 +0200
@@ -1,3 +1,22 @@
+Version 0.6.0
+-------------
+
+ * Only export required symbols - based on patch from Daniel Macks
+ - bug #12147 and #11969
+ * Fix build on OSX and Solaris
+ - bugs #12359 and #12043
+ * Various crash fixes in .document files - Hans Petter Jansson
+ - bugs #12226 and #12131
+ * Make sk-config return decent results when OMF reading is enabled
+ - bug #12212
+ * Fix silly spelling errors
+ - bug #12008
+ * Fix copyright headers
+ * Fallback languages now work correctly
+ - GNOME bug #474556
+ * Fix potential off-by-one issue in sk-preinstall - Ghee Teo
+ -bug #12052
+
Version 0.5.8
-------------
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/rarian-0.5.8/rarian.pc.in new/rarian-0.6.0/rarian.pc.in
--- old/rarian-0.5.8/rarian.pc.in 2007-08-13 22:31:46.000000000 +0200
+++ new/rarian-0.6.0/rarian.pc.in 2007-09-11 21:03:34.000000000 +0200
@@ -7,4 +7,4 @@
Description: Documentation metadata access library
Version: @VERSION@
Libs: -L${libdir} -lrarian
-Cflags: -I${includedir}/rarian
\ No newline at end of file
+Cflags: -I${includedir}/rarian
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/rarian-0.5.8/README new/rarian-0.6.0/README
--- old/rarian-0.5.8/README 2007-08-13 22:31:46.000000000 +0200
+++ new/rarian-0.6.0/README 2007-09-11 20:58:38.000000000 +0200
@@ -30,7 +30,7 @@
* The rarian-sk-migrate program
- Takes in a directory full of omf's, reads and parses them and spews out
an equivalent scroll file. You probably don't want to use this directly.
- Instead, copy the omf directory to you're standard omf dir and run the
+ Instead, copy the omf directory to your standard omf dir and run the
update script.
* The rarian-example program
@@ -115,7 +115,7 @@
./util/rarian-sk-update -o /usr/share/omf -r ./data/sk-import
will make a temporary migration of all scrollkeeper omf files in
-/usr/share/omf. The scrolls can be found in data/sk-import. If you're omf
+/usr/share/omf. The scrolls can be found in data/sk-import. If your omf
files are not stored in /usr/share/omf, you need to edit the -o option to the
correct path.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/rarian-0.5.8/util/rarian-sk-config.in new/rarian-0.6.0/util/rarian-sk-config.in
--- old/rarian-0.5.8/util/rarian-sk-config.in 2007-08-13 22:31:46.000000000 +0200
+++ new/rarian-0.6.0/util/rarian-sk-config.in 2007-09-11 21:09:43.000000000 +0200
@@ -13,6 +13,8 @@
datadir=@datadir@
output_dir=${datadir}/help
package_version=@PACKAGE_VERSION@
+omf_read_enabled=@ENABLE_OMF_READ@
+
print_help()
{
@@ -60,10 +62,15 @@
echo $datadir/librarian
;;
--omfdir )
- for x in $(grep -e '^0:@:' $statedir/rarian-update-mtimes > /dev/null 2>&1)
- do
- echo ${x##0:@:}
- done
+ if [ $omf_read_enabled = 0 ]
+ then
+ for x in $(grep -e '^0:@:' $statedir/rarian-update-mtimes > /dev/null 2>&1)
+ do
+ echo ${x##0:@:}
+ done
+ else
+ echo $datadir/omf
+ fi
;;
* )
print_help
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/rarian-0.5.8/util/rarian-sk-get-cl.cpp new/rarian-0.6.0/util/rarian-sk-get-cl.cpp
--- old/rarian-0.5.8/util/rarian-sk-get-cl.cpp 2007-08-13 22:31:46.000000000 +0200
+++ new/rarian-0.6.0/util/rarian-sk-get-cl.cpp 2007-09-11 21:15:12.000000000 +0200
@@ -25,6 +25,7 @@
#include
#include
#include
+#include
static char *cat = NULL;
static TiXmlElement *docs = NULL;
@@ -162,7 +163,7 @@
char *basepath = NULL;
int i=0;
int last = 0;
- uint lasttime = 0;
+ unsigned int lasttime = 0;
int init = 1;
basepath = (char *) malloc (sizeof(char) * (strlen(user) + 18 /*/tmp/scrollkeeper.*/ + 1));
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/rarian-0.5.8/util/rarian-sk-preinstall.cpp new/rarian-0.6.0/util/rarian-sk-preinstall.cpp
--- old/rarian-0.5.8/util/rarian-sk-preinstall.cpp 2007-08-13 22:31:46.000000000 +0200
+++ new/rarian-0.6.0/util/rarian-sk-preinstall.cpp 2007-09-01 19:23:19.000000000 +0200
@@ -96,11 +96,11 @@
}
if (i == 1) {
/* Normal path. Add file:/ to the start */
- new_url = (char *) malloc (sizeof(char) * (strlen (input) + 6));
+ new_url = (char *) malloc (sizeof(char) * (strlen (input) + 7));
sprintf (new_url, "file:/%s", input);
} else {
/* Don't know what to do. Just copy and append file: to it */
- new_url = (char *) malloc (sizeof(char) * (strlen(input) + 5));
+ new_url = (char *) malloc (sizeof(char) * (strlen(input) + 6));
sprintf (new_url, "file:%s", input);
}
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org