Ignore:
Timestamp:
May 25, 2017, 1:51:22 PM (2 years ago)
Author:
cameron
Message:

Fix for max-count option

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/grep_interface.cpp

    r5476 r5477  
    154154static cl::opt<bool, true> NormalizeLineBreaks("normalize-line-breaks", cl::location(NormalizeLineBreaksFlag), cl::desc("Normalize line breaks to LF."), cl::cat(Output_Options));
    155155
    156 size_t AfterContextFlag;
    157 static cl::opt<size_t, true> AfterContext("A", cl::location(AfterContextFlag), cl::desc("Print <num> lines of context after each matching line."), cl::cat(Output_Options), cl::Grouping);
     156int AfterContextFlag;
     157static cl::opt<int, true> AfterContext("A", cl::location(AfterContextFlag), cl::desc("Print <num> lines of context after each matching line."), cl::cat(Output_Options), cl::Grouping, cl::Prefix);
    158158static cl::alias AfterContextAlias("after-context", cl::desc("Alias for -A"), cl::aliasopt(AfterContext));
    159159
    160 size_t BeforeContextFlag;
    161 static cl::opt<size_t, true> BeforeContext("B", cl::location(BeforeContextFlag), cl::desc("Print <num>lines of context before each matching line."), cl::cat(Output_Options), cl::Grouping);
     160int BeforeContextFlag;
     161static cl::opt<int, true> BeforeContext("B", cl::location(BeforeContextFlag), cl::desc("Print <num>lines of context before each matching line."), cl::cat(Output_Options), cl::Grouping, cl::Prefix);
    162162static cl::alias BeforeContextAlias("before-context", cl::desc("Alias for -B"), cl::aliasopt(BeforeContext));
    163163
    164 size_t ContextFlag;
    165 static cl::opt<size_t, true> Context("C", cl::location(ContextFlag), cl::desc("Print <num> lines of context before and after each matching line."), cl::cat(Output_Options), cl::Grouping);
     164int ContextFlag;
     165static cl::opt<int, true> Context("C", cl::location(ContextFlag), cl::desc("Print <num> lines of context before and after each matching line."), cl::cat(Output_Options), cl::Grouping, cl::Prefix);
    166166static cl::alias ContextAlias("context", cl::desc("Alias for -C"), cl::aliasopt(Context));
    167167
    168 size_t MaxCountFlag;
    169 static cl::opt<size_t, true> MaxCount("m", cl::location(MaxCountFlag), cl::desc("Process only the first <num> matches per file."), cl::cat(Output_Options), cl::Grouping);
     168int MaxCountFlag;
     169static cl::opt<int, true> MaxCount("m", cl::location(MaxCountFlag), cl::desc("Process only the first <num> matches per file."), cl::cat(Output_Options), cl::Grouping, cl::Prefix);
    170170static cl::alias MaxCountAlias("max-count", cl::desc("Alias for -m"), cl::aliasopt(MaxCount));
    171171   
Note: See TracChangeset for help on using the changeset viewer.