[prev in list] [next in list] [prev in thread] [next in thread] 

List:       coreutils
Subject:    [coreutils] [PATCH] factor help message
From:       Loïc Le Loarer <loic.le-loarer () polytechnique ! org>
Date:       2010-11-08 14:51:27
Message-ID: 20101108145127.GG24650 () pavuc ! le-loarer ! org
[Download RAW message or body]

Hi All,

I would like to propose a small improvement to "factor" help message:
indicate factor capabilities. As it depends on how factor has been
compiled (with or without GMP library), I propose the attached patch.

What do you think of that ?

It is my first patch here, so I'm sorry if I send this message to the
wrong list. 

Best regards
-- 
Loïc

["patch_factor_help.diff" (text/x-diff)]

diff --git a/src/factor.c b/src/factor.c
index 7291d28..efa0775 100644
--- a/src/factor.c
+++ b/src/factor.c
@@ -501,6 +501,12 @@ Print the prime factors of each specified integer NUMBER.  If \
none\n\  are specified on the command line, read them from standard input.\n\
 \n\
 "), stdout);
+#ifdef HAVE_GMP
+      printf (_("Compiled with big numbers support using gmp version %s\n\n"), \
gmp_version); +#else
+      printf (_("Compiled without big numbers support: maximum input size supported \
is %lu\n\n"), UINTMAX_MAX); +#endif
+
       fputs (HELP_OPTION_DESCRIPTION, stdout);
       fputs (VERSION_OPTION_DESCRIPTION, stdout);
       emit_ancillary_info ();



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic