Fossil

Check-in [5ce57f21bd]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Highly experimental changes to enable TH1 usage in embedded docs. Do not merge.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | dynamicTh1Docs
Files: files | file ages | folders
SHA1: 5ce57f21bd993c6bdb881c7ed169a1ca195e6868
User & Date: mistachkin 2014-09-08 08:08:27.857
Context
2014-09-08
18:13
Add 'th1-docs' setting to control whether or not TH1 scripts are allowed in embedded documentation files. check-in: 4f0b0a6af2 user: mistachkin tags: dynamicTh1Docs
08:08
Highly experimental changes to enable TH1 usage in embedded docs. Do not merge. check-in: 5ce57f21bd user: mistachkin tags: dynamicTh1Docs
2014-09-07
09:49
removed a duplicated if() block, moved a free()-after-return, both reported by Edward Berner. check-in: 3fc62dde2c user: stephan tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/doc.c.
254
255
256
257
258
259
260

261
262
263
264
265
266
267
    { "t",          1, "application/x-troff"               },
    { "tar",        3, "application/x-tar"                 },
    { "tcl",        3, "application/x-tcl"                 },
    { "tex",        3, "application/x-tex"                 },
    { "texi",       4, "application/x-texinfo"             },
    { "texinfo",    7, "application/x-texinfo"             },
    { "tgz",        3, "application/x-tar-gz"              },

    { "tif",        3, "image/tiff"                        },
    { "tiff",       4, "image/tiff"                        },
    { "tr",         2, "application/x-troff"               },
    { "tsi",        3, "audio/TSP-audio"                   },
    { "tsp",        3, "application/dsptype"               },
    { "tsv",        3, "text/tab-separated-values"         },
    { "txt",        3, "text/plain"                        },







>







254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
    { "t",          1, "application/x-troff"               },
    { "tar",        3, "application/x-tar"                 },
    { "tcl",        3, "application/x-tcl"                 },
    { "tex",        3, "application/x-tex"                 },
    { "texi",       4, "application/x-texinfo"             },
    { "texinfo",    7, "application/x-texinfo"             },
    { "tgz",        3, "application/x-tar-gz"              },
    { "th1",        3, "application/x-th1"                 },
    { "tif",        3, "image/tiff"                        },
    { "tiff",       4, "image/tiff"                        },
    { "tr",         2, "application/x-troff"               },
    { "tsi",        3, "audio/TSP-audio"                   },
    { "tsp",        3, "application/dsptype"               },
    { "tsv",        3, "text/tab-separated-values"         },
    { "txt",        3, "text/plain"                        },
521
522
523
524
525
526
527




528
529
530
531
532
533
534
    blob_append(cgi_output_blob(), blob_buffer(&tail), blob_size(&tail));
    style_footer();
  }else if( fossil_strcmp(zMime, "text/plain")==0 ){
    style_header("Documentation");
    @ <blockquote><pre>
    @ %h(blob_str(&filebody))
    @ </pre></blockquote>




    style_footer();
  }else{
    cgi_set_content_type(zMime);
    cgi_set_content(&filebody);
  }
  return;








>
>
>
>







522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
    blob_append(cgi_output_blob(), blob_buffer(&tail), blob_size(&tail));
    style_footer();
  }else if( fossil_strcmp(zMime, "text/plain")==0 ){
    style_header("Documentation");
    @ <blockquote><pre>
    @ %h(blob_str(&filebody))
    @ </pre></blockquote>
    style_footer();
  }else if( fossil_strcmp(zMime, "application/x-th1")==0 ){
    style_header("Documentation");
    Th_Render(blob_str(&filebody));
    style_footer();
  }else{
    cgi_set_content_type(zMime);
    cgi_set_content(&filebody);
  }
  return;