diff options
Diffstat (limited to 'tex')
-rw-r--r-- | tex/context/base/cont-new.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/context-version.pdf | bin | 4169 -> 4177 bytes | |||
-rw-r--r-- | tex/context/base/context.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/status-files.pdf | bin | 24331 -> 24355 bytes | |||
-rw-r--r-- | tex/context/base/status-lua.pdf | bin | 257775 -> 257777 bytes | |||
-rw-r--r-- | tex/context/base/strc-ren.mkiv | 8 | ||||
-rw-r--r-- | tex/context/base/strc-sec.mkiv | 4 | ||||
-rw-r--r-- | tex/context/base/strc-syn.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/util-sql-imp-client.lua | 17 | ||||
-rw-r--r-- | tex/generic/context/luatex/luatex-fonts-merged.lua | 2 |
10 files changed, 22 insertions, 15 deletions
diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv index 7b3be3b04..925100a29 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{2015.12.29 13:30} +\newcontextversion{2015.12.31 16:49} %D This file is loaded at runtime, thereby providing an excellent place for %D hacks, patches, extensions and new features. diff --git a/tex/context/base/context-version.pdf b/tex/context/base/context-version.pdf Binary files differindex 8dfbadc4f..e2154f19f 100644 --- a/tex/context/base/context-version.pdf +++ b/tex/context/base/context-version.pdf diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv index 6fa3d1d98..b29fc9b11 100644 --- a/tex/context/base/context.mkiv +++ b/tex/context/base/context.mkiv @@ -39,7 +39,7 @@ %D up and the dependencies are more consistent. \edef\contextformat {\jobname} -\edef\contextversion{2015.12.29 13:30} +\edef\contextversion{2015.12.31 16:49} \edef\contextkind {beta} %D For those who want to use this: diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf Binary files differindex 2ed0c234e..321b0f2b9 100644 --- a/tex/context/base/status-files.pdf +++ b/tex/context/base/status-files.pdf diff --git a/tex/context/base/status-lua.pdf b/tex/context/base/status-lua.pdf Binary files differindex 6572d3cd2..56eafab4a 100644 --- a/tex/context/base/status-lua.pdf +++ b/tex/context/base/status-lua.pdf diff --git a/tex/context/base/strc-ren.mkiv b/tex/context/base/strc-ren.mkiv index f692d08fd..f68a79aa9 100644 --- a/tex/context/base/strc-ren.mkiv +++ b/tex/context/base/strc-ren.mkiv @@ -118,14 +118,14 @@ \unexpanded\def\strc_rendering_place_head_text {\strc_rendering_start_placement \setheadmarking - \doresettructureheadnumbercontent + \doresetstructureheadnumbercontent \ifconditional\c_strc_sectioning_empty \setbox\b_strc_rendering_head\hbox \headreferenceattributes to \zeropoint{\strut}% \else \docheckheadreference \setbox\b_strc_rendering_head\hbox \headreferenceattributes {\spac_grids_set_local_snapping{\headparameter\c!internalgrid}% - \doresettructureheadnumbercontent + \doresetstructureheadnumbercontent \useheadstyleparameter\c!style \setinlineheadreferenceattributes \strc_rendering_inject_text}% @@ -136,8 +136,8 @@ {\strc_rendering_start_placement \setheadmarking \doifelsetext\getheadnumber - \dosettructureheadnumbercontent - \doresettructureheadnumbercontent + \dosetstructureheadnumbercontent + \doresetstructureheadnumbercontent \ifconditional\c_strc_sectioning_empty \setbox\b_strc_rendering_head\hbox \headreferenceattributes to \zeropoint{\strut}% \else % = needed diff --git a/tex/context/base/strc-sec.mkiv b/tex/context/base/strc-sec.mkiv index 8fae2d133..a187ed50e 100644 --- a/tex/context/base/strc-sec.mkiv +++ b/tex/context/base/strc-sec.mkiv @@ -711,11 +711,11 @@ \newmode\v!sectionnumber -\def\dosettructureheadnumbercontent +\def\dosetstructureheadnumbercontent {\setsystemmode\v!sectionnumber \settrue\headshownumber} % why ? -\def\doresettructureheadnumbercontent +\def\doresetstructureheadnumbercontent {\resetsystemmode\v!sectionnumber \setfalse\headshownumber} % why ? diff --git a/tex/context/base/strc-syn.mkiv b/tex/context/base/strc-syn.mkiv index eb824c439..1c47dc876 100644 --- a/tex/context/base/strc-syn.mkiv +++ b/tex/context/base/strc-syn.mkiv @@ -274,7 +274,7 @@ {\begingroup \edef\currentsynonym{#2}% \edef\currentsynonymtag{#3}% - \let\currentsimplelist\currentsimplelist + \let\currentsimplelist\currentsynonym \ifx\currentsynonymtag\empty \edef\currentsynonymtag{#4}% \fi diff --git a/tex/context/base/util-sql-imp-client.lua b/tex/context/base/util-sql-imp-client.lua index e09dfde94..a5add61c7 100644 --- a/tex/context/base/util-sql-imp-client.lua +++ b/tex/context/base/util-sql-imp-client.lua @@ -43,6 +43,7 @@ local entry = Cs((unescaped + (1-separator-newline))^0) -- C 10% faster t local getfirst = Ct( entry * (separator * (entry+empty))^0) + newline local skipfirst = (1-newline)^1 * newline +local skipdashes = P("-")^1 * newline local getfirstline = C((1-newline)^0) local cache = { } @@ -105,7 +106,7 @@ local function splitdata(data) -- todo: hash on first line ... maybe move to cli end end p = Cf(Ct("") * p,rawset) * newline^1 - p = skipfirst * Ct(p^0) + p = skipfirst * (skipdashes^-1) * Ct(p^0) -- mssql has a dashed line between the header and data cache[first] = { parser = p, keys = keys } local entries = lpegmatch(p,data) return entries or { }, keys @@ -121,9 +122,13 @@ end helpers.splitdata = splitdata helpers.getdata = getdata -local function dataprepared(specification) +local function dataprepared(specification,client) local query = preparetemplate(specification) if query then + local preamble = client.preamble + if preamble then + query = preamble .. "\n" .. query + end io.savedata(specification.queryfile,query) os.remove(specification.resultfile) if trace_queries then @@ -137,7 +142,8 @@ local function dataprepared(specification) end end -local function datafetched(specification,runner) +local function datafetched(specification,client) + local runner = client.runner local command = replacetemplate(runner,specification) if trace_sql then local t = osclock() @@ -191,11 +197,11 @@ local function execute(specification) report_state("error in specification") return end - if not dataprepared(specification) then + if not dataprepared(specification,methods.client) then report_state("error in preparation") return end - if not datafetched(specification,methods.client.runner) then + if not datafetched(specification,methods.client) then report_state("error in fetching, query: %s",string.collapsespaces(io.loaddata(specification.queryfile))) return end @@ -249,6 +255,7 @@ local celltemplate = "cells[%s]" methods.client = { runner = [[mysql --batch --user="%username%" --password="%password%" --host="%host%" --port=%port% --database="%database%" --default-character-set=utf8 < "%queryfile%" > "%resultfile%"]], + preamble = "", execute = execute, usesfiles = true, wraptemplate = wraptemplate, diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index f4dbf705a..fd8280c8c 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 : c:/data/develop/context/sources/luatex-fonts-merged.lua -- parent file : c:/data/develop/context/sources/luatex-fonts.lua --- merge date : 12/29/15 13:30:02 +-- merge date : 12/31/15 16:49:34 do -- begin closure to overcome local limits and interference |