Patch for scanimage.c/scanimage.man

From: Henning Meier-Geinitz (hmg-ml@gmx.de)
Date: Sat Sep 30 2000 - 08:21:35 PDT

  • Next message: Henning Meier-Geinitz: "Patch for sane.tex (image polarity)"

    Hi,

    this is a patch for scanimage.man and scanimage.c. It adds the messages
    proposed by Nick (slightly varied) and adds two examples to scanimage.man.
    Comments?

    Bye,
      Henning

    Index: doc/scanimage.man
    ===================================================================
    RCS file: /cvsroot/external/sane/doc/scanimage.man,v
    retrieving revision 1.2
    diff -u -r1.2 scanimage.man
    --- scanimage.man 2000/08/12 15:10:39 1.2
    +++ scanimage.man 2000/09/30 15:19:56
    @@ -1,4 +1,4 @@
    -.TH scanimage 1 "29 April 2000"
    +.TH scanimage 1 "30 September 2000"
     .IX scanimage
     .SH NAME
     scanimage - scan an image
    @@ -35,8 +35,9 @@
     .B -d
     or
     .B --device-name
    -options must be followed by a SANE device-name. A (partial) list of
    -available devices can be obtained with the
    +options must be followed by a SANE device-name like "epson:/dev/sg0" or
    +"hp:/dev/usbscanner0". A (partial) list of available devices can be obtained
    +with the
     .B --list-devices
     option (see below). If no device-name is specified explicitly,
     .B scanimage
    Index: frontend/scanimage.c
    ===================================================================
    RCS file: /cvsroot/external/sane/frontend/scanimage.c,v
    retrieving revision 1.4
    diff -u -r1.4 scanimage.c
    --- scanimage.c 2000/09/24 19:38:30 1.4
    +++ scanimage.c 2000/09/30 15:20:01
    @@ -1186,8 +1186,14 @@
                              device_list[i]->name, device_list[i]->vendor,
                              device_list[i]->model, device_list[i]->type);
                   }
    - if (defdevname)
    - printf ("default device is `%s'\n", defdevname);
    + if (i == 0)
    + printf ("\nNo scanners were identified. If you were expecting "
    + "something different,\ncheck that the scanner is plugged "
    + "in, turned on and detected by the\nfind-scanner tool (if "
    + "appropriate). Please read the documentation which came\n"
    + "with this software (README, FAQ, manpages).\n");
    + if (defdevname)
    + printf ("default device is `%s'\n", defdevname);
     
                 exit (0);
               }
    @@ -1246,6 +1252,14 @@
         {
           fprintf (stderr, "%s: open of device %s failed: %s\n",
                    prog_name, devname, sane_strstatus (status));
    + if (devname[0] == '/')
    + fprintf (stderr, "\nYou seem to have specified a UNIX device name, "
    + "or filename instead of selecting\nthe SANE scanner or "
    + "image acquisition device you want to use. As an example,\n"
    + "you might want \"epson:/dev/sg0\" or "
    + "\"hp:/dev/usbscanner0\". If any supported\ndevices are "
    + "installed in your system, you should be able to see a "
    + "list with\n\"scanimage --list-devices\".\n");
           if (help)
             device = 0;
           else

    --
    Source code, list archive, and docs: http://www.mostang.com/sane/
    To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com
    



    This archive was generated by hypermail 2b29 : Sat Sep 30 2000 - 09:41:26 PDT