[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r1976 - Extractor Extractor/src/include Extractor-docs/WWW
From: |
grothoff |
Subject: |
[GNUnet-SVN] r1976 - Extractor Extractor/src/include Extractor-docs/WWW Extractor-python GNUnet/src/applications/fs/ecrs GNUnet/src/applications/fs/fsui GNUnet/src/applications/fs/tools GNUnet/src/include GNUnet/src/util GNUnet-docs/WWW gnunet-gtk/po gnunet-gtk/src/plugins/fs |
Date: |
Sat, 27 Aug 2005 16:07:22 -0700 (PDT) |
Author: grothoff
Date: 2005-08-27 16:07:16 -0700 (Sat, 27 Aug 2005)
New Revision: 1976
Removed:
Extractor-python/Extractor.py
Modified:
Extractor-docs/WWW/download.php3
Extractor-docs/WWW/index.php
Extractor-python/Makefile.am
Extractor-python/extract.py
Extractor-python/libextractor_python_setup.py
Extractor/ChangeLog
Extractor/configure.ac
Extractor/src/include/extractor.h
GNUnet-docs/WWW/download.php3
GNUnet/src/applications/fs/ecrs/directory.c
GNUnet/src/applications/fs/ecrs/search.c
GNUnet/src/applications/fs/ecrs/uri.c
GNUnet/src/applications/fs/fsui/collection.c
GNUnet/src/applications/fs/fsui/download.c
GNUnet/src/applications/fs/fsui/file_info.c
GNUnet/src/applications/fs/fsui/namespace_info.c
GNUnet/src/applications/fs/fsui/search.c
GNUnet/src/applications/fs/tools/gnunet-directory.c
GNUnet/src/include/gnunet_ecrs_lib.h
GNUnet/src/util/timer.c
gnunet-gtk/po/Makefile.in
gnunet-gtk/src/plugins/fs/namespace.c
gnunet-gtk/src/plugins/fs/search.c
Log:
fixing namespace search code
Modified: Extractor/ChangeLog
===================================================================
--- Extractor/ChangeLog 2005-08-27 22:50:38 UTC (rev 1975)
+++ Extractor/ChangeLog 2005-08-27 23:07:16 UTC (rev 1976)
@@ -1,5 +1,6 @@
Fri Aug 26 22:32:06 PDT 2005
Added workaround libstdc++ bug #23591 (Mantis bug #907).
+ Releasing libextractor 0.5.4.
Tue Aug 23 15:39:37 PDT 2005
Fixed build on OS X.
Modified: Extractor/configure.ac
===================================================================
--- Extractor/configure.ac 2005-08-27 22:50:38 UTC (rev 1975)
+++ Extractor/configure.ac 2005-08-27 23:07:16 UTC (rev 1976)
@@ -1,8 +1,8 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.57)
-AC_INIT([libextractor], [0.5.3], address@hidden)
+AC_INIT([libextractor], [0.5.4], address@hidden)
AC_REVISION($Revision: 1.67 $)
-AM_INIT_AUTOMAKE([libextractor], [0.5.3])
+AM_INIT_AUTOMAKE([libextractor], [0.5.4])
AM_CONFIG_HEADER(src/include/config.h)
AH_TOP([#define _GNU_SOURCE 1])
Modified: Extractor/src/include/extractor.h
===================================================================
--- Extractor/src/include/extractor.h 2005-08-27 22:50:38 UTC (rev 1975)
+++ Extractor/src/include/extractor.h 2005-08-27 23:07:16 UTC (rev 1976)
@@ -29,7 +29,7 @@
* 0.2.6-1 => 0x00020601
* 4.5.2-0 => 0x04050200
*/
-#define EXTRACTOR_VERSION 0x00050300
+#define EXTRACTOR_VERSION 0x00050400
#include <stdio.h>
Modified: Extractor-docs/WWW/download.php3
===================================================================
--- Extractor-docs/WWW/download.php3 2005-08-27 22:50:38 UTC (rev 1975)
+++ Extractor-docs/WWW/download.php3 2005-08-27 23:07:16 UTC (rev 1976)
@@ -34,16 +34,16 @@
ANCHOR("tar");
H2("Tar Package");
W("Latest version is %s.",
- extlink_("download/libextractor-0.5.3.tar.gz",
- "libextractor-0.5.3.tar.gz"));
+ extlink_("download/libextractor-0.5.4.tar.gz",
+ "libextractor-0.5.4.tar.gz"));
BR();
W("Latest Java-binding is %s.",
extlink_("download/libextractor-java-0.5.1.tar.gz",
"libextractor-java-0.5.1.tar.gz"));
BR();
W("Latest Python-binding is %s.",
- extlink_("download/libextractor-python-0.5.1.tar.gz",
- "libextractor-python-0.5.1.tar.gz"));
+ extlink_("download/libextractor-python-0.5.4.tar.gz",
+ "libextractor-python-0.5.4.tar.gz"));
ANCHOR("rpm");
H2("RPM Package");
Modified: Extractor-docs/WWW/index.php
===================================================================
--- Extractor-docs/WWW/index.php 2005-08-27 22:50:38 UTC (rev 1975)
+++ Extractor-docs/WWW/index.php 2005-08-27 23:07:16 UTC (rev 1976)
@@ -37,6 +37,8 @@
H2("Recent News");
P();
echo "<dl>";
+DTDD("Fri Aug 26 22:47:07 PDT 2005 | libextractor v0.5.4 released.",
+ "This release fixes a memory leak in the thumbnail extractor, character
set conversion in the OLE2 extractors and the build on OS X. Quotations now
follow GNU standards. A workaround for a bug in libstdc++ that could cause
segmentation fauls was added. A new version of the python binding has also
been released; this revision fixes various problems with the build process.");
DTDD("Sat Aug 13 19:08:46 PDT 2005 | libextractor v0.5.3 released.",
"This release fixes various bugs in the EXIV2, OO and OLE2 plugins. A
static, relocatable version of glib is no longer required.");
DTDD("Thu Jul 14 22:31:28 CEST 2005 | libextractor v0.5.2 released.",
Deleted: Extractor-python/Extractor.py
===================================================================
--- Extractor-python/Extractor.py 2005-08-27 22:50:38 UTC (rev 1975)
+++ Extractor-python/Extractor.py 2005-08-27 23:07:16 UTC (rev 1976)
@@ -1,112 +0,0 @@
-"""Extractor.py
-
- This file is part of libextractor.
- (C) 2002, 2003, 2004, 2005 Vidyut Samanta and Christian Grothoff
-
- libextractor 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, or (at your
- option) any later version.
-
- libextractor 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.
-
- You should have received a copy of the GNU General Public License
- along with libextractor; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA.
-
-libextractor is a simple library for keyword extraction. libextractor
-does not support all formats but supports a simple plugging mechanism
-such that you can quickly add extractors for additional formats, even
-without recompiling libextractor. libextractor typically ships with a
-dozen helper-libraries that can be used to obtain keywords from common
-file-types.
-
-libextractor is a part of the GNU project (http://www.gnu.org/).
-"""
-
-import _extractor
-
-__all__ = ["Extractor","Keyword"]
-__author__ = "Christian Grothoff, Heiko Wundram"
-__version__ = "0.5.0"
-__license__ = "GPL"
-__date__ = "5/5/2005"
-
-class Extractor(object):
- """
- Main class for extracting meta-data with GNU libextractor.
-
- You may create multiple instances of Extractor to use
- different sets of plugins. Initially each Extractor
- will start with the default set of plugins.
-
- Use the extract method to obtain keywords from a file.
-
- Use the load and unload methods to change the list of
- plugins that should be used.
- """
-
- def __init__(self):
- self.__plugins = _extractor.loadDefaultLibraries()
- def __del__(self):
- _extractor.removeAll(self.__plugins)
- def load(self,plugs):
- """
- Load certain plugins. Invoke with a string with the names
- of the plugins that should be loaded. For example,
-
- 'libextractor_filename:-libextractor_split'
-
- will prepend the extractor that just adds the filename as a
- keyword and append (runs last) the extractor that splits
- keywords at whitespaces and punctuations.
-
- No errors are reported if any of the listed plugins are not
- found.
- """
- self.__plugins = _extractor.load(self.__plugins, plugs)
- return None
- def unload(self,plugs):
- """
- Unload a plugin. Pass the name of the plugin that is to
- be unloaded. Only one plugin can be unloaded at a time.
- For example,
-
- 'libextractor_pdf'
-
- unloads the PDF extractor (if loaded). No errors are
- reported if no matching plugin is found.
- """
- self.__plugins = _extractor.unload(self.__plugins, plugs)
- return None
- def extract(self,filename):
- """Pass a filename to extract keywords.
-
- This function returns a list of Keyword objects.
- If the file cannot be opened or cannot be found,
- the list will be empty. The list can also be empty
- if no metadata was found for the file.
- """
- return _extractor.extract(self.__plugins, filename, Keyword)
-
-class Keyword(object):
- def __init__(self,type,value):
- self.__type = type
- self.__value = value.decode("utf-8")
- def __repr__(self):
- return u"%s(%i,%r)" %
(self.__class__.__name__,self.__type,self.__value)
- def __str__(self):
- return u"%s: %s" % (self.__getType(), self.__getValue())
- def __getType(self):
- return _extractor.getKeywordTypeAsString(self.__type).decode("utf-8")
- def __getValue(self):
- return self.__value
- def __hash__(self):
- return hash(self.__value)+self.__type
-
- type = property(__getType,None,None,"Type of the Keyword (i.e. author,
title)")
- value = property(__getValue,None,None,"Value of the Keyword (i.e. 'The GNU
GPL')")
Modified: Extractor-python/Makefile.am
===================================================================
--- Extractor-python/Makefile.am 2005-08-27 22:50:38 UTC (rev 1975)
+++ Extractor-python/Makefile.am 2005-08-27 23:07:16 UTC (rev 1976)
@@ -6,5 +6,4 @@
extract.py \
libextractor_python_setup.py \
libextractor_python.c \
- Extractor.py \
README.debian
\ No newline at end of file
Modified: Extractor-python/extract.py
===================================================================
--- Extractor-python/extract.py 2005-08-27 22:50:38 UTC (rev 1975)
+++ Extractor-python/extract.py 2005-08-27 23:07:16 UTC (rev 1976)
@@ -21,10 +21,10 @@
Little demo how to use the libextractor Python binding.
"""
-import Extractor
+import extractor
import sys
-xtract = Extractor.Extractor()
+xtract = extractor.Extractor()
for arg in sys.argv[1:]:
print "Keywords from " + arg
keys = xtract.extract(arg);
Modified: Extractor-python/libextractor_python_setup.py
===================================================================
--- Extractor-python/libextractor_python_setup.py 2005-08-27 22:50:38 UTC
(rev 1975)
+++ Extractor-python/libextractor_python_setup.py 2005-08-27 23:07:16 UTC
(rev 1976)
@@ -10,7 +10,7 @@
library_dirs=[path + "/lib"])
setup(name="Extractor",
- version="0.5.1",
+ version="0.5.4",
ext_modules=[cmod],
author="Christian Grothoff, Heiko Wundram",
author_email="address@hidden")
Modified: GNUnet/src/applications/fs/ecrs/directory.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/directory.c 2005-08-27 22:50:38 UTC (rev
1975)
+++ GNUnet/src/applications/fs/ecrs/directory.c 2005-08-27 23:07:16 UTC (rev
1976)
@@ -108,7 +108,9 @@
return SYSERR; /* illegal in directory! */
}
- memcpy(&mdSize, &data[pos], sizeof(unsigned int));
+ memcpy(&mdSize,
+ &data[pos],
+ sizeof(unsigned int));
mdSize = ntohl(mdSize);
pos += sizeof(unsigned int);
@@ -126,7 +128,7 @@
pos += mdSize;
count++;
if (spcb != NULL)
- spcb(&fi, NULL, spcbClosure);
+ spcb(&fi, NULL, NO, spcbClosure);
ECRS_freeMetaData(fi.meta);
ECRS_freeUri(fi.uri);
}
Modified: GNUnet/src/applications/fs/ecrs/search.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/search.c 2005-08-27 22:50:38 UTC (rev
1975)
+++ GNUnet/src/applications/fs/ecrs/search.c 2005-08-27 23:07:16 UTC (rev
1976)
@@ -296,7 +296,7 @@
uri.data.sks.namespace = nb->namespace;
uri.data.sks.identifier = nb->rootEntry;
if (sqc->spcb != NULL) {
- ret = sqc->spcb(&fi, key, sqc->spcbClosure);
+ ret = sqc->spcb(&fi, key, YES, sqc->spcbClosure);
if (ret == SYSERR)
sqc->aborted = YES;
} else
@@ -397,6 +397,7 @@
if (sqc->spcb != NULL) {
ret = sqc->spcb(&fi,
&ps->decryptKey,
+ NO,
sqc->spcbClosure);
if (ret == SYSERR)
sqc->aborted = YES;
@@ -480,7 +481,7 @@
return SYSERR;
}
if (sqc->spcb != NULL) {
- ret = sqc->spcb(&fi, NULL, sqc->spcbClosure);
+ ret = sqc->spcb(&fi, NULL, NO, sqc->spcbClosure);
if (ret == SYSERR)
sqc->aborted = YES;
} else
Modified: GNUnet/src/applications/fs/ecrs/uri.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/uri.c 2005-08-27 22:50:38 UTC (rev
1975)
+++ GNUnet/src/applications/fs/ecrs/uri.c 2005-08-27 23:07:16 UTC (rev
1976)
@@ -440,6 +440,21 @@
}
/**
+ * Get the content ID of an SKS URI.
+ *
+ * @return OK on success
+ */
+int ECRS_getSKSContentHash(const struct ECRS_URI * uri,
+ HashCode512 * id) {
+ if (! ECRS_isNamespaceUri(uri)) {
+ BREAK();
+ return SYSERR;
+ }
+ *id = uri->data.sks.identifier;
+ return OK;
+}
+
+/**
* Is this a keyword URI?
*/
int ECRS_isKeywordUri(const struct ECRS_URI * uri) {
Modified: GNUnet/src/applications/fs/fsui/collection.c
===================================================================
--- GNUnet/src/applications/fs/fsui/collection.c 2005-08-27 22:50:38 UTC
(rev 1975)
+++ GNUnet/src/applications/fs/fsui/collection.c 2005-08-27 23:07:16 UTC
(rev 1976)
@@ -307,7 +307,9 @@
static int collectCallback(const ECRS_FileInfo * fi,
const HashCode512 * key,
- struct CCcls * cls) {
+ int isRoot,
+ void * closure) {
+ struct CCcls * cls = closure;
GROW(cls->fis,
cls->count,
cls->count+1);
@@ -352,10 +354,11 @@
ECRS_listDirectory(&cd->name[strlen(cd->name)+1],
dirLen,
&metaData,
- (ECRS_SearchProgressCallback)
&collectCallback,
+ &collectCallback,
&cls));
collectCallback(fi,
NULL,
+ NO,
&cls);
dirData = NULL;
GNUNET_ASSERT(OK ==
Modified: GNUnet/src/applications/fs/fsui/download.c
===================================================================
--- GNUnet/src/applications/fs/fsui/download.c 2005-08-27 22:50:38 UTC (rev
1975)
+++ GNUnet/src/applications/fs/fsui/download.c 2005-08-27 23:07:16 UTC (rev
1976)
@@ -48,12 +48,16 @@
static int triggerRecursiveDownload(const ECRS_FileInfo * fi,
const HashCode512 * key,
+ int isRoot,
void * prnt) {
FSUI_DownloadList * parent = prnt;
int i;
FSUI_DownloadList * pos;
char * filename;
char * fullName;
+
+ if (isRoot == YES)
+ return OK; /* namespace ad, ignore */
FSUI_trackURI(fi);
for (i=0;i<parent->completedDownloadsCount;i++)
@@ -228,7 +232,7 @@
ECRS_listDirectory(dirBlock,
totalBytes,
&md,
- (ECRS_SearchProgressCallback)
&triggerRecursiveDownload,
+ &triggerRecursiveDownload,
dl);
MUTEX_UNLOCK(&dl->ctx->lock);
ECRS_freeMetaData(md);
Modified: GNUnet/src/applications/fs/fsui/file_info.c
===================================================================
--- GNUnet/src/applications/fs/fsui/file_info.c 2005-08-27 22:50:38 UTC (rev
1975)
+++ GNUnet/src/applications/fs/fsui/file_info.c 2005-08-27 23:07:16 UTC (rev
1976)
@@ -200,6 +200,7 @@
if (iterator != NULL) {
if (OK != iterator(&fi,
NULL,
+ NO,
closure)) {
ECRS_freeMetaData(fi.meta);
ECRS_freeUri(fi.uri);
Modified: GNUnet/src/applications/fs/fsui/namespace_info.c
===================================================================
--- GNUnet/src/applications/fs/fsui/namespace_info.c 2005-08-27 22:50:38 UTC
(rev 1975)
+++ GNUnet/src/applications/fs/fsui/namespace_info.c 2005-08-27 23:07:16 UTC
(rev 1976)
@@ -33,6 +33,7 @@
#define NS_DIR "data" DIR_SEPARATOR_STR "namespaces" DIR_SEPARATOR_STR
#define NS_UPDATE_DIR "data" DIR_SEPARATOR_STR "namespace-updates"
DIR_SEPARATOR_STR
+#define NS_ROOTS "data" DIR_SEPARATOR_STR "namespace-root" DIR_SEPARATOR_STR
static void writeNamespaceInfo(const char * namespaceName,
const struct ECRS_MetaData * meta,
@@ -431,9 +432,12 @@
return SYSERR;
}
}
- *updateInterval = ntohl(buf->updateInterval);
- *lastPubTime = ntohl(buf->lastPubTime);
- *nextId = buf->nextId;
+ if (updateInterval != NULL)
+ *updateInterval = ntohl(buf->updateInterval);
+ if (lastPubTime != NULL)
+ *lastPubTime = ntohl(buf->lastPubTime);
+ if (nextId != NULL)
+ *nextId = buf->nextId;
FREE(buf);
return OK;
}
@@ -493,8 +497,36 @@
const HashCode512 * thisId,
TIME_T updateInterval,
HashCode512 * nextId) {
- BREAK();
- return SYSERR; /* not implemented -- FIXME! */
+ HashCode512 delta;
+ cron_t now;
+ TIME_T tnow;
+ TIME_T lastTime;
+ TIME_T ui;
+
+ if ( (updateInterval == ECRS_SBLOCK_UPDATE_SPORADIC) ||
+ (updateInterval == ECRS_SBLOCK_UPDATE_NONE) )
+ return SYSERR;
+
+ if (OK != readUpdateData(name,
+ lastId,
+ NULL,
+ NULL,
+ &ui,
+ &lastTime))
+ return SYSERR;
+ deltaId(lastId,
+ thisId,
+ &delta);
+ cronTime(&now);
+ TIME(&tnow);
+ *nextId = *thisId;
+ while (lastTime < tnow + updateInterval/2) {
+ lastTime += updateInterval;
+ addHashCodes(nextId,
+ &delta,
+ nextId);
+ }
+ return OK;
}
@@ -792,7 +824,32 @@
*/
int FSUI_getNamespaceRoot(const char * ns,
HashCode512 * root) {
- return SYSERR; /* FIXME: not implemented */
+ char * buf;
+ char * fn;
+ char * fnBase;
+ int ret;
+
+ fn = getConfigurationString("GNUNET", "GNUNET_HOME");
+ fnBase = expandFileName(fn);
+ FREE(fn);
+ fn = MALLOC(strlen(fnBase) +
+ strlen(NS_ROOTS) +
+ strlen(ns) +
+ 6);
+ strcpy(fn, fnBase);
+ strcat(fn, DIR_SEPARATOR_STR);
+ strcat(fn, NS_ROOTS);
+ mkdirp(fn);
+ strcat(fn, DIR_SEPARATOR_STR);
+ strcat(fn, ns);
+ FREE(fnBase);
+ if (sizeof(HashCode512)
+ == readFile(fn, sizeof(HashCode512), root))
+ ret = OK;
+ else
+ ret = SYSERR;
+ FREE(fn);
+ return ret;
}
Modified: GNUnet/src/applications/fs/fsui/search.c
===================================================================
--- GNUnet/src/applications/fs/fsui/search.c 2005-08-27 22:50:38 UTC (rev
1975)
+++ GNUnet/src/applications/fs/fsui/search.c 2005-08-27 23:07:16 UTC (rev
1976)
@@ -33,6 +33,9 @@
#define DEBUG_SEARCH NO
+/* must match namespace_info.c */
+#define NS_ROOTS "data" DIR_SEPARATOR_STR "namespace-root" DIR_SEPARATOR_STR
+
/**
* Pass the result to the client and note it as shown.
*/
@@ -55,17 +58,62 @@
&event);
}
+static void setNamespaceRoot(const ECRS_FileInfo * fi) {
+ char * fn;
+ char * fnBase;
+ HashCode512 ns;
+ char * name;
+
+ if (OK != ECRS_getNamespaceId(fi->uri,
+ &ns)) {
+ BREAK();
+ return;
+ }
+ name = ECRS_getNamespaceName(&ns);
+ fn = getConfigurationString("GNUNET", "GNUNET_HOME");
+ fnBase = expandFileName(fn);
+ FREE(fn);
+ fn = MALLOC(strlen(fnBase) +
+ strlen(NS_ROOTS) +
+ strlen(name) +
+ 6);
+ strcpy(fn, fnBase);
+ strcat(fn, DIR_SEPARATOR_STR);
+ strcat(fn, NS_ROOTS);
+ mkdirp(fn);
+ strcat(fn, DIR_SEPARATOR_STR);
+ strcat(fn, name);
+ FREE(name);
+ FREE(fnBase);
+ if (OK == ECRS_getSKSContentHash(fi->uri,
+ &ns)) {
+ writeFile(fn,
+ &ns,
+ sizeof(HashCode512),
+ "644");
+ }
+ FREE(fn);
+}
+
/**
* Process results found by ECRS.
*/
static int spcb(const ECRS_FileInfo * fi,
const HashCode512 * key,
- FSUI_SearchList * pos) {
+ int isRoot,
+ void * cls) {
+ FSUI_SearchList * pos = cls;
unsigned int i;
unsigned int j;
ResultPending * rp;
FSUI_trackURI(fi);
+ if (isRoot) {
+ setNamespaceRoot(fi);
+ FSUI_addNamespaceInfo(fi->uri,
+ fi->meta);
+ return OK;
+ }
for (i=0;i<pos->sizeResultsReceived;i++)
if (ECRS_equalsUri(fi->uri,
pos->resultsReceived[i].uri)) {
@@ -172,7 +220,7 @@
ECRS_search(pos->uri,
pos->anonymityLevel,
cronTime(NULL) + cronYEARS, /* timeout!?*/
- (ECRS_SearchProgressCallback) &spcb,
+ &spcb,
pos,
(ECRS_TestTerminate) &testTerminate,
pos);
Modified: GNUnet/src/applications/fs/tools/gnunet-directory.c
===================================================================
--- GNUnet/src/applications/fs/tools/gnunet-directory.c 2005-08-27 22:50:38 UTC
(rev 1975)
+++ GNUnet/src/applications/fs/tools/gnunet-directory.c 2005-08-27 23:07:16 UTC
(rev 1976)
@@ -53,6 +53,7 @@
static int printNode(const ECRS_FileInfo * fi,
const HashCode512 * key,
+ int isRoot,
void * unused) {
char * string;
Modified: GNUnet/src/include/gnunet_ecrs_lib.h
===================================================================
--- GNUnet/src/include/gnunet_ecrs_lib.h 2005-08-27 22:50:38 UTC (rev
1975)
+++ GNUnet/src/include/gnunet_ecrs_lib.h 2005-08-27 23:07:16 UTC (rev
1976)
@@ -310,6 +310,12 @@
HashCode512 * nsid);
/**
+ * Get the content ID of an SKS URI.
+ */
+int ECRS_getSKSContentHash(const struct ECRS_URI * uri,
+ HashCode512 * nsid);
+
+/**
* Is this a keyword URI?
*/
int ECRS_isKeywordUri(const struct ECRS_URI * uri);
@@ -551,12 +557,14 @@
* @param uri the URI of the datum
* @param key under which the result was found (hash of keyword),
* NULL if no key is known
+ * @param isRoot is this a namespace root advertisement?
* @param md a description for the URI
* @return OK, SYSERR to abort
*/
typedef int (*ECRS_SearchProgressCallback)
(const ECRS_FileInfo * fi,
const HashCode512 * key,
+ int isRoot,
void * closure);
/**
Modified: GNUnet/src/util/timer.c
===================================================================
--- GNUnet/src/util/timer.c 2005-08-27 22:50:38 UTC (rev 1975)
+++ GNUnet/src/util/timer.c 2005-08-27 23:07:16 UTC (rev 1976)
@@ -87,6 +87,8 @@
req.tv_nsec
= (delay - req.tv_sec * CRON_UNIT_TO_SECONDS)
* NANOSEC_TO_CRON_UNIT;
+ rem.tv_sec = 0;
+ rem.tv_nsec = 0;
if (0 != nanosleep(&req, &rem)) {
if (errno == EINTR) {
return 1;
Modified: GNUnet-docs/WWW/download.php3
===================================================================
--- GNUnet-docs/WWW/download.php3 2005-08-27 22:50:38 UTC (rev 1975)
+++ GNUnet-docs/WWW/download.php3 2005-08-27 23:07:16 UTC (rev 1976)
@@ -18,7 +18,7 @@
<li><strong><?php W("Required:"); ?></strong>
<a href="http://www.gnu.org/directory/security/libgcrypt.html">libgcrypt
(>= 1.2.0)</a></li>
<li><strong><?php W("Required:"); ?></strong>
- <a href="/libextractor/">libextractor (>= 0.5.3)</a></li>
+ <a href="/libextractor/">libextractor (>= 0.5.4)</a></li>
<li><strong><?php W("Required:"); ?></strong>
<a href="http://www.sqlite.org/">sqlite</a> (>= 3.0.0) <?php W("or");
?>
<a href="http://www.mysql.com/">mysql</a> (>= 4.1)</li>
@@ -77,10 +77,10 @@
echo "<ul>\n";
LIV(extlink_("download/GNUnet-0.6.6b.tar.bz2","GNUnet-0.6.6b.tar.bz2 (1291
kb)"));
LIV(extlink_("download/GNUnet-0.6.6b.tar.gz","GNUnet-0.6.6b.tar.gz (1737
kb)"));
-LIV(extlink_("/libextractor/download/libextractor-0.5.3.tar.bz2",
- "libextractor-0.5.2.tar.bz2 (6383 kb)"));
-LIV(extlink_("/libextractor/download/libextractor-0.5.3.tar.gz",
- "libextractor-0.5.2.tar.gz (6019 kb)"));
+LIV(extlink_("/libextractor/download/libextractor-0.5.4.tar.bz2",
+ "libextractor-0.5.4.tar.bz2 (6383 kb)"));
+LIV(extlink_("/libextractor/download/libextractor-0.5.4.tar.gz",
+ "libextractor-0.5.4.tar.gz (6019 kb)"));
echo "</ul>\n";
P();
W("The next major release will be %s and is expected %s.",
Modified: gnunet-gtk/po/Makefile.in
===================================================================
--- gnunet-gtk/po/Makefile.in 2005-08-27 22:50:38 UTC (rev 1975)
+++ gnunet-gtk/po/Makefile.in 2005-08-27 23:07:16 UTC (rev 1976)
@@ -20,7 +20,7 @@
top_srcdir = ..
-prefix = /home/grothoff/
+prefix = /home/grothoff
exec_prefix = ${prefix}
datadir = ${prefix}/share
localedir = $(datadir)/locale
Modified: gnunet-gtk/src/plugins/fs/namespace.c
===================================================================
--- gnunet-gtk/src/plugins/fs/namespace.c 2005-08-27 22:50:38 UTC (rev
1975)
+++ gnunet-gtk/src/plugins/fs/namespace.c 2005-08-27 23:07:16 UTC (rev
1976)
@@ -161,6 +161,7 @@
*/
static int updateView(const ECRS_FileInfo * fi,
const HashCode512 * key,
+ int isRoot,
void * closure) {
GtkTreeModel * model = GTK_TREE_MODEL(closure);
struct ECRS_URI * euri;
Modified: gnunet-gtk/src/plugins/fs/search.c
===================================================================
--- gnunet-gtk/src/plugins/fs/search.c 2005-08-27 22:50:38 UTC (rev 1975)
+++ gnunet-gtk/src/plugins/fs/search.c 2005-08-27 23:07:16 UTC (rev 1976)
@@ -199,8 +199,10 @@
GtkTreeModel * model;
GtkTreeIter iter;
char * encStr;
+ char * description;
int rating;
-
+ int newrating;
+
spin
= glade_xml_get_widget(getMainXML(),
"namespaceRatingSpinButton");
@@ -212,24 +214,33 @@
&iter)) {
gtk_tree_model_get(model,
&iter,
+ NS_SEARCH_DESCRIPTION, &description,
NS_SEARCH_ENCNAME, &encStr,
NS_SEARCH_RATING, &rating,
- -1);
- if (0 == strcmp(encStr,
- _("globally"))) {
- BREAK(); /* spin button should be insensitive! */
+ -1);
+ if ( (description != NULL) &&
+ (0 == strcmp(description,
+ _("globally"))) ) {
+ /* just to be sure */
gtk_widget_set_sensitive(spin,
FALSE);
} else {
- FSUI_rankNamespace(ctx,
- encStr,
- rating - FSUI_rankNamespace(ctx,
- encStr,
- 0));
- gtk_list_store_set(GTK_LIST_STORE(model),
- &iter,
- NS_SEARCH_RATING, rating,
- -1);
+ if (encStr != NULL) {
+ newrating = gtk_spin_button_get_value(GTK_SPIN_BUTTON(spin));
+ rating = FSUI_rankNamespace(ctx,
+ encStr,
+ newrating - rating);
+ if (rating != newrating) {
+ /* concurrent modification? */
+ gtk_spin_button_set_value(GTK_SPIN_BUTTON(spin),
+ rating);
+ BREAK();
+ }
+ gtk_list_store_set(GTK_LIST_STORE(model),
+ &iter,
+ NS_SEARCH_RATING, rating,
+ -1);
+ }
}
} else {
/* FIXME: if enc2hash succeeds, we may want to keep this
@@ -255,6 +266,7 @@
GtkTreeIter iter;
int rating;
char * encStr;
+ char * descStr;
HashCode512 ns;
HashCode512 root;
EncName enc;
@@ -269,22 +281,21 @@
if (TRUE == gtk_combo_box_get_active_iter(GTK_COMBO_BOX(ncbe),
&iter)) {
encStr = NULL;
+ descStr = NULL;
gtk_tree_model_get(model,
&iter,
+ NS_SEARCH_DESCRIPTION, &descStr,
NS_SEARCH_ENCNAME, &encStr,
NS_SEARCH_RATING, &rating,
-1);
-
- if (!encStr)
- return;
-
- if (0 == strcmp(encStr,
- _("globally"))) {
+ if ( (descStr != NULL) &&
+ (0 == strcmp(descStr,
+ _("globally"))) ) {
gtk_spin_button_set_value(GTK_SPIN_BUTTON(spin),
0);
gtk_widget_set_sensitive(spin,
FALSE);
- } else {
+ } else if (encStr != NULL) {
enc2hash(encStr,
&ns);
gtk_spin_button_set_value(GTK_SPIN_BUTTON(spin),
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r1976 - Extractor Extractor/src/include Extractor-docs/WWW Extractor-python GNUnet/src/applications/fs/ecrs GNUnet/src/applications/fs/fsui GNUnet/src/applications/fs/tools GNUnet/src/include GNUnet/src/util GNUnet-docs/WWW gnunet-gtk/po gnunet-gtk/src/plugins/fs,
grothoff <=