From 94b543649cdff70e9b9e203c60f4851a163fa435 Mon Sep 17 00:00:00 2001 From: Henning Geinitz Date: Sun, 7 Jul 2002 21:43:28 +0000 Subject: [PATCH] Added status column for non-hardware devices. Fixed legends. Minor output fixes. Henning Meier-Geinitz --- tools/sane-desc.c | 194 +++++++++++++++++++++++----------------------- 1 file changed, 99 insertions(+), 95 deletions(-) diff --git a/tools/sane-desc.c b/tools/sane-desc.c index f67c30601..d55d1b760 100644 --- a/tools/sane-desc.c +++ b/tools/sane-desc.c @@ -21,7 +21,7 @@ MA 02111-1307, USA. */ -#define SANE_DESC_VERSION "0.5" +#define SANE_DESC_VERSION "0.6" #define MAN_PAGE_LINK "http://www.mostang.com/sane/man/%s.5.html" #define COLOR_ALPHA "#B00000" @@ -236,7 +236,7 @@ print_usage (char *program_name) program_name); printf (" -s|--search-dir dir Specify the directory that contains " ".desc files\n"); - printf (" -m|--mode mode Output mode (ascii, hmtl-backends, " + printf (" -m|--mode mode Output mode (ascii, html-backends, " "html-mfgs)\n"); printf (" -t|--title \"title\" The title used for HTML pages\n"); printf (" -i|--intro \"intro\" A short description of the " @@ -1474,6 +1474,7 @@ html_backends_table (device_type dev_type) printf ("Backend\n"); printf ("Manual Page\n"); printf ("Description\n"); + printf ("Status\n"); printf ("Comment\n"); break; default: @@ -1516,34 +1517,26 @@ html_backends_table (device_type dev_type) else printf ("%s", be->name); - if (be->version) - printf ("
(v%s", be->version); - else - printf ("
(v?"); - /* - switch (be->status) - { - case status_alpha: - printf ("alpha"); - break; - case status_beta: - printf ("beta"); - break; - case status_stable: - printf ("stable"); - break; - default: - printf ("?"); - break; - } - */ - if (be->new) - printf (", NEW!)"); - else - printf (")"); + if (be->version || be->new) + { + printf ("
("); + if (be->version) + { + printf ("v%s", be->version); + if (be->new) + printf (", NEW!"); + } + else + printf ("NEW!"); + printf (")\n"); + } printf ("\n"); - printf ("%s\n", row_num, be->manpage, be->manpage); + if (be->manpage) + printf ("%s\n", row_num, be->manpage, + be->manpage); + else + printf ("?\n", row_num); mfg = type->mfg; if (!mfg && type->desc) @@ -1558,6 +1551,24 @@ html_backends_table (device_type dev_type) } else printf (" \n"); + printf (""); + switch (be->status) + { + case status_alpha: + printf ("alpha"); + break; + case status_beta: + printf ("beta"); + break; + case status_stable: + printf ("stable"); + break; + default: + printf ("?"); + break; + } + printf ("\n"); + if (type->desc->comment) printf ("%s\n", type->desc->comment); else @@ -1760,38 +1771,29 @@ html_mfgs_table (device_type dev_type) be_record->url->name, be_record->name); else printf ("%s", be_record->name); - if (be_record->version) - printf ("
(v%s", be_record->version); - else - printf ("
(?"); - /* - switch (be_record->status) - { - case status_alpha: - printf ("alpha"); - break; - case status_beta: - printf ("beta"); - break; - case status_stable: - printf ("stable"); - break; - default: - printf ("?"); - break; - } - */ - if (be_record->new) - printf (", NEW!)"); - else - printf (")"); + + if (be_record->version || be_record->new) + { + printf ("
("); + if (be_record->version) + { + printf ("v%s", be_record->version); + if (be_record->new) + printf (", NEW!"); + } + else + printf ("NEW!"); + printf (")\n"); + } + printf ("\n"); - printf ("%s\n", - be_record->manpage, be_record->manpage); + if (be_record->manpage) + + printf ("%s\n", + be_record->manpage, be_record->manpage); + else + printf ("?\n"); printf ("\n"); model = model->next; @@ -1836,8 +1838,8 @@ html_print_header (void) "e-mail to sane-devel, the SANE mailing\n" "list.

