aboutsummaryrefslogtreecommitdiffstats
path: root/extension
diff options
context:
space:
mode:
Diffstat (limited to 'extension')
-rw-r--r--extension/ChangeLog5
-rw-r--r--extension/filefuncs.c8
-rw-r--r--extension/revtwoway.3am6
3 files changed, 13 insertions, 6 deletions
diff --git a/extension/ChangeLog b/extension/ChangeLog
index 0874ed1a..9dce32bc 100644
--- a/extension/ChangeLog
+++ b/extension/ChangeLog
@@ -1,3 +1,8 @@
+2012-10-26 Arnold D. Robbins <arnold@skeeve.com>
+
+ * revtwoway.3am: Clean up example.
+ * revtwoway.c: Minor cleanup (add translation calls).
+
2012-10-24 Arnold D. Robbins <arnold@skeeve.com>
* revtwoway.3am: New file.
diff --git a/extension/filefuncs.c b/extension/filefuncs.c
index f2479c50..391ed11a 100644
--- a/extension/filefuncs.c
+++ b/extension/filefuncs.c
@@ -164,7 +164,7 @@ format_mode(unsigned long fmode)
return outbuf;
}
-/* read_symlink -- read a symbolic link into an allocated buffer.
+/* read_symlink --- read a symbolic link into an allocated buffer.
This is based on xreadlink; the basic problem is that lstat cannot be relied
upon to return the proper size for a symbolic link. This happens,
for example, on GNU/Linux in the /proc filesystem, where the symbolic link
@@ -314,7 +314,7 @@ fill_stat_array(const char *name, awk_array_t array, struct stat *sbuf)
& linksize)) != NULL)
array_set(array, "linkval", make_malloced_string(buf, linksize, & tmp));
else
- warning(ext_id, "stat: unable to read symbolic link `%s'", name);
+ warning(ext_id, _("stat: unable to read symbolic link `%s'"), name);
}
/* add a type field */
@@ -401,7 +401,7 @@ init_filefuncs(void)
for (i = 0; opentab[i].name != NULL; i++) {
(void) make_number(opentab[i].value, & value);
if (! sym_constant(opentab[i].name, & value)) {
- warning(ext_id, "fts init: could not create constant %s",
+ warning(ext_id, _("fts init: could not create constant %s"),
opentab[i].name);
errors++;
}
@@ -689,7 +689,7 @@ do_fts(int nargs, awk_value_t *result)
/* clear dest array */
if (! clear_array(dest.array_cookie)) {
- warning(ext_id, _("fts: clear_array failed\n"));
+ warning(ext_id, _("fts: clear_array() failed\n"));
goto out;
}
diff --git a/extension/revtwoway.3am b/extension/revtwoway.3am
index 89b92583..9f2f040a 100644
--- a/extension/revtwoway.3am
+++ b/extension/revtwoway.3am
@@ -7,9 +7,11 @@ revtwoway \- Reverse strings sample two-way processor extension
.sp
.nf
BEGIN {
- print "hello, world" |& "/magic/morrir"
- "/magic/mirror" |& getline result
+ cmd = "/magic/mirror"
+ print "hello, world" |& cmd
+ cmd |& getline result
print result
+ close(cmd)
}
.fi
.ft R