summaryrefslogtreecommitdiffabout
path: root/src
authorSergey Poznyakoff <gray@gnu.org.ua>2010-01-02 17:24:03 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2010-01-02 17:24:03 (GMT)
commitc44f0f83448b426935e9aeb07c5d761299144d14 (patch) (side-by-side diff)
tree696d15a11587c94e3a5f8b356f3f91adc73c789a /src
parent1b0a4de9fa73dd2453cbd2902c2cd4d000f4abe7 (diff)
downloadwydawca-c44f0f83448b426935e9aeb07c5d761299144d14.tar.gz
wydawca-c44f0f83448b426935e9aeb07c5d761299144d14.tar.bz2
$- construct (similar to m4's dnl).
* src/meta.c: Special construct $- removes the character immediately following it. * doc/wydawca.texi: Document the use of $- construct. * src/triplet.c (expand_triplet_ls_full) (expand_triplet_ls_upload): Keep trailing newline in the expansion. * tests/etc/notify.rc: Update.
Diffstat (limited to 'src') (more/less context) (ignore whitespace changes)
-rw-r--r--src/meta.c5
-rw-r--r--src/triplet.c2
2 files changed, 5 insertions, 2 deletions
diff --git a/src/meta.c b/src/meta.c
index fc88c6b..545ac36 100644
--- a/src/meta.c
+++ b/src/meta.c
@@ -78,6 +78,11 @@ meta_expand_string (const char *string, struct metadef *def, void *data,
p++;
break;
+ case '-':
+ if (*++p)
+ p++;
+ break;
+
case '{':
e = strchr (p + 1, '}');
if (e && (s = find_expansion_word (p + 1, e - p - 1, def, data)))
diff --git a/src/triplet.c b/src/triplet.c
index f18f573..7f6ac68 100644
--- a/src/triplet.c
+++ b/src/triplet.c
@@ -399,7 +399,6 @@ expand_triplet_ls_full (struct metadef *def, void *data)
strcat (def->value, buf[file_directive]);
strcat (def->value, "\n");
}
- def->value[size-1] = 0; /* Kill terminating newline */
free (buf[file_dist]);
free (buf[file_signature]);
free (buf[file_directive]);
@@ -430,7 +429,6 @@ expand_triplet_ls_upload (struct metadef *def, void *data)
strcat (def->value, buf[file_signature]);
strcat (def->value, "\n");
}
- def->value[size-1] = 0; /* Kill terminating newline */
free (buf[file_dist]);
free (buf[file_signature]);

Return to:

Send suggestions and report system problems to the System administrator.