From 9e577b0142eb934ef24eedbd16c73a7addff109d Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Sun, 14 Apr 2013 16:51:00 +0200 Subject: beta 2013.04.14 16:51 --- tex/context/base/cont-new.mkiv | 2 +- tex/context/base/context-version.pdf | Bin 4134 -> 4131 bytes tex/context/base/context-version.png | Bin 40477 -> 40552 bytes tex/context/base/context.mkiv | 2 +- tex/context/base/mult-def.mkiv | 1 + tex/context/base/pack-com.mkiv | 6 ++- tex/context/base/status-files.pdf | Bin 24733 -> 24750 bytes tex/context/base/status-lua.pdf | Bin 211781 -> 211728 bytes tex/context/base/strc-flt.mkvi | 9 ++++ tex/context/base/strc-lab.mkiv | 2 + tex/context/base/strc-lst.lua | 10 ++-- tex/context/base/trac-inf.lua | 5 +- tex/context/base/util-sql-imp-swiglib.lua | 51 +++++++++++++-------- tex/generic/context/luatex/luatex-fonts-merged.lua | 2 +- 14 files changed, 60 insertions(+), 30 deletions(-) (limited to 'tex') diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv index 01079a058..74a5f3f2a 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{2013.04.14 00:32} +\newcontextversion{2013.04.14 16:51} %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 index 9206cdae8..cf05572ff 100644 Binary files a/tex/context/base/context-version.pdf and b/tex/context/base/context-version.pdf differ diff --git a/tex/context/base/context-version.png b/tex/context/base/context-version.png index 2e85a21cd..b0bfbdbe0 100644 Binary files a/tex/context/base/context-version.png and b/tex/context/base/context-version.png differ diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv index 90b9a3ff2..5dc0a73fd 100644 --- a/tex/context/base/context.mkiv +++ b/tex/context/base/context.mkiv @@ -25,7 +25,7 @@ %D up and the dependencies are more consistent. \edef\contextformat {\jobname} -\edef\contextversion{2013.04.14 00:32} +\edef\contextversion{2013.04.14 16:51} \edef\contextkind {beta} %D For those who want to use this: diff --git a/tex/context/base/mult-def.mkiv b/tex/context/base/mult-def.mkiv index 274010692..66d4f4748 100644 --- a/tex/context/base/mult-def.mkiv +++ b/tex/context/base/mult-def.mkiv @@ -70,6 +70,7 @@ \def\v!chemical {chemical} \def\v!chemicals {chemicals} \def\v!words {words} +\def\v!combination {combination} \def\s!lcgreek {lcgreek} \def\s!ucgreek {ucgreek} diff --git a/tex/context/base/pack-com.mkiv b/tex/context/base/pack-com.mkiv index d12c0d90a..8c10549e0 100644 --- a/tex/context/base/pack-com.mkiv +++ b/tex/context/base/pack-com.mkiv @@ -163,6 +163,8 @@ \egroup \egroup} +\newtoks\everycombination + \def\pack_combinations_start[#1][#2]% needs a cleanup, also nx ny (pretty old, this one) {\global\setsystemmode{combination}% % @@ -182,6 +184,8 @@ % \forgetall % + \the\everycombination + % \let\startcontent\pack_common_content_start \let\stopcontent \pack_common_content_stop \let\startcaption\pack_common_caption_start @@ -795,7 +799,7 @@ \usepairedboxstyleandcolor\c!style\c!color \tolerantTABLEbreaktrue % hm. \blank[\v!disable]% use fast one - \everypar{\begstrut}} + \everypar{\begstrut}} % also flushers here (see bTABLE) \definepairedbox[\v!legend] diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf index 36f371e1e..52b899bb4 100644 Binary files a/tex/context/base/status-files.pdf and b/tex/context/base/status-files.pdf differ diff --git a/tex/context/base/status-lua.pdf b/tex/context/base/status-lua.pdf index 996325102..7184d6b26 100644 Binary files a/tex/context/base/status-lua.pdf and b/tex/context/base/status-lua.pdf differ diff --git a/tex/context/base/strc-flt.mkvi b/tex/context/base/strc-flt.mkvi index b552573d8..d1f4477b9 100644 --- a/tex/context/base/strc-flt.mkvi +++ b/tex/context/base/strc-flt.mkvi @@ -788,6 +788,15 @@ \newconditional\usesamefloatnumber +% \startplacefigure[location=here,reference=first, title=first, group=alpha,groupsuffix=.a] +% \externalfigure[dummy][height=2cm] +% \stopplacefigure +% \startplacefigure[location=here,reference=second,title=second,group=alpha,groupsuffix=.b] +% \externalfigure[dummy][height=2cm] +% \stopplacefigure +% +% uses: + \def\strc_floats_group_index {\numexpr\ctxcommand{listgroupindex("\currentfloat","\currentfloatgroup")}\relax} diff --git a/tex/context/base/strc-lab.mkiv b/tex/context/base/strc-lab.mkiv index 772a9cc19..407b74669 100644 --- a/tex/context/base/strc-lab.mkiv +++ b/tex/context/base/strc-lab.mkiv @@ -60,6 +60,8 @@ %setuevalue{\c!set #1}{\strc_labels_set }% \setuevalue {#1}{\strc_labels_command{#1}}} +% todo: \strc_labels_command for user + \appendtoks \ifx\currentlabelparent\empty % clone => parent | subclone => clone | subsubclone => subclone diff --git a/tex/context/base/strc-lst.lua b/tex/context/base/strc-lst.lua index 7d4d8e7e7..ad7dc0f54 100644 --- a/tex/context/base/strc-lst.lua +++ b/tex/context/base/strc-lst.lua @@ -129,9 +129,11 @@ function lists.addto(t) t.userdata = helpers.touserdata(u) -- nicer at the tex end end local numberdata = t.numberdata - local group = numberdata and numberdata.group or "" - if group == "" then - numberdata.group = nil + local group = numberdata and numberdata.group + if not group then + -- forget about it + elseif group == "" then + group, numberdata.group = nil, nil else local groupindex = groupindices[m.name][group] if groupindex then @@ -151,7 +153,7 @@ function lists.addto(t) if setcomponent then setcomponent(t) -- might move to the tex end end - if group ~= "" then + if group then groupindices[m.name][group] = p end return p diff --git a/tex/context/base/trac-inf.lua b/tex/context/base/trac-inf.lua index fdc07d97d..eefc15a6f 100644 --- a/tex/context/base/trac-inf.lua +++ b/tex/context/base/trac-inf.lua @@ -50,7 +50,7 @@ local function starttiming(instance) timer.timing = it + 1 end -local function stoptiming(instance, report) +local function stoptiming(instance) local timer = timers[instance or "notimer"] local it = timer.timing if it > 1 then @@ -62,9 +62,6 @@ local function stoptiming(instance, report) local loadtime = stoptime - starttime timer.stoptime = stoptime timer.loadtime = timer.loadtime + loadtime - if report then - statistics.report("load time %0.3f",loadtime) - end timer.timing = 0 return loadtime end diff --git a/tex/context/base/util-sql-imp-swiglib.lua b/tex/context/base/util-sql-imp-swiglib.lua index 9a22477a9..719620a6f 100644 --- a/tex/context/base/util-sql-imp-swiglib.lua +++ b/tex/context/base/util-sql-imp-swiglib.lua @@ -110,7 +110,10 @@ local typemap = mysql.MYSQL_TYPE_VAR_STRING and { -- real_escape_string local function finish(t) - mysql_free_result(t._result_) + local r = t._result_ + if r then + mysql_free_result(r) + end end -- will become metatable magic @@ -203,9 +206,17 @@ local mt = { __index = { numrows = numrows, getcolnames = getcolnames, getcoltypes = getcoltypes, + -- fallback + _result_ = nil, + names = { }, + types = { }, + noffields = 0, + nofrows = 0, } } +local nt = setmetatable({},mt) + -- session local function close(t) @@ -218,24 +229,28 @@ local function execute(t,query) local result = mysql_execute_query(connection,query,#query) if result == 0 then local result = mysql_store_result(connection) - mysql_field_seek(result,0) - local nofrows = mysql_num_rows(result) or 0 - local noffields = mysql_num_fields(result) - local names = { } - local types = { } - for i=1,noffields do - local field = mysql_fetch_field(result) - names[i] = field.name - types[i] = field.type + if result then + mysql_field_seek(result,0) + local nofrows = mysql_num_rows(result) or 0 + local noffields = mysql_num_fields(result) + local names = { } + local types = { } + for i=1,noffields do + local field = mysql_fetch_field(result) + names[i] = field.name + types[i] = field.type + end + local t = { + _result_ = result, + names = names, + types = types, + noffields = noffields, + nofrows = nofrows, + } + return setmetatable(t,mt) + else + return nt end - local t = { - _result_ = result, - names = names, - types = types, - noffields = noffields, - nofrows = nofrows, - } - return setmetatable(t,mt) end end return false diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index 449378d15..96f4c79cb 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/13/13 13:24:36 +-- merge date : 04/14/13 16:51:15 do -- begin closure to overcome local limits and interference -- cgit v1.2.3