aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--out.c4
-rw-r--r--tbl.74
-rw-r--r--tbl_term.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/out.c b/out.c
index f12a6439..58fdf951 100644
--- a/out.c
+++ b/out.c
@@ -1,4 +1,4 @@
-/* $Id: out.c,v 1.31 2011/01/08 17:00:27 kristaps Exp $ */
+/* $Id: out.c,v 1.32 2011/01/08 17:16:48 kristaps Exp $ */
/*
* Copyright (c) 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -527,7 +527,7 @@ tblcalc_number(struct rofftbl *tbl, struct roffcol *col,
psz = (*tbl->slen)(buf, tbl->arg);
- if (NULL != (cp = strchr(str, tp->decimal))) {
+ if (NULL != (cp = strrchr(str, tp->decimal))) {
buf[1] = '\0';
for (ssz = 0, i = 0; cp != &str[i]; i++) {
buf[0] = str[i];
diff --git a/tbl.7 b/tbl.7
index 747b54b5..0479c40a 100644
--- a/tbl.7
+++ b/tbl.7
@@ -1,4 +1,4 @@
-.\" $Id: tbl.7,v 1.5 2011/01/08 17:00:27 kristaps Exp $
+.\" $Id: tbl.7,v 1.6 2011/01/08 17:16:48 kristaps Exp $
.\"
.\" Copyright (c) 2010 Kristaps Dzonsons <kristaps@bsd.lv>
.\"
@@ -205,7 +205,7 @@ Right-justify a literal string within its column.
.It Cm l
Left-justify a literal string within its column.
.It Cm n
-Justify a number around its decimal point.
+Justify a number around its last decimal point.
If the decimal point is not found on the number, it's assumed to trail
the number.
.It Cm s
diff --git a/tbl_term.c b/tbl_term.c
index edf03420..34a445cd 100644
--- a/tbl_term.c
+++ b/tbl_term.c
@@ -1,4 +1,4 @@
-/* $Id: tbl_term.c,v 1.14 2011/01/08 17:00:27 kristaps Exp $ */
+/* $Id: tbl_term.c,v 1.15 2011/01/08 17:16:48 kristaps Exp $ */
/*
* Copyright (c) 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -400,7 +400,7 @@ tbl_number(struct termp *tp, const struct tbl *tbl,
psz = term_strlen(tp, buf);
- if (NULL != (cp = strchr(str, tbl->decimal))) {
+ if (NULL != (cp = strrchr(str, tbl->decimal))) {
buf[1] = '\0';
for (ssz = 0, i = 0; cp != &str[i]; i++) {
buf[0] = str[i];