start with the regexp mode activated
.IP "\fB-a\fP" 10
make the matching case sensitive
+.IP "\fB-t <title>\fP" 10
+add a title in the modeline
.IP "\fB-c <fg modeline> <bg modeline> <fg highlight> <bg highlight>\fP" 10
select the modeline and highlight color numbers
.IP "\fB-v\fP" 10
int remove_duplicates = 0;
int use_regexp = 0;
int case_sensitive = 0;
+char *title = 0;
//////////////////////////////////////////////////////////////////////
// Draw the modeline
- sprintf(buffer, "%d/%d pattern: %s%s",
- nb_printed_lines,
- nb_lines,
- pattern,
- use_regexp ? " [regexp]" : "");
+ if(title) {
+ sprintf(buffer, "%s %d/%d pattern: %s%s",
+ title,
+ nb_printed_lines,
+ nb_lines,
+ pattern,
+ use_regexp ? " [regexp]" : "");
+ } else {
+ sprintf(buffer, "%d/%d pattern: %s%s",
+ nb_printed_lines,
+ nb_lines,
+ pattern,
+ use_regexp ? " [regexp]" : "");
+ }
for(int k = strlen(buffer); k < console_width; k++) buffer[k] = ' ';
buffer[console_width] = '\0';
i++;
}
+ else if(strcmp(argv[i], "-t") == 0) {
+ check_opt(argc, argv, i, 1, "<title>");
+ delete[] title;
+ title = new char[strlen(argv[i+1]) + 1];
+ strcpy(title, argv[i+1]);
+ i += 2;
+ }
+
else if(strcmp(argv[i], "-l") == 0) {
check_opt(argc, argv, i, 1, "<maximum number of lines>");
nb_lines_max = atoi(argv[i+1]);
<< " -e start in regexp mode" << endl
<< " -a case sensitive" << endl
<< " -m monochrome mode" << endl
+ << " -t <title>" << endl
+ << " add a title in the modeline" << endl
<< " -c <fg modeline> <bg modeline> <fg highlight> <bg highlight>" << endl
<< " set the display colors" << endl
<< " -o <output filename>" << endl
}
delete[] lines;
+ delete[] title;
exit(0);
}