projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use hyphen, not plus (corresponding to previous RCx naming convention)
[mmh]
/
sbr
/
path.c
diff --git
a/sbr/path.c
b/sbr/path.c
index
0ae27d3
..
7ef83ea
100644
(file)
--- a/
sbr/path.c
+++ b/
sbr/path.c
@@
-26,6
+26,11
@@
static char *pwds;
static char *expath(char *,int);
static void compath(char *);
static char *expath(char *,int);
static void compath(char *);
+char *
+pluspath(char *name)
+{
+ return path(name + 1, *name == '+' ? TFOLDER : TSUBCWF);
+}
char *
path(char *name, int flag)
char *
path(char *name, int flag)
@@
-85,7
+90,7
@@
expath (char *name, int flag)
name += NCWD;
if (strcmp (name, DOTDOT) == 0 || strcmp (name, PWD) == 0) {
name += NCWD;
if (strcmp (name, DOTDOT) == 0 || strcmp (name, PWD) == 0) {
- snprintf (buffer, sizeof(buffer), "%.*s", cp - pwds, pwds);
+ snprintf (buffer, sizeof(buffer), "%.*s", (int)(cp - pwds), pwds);
return getcpy (buffer);
}
return getcpy (buffer);
}
@@
-94,7
+99,7
@@
expath (char *name, int flag)
else
cp = ep;
else
cp = ep;
- snprintf (buffer, sizeof(buffer), "%.*s/%s", cp - pwds, pwds, name);
+ snprintf (buffer, sizeof(buffer), "%.*s/%s", (int)(cp - pwds), pwds, name);
return getcpy (buffer);
}
return getcpy (buffer);
}