summaryrefslogtreecommitdiff
path: root/src/xsane-rc-io.c
diff options
context:
space:
mode:
authorAurelien Jarno <aurel32@debian.org>2005-02-03 16:24:20 +0100
committerMattia Rizzolo <mattia@mapreri.org>2014-10-03 14:05:06 +0000
commit825ef604db05e42ea267a86187bf62d54670c98c (patch)
treec41b8addd68e573fcf6ef599ec777e251a130b8e /src/xsane-rc-io.c
parentac8459519a9ef2a1ee635509b52a653da1bfe9d5 (diff)
parent817e6294b42b3e4435f1b99728afc1dca84a6445 (diff)
Imported Debian patch 0.97-3debian/0.97-3
Diffstat (limited to 'src/xsane-rc-io.c')
-rw-r--r--src/xsane-rc-io.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/xsane-rc-io.c b/src/xsane-rc-io.c
index 9fe991c..4a0af86 100644
--- a/src/xsane-rc-io.c
+++ b/src/xsane-rc-io.c
@@ -3,7 +3,7 @@
xsane-rc-io.c
Oliver Rauch <Oliver.Rauch@rauch-domain.de>
- Copyright (C) 1998-2002 Oliver Rauch
+ Copyright (C) 1998-2005 Oliver Rauch
This file is part of the XSANE package.
This program is free software; you can redistribute it and/or modify
@@ -24,13 +24,8 @@
#include "xsane.h"
-#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/types.h>
#include <sane/sane.h>
#include <ctype.h>
-#include <unistd.h>
#ifdef HAVE_LIBC_H
# include <libc.h> /* NeXTStep/OpenStep */
@@ -722,12 +717,18 @@ void xsane_rc_io_w_string(Wire *w, SANE_String *s)
}
else
{
+#if 0
xsane_rc_io_w_space(w, 5);
*w->buffer.curr++ = '(';
*w->buffer.curr++ = 'n';
*w->buffer.curr++ = 'i';
*w->buffer.curr++ = 'l';
*w->buffer.curr++ = ')';
+#else
+ xsane_rc_io_w_space(w, 2);
+ *w->buffer.curr++ = '"';
+ *w->buffer.curr++ = '"';
+#endif
}
xsane_rc_io_w_space(w, 1);
@@ -804,12 +805,14 @@ void xsane_rc_io_w_string(Wire *w, SANE_String *s)
if (*s == 0)
{
/* Malloc failed, so return an error. */
+ DBG(DBG_wire, "xsane_rc_io_w_string: out of memory\n");
w->status = ENOMEM;
return;
}
}
else /* string does not begin with a " */
{
+ DBG(DBG_wire, "xsane_rc_io_w_string: not a string\n");
w->status = EINVAL;
*s = 0; /* make sure pointer does not point to an invalid address */
return;