aboutsummaryrefslogtreecommitdiff
path: root/multimedia/gxine/files
diff options
context:
space:
mode:
authorMartin Wilke <miwi@FreeBSD.org>2008-06-18 23:34:42 +0000
committerMartin Wilke <miwi@FreeBSD.org>2008-06-18 23:34:42 +0000
commita44a52fb21b72debf71a75a88e89027137f2b8cf (patch)
tree401cb250751aeddd61364e5bd62615e848be5a58 /multimedia/gxine/files
parenta2f50f224305c7f440eb83fe26c3575098499a3d (diff)
downloadports-a44a52fb21b72debf71a75a88e89027137f2b8cf.tar.gz
ports-a44a52fb21b72debf71a75a88e89027137f2b8cf.zip
Notes
Diffstat (limited to 'multimedia/gxine/files')
-rw-r--r--multimedia/gxine/files/patch-src_console_output.c156
-rw-r--r--multimedia/gxine/files/patch-src_desktop_integration.c20
2 files changed, 176 insertions, 0 deletions
diff --git a/multimedia/gxine/files/patch-src_console_output.c b/multimedia/gxine/files/patch-src_console_output.c
new file mode 100644
index 000000000000..913bc0ca11df
--- /dev/null
+++ b/multimedia/gxine/files/patch-src_console_output.c
@@ -0,0 +1,156 @@
+--- ./src/console_output.c.orig 2008-06-12 04:48:13.000000000 +0400
++++ ./src/console_output.c 2008-06-15 18:04:23.000000000 +0400
+@@ -44,6 +44,153 @@
+ #else
+ /* defines & functions for gxine */
+
++/* from src/contrib/cvs/lib/getline.h */
++#if defined (__GNUC__) || (defined (__STDC__) && __STDC__)
++#define __PROTO(args) args
++#else
++#define __PROTO(args) ()
++#endif /* GCC. */
++
++#define GETLINE_NO_LIMIT -1
++
++int
++ getline __PROTO ((char **_lineptr, size_t *_n, FILE *_stream));
++int
++ getline_safe __PROTO ((char **_lineptr, size_t *_n, FILE *_stream,
++ int limit));
++int
++ getstr __PROTO ((char **_lineptr, size_t *_n, FILE *_stream,
++ int _terminator, int _offset, int limit));
++
++/* getline.h */
++/* from src/contrib/cvs/lib/getline.c */
++
++#include <sys/types.h>
++#include <assert.h>
++#include <errno.h>
++
++#define MIN_CHUNK 64
++
++int
++getstr (lineptr, n, stream, terminator, offset, limit)
++ char **lineptr;
++ size_t *n;
++ FILE *stream;
++ int terminator;
++ int offset;
++ int limit;
++{
++ int nchars_avail; /* Allocated but unused chars in *LINEPTR. */
++ char *read_pos; /* Where we're reading into *LINEPTR. */
++ int ret;
++
++ if (!lineptr || !n || !stream)
++ {
++ errno = EINVAL;
++ return -1;
++ }
++
++ if (!*lineptr)
++ {
++ *n = MIN_CHUNK;
++ *lineptr = malloc (*n);
++ if (!*lineptr)
++ {
++ errno = ENOMEM;
++ return -1;
++ }
++ *lineptr[0] = '\0';
++ }
++
++ nchars_avail = *n - offset;
++ read_pos = *lineptr + offset;
++
++ for (;;)
++ {
++ int save_errno;
++ register int c;
++
++ if (limit == 0)
++ break;
++ else
++ {
++ c = getc (stream);
++
++ /* If limit is negative, then we shouldn't pay attention to
++ it, so decrement only if positive. */
++ if (limit > 0)
++ limit--;
++ }
++
++ save_errno = errno;
++
++ /* We always want at least one char left in the buffer, since we
++ always (unless we get an error while reading the first char)
++ NUL-terminate the line buffer. */
++
++ assert((*lineptr + *n) == (read_pos + nchars_avail));
++ if (nchars_avail < 2)
++ {
++ if (*n > MIN_CHUNK)
++ *n *= 2;
++ else
++ *n += MIN_CHUNK;
++
++ nchars_avail = *n + *lineptr - read_pos;
++ *lineptr = realloc (*lineptr, *n);
++ if (!*lineptr)
++ {
++ errno = ENOMEM;
++ return -1;
++ }
++ read_pos = *n - nchars_avail + *lineptr;
++ assert((*lineptr + *n) == (read_pos + nchars_avail));
++ }
++
++ if (ferror (stream))
++ {
++ /* Might like to return partial line, but there is no
++ place for us to store errno. And we don't want to just
++ lose errno. */
++ errno = save_errno;
++ return -1;
++ }
++
++ if (c == EOF)
++ {
++ /* Return partial line, if any. */
++ if (read_pos == *lineptr)
++ return -1;
++ else
++ break;
++ }
++
++ *read_pos++ = c;
++ nchars_avail--;
++
++ if (c == terminator)
++ /* Return the line. */
++ break;
++ }
++
++ /* Done - NUL terminate and return the number of chars read. */
++ *read_pos = '\0';
++
++ ret = read_pos - (*lineptr + offset);
++ return ret;
++}
++
++int
++getline (lineptr, n, stream)
++ char **lineptr;
++ size_t *n;
++ FILE *stream;
++{
++ return getstr (lineptr, n, stream, '\n', 0, GETLINE_NO_LIMIT);
++}
++
++/* getline.c */
++
+ # include <pthread.h>
+ # include <string.h>
+ # include "log_window.h"
diff --git a/multimedia/gxine/files/patch-src_desktop_integration.c b/multimedia/gxine/files/patch-src_desktop_integration.c
new file mode 100644
index 000000000000..40b110dda350
--- /dev/null
+++ b/multimedia/gxine/files/patch-src_desktop_integration.c
@@ -0,0 +1,20 @@
+--- ./src/desktop_integration.c.orig 2008-05-23 22:42:20.000000000 +0400
++++ ./src/desktop_integration.c 2008-06-15 20:21:03.000000000 +0400
+@@ -123,6 +123,9 @@
+
+ gboolean gxine_vfs_init (void)
+ {
++#ifndef USE_INTEGRATION_WIZARD
++ return gnome_vfs_available = 0;
++#else
+ void (*init_func) (void) = NULL;
+
+ if (gnome_vfs_available != -1)
+@@ -173,6 +176,7 @@
+ #endif
+
+ return gnome_vfs_available = 1;
++#endif
+ }
+
+ /*