* gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
[gnulib.git] / lib / argp.h
index abb3277..f06542a 100644 (file)
@@ -15,7 +15,7 @@
 
    You should have received a copy of the GNU General Public License along
    with this program; if not, write to the Free Software Foundation,
-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
 #ifndef _ARGP_H
 #define _ARGP_H
@@ -23,6 +23,7 @@
 #include <stdio.h>
 #include <ctype.h>
 #include <getopt.h>
+#include <limits.h>
 
 #define __need_error_t
 #include <errno.h>
@@ -126,11 +127,12 @@ struct argp_option
    should be displayed in much the same manner as the options.  If this flag
    is set, then the option NAME field is displayed unmodified (e.g., no `--'
    prefix is added) at the left-margin (where a *short* option would normally
-   be displayed), and the documentation string in the normal place.  For
-   purposes of sorting, any leading whitespace and punctuation is ignored,
-   except that if the first non-whitespace character is not `-', this entry
-   is displayed after all options (and OPTION_DOC entries with a leading `-')
-   in the same group.  */
+   be displayed), and the documentation string in the normal place. The NAME
+   field will be translated using gettext, unless OPTION_NO_TRANS is set (see
+   below). For purposes of sorting, any leading whitespace and punctuation is
+   ignored, except that if the first non-whitespace character is not `-', this
+   entry is displayed after all options (and OPTION_DOC entries with a leading
+   `-') in the same group.  */
 #define OPTION_DOC             0x8
 
 /* This option shouldn't be included in `long' usage messages (but is still
@@ -141,6 +143,11 @@ struct argp_option
    distinguish these two cases, -x should probably be marked
    OPTION_NO_USAGE.  */
 #define OPTION_NO_USAGE                0x10
+
+/* Valid only in conjunction with OPTION_DOC. This option disables translation
+   of option name. */
+#define OPTION_NO_TRANS         0x20
+
 \f
 struct argp;                   /* fwd declare this type */
 struct argp_state;             /* " */
@@ -573,7 +580,7 @@ __NTH (__option_is_short (__const struct argp_option *__opt))
   else
     {
       int __key = __opt->key;
-      return __key > 0 && isprint (__key);
+      return __key > 0 && __key <= UCHAR_MAX && isprint (__key);
     }
 }