#define GREATER 1
#define LESS (-1)
-int dflag, fflag;
+static int dflag, fflag;
/* uglified the source a bit with globals, so that we only need
to allocate comparbuf once */
-int stringlen;
-char *string;
-char *comparbuf;
+static int stringlen;
+static char *string;
+static char *comparbuf;
static char *binary_search (char *, char *);
static int compare (char *, char *);
return look(front, back);
}
-int
+static int
look(char *front, char *back)
{
int ch;
#define SKIP_PAST_NEWLINE(p, back) \
while (p < back && *p++ != '\n')
-char *
+static char *
binary_search(char *front, char *back)
{
char *p;
* o front points at the first character in a line.
* o front is before or at the first line to be printed.
*/
-char *
+static char *
linear_search(char *front, char *back)
{
while (front < back) {
/*
* Print as many lines as match string, starting at front.
*/
-void
+static void
print_from(char *front, char *back)
{
int eol;
* We use strcasecmp etc, since it knows how to ignore case also
* in other locales.
*/
-int
+static int
compare(char *s2, char *s2end) {
int i;
char *p;