\n" - "

(For an explanation of the tables, see the\n" - "legend.)\n" + "

For an explanation of the tables, see the\n" + "legend.\n" "

There are tables for scanners,\n" "still cameras,\n" "video cameras,\n" @@ -1908,17 +1910,7 @@ html_print_backends (void) " detailed information, if it exists, or the email address\n" " of the author or maintainer. In parentheses if available:\n" " Version of backend/driver; newer versions may be\n" - " available from their home sites. Status of the backend:\n" - " A vague indication of robustness and reliability.\n" - "

  • alpha means it must\n" - " do something, but is not very well tested, probably has\n" - " bugs, and may even crash your system, etc., etc.\n" - "
  • beta means it works\n" - " pretty well, and looks stable and functional, but not\n" - " bullet-proof.\n" - "
  • stable means someone is\n" - " pulling your leg.\n" - "
\n" + " available from their home sites.
" " NEW! means brand-new to the\n" " current release of SANE.\n" " \n" @@ -1932,6 +1924,20 @@ html_print_backends (void) "
Name of the the device.
\n" "
Interface:
\n" "
How the device is connected to the computer.
\n" + "
Status:
\n" + "
A vague indication of robustness and reliability.\n" + "
  • untested means the " + " device may be supported but couldn't be tested. Be very " + " careful.\n" + "
  • alpha means it must\n" + " do something, but is not very well tested, probably has\n" + " bugs, and may even crash your system, etc., etc.\n" + "
  • beta means it works\n" + " pretty well, and looks stable and functional, but not\n" + " bullet-proof.\n" + "
  • stable means someone is\n" + " pulling your leg.\n" + "
\n" "
Comment:
\n" "
More information about the level of support and\n" " possible problems.
\n" @@ -1956,8 +1962,6 @@ html_print_mfgs (void) html_print_header (); - /* printf ("

\n"); */ - printf ("

Scanners

\n"); html_mfgs_table (type_scanner); @@ -1973,29 +1977,20 @@ html_print_mfgs (void) printf ("

Meta Backends

\n"); html_backends_table (type_meta); - /* printf ("
\n"); */ - printf ("

Legend:

\n" "
\n" "
\n" - "
Manufacturer:
\n" - "
Manufacturer, Vendor or brand name of the device.
\n" - "
Model:
\n" + "
Model:
\n" "
Name of the the device.
\n" - "
Interface:
\n" + "
Interface:
\n" "
How the device is connected to the computer.
\n" - "
Comment:
\n" - "
More information about the level of support and\n" - " possible problems.
\n" - "
Backend:
\n" - "
Name of the backend, with a link to more extensive and\n" - " detailed information, if it exists, or the email address\n" - " of the author or maintainer. In parentheses if available:\n" - " Version of backend/driver; newer versions may be\n" - " available from their home sites. Status of the backend:\n" - " A vague indication of robustness and reliability.\n" - "
  • alpha means it must\n" + "
    Status:
    \n" + "
    A vague indication of robustness and reliability.\n" + "
    • untested means the " + " device may be supported but couldn't be tested. Be very " + " careful.\n" + "
    • alpha means it must\n" " do something, but is not very well tested, probably has\n" " bugs, and may even crash your system, etc., etc.\n" "
    • beta means it works\n" @@ -2003,13 +1998,22 @@ html_print_mfgs (void) " bullet-proof.\n" "
    • stable means someone is\n" " pulling your leg.\n" - "
    \n" + "
\n" + "
Comment:
\n" + "
More information about the level of support and\n" + " possible problems.
\n" + "
Backend:
\n" + "
Name of the backend, with a link to more extensive and\n" + " detailed information, if it exists, or the email address\n" + " of the author or maintainer. In parentheses if available:\n" + " Version of backend/driver; newer versions may be\n" + " available from their home sites.
\n" " NEW! means brand-new to the\n" " current release of SANE.\n" "
\n" - "
Manual Page:
\n" + "
Manual Page:
\n" "
A link to the man-page on-line, if it exists.
\n" - "
Description (for API and meta backends):
\n" + "
Description:
\n" "
The scope of application of the backend.\n" "
\n" "
\n");