diff --git a/ChangeLog b/ChangeLog index 4411b8e5a..72fc52bcd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,7 +3,9 @@ * doc/descriptions/unsupported.desc: Added Xerox 4800. * doc/descriptions.txt tools/sane-desc.c: Added support for keyword :usbid. All output modes now print the usb vendor and - product modes. + product modes. Added usermap, db, and udev output modes for + generating USB vendor/product lists for hotplug (ng) and Linux + udev. Added version information to html modes. * doc/descriptions/gt68xx.desc: Added vendor and product ids for all scanners. diff --git a/tools/sane-desc.c b/tools/sane-desc.c index f4caf56ca..f690d963f 100644 --- a/tools/sane-desc.c +++ b/tools/sane-desc.c @@ -22,7 +22,7 @@ MA 02111-1307, USA. */ -#define SANE_DESC_VERSION "3.0" +#define SANE_DESC_VERSION "3.1" #define MAN_PAGE_LINK "http://www.sane-project.org/man/%s.5.html" #define COLOR_MINIMAL "\"#B00000\"" @@ -71,7 +71,10 @@ typedef enum output_mode output_mode_html_backends, output_mode_html_backends_split, output_mode_html_mfgs, - output_mode_statistics + output_mode_statistics, + output_mode_usermap, + output_mode_db, + output_mode_udev } output_mode; @@ -202,6 +205,23 @@ mfg_record_entry; typedef int statistics_type [status_complete + 1]; + +typedef struct manufacturer_model_type +{ + struct manufacturer_model_type * next; + char *name; +} +manufacturer_model_type; + +typedef struct usbid_type +{ + struct usbid_type * next; + char *usb_vendor_id; + char *usb_product_id; + struct manufacturer_model_type *name; +} +usbid_type; + static char *program_name; static int debug = 0; static int current_debug_level = 0; @@ -269,7 +289,7 @@ print_usage (char *program_name) "(multiple directories can be concatenated by \":\")\n"); printf (" -m|--mode mode " "Output mode (ascii, html-backends-split,\n" - " html-mfgs, xml, statistics)\n"); + " html-mfgs, xml, statistics, usermap, db, udev)\n"); printf (" -t|--title \"title\" The title used for HTML pages\n"); printf (" -i|--intro \"intro\" A short description of the " "contents of the page\n"); @@ -351,6 +371,21 @@ get_options (int argc, char **argv) DBG_INFO ("Output mode: %s\n", optarg); mode = output_mode_statistics; } + else if (strcmp (optarg, "usermap") == 0) + { + DBG_INFO ("Output mode: %s\n", optarg); + mode = output_mode_usermap; + } + else if (strcmp (optarg, "db") == 0) + { + DBG_INFO ("Output mode: %s\n", optarg); + mode = output_mode_db; + } + else if (strcmp (optarg, "udev") == 0) + { + DBG_INFO ("Output mode: %s\n", optarg); + mode = output_mode_udev; + } else { DBG_ERR ("Unknown output mode: %s\n", optarg); @@ -2555,8 +2590,8 @@ html_print_footer (void) "
\n" "Contact\n" "\n" "\n"); - printf ("This page was last updated on %s\n", - asctime (localtime (¤t_time))); + printf ("This page was last updated on %s by sane-desc %s from %s\n", + asctime (localtime (¤t_time)), SANE_DESC_VERSION, PACKAGE_STRING); printf ("\n"); printf ("