Skip to content

Commit

Permalink
Revert "ovs-fields.7: Use a more general approach to groff encodings."
Browse files Browse the repository at this point in the history
This reverts commit 3e45560, which failed
on Windows and Mac OS because they use antique pre-2009 versions of groff.

Fixes: 3e45560 ("ovs-fields.7: Use a more general approach to groff encodings.")
Signed-off-by: Ben Pfaff <[email protected]>
  • Loading branch information
blp committed Mar 9, 2017
1 parent e723770 commit 6e06e05
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions build-aux/extract-ofp-fields
Original file line number Diff line number Diff line change
Expand Up @@ -755,6 +755,14 @@ ovs\-fields \- protocol header fields in OpenFlow and Open vSwitch
output = []
for oline in s.split("\n"):
oline = oline.strip()

# Life is easier with nroff if we don't try to feed it Unicode.
# Fortunately, we only use a few characters outside the ASCII range.
oline = oline.replace(u'\u2208', r'\[mo]')
oline = oline.replace(u'\u2260', r'\[!=]')
oline = oline.replace(u'\u2264', r'\[<=]')
oline = oline.replace(u'\u2265', r'\[>=]')
oline = oline.replace(u'\u00d7', r'\[mu]')
if len(oline):
output += [oline]

Expand Down
2 changes: 1 addition & 1 deletion lib/automake.mk
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,6 @@ lib/ovs-fields.7: $(srcdir)/build-aux/extract-ofp-fields include/openvswitch/met
$(AM_V_GEN)PYTHONIOENCODING=utf8 $(run_python) $< \
--ovs-version=$(VERSION) ovs-fields \
$(srcdir)/include/openvswitch/meta-flow.h \
$(srcdir)/lib/meta-flow.xml | preconv -e utf-8 > $@.tmp
$(srcdir)/lib/meta-flow.xml > $@.tmp
$(AM_V_at)mv [email protected] $@
EXTRA_DIST += lib/meta-flow.xml

0 comments on commit 6e06e05

Please sign in to comment.