diff options
Diffstat (limited to 'src/xsane-rc-io.c')
-rw-r--r-- | src/xsane-rc-io.c | 15 |
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; |