Skip to content

Commit

Permalink
libast: cleanup: remove unused pathprobe() function
Browse files Browse the repository at this point in the history
This function was part of the defunct internal AT&T AST build
system. Grepping the ast-open-archive repo shows it was used by
nmake(1), probe(1), and libpp (pp(3)), the latter being a library
supporting the AST implementation of cpp(1), the C preprocessor.
According to the documentation, the pathprobe function yields the
path to probe(1) information for arbitrary language processors.

There's not going to be any interest in this in the future as we
are going to keep our version of the build system small and
self-contained, so we can get rid.
  • Loading branch information
McDutchie committed Jul 17, 2024
1 parent d2c4bf5 commit 6f77a06
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 385 deletions.
17 changes: 3 additions & 14 deletions src/lib/libast/Mamfile
Original file line number Diff line number Diff line change
Expand Up @@ -1089,19 +1089,6 @@ make install virtual
exec - compile ${<}
done

make pathprobe.o
make path/pathprobe.c
prev ast_api.h
make include/proc.h implicit
prev include/ast.h
done
prev include/ls.h
prev include/error.h
prev include/ast.h
done
exec - compile ${<} -DHOSTTYPE=\""${mam_cc_HOSTTYPE}"\"
done

make pathrepl.o
make path/pathrepl.c
prev ast_api.h
Expand Down Expand Up @@ -1389,7 +1376,9 @@ make install virtual
make systrace.o
make misc/systrace.c
prev include/debug.h
prev include/proc.h
make include/proc.h implicit
prev include/ast.h
done
prev include/error.h
prev include/ast.h
done
Expand Down
2 changes: 1 addition & 1 deletion src/lib/libast/features/api
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ api ast 20120411 cmdopen

api ast 20110505 cmdopen

api ast 20100601 pathaccess pathcanon pathcat pathkey pathpath pathprobe pathrepl
api ast 20100601 pathaccess pathcanon pathcat pathkey pathpath pathrepl

api ast 20000308 sfkeyprintf

Expand Down
2 changes: 0 additions & 2 deletions src/lib/libast/features/map.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,6 @@ main(void)
printf("#define pathpath _ast_pathpath\n");
printf("#undef pathposix\n");
printf("#define pathposix _ast_pathposix\n");
printf("#undef pathprobe\n");
printf("#define pathprobe _ast_pathprobe\n");
printf("#undef pathprog\n");
printf("#define pathprog _ast_pathprog\n");
printf("#undef pathrepl\n");
Expand Down
2 changes: 0 additions & 2 deletions src/lib/libast/include/ast.h
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,6 @@ extern size_t pathnative(const char*, char*, size_t);
extern char* pathpath(char*, const char*, const char*, int);
extern char* pathpath_20100601(const char*, const char*, int, char*, size_t);
extern size_t pathposix(const char*, char*, size_t);
extern char* pathprobe(char*, char*, const char*, const char*, const char*, int);
extern char* pathprobe_20100601(const char*, const char*, const char*, int, char*, size_t, char*, size_t);
extern size_t pathprog(const char*, char*, size_t);
extern char* pathrepl(char*, const char*, const char*);
extern char* pathrepl_20100601(char*, size_t, const char*, const char*);
Expand Down
38 changes: 0 additions & 38 deletions src/lib/libast/man/path.3
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ int pathicase(const char* \fIpath\fP);
char* pathkey(char* \fIkey\fP, char* \fIattr\fP, const char* \fIlang\fP, const char* \fIpath\fP);
char* pathnext(char* \fIpath\fP, char* \fIextra\fP, long* \fIvisits\fP);
char* pathpath(char* \fIpath\fP, const char* \fIp\fP, const char* \fIa\fP, int \fImode\fP);
char* pathprobe(char* \fIpath\fP, char* \fIattr\fP, const char* \fIlang\fP, const char* \fItool\fP, const char* \fIproc\fP, int \fIop\fP);
char* pathrepl(char* \fIpath\fP, const char* \fImatch\fP, const char* \fIreplace\fP);
int pathsetlink(const char* \fItext\fP, char* \fIname\fP);
char* pathshell(void);
Expand Down Expand Up @@ -305,43 +304,6 @@ then
.I ../p
is searched for.
.PP
.L pathprobe
generates in
.I path
the full path name of the
.I tool
specific
.IR probe (1)
information file for the
.I lang
language processor
.IR proc .
If
.I "path == 0"
then space is allocated via
.IR malloc (3).
Probe attribute
.I name=value
pairs are copied into
.I attr
if
.IR "attr != 0" .
.I op
may be one of:
.TP
.B \-1
return the path name with no access checks or generation
.TP
.B 0
message emitted information must be generated via
.IR probe (1)
.TP
.B 1
no message emitted information must be probed via
.IR probe (1)
.PP
0 is returned if the information does not exist and cannot be generated.
.PP
.L pathrepl
does an in-place replacement of the first occurrence of
.I /match/
Expand Down
Loading

0 comments on commit 6f77a06

Please sign in to comment.