aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjozan <jozan@noemail.net>2020-11-08 21:15:49 +0000
committerjozan <jozan@noemail.net>2020-11-08 21:15:49 +0000
commitf2a5efc0cebf2e14e9038b7ee8baefd8f83e0b90 (patch)
treed55664793ee00d88dc95b31d9554e84d4769e0c1
parentSubst stuff, no unicode and extended ascii (diff)
downloadunixize-f2a5efc0cebf2e14e9038b7ee8baefd8f83e0b90.tar.gz
unixize-f2a5efc0cebf2e14e9038b7ee8baefd8f83e0b90.tar.bz2
unixize-f2a5efc0cebf2e14e9038b7ee8baefd8f83e0b90.tar.xz
unixize-f2a5efc0cebf2e14e9038b7ee8baefd8f83e0b90.tar.zst
unixize-f2a5efc0cebf2e14e9038b7ee8baefd8f83e0b90.zip
More subst to do
FossilOrigin-Name: a4e2a4c3655a95845d8b85510a918bbf7e1b1277387f0b3a41f8d7d98708a7fc
-rw-r--r--src/c_subst.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/c_subst.c b/src/c_subst.c
index 3fce51f..2423609 100644
--- a/src/c_subst.c
+++ b/src/c_subst.c
@@ -130,7 +130,11 @@ c_classic_subst
c_classic_subst(filename, hyphen);
}
if (*p == sep && *(p + 1) == sep) {
- memmove(p, p + 1, strlen(p + 1) * sizeof(char));
+ memmove(p, p + 1, (strlen(p + 1) + 1) * sizeof(char));
+ c_classic_subst(filename, hyphen);
+ }
+ if (*p == '.' && *(p + 1) == '.') {
+ memmove(p, p + 1, (strlen(p + 1) + 1) * sizeof(char));
c_classic_subst(filename, hyphen);
}
if (*p == ' ') {
@@ -140,7 +144,9 @@ c_classic_subst
if (
isalnum(*p) == 0 &&
u_ischarset(*p, C_CHARSET_VALID) == FALSE
- ) {
+ ) {
+ memmove(p, p + 1, (strlen(p + 1) + 1) * sizeof(char));
+ c_classic_subst(filename, hyphen);
}
p++;
}
@@ -160,7 +166,7 @@ c_num_prefix_subst(char filename[])
}
else {
p_probe = p + 1;
- while (*p_probe != 0x00 && *p_probe == '.') {
+ while (*p_probe != 0x00 && *p_probe != '.') {
p_probe++;
}
if (*p_probe != 0x00) {