summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTheodore Tso <tytso@mit.edu>1995-06-09 02:55:07 +0000
committerTheodore Tso <tytso@mit.edu>1995-06-09 02:55:07 +0000
commit3e5ec1055fe8476974c268d3b81f687ef7a8bb7f (patch)
tree7dc2273ec3d58f9aeeff90b40b0edd22805c1cbd /src
parent78091a185453594003c607b8e23d90993f33363c (diff)
downloadkrb5-3e5ec1055fe8476974c268d3b81f687ef7a8bb7f.tar.gz
krb5-3e5ec1055fe8476974c268d3b81f687ef7a8bb7f.tar.xz
krb5-3e5ec1055fe8476974c268d3b81f687ef7a8bb7f.zip
Change mk_cmds so that the output file is always created in the
current directory, instead of in the directory where the source file is located. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5989 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src')
-rw-r--r--src/util/ss/ChangeLog6
-rw-r--r--src/util/ss/mk_cmds.c5
2 files changed, 9 insertions, 2 deletions
diff --git a/src/util/ss/ChangeLog b/src/util/ss/ChangeLog
index 1e85c2a246..e288658718 100644
--- a/src/util/ss/ChangeLog
+++ b/src/util/ss/ChangeLog
@@ -1,3 +1,9 @@
+Thu Jun 8 22:54:16 1995 Theodore Y. Ts'o <tytso@dcl>
+
+ * mk_cmds.c (main): Change mk_cmds so that the output file is
+ always created in the current directory, instead of in the
+ directory where the source file is located.
+
Thu Apr 27 12:26:26 1995 Ezra Peisach <epeisach@kangaroo.mit.edu>
* pager.c: Use posix signals.
diff --git a/src/util/ss/mk_cmds.c b/src/util/ss/mk_cmds.c
index fa69b593c6..0bcd77061a 100644
--- a/src/util/ss/mk_cmds.c
+++ b/src/util/ss/mk_cmds.c
@@ -34,7 +34,7 @@ int main(argc, argv)
{
char c_file[MAXPATHLEN];
int result;
- char *path, *p;
+ char *path, *p, *q;
if (argc != 2) {
fputs("Usage: ", stderr);
@@ -61,7 +61,8 @@ int main(argc, argv)
p = strrchr(path, '.');
*p = '\0';
- strcpy(c_file, path);
+ q = rindex(path, '/');
+ strcpy(c_file, (q) ? q + 1 : path);
strcat(c_file, ".c");
*p = '.';