public
/
ack.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c4e1e51
)
Added the SUFFIX variable
author
ceriel
<none@none>
Thu, 26 Feb 1987 12:44:11 +0000
(12:44 +0000)
committer
ceriel
<none@none>
Thu, 26 Feb 1987 12:44:11 +0000
(12:44 +0000)
util/ack/ack.h
patch
|
blob
|
history
util/ack/main.c
patch
|
blob
|
history
diff --git
a/util/ack/ack.h
b/util/ack/ack.h
index
4a2c98f
..
5300b82
100644
(file)
--- a/
util/ack/ack.h
+++ b/
util/ack/ack.h
@@
-21,6
+21,7
@@
#define TAIL "TAIL"
#define SRC "SOURCE"
#define LIBVAR "LNAME"
+#define SUFFIX "SUFFIX"
/* Intended for flags, possibly in bit fields */
diff --git
a/util/ack/main.c
b/util/ack/main.c
index
3a68bf2
..
9c69b90
100644
(file)
--- a/
util/ack/main.c
+++ b/
util/ack/main.c
@@
-126,6
+126,10
@@
char *srcvar() {
return orig.p_path ;
}
+char *getsuffix() {
+ return strrindex(orig.p_path, SUFCHAR) ;
+}
+
varinit() {
/* initialize the string variables */
register char *envstr ;
@@
-136,6
+140,7
@@
varinit() {
setsvar(keeps(HOME),keeps(EM_DIR)) ;
}
setpvar(keeps(SRC),srcvar) ;
+ setpvar(keeps(SUFFIX),getsuffix) ;
}
/************************* flag processing ***********************/