>From 71c89a405eb88d13f5edf9511bd082f9f4c01325 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 8 Jan 2012 19:39:41 +0100 Subject: [PATCH 3/4] Deprecate old option -H. * src/diff.c (SPEED_LARGE_FILES_OPTION): New enumeration item. (longopts): Use it instead of '-H'. (main): Give an error message if option -H is used. Suggested by Paul Eggert. --- src/diff.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/diff.c b/src/diff.c index 67b3109..2d364e9 100644 --- a/src/diff.c +++ b/src/diff.c @@ -125,6 +125,7 @@ enum NO_IGNORE_FILE_NAME_CASE_OPTION, NORMAL_OPTION, SDIFF_MERGE_ASSIST_OPTION, + SPEED_LARGE_FILES_OPTION, STRIP_TRAILING_CR_OPTION, SUPPRESS_BLANK_EMPTY_OPTION, SUPPRESS_COMMON_LINES_OPTION, @@ -204,7 +205,7 @@ static struct option const longopts[] = {"show-c-function", 0, 0, 'p'}, {"show-function-line", 1, 0, 'F'}, {"side-by-side", 0, 0, 'y'}, - {"speed-large-files", 0, 0, 'H'}, + {"speed-large-files", 0, 0, SPEED_LARGE_FILES_OPTION}, {"starting-file", 1, 0, 'S'}, {"strip-trailing-cr", 0, 0, STRIP_TRAILING_CR_OPTION}, {"suppress-blank-empty", 0, 0, SUPPRESS_BLANK_EMPTY_OPTION}, @@ -411,7 +412,7 @@ main (int argc, char **argv) break; case 'H': - speed_large_files = true; + fatal ("option -H no longer supported, use --speed-large-files for the old meaning"); break; case 'i': @@ -585,6 +586,10 @@ main (int argc, char **argv) sdiff_merge_assist = true; break; + case SPEED_LARGE_FILES_OPTION: + speed_large_files = true; + break; + case STRIP_TRAILING_CR_OPTION: strip_trailing_cr = true; break; -- 1.6.3.2