[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r31686 - Extractor/src/main
From: |
gnunet |
Subject: |
[GNUnet-SVN] r31686 - Extractor/src/main |
Date: |
Sun, 22 Dec 2013 18:55:27 +0100 |
Author: grothoff
Date: 2013-12-22 18:55:27 +0100 (Sun, 22 Dec 2013)
New Revision: 31686
Modified:
Extractor/src/main/extractor.c
Extractor/src/main/extractor_ipc.c
Log:
-just whitespace
Modified: Extractor/src/main/extractor.c
===================================================================
--- Extractor/src/main/extractor.c 2013-12-22 17:54:34 UTC (rev 31685)
+++ Extractor/src/main/extractor.c 2013-12-22 17:55:27 UTC (rev 31686)
@@ -92,7 +92,7 @@
EXTRACTOR_IPC_channel_destroy_ (plugin->channel);
plugin->channel = NULL;
plugin->round_finished = 1;
- }
+ }
}
@@ -166,7 +166,7 @@
if (0 != prp->file_finished)
{
/* client already aborted, ignore message, tell plugin about abort */
- return;
+ return;
}
if (0 != prp->proc (prp->proc_cls,
plugin->short_libname,
@@ -271,13 +271,13 @@
* Seek in the file. Use 'SEEK_CUR' for whence and 'pos' of 0 to
* obtain the current position in the file.
* Callback used for in-process plugins.
- *
+ *
* @param cls a 'struct InProcessContext'
* @param pos position to seek (see 'man lseek')
* @param whence how to see (absolute to start, relative, absolute to end)
* @return new absolute position, -1 on error (i.e. desired position
* does not exist)
- */
+ */
static int64_t
in_process_seek (void *cls,
int64_t pos,
@@ -294,15 +294,15 @@
/**
* Determine the overall size of the file.
* Callback used for in-process plugins.
- *
+ *
* @param cls a 'struct InProcessContext'
* @return overall file size, UINT64_MAX on error (i.e. IPC failure)
- */
+ */
static uint64_t
in_process_get_size (void *cls)
{
struct InProcessContext *ctx = cls;
-
+
return (uint64_t) EXTRACTOR_datasource_get_size_ (ctx->ds, 0);
}
@@ -318,13 +318,13 @@
* used in the main libextractor library and yielding
* meta data).
* @param type libextractor-type describing the meta data
- * @param format basic format information about data
+ * @param format basic format information about data
* @param data_mime_type mime-type of data (not of the original file);
* can be NULL (if mime-type is not known)
* @param data actual meta-data found
* @param data_len number of bytes in data
* @return 0 to continue extracting, 1 to abort
- */
+ */
static int
in_process_proc (void *cls,
const char *plugin_name,
@@ -363,7 +363,7 @@
* @param proc_cls cls argument to proc
*/
static void
-do_extract (struct EXTRACTOR_PluginList *plugins,
+do_extract (struct EXTRACTOR_PluginList *plugins,
struct EXTRACTOR_SharedMemory *shm,
struct EXTRACTOR_Datasource *ds,
EXTRACTOR_MetaDataProcessor proc, void *proc_cls)
@@ -438,12 +438,12 @@
else
{
/* not running this round, seeking! */
- channels[plugin_off] = NULL;
+ channels[plugin_off] = NULL;
}
plugin_off++;
}
/* give plugins chance to send us meta data, seek or finished messages */
- if (-1 ==
+ if (-1 ==
EXTRACTOR_IPC_channel_recv_ (channels,
plugin_count,
&process_plugin_reply,
@@ -464,12 +464,14 @@
plugin_off++;
if ( (1 == pos->round_finished) ||
(NULL == pos->channel) )
- continue; /* inactive plugin */
+ {
+ continue; /* inactive plugin */
+ }
if (-1 == pos->seek_request)
{
- /* possibly more meta data at current position, at least
+ /* possibly more meta data at current position, at least
this plugin is still working on it... */
- done = 0;
+ done = 0;
break;
}
if (-1 != pos->seek_request)
@@ -485,14 +487,14 @@
pos->seek_request = 0;
}
else
- {
+ {
pos->seek_request = end - pos->seek_request;
}
}
if ( (-1 == min_seek) ||
(min_seek > pos->seek_request) )
{
- min_seek = pos->seek_request;
+ min_seek = pos->seek_request;
}
}
}
@@ -521,16 +523,16 @@
{
/* Skipping plugin: channel down */
continue;
- }
- if ( (-1 != pos->seek_request) &&
+ }
+ if ( (-1 != pos->seek_request) &&
(1 == prp.file_finished) )
{
send_discard_message (pos);
pos->round_finished = 1;
- pos->seek_request = -1;
- }
+ pos->seek_request = -1;
+ }
if ( (-1 != data_available) &&
- (-1 != pos->seek_request) &&
+ (-1 != pos->seek_request) &&
(min_seek <= pos->seek_request) &&
( (min_seek + data_available > pos->seek_request) ||
(min_seek == EXTRACTOR_datasource_get_size_ (ds, 0))) )
@@ -540,10 +542,10 @@
min_seek,
data_available,
ds);
- pos->seek_request = -1;
+ pos->seek_request = -1;
}
if (0 == pos->round_finished)
- done = 0; /* can't be done, plugin still active */
+ done = 0; /* can't be done, plugin still active */
}
}
@@ -615,7 +617,7 @@
datasource = EXTRACTOR_datasource_create_from_file_ (filename,
proc, proc_cls);
if (NULL == datasource)
- return;
+ return;
shm = NULL;
have_oop = 0;
for (pos = plugins; NULL != pos; pos = pos->next)
@@ -658,8 +660,8 @@
/**
* Initialize gettext and libltdl (and W32 if needed).
*/
-void __attribute__ ((constructor))
-EXTRACTOR_ltdl_init ()
+void __attribute__ ((constructor))
+EXTRACTOR_ltdl_init ()
{
int err;
@@ -667,7 +669,7 @@
BINDTEXTDOMAIN (PACKAGE, LOCALEDIR);
#endif
err = lt_dlinit ();
- if (err > 0)
+ if (err > 0)
{
#if DEBUG
fprintf (stderr,
@@ -685,7 +687,7 @@
/**
* Deinit.
*/
-void __attribute__ ((destructor))
+void __attribute__ ((destructor))
EXTRACTOR_ltdl_fini () {
#if WINDOWS
plibc_shutdown ();
Modified: Extractor/src/main/extractor_ipc.c
===================================================================
--- Extractor/src/main/extractor_ipc.c 2013-12-22 17:54:34 UTC (rev 31685)
+++ Extractor/src/main/extractor_ipc.c 2013-12-22 17:55:27 UTC (rev 31686)
@@ -67,7 +67,7 @@
size--;
data++;
continue;
- case MESSAGE_SEEK: /* Seek */
+ case MESSAGE_SEEK: /* Seek */
if (size < sizeof (struct SeekRequestMessage))
{
plugin->seek_request = -1;
@@ -88,13 +88,13 @@
}
memcpy (&meta, cdata, sizeof (meta));
/* check hdr for sanity */
- if (meta.value_size > MAX_META_DATA)
+ if (meta.value_size > MAX_META_DATA)
{
LOG ("Meta data exceeds size limit\n");
return -1; /* not allowing more than MAX_META_DATA meta data */
}
if (size < sizeof (meta) + meta.mime_length + meta.value_size)
- {
+ {
plugin->seek_request = -1;
return ret;
}
@@ -108,7 +108,7 @@
if ('\0' != mime_type[meta.mime_length - 1])
{
LOG ("Mime type not 0-terminated\n");
- return -1;
+ return -1;
}
}
if (0 == meta.value_size)
@@ -117,7 +117,7 @@
value = &cdata[sizeof (struct MetaMessage) + meta.mime_length];
if (meta.meta_type >= EXTRACTOR_metatype_get_max ())
meta.meta_type = EXTRACTOR_METATYPE_UNKNOWN;
- proc (proc_cls,
+ proc (proc_cls,
plugin,
(enum EXTRACTOR_MetaType) meta.meta_type,
(enum EXTRACTOR_MetaFormat) meta.meta_format,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r31686 - Extractor/src/main,
gnunet <=