Hi Aleksey,

Here are two patches that I have been applying to the Debian dictd for
some time -- I don't know why I haven't offered them upstream before.

------------------------------ 8< ------------------------------
--- dictl.in.orig       2004-02-07 07:34:32.000000000 -0500
+++ dictl.in    2005-01-13 14:03:09.000000000 -0500
@@ -93,8 +93,10 @@
            DICTL_PAGER=$2
            shift;;
        *)
-           p=`echo "$1" | charset2charset $DICTL_CHARSET $DICTL_SERVER_CHARSET`
-           params="$params '$p'"
+           p=`echo "$1" | \
+              charset2charset $DICTL_CHARSET $DICTL_SERVER_CHARSET | \
+              sed -e 's/\\([\$\`\"\\]\\)/\\\\\\1/g'`
+           params="$params \"$p\""
 
            # ...to be comatible with dict
            if echo $1 |
------------------------------ >8 ------------------------------

This patch backslash quotes the characters $, ', ", and \ for use in
the subsequent double quoted string.  This fixes the trouble caused by
the single quoted string, as it may not include a ' character.
Without this patch, the command
  dictl "brooks's law"
causes breakage.


------------------------------ 8< ------------------------------
--- dict.c.orig 2005-03-30 05:32:46.000000000 -0500
+++ dict.c      2005-10-01 19:20:36.000000000 -0400
@@ -679,8 +679,8 @@
            }
         }
          client_close_pager();
-        fprintf (stderr,
-                 "Cannot connect to any servers (use -v to see why)\n");
+        fprintf (stderr, "Cannot connect to any servers%s\n",\
+                 dbg_test(DBG_VERBOSE) ? "" : " (use -v to see why)" );
         exit (EXST_CONNECTION_FAILED);
       }
       cmd_reply.host    = c->host;
------------------------------ >8 ------------------------------

This patch just keeps dict from suggesting -v when it has been
invoked with one.


I can check them in via CVS if you desire.

Kirk