home *** CD-ROM | disk | FTP | other *** search
- # ixlookup.patch -- patch to GNU locate
- # SCCS Status : @(#)@ ixlookup.patch 1.3
- # Author : Johan Vromans
- # Created On : Thu May 7 20:51:33 1992
- # Last Modified By: Johan Vromans
- # Last Modified On: Wed Jun 10 11:57:25 1992
- # Update Count : 2
- # Status : OK
-
- This patch enhances GNU locate with the possibility to select a
- database using environment variable FCODES.
-
- This patch is based on GNU find 3.5.
-
- *** /usr/local/src/find-3.5/locate/locate.c Tue Dec 24 08:37:44 1991
- --- ixlookup.c Wed Apr 22 13:28:51 1992
- ***************
- *** 97,106 ****
- int path_max;
- char bigram1[128], bigram2[128];
- int found = NO;
-
- ! fp = fopen (FCODES, "r");
- if (fp == NULL)
- ! error (1, errno, "%s", FCODES);
-
- path_max = PATH_MAX;
- if (path_max < 1)
- --- 97,109 ----
- int path_max;
- char bigram1[128], bigram2[128];
- int found = NO;
- + char *fcodes = (char*) getenv ("LOCATE_DB");
- + if ( fcodes == NULL )
- + fcodes = FCODES;
-
- ! fp = fopen (fcodes, "r");
- if (fp == NULL)
- ! error (1, errno, "%s", fcodes);
-
- path_max = PATH_MAX;
- if (path_max < 1)
-