Skip to content

Commit

Permalink
\} no longer considered as macro argument
Browse files Browse the repository at this point in the history
  • Loading branch information
n-t-roff committed Sep 14, 2014
1 parent dbf9ffe commit 3275936
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 36 deletions.
68 changes: 38 additions & 30 deletions CHANGES
@@ -1,56 +1,64 @@
2014‐09‐07
Documentation revised by Pierre‐Jean Fichet: doc/just/ and
2014-09-14
Any version of roff (e.g. UNIX V7) does count \} as a macro
argument regarding \n(.$. This makes \n(.$ rather random if
you cannot force users to put \} on a separate line *or* to
put it behind the macro call and substract 1 from \n(.$. To
make \n(.$ meaningful again this bug has been fixed now, i.e.
\} is not considered as a macro argument anymore.

2014-09-07
Documentation revised by Pierre-Jean Fichet: doc/just/ and
doc/quickstart/ changed to use free available OTF fonts.

2014‐09‐03
Bug reported by PierreJean Fichet fixed: If character ’"’ is
used in a .char request it did not work in a .if request as
the string compare delimiter.

2014‐08‐28
Bug reported by Blake McBride fixed: Very old versions of the
mm macros inserted cut marks in the document for typesetters
which had used endless paper rolls. Although they are only
of historical significance they had never been removed in the
Solaris version of mm. They are now switched of (via .rm
)k).

2014‐08‐23
Bugfix by Steffen Nurpmeso: In .rm code a function return
2014-09-03
Bug reported by Pierre-Jean Fichet fixed: If character '"'
is used in a .char request it did not work in a .if request
as the string compare delimiter.

2014-08-28
Bug reported by Blake McBride fixed: Very old versions of
the mm macros inserted cut marks in the document for
typesetters which had used endless paper rolls. Although
they are only of historical significance they had never been
removed in the Solaris version of mm. They are now switched
of (via .rm )k).

2014-08-23
Bugfix by Steffen Nurpmeso: In .rm code a function return
value is unchecked used as a pointer.

2014‐08‐20
2014-08-20
eqn(1) did not compile because of bison to BSD yacc differ-
ences. Sorry, had not tested on Linux this time...

2014‐08‐18
2014-08-18
Experimental bugfix: When .bp is directly followed by .. and
.bp triggers a macro which calls a macro then document text
is printed at that trap position. This bug is also in other
ditroff derivatives (e.g. DWB and Plan9). It is difficult to
track the bug to its root cause so it is an experimental fix
track the bug to it's root cause so it is an experimental fix
at the moment.

2014‐08‐17
2014-08-17
\fP after \fS did set the font before the previous font and
not the previous one.

2014‐08‐16
Bug reported by PierreJean Fichet fixed: If character "!" is
used in a .char request it did not work in a .if request as
the NOT operator.
2014-08-16
Bug reported by Pierre-Jean Fichet fixed: If character "!"
is used in a .char request it did not work in a .if request
as the NOT operator.

2014‐08‐14
The eqn parser used type int for all token values‐‐even
2014-08-14
The eqn parser used type int for all token values--even
pointers. This may work fine on 32 bit hardware but causes
problems on 64 bit. A new data type had been introduced to
separate int tokens from pointers.

Also a bug in the parser regarding movements (e.g. FWD) had
been fixed.

2014‐07‐27
A variable had been initilized after use. This variable mi-
nus a literal value is used as an array index. When data
2014-07-27
A variable had been initilized after use. This variable
minus a literal value is used as an array index. When data
from the array is read an invalid memory segment is accessed.
This had caused crashes on at least OpenBSD.
18 changes: 12 additions & 6 deletions troff/n3.c
Expand Up @@ -1125,8 +1125,8 @@ _collect(int termc)
{
register tchar i = 0;
int at = 0, asp = 0;
int nt = 0, nsp = 0;
int quote;
int nt = 0, nsp = 0, nsp0;
int quote, right;
struct s *savnxf;

copyf++;
Expand All @@ -1143,8 +1143,8 @@ _collect(int termc)
if (nt >= at)
savnxf->argt = realloc(savnxf->argt,
(at += 10) * sizeof *savnxf->argt);
savnxf->argt[nt++] = nsp;
quote = 0;
savnxf->argt[nt] = nsp0 = nsp; /* CK: Bugfix: \} counts \n(.$ */
quote = right = 0;
if (cbits(i = getch()) == '"')
quote++;
else
Expand All @@ -1169,12 +1169,18 @@ _collect(int termc)
if (nsp >= asp)
savnxf->argsp = realloc(savnxf->argsp,
(asp += 200) * sizeof *savnxf->argsp);
savnxf->argsp[nsp++] = i;
if (cbits(i) == RIGHT) /* CK: Bugfix: \} counts \n(.$ */
right = 1;
else
savnxf->argsp[nsp++] = i;
}
if (nsp >= asp)
savnxf->argsp = realloc(savnxf->argsp,
++asp * sizeof *savnxf->argsp);
savnxf->argsp[nsp++] = 0;
if (!right || nsp != nsp0) { /* CK: Bugfix: \} counts \n(.$ */
nt++;
savnxf->argsp[nsp++] = 0;
}
}
rtn:
if (termc && i != termc)
Expand Down

0 comments on commit 3275936

Please sign in to comment.