summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog22
-rw-r--r--Makefile.in2
-rw-r--r--doc/Makefile.sub3
-rw-r--r--src/libs/libgroff/font.cpp26
-rw-r--r--src/roff/troff/env.h2
-rw-r--r--src/roff/troff/input.cpp6
-rw-r--r--tmac/Makefile.sub49
7 files changed, 80 insertions, 30 deletions
diff --git a/ChangeLog b/ChangeLog
index 5b157a10..0ea8e0e4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,25 @@
+2006-05-30 Werner LEMBERG <wl@gnu.org>
+
+ * src/libs/libgroff/font.cpp (font::load): Reject fonts called
+ `DESC'.
+ Reduce number of false positives for `.if F ...' conditionals.
+ Improve warning messages.
+
+2006-05-29 Werner LEMBERG <wl@gnu.org>
+
+ * tmac/Makefile.sub: Add copyright notice.
+ (NORMALFILES): Add man.tmac and ms.tmac.
+ (SPECIALFILES): Remove man.tmac and ms.tmac.
+ (CLEANADD): Remove man.tmac-sed and ms.tmac-sed.
+ (install_data, uninstall_sub): Don't handle man.tmac and ms.tmac
+ specially.
+ (stamp-sed): Don't handle man.tmac and ms.tmac.
+ Remove obsolete components in sed's regexp.
+
+ * doc/Makefile.sub (EXAMPLEFILES): Add gnu.eps.
+
+ * Makefile.in (OTHERDIRS, NOMAKEDIRS): Add hdtbl.
+
2006-05-28 Werner LEMBERG <wl@gnu.org>
* doc/groff.texinfo: Correct death circumstances of Joe Ossanna.
diff --git a/Makefile.in b/Makefile.in
index 6f293cf8..0aee2609 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -594,6 +594,7 @@ OTHERDIRS=\
contrib/grap2graph \
contrib/groffer \
contrib/mom \
+ contrib/hdtbl \
contrib/pdfmark \
contrib/gdiffmk
ALLDIRS=$(INCDIRS) $(LIBDIRS) $(PROGDIRS) \
@@ -605,6 +606,7 @@ EXTRADIRS=\
doc
NOMAKEDIRS=\
arch/djgpp \
+ contrib/hdtbl/examples \
contrib/mm/examples \
contrib/mm/mm \
contrib/mom/examples \
diff --git a/doc/Makefile.sub b/doc/Makefile.sub
index 91510d06..6360255d 100644
--- a/doc/Makefile.sub
+++ b/doc/Makefile.sub
@@ -68,7 +68,8 @@ EXAMPLEFILES=\
webpage.ms \
groff.css \
grnexmpl.g \
- grnexmpl.me
+ grnexmpl.me \
+ gnu.eps
PROCESSEDEXAMPLEFILES=\
webpage.ps \
diff --git a/src/libs/libgroff/font.cpp b/src/libs/libgroff/font.cpp
index 67d4f154..e0b6de0a 100644
--- a/src/libs/libgroff/font.cpp
+++ b/src/libs/libgroff/font.cpp
@@ -746,6 +746,13 @@ again:
int font::load(int *not_found, int head_only)
{
+ if (strcmp(name, "DESC") == 0) {
+ if (not_found)
+ *not_found = 1;
+ else
+ error("`DESC' is not a valid font file name");
+ return 0;
+ }
char *path;
FILE *fp;
if ((fp = open_file(name, &path)) == NULL) {
@@ -771,7 +778,7 @@ int font::load(int *not_found, int head_only)
p = strtok(0, WS);
int n;
if (p == 0 || sscanf(p, "%d", &n) != 1 || n <= 0) {
- t.error("bad argument for spacewidth command");
+ t.error("bad argument for `spacewidth' command");
return 0;
}
space_width = n;
@@ -780,7 +787,7 @@ int font::load(int *not_found, int head_only)
p = strtok(0, WS);
double n;
if (p == 0 || sscanf(p, "%lf", &n) != 1 || n >= 90.0 || n <= -90.0) {
- t.error("bad argument for slant command", p);
+ t.error("bad argument for `slant' command", p);
return 0;
}
slant = n;
@@ -809,7 +816,7 @@ int font::load(int *not_found, int head_only)
else if (strcmp(p, "internalname") == 0) {
p = strtok(0, WS);
if (!p) {
- t.error("`internalname command requires argument");
+ t.error("`internalname' command requires argument");
return 0;
}
internalname = new char[strlen(p) + 1];
@@ -826,8 +833,6 @@ int font::load(int *not_found, int head_only)
else
break;
}
- if (head_only)
- return 1;
int had_charset = 0;
if (p == 0) {
if (!is_unicode) {
@@ -839,6 +844,8 @@ int font::load(int *not_found, int head_only)
t.skip_comments = 0;
while (command) {
if (strcmp(command, "kernpairs") == 0) {
+ if (head_only)
+ return 1;
for (;;) {
if (!t.next()) {
command = 0;
@@ -868,6 +875,8 @@ int font::load(int *not_found, int head_only)
}
}
else if (strcmp(command, "charset") == 0) {
+ if (head_only)
+ return 1;
had_charset = 1;
glyph *last_glyph = NULL;
for (;;) {
@@ -963,15 +972,16 @@ int font::load(int *not_found, int head_only)
}
}
else {
- t.error("unrecognised command `%1' after `kernpairs' or `charset' command",
- command);
+ t.error("unrecognised command `%1' "
+ "after `kernpairs' or `charset' command",
+ command);
return 0;
}
}
compact();
}
if (!is_unicode && !had_charset) {
- t.error("missing charset command");
+ t.error("missing `charset' command");
return 0;
}
if (space_width == 0)
diff --git a/src/roff/troff/env.h b/src/roff/troff/env.h
index 2ee7bdcf..01b6866d 100644
--- a/src/roff/troff/env.h
+++ b/src/roff/troff/env.h
@@ -398,7 +398,7 @@ public:
friend void do_divert(int append, int boxing);
};
-
+
extern environment *curenv;
extern void pop_env();
extern void push_env(int);
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index e3ecef47..053468e5 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -2023,13 +2023,11 @@ void token::next()
case 'H':
// don't take height increments relative to previous height if
// in compatibility mode
- if (!compatible_flag && curenv->get_char_height())
- {
+ if (!compatible_flag && curenv->get_char_height()) {
if (get_delim_number(&x, 'z', curenv->get_char_height()))
curenv->set_char_height(x);
}
- else
- {
+ else {
if (get_delim_number(&x, 'z', curenv->get_requested_point_size()))
curenv->set_char_height(x);
}
diff --git a/tmac/Makefile.sub b/tmac/Makefile.sub
index 1dcbc3de..d3f84f9b 100644
--- a/tmac/Makefile.sub
+++ b/tmac/Makefile.sub
@@ -1,3 +1,23 @@
+# Copyright (C) 1989-2000, 2001, 2002, 2003, 2004, 2005, 2006
+# Free Software Foundation, Inc.
+# Written by James Clark (jjc@jclark.com)
+#
+# This file is part of groff.
+#
+# groff is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2, or (at your option) any later
+# version.
+#
+# groff is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with groff; see the file COPYING. If not, write to the Free Software
+# Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA.
+
MAN7=\
groff_ms.n \
groff_man.n \
@@ -7,7 +27,8 @@ MAN7=\
groff_www.n
NORMALFILES=\
- mandoc.tmac andoc.tmac an-old.tmac \
+ man.tmac mandoc.tmac andoc.tmac an-old.tmac \
+ ms.tmac \
me.tmac \
mdoc.tmac \
pic.tmac \
@@ -33,12 +54,17 @@ NORMALFILES=\
hyphen.us hyphenex.us \
fr.tmac hyphen.fr \
sv.tmac hyphen.sv
-SPECIALFILES=an.tmac man.tmac s.tmac ms.tmac www.tmac
+
+# These files are handled specially during installation and deinstallation.
+SPECIALFILES=an.tmac s.tmac www.tmac
+
+# These files are processed with `strip.sed'.
STRIPFILES=e.tmac doc.tmac doc-old.tmac
MDOCFILES=doc-common doc-ditroff doc-nroff doc-syms
mdocdir=$(tmacdir)/mdoc
+
CLEANADD=\
- stamp-wrap stamp-sed *-wrap man.tmac-sed ms.tmac-sed www.tmac-sed \
+ stamp-wrap stamp-sed *-wrap www.tmac-sed \
stamp-strip e.tmac-s doc.tmac-s doc-old.tmac-s \
doc-common-s doc-ditroff-s doc-nroff-s doc-syms-s mdoc.local-s
tmac_s_prefix=
@@ -69,13 +95,9 @@ install_data: $(NORMALFILES) $(SPECIALFILES) man.local \
-rm -f $(DESTDIR)$(tmacdir)/$(tmac_s_prefix)s.tmac
$(INSTALL_DATA) $(srcdir)/s.tmac \
$(DESTDIR)$(tmacdir)/$(tmac_s_prefix)s.tmac
- -rm -f $(DESTDIR)$(tmacdir)/ms.tmac
- $(INSTALL_DATA) ms.tmac-sed $(DESTDIR)$(tmacdir)/ms.tmac
-rm -f $(DESTDIR)$(tmacdir)/$(tmac_an_prefix)an.tmac
$(INSTALL_DATA) $(srcdir)/an.tmac \
$(DESTDIR)$(tmacdir)/$(tmac_an_prefix)an.tmac
- -rm -f $(DESTDIR)$(tmacdir)/man.tmac
- $(INSTALL_DATA) man.tmac-sed $(DESTDIR)$(tmacdir)/man.tmac
-rm -f $(DESTDIR)$(tmacdir)/www.tmac
$(INSTALL_DATA) www.tmac-sed $(DESTDIR)$(tmacdir)/www.tmac
for f in $(STRIPFILES); do \
@@ -113,14 +135,10 @@ stamp-wrap:
fi
touch $@
-stamp-sed: man.tmac ms.tmac www.tmac
- for f in man.tmac ms.tmac www.tmac; do \
- rm -f $$f-sed; \
- sed -e "s;@TMAC_AN_PREFIX@;$(tmac_an_prefix);g" \
- -e "s;@TMAC_S_PREFIX@;$(tmac_s_prefix);g" \
- -e "s;@PNMTOPS_NOSETPAGE@;$(pnmtops_nosetpage);g" \
- $(srcdir)/$$f > $$f-sed; \
- done
+stamp-sed: www.tmac
+ rm -f www.tmac-sed; \
+ sed -e "s;@PNMTOPS_NOSETPAGE@;$(pnmtops_nosetpage);g" \
+ $(srcdir)/www.tmac > www.tmac-sed;
touch $@
uninstall_sub:
@@ -134,7 +152,6 @@ uninstall_sub:
done
-rm -f $(DESTDIR)$(tmacdir)/$(tmac_s_prefix)s.tmac
-rm -f $(DESTDIR)$(tmacdir)/$(tmac_an_prefix)an.tmac
- -rm -f $(DESTDIR)$(tmacdir)/man.tmac $(DESTDIR)$(tmacdir)/ms.tmac
-rm -f $(DESTDIR)$(tmacdir)/www.tmac
-if cmp -s $(DESTDIR)$(localtmacdir)/man.local \
$(srcdir)/man.local; then \