summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
Diffstat (limited to 'tex')
-rw-r--r--tex/context/base/cont-new.mkii2
-rw-r--r--tex/context/base/cont-new.mkiv2
-rw-r--r--tex/context/base/context-version.pdfbin4075 -> 4072 bytes
-rw-r--r--tex/context/base/context-version.pngbin105964 -> 105680 bytes
-rw-r--r--tex/context/base/context.mkii2
-rw-r--r--tex/context/base/context.mkiv2
-rw-r--r--tex/context/base/spac-ali.mkiv16
-rw-r--r--tex/context/base/status-files.pdfbin24342 -> 24325 bytes
-rw-r--r--tex/context/base/status-lua.pdfbin172424 -> 172421 bytes
-rw-r--r--tex/context/base/x-pfs-01.mkiv271
-rw-r--r--tex/context/base/x-pfsense.ctx15
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
12 files changed, 274 insertions, 38 deletions
diff --git a/tex/context/base/cont-new.mkii b/tex/context/base/cont-new.mkii
index 248c0107b..400da4681 100644
--- a/tex/context/base/cont-new.mkii
+++ b/tex/context/base/cont-new.mkii
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2012.04.10 19:46}
+\newcontextversion{2012.04.13 09:31}
%D This file is loaded at runtime, thereby providing an
%D excellent place for hacks, patches, extensions and new
diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv
index f448ff2bc..bb8c36d80 100644
--- a/tex/context/base/cont-new.mkiv
+++ b/tex/context/base/cont-new.mkiv
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2012.04.10 19:46}
+\newcontextversion{2012.04.13 09:31}
%D This file is loaded at runtime, thereby providing an
%D excellent place for hacks, patches, extensions and new
diff --git a/tex/context/base/context-version.pdf b/tex/context/base/context-version.pdf
index 780c1383e..9a4d50823 100644
--- a/tex/context/base/context-version.pdf
+++ b/tex/context/base/context-version.pdf
Binary files differ
diff --git a/tex/context/base/context-version.png b/tex/context/base/context-version.png
index 65b97446a..b77a96efd 100644
--- a/tex/context/base/context-version.png
+++ b/tex/context/base/context-version.png
Binary files differ
diff --git a/tex/context/base/context.mkii b/tex/context/base/context.mkii
index 928349049..3f9fd06a1 100644
--- a/tex/context/base/context.mkii
+++ b/tex/context/base/context.mkii
@@ -20,7 +20,7 @@
%D your styles an modules.
\edef\contextformat {\jobname}
-\edef\contextversion{2012.04.10 19:46}
+\edef\contextversion{2012.04.13 09:31}
%D For those who want to use this:
diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv
index 7cfadf849..45f470307 100644
--- a/tex/context/base/context.mkiv
+++ b/tex/context/base/context.mkiv
@@ -23,7 +23,7 @@
%D up and the dependencies are more consistent.
\edef\contextformat {\jobname}
-\edef\contextversion{2012.04.10 19:46}
+\edef\contextversion{2012.04.13 09:31}
%D For those who want to use this:
diff --git a/tex/context/base/spac-ali.mkiv b/tex/context/base/spac-ali.mkiv
index 6bfba019f..93f00249c 100644
--- a/tex/context/base/spac-ali.mkiv
+++ b/tex/context/base/spac-ali.mkiv
@@ -831,21 +831,17 @@
\installcorenamespace{alignline}
-\letvalue{\??alignline\v!middle }\midaligned
-\letvalue{\??alignline\v!center }\midaligned
-\letvalue{\??alignline\v!max }\maxaligned
+\letvalue{\??alignline\v!middle}\midaligned
+\letvalue{\??alignline\v!center}\midaligned
+\letvalue{\??alignline\v!max }\maxaligned
+\letvalue{\??alignline\v!left }\leftaligned
+\letvalue{\??alignline\v!right }\rightaligned
-% was wrong
+% not here, as here we use a location
%
-% \letvalue{\??alignline\v!left }\leftaligned
-% \letvalue{\??alignline\v!right }\rightaligned
% \letvalue{\??alignline\v!flushleft }\rightaligned
% \letvalue{\??alignline\v!flushright}\leftaligned
-\letvalue{\??alignline\v!left }\rightaligned
-\letvalue{\??alignline\v!right }\leftaligned
-\letvalue{\??alignline\v!flushleft }\leftaligned
-\letvalue{\??alignline\v!flushright}\rightaligned
\def\doalignedline#1{\resetrealignsignal\csname\??alignline#1\endcsname}
diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf
index 71a070346..9a71e6cee 100644
--- a/tex/context/base/status-files.pdf
+++ b/tex/context/base/status-files.pdf
Binary files differ
diff --git a/tex/context/base/status-lua.pdf b/tex/context/base/status-lua.pdf
index c3da827ec..bef2e3e96 100644
--- a/tex/context/base/status-lua.pdf
+++ b/tex/context/base/status-lua.pdf
Binary files differ
diff --git a/tex/context/base/x-pfs-01.mkiv b/tex/context/base/x-pfs-01.mkiv
index 57f1f1b3d..8b06bd873 100644
--- a/tex/context/base/x-pfs-01.mkiv
+++ b/tex/context/base/x-pfs-01.mkiv
@@ -1,6 +1,12 @@
% pfsense status info, work in progress
%
+% usage:
+%
% context --environment=x-pfs-01 filename.xml
+%
+% or
+%
+% <?context-directive job ctxfile x-pfsense.ctx ?>
\setupbodyfont
[dejavu,10pt]
@@ -8,9 +14,14 @@
\setuplayout
[topspace=1cm,
backspace=1cm,
+ footer=0pt,
+ header=1cm,
width=middle,
height=middle]
+\setupheader
+ [style=bold]
+
\setuphead
[section]
[style=\bfb]
@@ -24,6 +35,145 @@
\dontcomplain
+% todo: show all values and map keys onto longer names via labels
+
+\startxmlsetups xml:system
+
+ \startsection[title={System}]
+
+ \startsubsection[title={Properties}]
+
+ \starttabulate[|B|T|]
+ \NC hostname \NC \xmlfirst{#1}{hostname} \NC \NR
+ \NC domain \NC \xmlfirst{#1}{domain} \NC \NR
+ \NC timezone \NC \xmlfirst{#1}{timezone} \NC \NR
+ \NC timeservers \NC \xmlfirst{#1}{timeservers} \NC \NR
+ \NC dnsserver \NC \xmlfirst{#1}{dnsserver} \NC \NR
+ \stoptabulate
+
+ \stopsubsection
+
+ \startsubsection[title={Groups}]
+ \xmlfilter{#1}{group/command(xml:system:group)}
+ \stopsubsection
+
+ \startsubsection[title={Users}]
+ \xmlfilter{#1}{user/command(xml:system:user)}
+ \stopsubsection
+
+ \stopsection
+
+\stopxmlsetups
+
+\startxmlsetups xml:system:group
+
+ \starttabulate[|B|T|]
+ \NC name \NC \xmlfirst{#1}{/name} \NC \NR
+ \NC description \NC \xmlfirst{#1}{/descr} \NC \NR
+ \NC scope \NC \xmlfirst{#1}{/scope} \NC \NR
+ \NC gid \NC \xmlfirst{#1}{/gid} \NC \NR
+ \NC privilege \NC \xmlfirst{#1}{/priv} \NC \NR
+ \NC members \NC \xmlconcat{#1}{/member}{ } \NC \NR
+ \stoptabulate
+
+\stopxmlsetups
+
+\startxmlsetups xml:system:user
+
+ \starttabulate[|B|T|]
+ \NC name \NC \xmlfirst{#1}{/name} \NC \NR
+ \NC description \NC \xmlfirst{#1}{/descr} \NC \NR
+ \NC scope \NC \xmlfirst{#1}{/scope} \NC \NR
+ \NC uid \NC \xmlfirst{#1}{/uid} \NC \NR
+ \NC group \NC \xmlfirst{#1}{/groupname} \NC \NR
+ \NC privilege \NC \xmlfirst{#1}{/priv} \NC \NR
+ \NC password \NC \xmldoifelsetext{#1}{/password}{set}{unset} \NC \NR
+ \NC ipsec psk \NC \xmldoifelsetext{#1}{/ipsecpsk}{set}{unset} \NC \NR
+ \NC certificate \NC \xmldoifelsetext{#1}{/cert} {set}{unset} \NC \NR
+ \stoptabulate
+
+\stopxmlsetups
+
+\startxmlsetups xml:interfaces
+
+ \startsection[title={Interfaces}]
+
+ \xmlfilter{#1}{*/command(xml:interfaces:network)}
+
+ \stopsection
+
+\stopxmlsetups
+
+\startxmlsetups xml:interfaces:network
+
+ \startsubsection[title={\xmltag{#1}}]
+
+ % <blockpriv/> <blockbogons/> <spoofmac/> <enable/>
+
+ \starttabulate[|B|T|]
+ \NC interface \NC \xmlfirst{#1}{/if} \NC \NR
+ \NC block private \NC \xmldoifelse{#1}{/blockpriv} {yes}{no} \NC \NR
+ \NC block bogons \NC \xmldoifelse{#1}{/blockbogons}{yes}{no} \NC \NR
+ \NC spoof mac address \NC \xmldoifelse{#1}{/spoofmac} {yes}{no} \NC \NR
+ \NC enable interface \NC \xmldoifelse{#1}{/enable} {yes}{no} \NC \NR
+ \NC ipaddress \NC \xmlfirst{#1}{/ipaddr} \NC \NR
+ \NC subnet \NC \xmlfirst{#1}{/subnet} \NC \NR
+ \NC gateway \NC \xmlfirst{#1}{/gateway} \NC \NR
+ \NC description \NC \xmlfirst{#1}{/descr} \NC \NR
+ \stoptabulate
+
+ \stopsubsection
+
+\stopxmlsetups
+
+\startxmlsetups xml:gateways
+
+ \startsection[title={Gateways}]
+
+ \xmlfilter{#1}{*/command(xml:gateways:entry)}
+
+ \stopsection
+
+\stopxmlsetups
+
+\startxmlsetups xml:gateways:entry
+
+ \starttabulate[|B|T|]
+ \NC interface \NC \xmlfirst{#1}{/interface} \NC \NR
+ \NC gateway \NC \xmlfirst{#1}{/gateway} \NC \NR
+ \NC name \NC \xmlfirst{#1}{/name} \NC \NR
+ \NC weight \NC \xmlfirst{#1}{/weight} \NC \NR
+ \NC interval \NC \xmlfirst{#1}{/interval} \NC \NR
+ \NC description \NC \xmlfirst{#1}{/descr} \NC \NR
+ \NC disable monitor \NC \xmlfirst{#1}{/monitor_disable} \NC \NR
+ \NC default gateway \NC \xmlfirst{#1}{/defaultgw} \NC \NR
+ \stoptabulate
+
+\stopxmlsetups
+
+\startxmlsetups xml:virtualips
+
+ \startsection[title={Virtual ipadresses}]
+
+ \xmlfilter{#1}{*/command(xml:virtualips:entry)}
+
+ \stopsection
+
+\stopxmlsetups
+
+\startxmlsetups xml:virtualips:entry
+
+ \starttabulate[|B|T|]
+ \NC interface \NC \xmlfirst{#1}{/interface} \NC \NR
+ \NC type \NC \xmlfirst{#1}{/type} \NC \NR
+ \NC mode \NC \xmlfirst{#1}{/mode} \NC \NR
+ \NC subnet \NC \xmlfirst{#1}{/subnet}
+ /\xmlfirst{#1}{/subnet_bits} \NC \NR
+ \NC description \NC \xmlfirst{#1}{/descr} \NC \NR
+ \stoptabulate
+
+\stopxmlsetups
+
\startxmlsetups xml:dhcp
\startsection[title={DHCP}]
@@ -38,17 +188,17 @@
\startsubsection[title={\xmltag{#1}}]
- \starttabulate[||T|]
- \NC \bf range \NC \xmlfirst{#1}{/range/from} \endash\ \xmlfirst{#1}{/range/to} \NC \NR
- \NC \bf domain \NC \xmlfirst{#1}{/domain} \NC \NR
- \NC \bf dnsserver \NC \xmlfirst{#1}{/dnsserver} \NC \NR
- \NC \bf gateway \NC \xmlfirst{#1}{/gateway} \NC \NR
- \NC \bf ddnsdomain \NC \xmlfirst{#1}{/ddnsdomain} \NC \NR
+ \starttabulate[|B|T|]
+ \NC range \NC \xmlfirst{#1}{/range/from} \endash\ \xmlfirst{#1}{/range/to} \NC \NR
+ \NC domain \NC \xmlfirst{#1}{/domain} \NC \NR
+ \NC dnsserver \NC \xmlfirst{#1}{/dnsserver} \NC \NR
+ \NC gateway \NC \xmlfirst{#1}{/gateway} \NC \NR
+ \NC ddnsdomain \NC \xmlfirst{#1}{/ddnsdomain} \NC \NR
\stoptabulate
\xmldoif {#1} {/staticmap} {
- \starttabulate[|T|T|T|P|]
+ \starttabulate[|T|T|T|p|]
\NC \rm\bf macaddress
\NC \rm\bf ipaddress
\NC \rm\bf hostname
@@ -78,7 +228,7 @@
\startsection[title={DNS MASQ}]
- \starttabulate[|T|T|T|P|]
+ \starttabulate[|T|T|T|p|]
\NC \rm\bf host
\NC \rm\bf domain
\NC \rm\bf ipaddress
@@ -107,26 +257,44 @@
\startsection[title={NAT}]
- \starttabulate[|T|T|T|T|T|P|]
- \NC \rm\bf interface
- \NC \rm\bf protocol
- \NC \rm\bf source
- \NC \rm\bf destination
- \NC \rm\bf target
- \NC \rm\bf description
- \NC \NR
- \HL
- \xmlfilter{#1}{/rule/command(xml:nat:rule)}
- \stoptabulate
+ \startsubsection[title={Rules}]
- \stopsection
+ \starttabulate[|T|T|T|T|T|p|]
+ \NC \rm\bf interface
+ \NC \rm\bf protocol
+ \NC \rm\bf source
+ \NC \rm\bf destination
+ \NC \rm\bf target
+ \NC \rm\bf description
+ \NC \NR
+ \HL
+ \xmlfilter{#1}{/rule/command(xml:nat:rule)}
+ \stoptabulate
+
+ \stopsubsection
+
+ \startsubsection[title={One to one}]
+
+ \starttabulate[|T|T|T|T|T|p|]
+ \NC \rm\bf interface
+ \NC \rm\bf protocol
+ \NC \rm\bf source
+ \NC \rm\bf destination
+ \NC \rm\bf external
+ \NC \rm\bf description
+ \NC \NR
+ \HL
+ \xmlfilter{#1}{/onetoone/command(xml:nat:onetoone)}
+ \stoptabulate
+
+ \stopsubsection
+
+\stopsection
\stopxmlsetups
\startxmlsetups xml:nat:rule
- % any
-
\NC \xmlfilter{#1}{/interface/command(xml:checked)}
\NC \xmlfilter{#1}{/protocol/command(xml:checked)}
\NC \xmlfilter{#1}{/source/command(xml:checked)}
@@ -139,6 +307,20 @@
\stopxmlsetups
+\startxmlsetups xml:nat:onetoone
+
+ \NC \xmlfilter{#1}{/interface/command(xml:checked)}
+ \NC \xmlfilter{#1}{/protocol/command(xml:checked)}
+ \NC \xmlfilter{#1}{/source/command(xml:checked)}
+ \NC \xmlfilter{#1}{/destination/(address|any)/command(xml:checked)}
+ :\xmlfilter{#1}{/destination/port/command(xml:checked)}
+ \NC \xmlfilter{#1}{/external/command(xml:checked)}
+ :\xmlfilter{#1}{/local-port/command(xml:checked)}
+ \NC \xmlfirst {#1}{/descr}
+ \NC \NR
+
+\stopxmlsetups
+
\startxmlsetups xml:checked
\xmldoifelse {#1} {/any} {
*
@@ -151,6 +333,44 @@
}
\stopxmlsetups
+\startxmlsetups xml:filter
+
+ \startsection[title={Filter}]
+
+ \startsubsection[title={Rules}]
+
+ \starttabulate[|T|T|T|T|T|p|]
+ \NC \rm\bf type
+ \NC \rm\bf interface
+ \NC \rm\bf protocol
+ \NC \rm\bf source
+ \NC \rm\bf destination
+ \NC \rm\bf description
+ \NC \NR
+ \HL
+ \xmlfilter{#1}{/rule/command(xml:filter:rule)}
+ \stoptabulate
+
+ \stopsubsection
+
+ \stopsubsection
+
+\stopxmlsetups
+
+\startxmlsetups xml:filter:rule
+
+ \NC \xmlfilter{#1}{/type/command(xml:checked)}
+ \NC \xmlfilter{#1}{/interface/command(xml:checked)}
+ \NC \xmlfilter{#1}{/protocol/command(xml:checked)}
+ \NC \xmlfilter{#1}{/source/(address|any)/command(xml:checked)}:
+ :\xmlfilter{#1}{/source/port/command(xml:checked)}
+ \NC \xmlfilter{#1}{/destination/(address|any)/command(xml:checked)}
+ :\xmlfilter{#1}{/destination/port/command(xml:checked)}
+ \NC \xmlfirst {#1}{/descr}
+ \NC \NR
+
+\stopxmlsetups
+
\starttext
\doifelse {\inputfilename} {x-pfs-01.mkiv} {
@@ -163,12 +383,17 @@
\xmlloadonly{main}{\inputfilename}{}
- \setupheadertexts[router.xml][\pagenumber]
+ \setupheadertexts[\inputfilename][\pagenumber]
}
+ \xmlfilter{main}{/pfsense/system/command(xml:system)}
+ \xmlfilter{main}{/pfsense/interfaces/command(xml:interfaces)}
+ \xmlfilter{main}{/pfsense/gateways/command(xml:gateways)}
+ \xmlfilter{main}{/pfsense/virtualip/command(xml:virtualips)}
\xmlfilter{main}{/pfsense/dhcpd/command(xml:dhcp)}
\xmlfilter{main}{/pfsense/dnsmasq/command(xml:dnsmasq)}
\xmlfilter{main}{/pfsense/nat/command(xml:nat)}
+ \xmlfilter{main}{/pfsense/filter/command(xml:filter)}
\stoptext
diff --git a/tex/context/base/x-pfsense.ctx b/tex/context/base/x-pfsense.ctx
new file mode 100644
index 000000000..8d7087cf2
--- /dev/null
+++ b/tex/context/base/x-pfsense.ctx
@@ -0,0 +1,15 @@
+<?xml version='1.0' standalone='yes'?>
+
+<!-- this is also a demo of using the xml interface -->
+
+<ctx:job>
+ <ctx:message>pfsense configuration listing</ctx:message>
+ <ctx:process>
+ <ctx:flags>
+ <ctx:flag>purge</ctx:flag>
+ </ctx:flags>
+ <ctx:resources>
+ <ctx:environment>x-pfs-01.mkiv</ctx:environment>
+ </ctx:resources>
+ </ctx:process>
+</ctx:job>
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index 85a03be6c..360cd67c0 100644
--- a/tex/generic/context/luatex/luatex-fonts-merged.lua
+++ b/tex/generic/context/luatex/luatex-fonts-merged.lua
@@ -1,6 +1,6 @@
-- merged file : luatex-fonts-merged.lua
-- parent file : luatex-fonts.lua
--- merge date : 04/10/12 19:46:21
+-- merge date : 04/13/12 09:31:06
do -- begin closure to overcome local limits and interference