Re: [fossil-users] TH1 Work - May be of interest to others

2016-06-12 Thread Joe Mistachkin

David Simmons wrote:
>
> While doing other work in fossil, I've made a few enhancements to TH1.
>

Is the code posted somewhere we can look at it?  I'm not sure if you
intended
to attach it to your message; however, these mailing lists strip
attachments.

--
Joe Mistachkin

___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] How about to add "unsetenv:" tag for the CGI script ?

2016-06-12 Thread Svyatoslav Mishyn
(Sat, 11 Jun 16:14) Richard Hipp:
> On 6/11/16, Svyatoslav Mishyn  wrote:
> >
> > as `setenv: SCRIPT_NAME ""` does not work.
> >
> 
> I think I might have fixed this with the latest trunk check-in
> (https://www.fossil-scm.org/fossil/info/72df287cf3556a04) - please try
> it out and let us know.

Yes, it works.

Thanks so much!


-- 
https://www.juef.tk/


signature.asc
Description: PGP signature
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


[fossil-users] TH1 Work - May be of interest to others

2016-06-12 Thread David Simmons

While doing other work in fossil, I've made a few enhancements to TH1.


A) Removed expensive double scanning of whitespace in thEvalLocal during:

 * word-by-word parsing in the gobble phase of thEvalLocal.
 * # comment to EOL scanning

B) Added "\" end-of-line continuation support for both # comments and 
regular parsing. Line continuation supports both "\n" and "\r\n" line 
formats.


Thus making it possible to write expression like:

puts\
1;
#\
or whatever else comment
# and so on \
and on
puts \
2;

Which properly runs and outputs "12".

C) Minor fixes relating to makemake.tcl to add /FS build flag needed on 
windows to avoid parallel build race conditions while accessing .obj 
files. Explored tweaking the translate.c tool to support C99 // 
transformation for C89 back-compat to enable sources to use //.


D) Added C-layer Th_RenderEx to support script execution with security 
controls and output to a blob-output target capability. Added HTML 
script tag and variable reference compatibility to TH1 to allow 
variables and scripts to be conformingly embedded in HTML. Enabled TH1 
variable references and privileged author execution of scripts 
throughout the wiki, ticket, etc system. Added additional hooks to 
support URL handling including GET/PUT requests using TH1.


E) Wrote wikieditor replacement. I.e., a new HTML/Markup (TH1+JS+CSS) 
customizable editor component with  key-bindings that is mimetype aware 
and unifies the HTML+TH1, markdown, and fossil-wiki editing model. 
Import and export of wiki-files now can round-trip and transparently 
incorporate mimetype to file extension mappings.


F) Wrote some basic TH1 libraries and documentation to make learning and 
using TH1 within fossil a lower friction exercise.


(A) Is only a performance fix, other perf-fixes exist as low-hanging 
fruit but that one was simple while refactoring for (B). The next 
obvious one is to remove the gobble phase entirely.


(B) Was more significant as we kept running into many cases using TH1 
where we needed long lines and not having continuations made quoting 
forms a PITB .


(D+E) Allows arbitrary server-side code to be written via the wiki or 
checkins. Any item containing scripts will have the scripts treated as 
no-ops if the author of the script doesn't have execution rights on the 
repo.


Cheers,

-- DSim


___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users