Skip to content

Commit bedba24

Browse files
committed
libast: cleanup: remove unused pathkey function (re: 3677046)
The pathkey function calculates a 14-character hash out of the path to a compiler command ("language processor"). The removed pathprobe function was the only user of the pathkey function, so it is hereby removed for the same reasons.
1 parent 709517a commit bedba24

File tree

5 files changed

+1
-324
lines changed

5 files changed

+1
-324
lines changed

src/lib/libast/Mamfile

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1141,15 +1141,6 @@ make install virtual
11411141
exec - compile %{<}
11421142
done
11431143

1144-
make pathkey.o
1145-
make path/pathkey.c
1146-
prev ast_api.h
1147-
prev include/ls.h
1148-
prev include/ast.h
1149-
done
1150-
exec - compile %{<}
1151-
done
1152-
11531144
make pathrepl.o
11541145
make path/pathrepl.c
11551146
prev ast_api.h

src/lib/libast/features/api

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ api ast 20120411 cmdopen
88

99
api ast 20110505 cmdopen
1010

11-
api ast 20100601 pathaccess pathcanon pathcat pathkey pathpath pathrepl
11+
api ast 20100601 pathaccess pathcanon pathcat pathpath pathrepl
1212

1313
api ast 20000308 sfkeyprintf
1414

src/lib/libast/include/ast.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,8 +365,6 @@ extern char* pathfind(const char*, const char*, const char*, char*, size_t);
365365
extern int pathgetlink(const char*, char*, int);
366366
extern int pathicase(const char*);
367367
extern int pathinclude(const char*);
368-
extern char* pathkey(char*, char*, const char*, const char*, const char*);
369-
extern char* pathkey_20100601(const char*, const char*, const char*, char*, size_t, char*, size_t);
370368
extern size_t pathnative(const char*, char*, size_t);
371369
extern char* pathpath(char*, const char*, const char*, int);
372370
extern char* pathpath_20100601(const char*, const char*, int, char*, size_t);

src/lib/libast/man/path.3

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ char* pathcd(char* \fIpath\fP, const char* \fIhome\fP);
5151
int pathcheck(const char* \fIpackage\fP, const char* \fItool\fP, Pathcheck_t* \fIpc\fP);
5252
int pathgetlink(const char* \fIname\fP, char* \fIbuf\fP, int \fIsiz\fP);
5353
int pathicase(const char* \fIpath\fP);
54-
char* pathkey(char* \fIkey\fP, char* \fIattr\fP, const char* \fIlang\fP, const char* \fIpath\fP);
5554
char* pathnext(char* \fIpath\fP, char* \fIextra\fP, long* \fIvisits\fP);
5655
char* pathpath(char* \fIpath\fP, const char* \fIp\fP, const char* \fIa\fP, int \fImode\fP);
5756
char* pathrepl(char* \fIpath\fP, const char* \fImatch\fP, const char* \fIreplace\fP);
@@ -256,25 +255,6 @@ with
256255
set to
257256
.LR ENOSYS .
258257
.PP
259-
.L pathkey
260-
generates in
261-
.I key
262-
a 14 character lookup key (plus terminating 0) for the language
263-
.I lang
264-
processor in
265-
.IR path .
266-
A pointer to the key is returned, 0 on error.
267-
If
268-
.I "key == 0"
269-
then space is allocated via
270-
.IR malloc (3).
271-
Key specific attribute
272-
.I name=value
273-
pairs are copied into
274-
.I attr
275-
if
276-
.IR "attr != 0" .
277-
.PP
278258
.L pathpath
279259
constructs in
280260
.I path

src/lib/libast/path/pathkey.c

Lines changed: 0 additions & 292 deletions
This file was deleted.

0 commit comments

Comments
 (0)