Added the SUFFIX variable
authorceriel <none@none>
Thu, 26 Feb 1987 12:44:11 +0000 (12:44 +0000)
committerceriel <none@none>
Thu, 26 Feb 1987 12:44:11 +0000 (12:44 +0000)
util/ack/ack.h
util/ack/main.c

index 4a2c98f..5300b82 100644 (file)
@@ -21,6 +21,7 @@
 #define TAIL    "TAIL"
 #define SRC     "SOURCE"
 #define LIBVAR "LNAME"
+#define SUFFIX "SUFFIX"
 
 /* Intended for flags, possibly in bit fields */
 
index 3a68bf2..9c69b90 100644 (file)
@@ -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 ***********************/