Package: binutils Version: 2.17-3 Severity: wishlist Tags: patch upstream --- binutils-2.17/binutils/strings.c 2005-10-03 12:37:44.000000000 -0700 +++ binutils/strings.c 2006-10-13 10:03:10.000000000 -0700 @@ -48,6 +48,9 @@ --target=BFDNAME Specify a non-default object file format. + --whitespace + -w Treat whitespace as part of a string. + --help -h Print the usage message on the standard output. @@ -89,7 +92,10 @@ #define STRING_ISGRAPHIC(c) \ ( (c) >= 0 \ && (c) <= 255 \ - && ((c) == '\t' || ISPRINT (c) || (encoding == 'S' && (c) > 127))) + && ((c) == '\t' || ISPRINT (c) || \ + (encoding == 'S' && (c) > 127) || \ + (whitespace && ISSPACE (c)) \ + )) #ifndef errno extern int errno; @@ -138,6 +144,9 @@ static char encoding; static int encoding_bytes; +/* Treat whitespace as part of the string */ +static int whitespace; + static struct option long_options[] = { {"all", no_argument, NULL, 'a'}, @@ -148,6 +157,7 @@ {"target", required_argument, NULL, 'T'}, {"help", no_argument, NULL, 'h'}, {"version", no_argument, NULL, 'v'}, + {"whitespace", no_argument, NULL, 'w'}, {NULL, 0, NULL, 0} }; @@ -194,8 +204,9 @@ datasection_only = TRUE; target = NULL; encoding = 's'; + whitespace = 0; - while ((optc = getopt_long (argc, argv, "afhHn:ot:e:Vv0123456789", + while ((optc = getopt_long (argc, argv, "afhHn:ot:e:Vvw0123456789", long_options, (int *) 0)) != EOF) { switch (optc) @@ -256,6 +267,11 @@ encoding = optarg[0]; break; + case 'w': + whitespace = 1; + break; + + case 'V': case 'v': print_version ("strings");
-- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]