Added a crunched_here(char *path) function so crunched programs can find out

who they share bed and breakfast with.
This commit is contained in:
Poul-Henning Kamp 1995-05-21 01:50:13 +00:00
parent 3525074d14
commit 7d150b7705
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=8664

View File

@ -64,6 +64,21 @@ int main(int argc, char **argv)
}
int crunched_here(char *path)
{
char *slash, *basename;
struct stub *ep;
slash = strrchr(path, '/');
basename = slash? slash+1 : path;
for(ep=entry_points; ep->name != NULL; ep++)
if(!strcmp(basename, ep->name))
return 1;
return 0;
}
int crunched_main(int argc, char **argv)
{
struct stub *ep;