Fossil

Check-in [02f312e698]
Login

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

Overview
Comment:Enable markdown by default. Render as markdown any document that ends with either "md" or "markdown".
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | markdown
Files: files | file ages | folders
SHA1: 02f312e698ee699cf66e8fc229d9aa1f866d2f78
User & Date: drh 2013-03-29 15:43:59.605
Context
2013-03-29
16:38
Add the N-card to control artifacts for wiki, checkins, events, and attachments, which opens up the possibility (not yet implemented) of being able to save wiki text, check-in comments, event text, and attachment descriptions in a variety of formats, such as text/plain, text/html, or text/x-markdown. check-in: 2336a2d86e user: drh tags: markdown
15:43
Enable markdown by default. Render as markdown any document that ends with either "md" or "markdown". check-in: 02f312e698 user: drh tags: markdown
15:05
Win32: Fossil now understands Cygwin paths containing one or more of the characters <nowiki>"*:<>?|</nowiki>. Those are normally forbidden in win32. This means that the win32 fossil.exe is better usable in a Cygwin environment. See [http://cygwin.com/cygwin-ug-net/using-specialnames.html#pathnames-specialchars]. check-in: fc413110eb user: jan.nijtmans tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to auto.def.
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
    with-tcl:path        => {Enable Tcl integration, with Tcl in the specified path}
    with-tcl-stubs=0     => {Enable Tcl integration via stubs mechanism}
    internal-sqlite=1    => {Don't use the internal sqlite, use the system one}
    static=0             => {Link a static executable}
    lineedit=1           => {Disable line editing}
    fossil-debug=0       => {Build with fossil debugging enabled}
    json=0               => {Build with fossil JSON API enabled}
    markdown=0           => {Build with markdown engine enabled}
}

# sqlite wants these types if possible
cc-with {-includes {stdint.h inttypes.h}} {
    cc-check-types uint32_t uint16_t int16_t uint8_t
}








<







9
10
11
12
13
14
15

16
17
18
19
20
21
22
    with-tcl:path        => {Enable Tcl integration, with Tcl in the specified path}
    with-tcl-stubs=0     => {Enable Tcl integration via stubs mechanism}
    internal-sqlite=1    => {Don't use the internal sqlite, use the system one}
    static=0             => {Link a static executable}
    lineedit=1           => {Disable line editing}
    fossil-debug=0       => {Build with fossil debugging enabled}
    json=0               => {Build with fossil JSON API enabled}

}

# sqlite wants these types if possible
cc-with {-includes {stdint.h inttypes.h}} {
    cc-check-types uint32_t uint16_t int16_t uint8_t
}

74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
    # have #ifdef guards around the whole file without
    # reading config.h first.
    define-append EXTRA_CFLAGS -DFOSSIL_ENABLE_JSON
    define FOSSIL_ENABLE_JSON
}

if {[opt-bool markdown]} {
    define-append EXTRA_CFLAGS -DFOSSIL_ENABLE_MARKDOWN
    define FOSSIL_ENABLE_MARKDOWN
}

if {[opt-bool static]} {
    # XXX: This will not work on all systems.
    define-append EXTRA_LDFLAGS -static
}








|
<







73
74
75
76
77
78
79
80

81
82
83
84
85
86
87
    # have #ifdef guards around the whole file without
    # reading config.h first.
    define-append EXTRA_CFLAGS -DFOSSIL_ENABLE_JSON
    define FOSSIL_ENABLE_JSON
}

if {[opt-bool markdown]} {
    # no-op.  Markdown is now enabled by default.

}

if {[opt-bool static]} {
    # XXX: This will not work on all systems.
    define-append EXTRA_LDFLAGS -static
}

Changes to src/db.c.
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
  { "gmerge-command",0,               40, 0, ""                    },
  { "http-port",     0,               16, 0, "8080"                },
  { "https-login",   0,                0, 0, "off"                 },
  { "ignore-glob",   0,               40, 1, ""                    },
  { "localauth",     0,                0, 0, "off"                 },
  { "main-branch",   0,               40, 0, "trunk"               },
  { "manifest",      0,                0, 1, "off"                 },
#ifdef FOSSIL_ENABLE_MARKDOWN
  { "markdown",      0,                0, 0, "off"                 },
#endif
  { "max-upload",    0,               25, 0, "250000"              },
  { "mtime-changes", 0,                0, 0, "on"                  },
  { "pgp-command",   0,               40, 0, "gpg --clearsign -o " },
  { "proxy",         0,               32, 0, "off"                 },
  { "relative-paths",0,                0, 0, "on"                  },
  { "repo-cksum",    0,                0, 0, "on"                  },
  { "self-register", 0,                0, 0, "off"                 },







<
<
<







2102
2103
2104
2105
2106
2107
2108



2109
2110
2111
2112
2113
2114
2115
  { "gmerge-command",0,               40, 0, ""                    },
  { "http-port",     0,               16, 0, "8080"                },
  { "https-login",   0,                0, 0, "off"                 },
  { "ignore-glob",   0,               40, 1, ""                    },
  { "localauth",     0,                0, 0, "off"                 },
  { "main-branch",   0,               40, 0, "trunk"               },
  { "manifest",      0,                0, 1, "off"                 },



  { "max-upload",    0,               25, 0, "250000"              },
  { "mtime-changes", 0,                0, 0, "on"                  },
  { "pgp-command",   0,               40, 0, "gpg --clearsign -o " },
  { "proxy",         0,               32, 0, "off"                 },
  { "relative-paths",0,                0, 0, "on"                  },
  { "repo-cksum",    0,                0, 0, "on"                  },
  { "self-register", 0,                0, 0, "off"                 },
Changes to src/doc.c.
167
168
169
170
171
172
173

174
175
176
177
178
179
180
    { "lha",        3, "application/octet-stream"          },
    { "lsp",        3, "application/x-lisp"                },
    { "lzh",        3, "application/octet-stream"          },
    { "m",          1, "text/plain"                        },
    { "m3u",        3, "audio/x-mpegurl"                   },
    { "man",        3, "application/x-troff-man"           },
    { "markdown",   8, "text/x-markdown"                   },

    { "me",         2, "application/x-troff-me"            },
    { "mesh",       4, "model/mesh"                        },
    { "mid",        3, "audio/midi"                        },
    { "midi",       4, "audio/midi"                        },
    { "mif",        3, "application/x-mif"                 },
    { "mime",       4, "www/mime"                          },
    { "mkd",        3, "text/x-markdown"                   },







>







167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
    { "lha",        3, "application/octet-stream"          },
    { "lsp",        3, "application/x-lisp"                },
    { "lzh",        3, "application/octet-stream"          },
    { "m",          1, "text/plain"                        },
    { "m3u",        3, "audio/x-mpegurl"                   },
    { "man",        3, "application/x-troff-man"           },
    { "markdown",   8, "text/x-markdown"                   },
    { "md",         2, "text/x-markdown"                   },
    { "me",         2, "application/x-troff-me"            },
    { "mesh",       4, "model/mesh"                        },
    { "mid",        3, "audio/midi"                        },
    { "midi",       4, "audio/midi"                        },
    { "mif",        3, "application/x-mif"                 },
    { "mime",       4, "www/mime"                          },
    { "mkd",        3, "text/x-markdown"                   },
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
      style_header(blob_str(&title));
      wiki_convert(&tail, 0, WIKI_BUTTONS);
    }else{
      style_header("Documentation");
      wiki_convert(&filebody, 0, WIKI_BUTTONS);
    }
    style_footer();
#ifdef FOSSIL_ENABLE_MARKDOWN
  }else if( fossil_strcmp(zMime, "text/x-markdown")==0
         && db_get_boolean("markdown", 0) ){
    Blob title = BLOB_INITIALIZER;
    Blob tail = BLOB_INITIALIZER;
    markdown_to_html(&filebody, &title, &tail);
    if( blob_size(&title)>0 ){
      style_header(blob_str(&title));
    }else{
      style_header("Documentation");
    }
    blob_append(cgi_output_blob(), blob_buffer(&tail), blob_size(&tail));
    style_footer();
#endif
  }else if( fossil_strcmp(zMime, "text/plain")==0 ){
    style_header("Documentation");
    @ <blockquote><pre>
    @ %h(blob_str(&filebody))
    @ </pre></blockquote>
    style_footer();
  }else{







<
|
<










<







503
504
505
506
507
508
509

510

511
512
513
514
515
516
517
518
519
520

521
522
523
524
525
526
527
      style_header(blob_str(&title));
      wiki_convert(&tail, 0, WIKI_BUTTONS);
    }else{
      style_header("Documentation");
      wiki_convert(&filebody, 0, WIKI_BUTTONS);
    }
    style_footer();

  }else if( fossil_strcmp(zMime, "text/x-markdown")==0 ){

    Blob title = BLOB_INITIALIZER;
    Blob tail = BLOB_INITIALIZER;
    markdown_to_html(&filebody, &title, &tail);
    if( blob_size(&title)>0 ){
      style_header(blob_str(&title));
    }else{
      style_header("Documentation");
    }
    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{
Changes to src/main.c.
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
    ++count;
    fossil_print("\tTCL_STUBS\n");
#endif
#if defined(FOSSIL_ENABLE_JSON)
    ++count;
    fossil_print("\tJSON (API %s)\n", FOSSIL_JSON_API_VERSION);
#endif
#if defined(FOSSIL_ENABLE_MARKDOWN)
    ++count;
    fossil_print("\tMARKDOWN\n");
#endif
    if( !count ){
      fossil_print("\tNo optional features were enabled.\n");
    }
  }
}









<
<
<
<







778
779
780
781
782
783
784




785
786
787
788
789
790
791
    ++count;
    fossil_print("\tTCL_STUBS\n");
#endif
#if defined(FOSSIL_ENABLE_JSON)
    ++count;
    fossil_print("\tJSON (API %s)\n", FOSSIL_JSON_API_VERSION);
#endif




    if( !count ){
      fossil_print("\tNo optional features were enabled.\n");
    }
  }
}


Changes to src/makemake.tcl.
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
#
# FOSSIL_ENABLE_SYMBOLS = 1

#### Enable JSON (http://www.json.org) support using "cson"
#
# FOSSIL_ENABLE_JSON = 1

#### Enable markdown support
#
# FOSSIL_ENABLE_MARKDOWN = 1

#### Enable HTTPS support via OpenSSL (links to libssl and libcrypto)
#
# FOSSIL_ENABLE_SSL = 1

#### Enable scripting support via Tcl/Tk
#
# FOSSIL_ENABLE_TCL = 1







<
<
<
<







378
379
380
381
382
383
384




385
386
387
388
389
390
391
#
# FOSSIL_ENABLE_SYMBOLS = 1

#### Enable JSON (http://www.json.org) support using "cson"
#
# FOSSIL_ENABLE_JSON = 1





#### Enable HTTPS support via OpenSSL (links to libssl and libcrypto)
#
# FOSSIL_ENABLE_SSL = 1

#### Enable scripting support via Tcl/Tk
#
# FOSSIL_ENABLE_TCL = 1
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542

# With JSON support
ifdef FOSSIL_ENABLE_JSON
TCC += -DFOSSIL_ENABLE_JSON=1
RCC += -DFOSSIL_ENABLE_JSON=1
endif

# With markdown support
ifdef FOSSIL_ENABLE_MARKDOWN
TCC += -DFOSSIL_ENABLE_MARKDOWN=1
RCC += -DFOSSIL_ENABLE_MARKDOWN=1
endif

#### We add the -static option here so that we can build a static
#    executable that will run in a chroot jail.
#
LIB = -static

# MinGW: If available, use the Unicode capable runtime startup code.
ifndef BROKEN_MINGW_CMDLINE







<
<
<
<
<
<







519
520
521
522
523
524
525






526
527
528
529
530
531
532

# With JSON support
ifdef FOSSIL_ENABLE_JSON
TCC += -DFOSSIL_ENABLE_JSON=1
RCC += -DFOSSIL_ENABLE_JSON=1
endif







#### We add the -static option here so that we can build a static
#    executable that will run in a chroot jail.
#
LIB = -static

# MinGW: If available, use the Unicode capable runtime startup code.
ifndef BROKEN_MINGW_CMDLINE
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
ZINCDIR = $(B)\compat\zlib
ZLIBDIR = $(B)\compat\zlib
ZLIB    = zlib.lib

# Uncomment to enable JSON API
# FOSSIL_ENABLE_JSON = 1

# Uncomment to enable markdown support
# FOSSIL_ENABLE_MARKDOWN = 1

INCL   = -I. -I$(SRCDIR) -I$B\win\include -I$(ZINCDIR)

CFLAGS = -nologo -MT -O2
BCC    = $(CC) $(CFLAGS)
TCC    = $(CC) -c $(CFLAGS) $(MSCDEF) $(SSL) $(INCL)
RCC    = rc -D_WIN32 -D_MSC_VER $(INCL)
LIBS   = $(ZLIB) ws2_32.lib advapi32.lib $(SSLLIB)
LIBDIR = -LIBPATH:$(ZLIBDIR)

!ifdef FOSSIL_ENABLE_JSON
TCC = $(TCC) -DFOSSIL_ENABLE_JSON
RCC = $(RCC) -DFOSSIL_ENABLE_JSON
!endif

!ifdef FOSSIL_ENABLE_MARKDOWN
TCC = $(TCC) -DFOSSIL_ENABLE_MARKDOWN
RCC = $(RCC) -DFOSSIL_ENABLE_MARKDOWN
!endif
}
regsub -all {[-]D} $SQLITE_OPTIONS {/D} MSC_SQLITE_OPTIONS
set j " \\\n                 "
writeln "SQLITE_OPTIONS = [join $MSC_SQLITE_OPTIONS $j]\n"
writeln -nonewline "SRC   = "
set i 0
foreach s [lsort $src] {







<
<
<













<
<
<
<
<







954
955
956
957
958
959
960



961
962
963
964
965
966
967
968
969
970
971
972
973





974
975
976
977
978
979
980
ZINCDIR = $(B)\compat\zlib
ZLIBDIR = $(B)\compat\zlib
ZLIB    = zlib.lib

# Uncomment to enable JSON API
# FOSSIL_ENABLE_JSON = 1




INCL   = -I. -I$(SRCDIR) -I$B\win\include -I$(ZINCDIR)

CFLAGS = -nologo -MT -O2
BCC    = $(CC) $(CFLAGS)
TCC    = $(CC) -c $(CFLAGS) $(MSCDEF) $(SSL) $(INCL)
RCC    = rc -D_WIN32 -D_MSC_VER $(INCL)
LIBS   = $(ZLIB) ws2_32.lib advapi32.lib $(SSLLIB)
LIBDIR = -LIBPATH:$(ZLIBDIR)

!ifdef FOSSIL_ENABLE_JSON
TCC = $(TCC) -DFOSSIL_ENABLE_JSON
RCC = $(RCC) -DFOSSIL_ENABLE_JSON
!endif





}
regsub -all {[-]D} $SQLITE_OPTIONS {/D} MSC_SQLITE_OPTIONS
set j " \\\n                 "
writeln "SQLITE_OPTIONS = [join $MSC_SQLITE_OPTIONS $j]\n"
writeln -nonewline "SRC   = "
set i 0
foreach s [lsort $src] {
Changes to src/markdown.c.
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
**
*******************************************************************************
**
** This file contains code to parse a blob containing markdown text,
** using an external renderer.
*/

#ifdef FOSSIL_ENABLE_MARKDOWN

#include "config.h"
#include "markdown.h"

#include <assert.h>
#include <string.h>
#include <stdlib.h>








<
<







15
16
17
18
19
20
21


22
23
24
25
26
27
28
**
*******************************************************************************
**
** This file contains code to parse a blob containing markdown text,
** using an external renderer.
*/



#include "config.h"
#include "markdown.h"

#include <assert.h>
#include <string.h>
#include <stdlib.h>

2236
2237
2238
2239
2240
2241
2242
2243
2244
    blob_zero(&lr[i].link);
    blob_zero(&lr[i].title);
  }
  blob_zero(&rndr.refs);
  blobarray_zero(rndr.work, rndr.make.max_work_stack);
  fossil_free(rndr.work);
}

#endif /* def FOSSIL_ENABLE_MARKDOWN */







<
<
2234
2235
2236
2237
2238
2239
2240


    blob_zero(&lr[i].link);
    blob_zero(&lr[i].title);
  }
  blob_zero(&rndr.refs);
  blobarray_zero(rndr.work, rndr.make.max_work_stack);
  fossil_free(rndr.work);
}


Changes to src/markdown_html.c.
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
**
*******************************************************************************
**
** This file contains callbacks for the markdown parser that generate
** XHTML output.
*/

#ifdef FOSSIL_ENABLE_MARKDOWN

#include "config.h"
#include "markdown_html.h"

#if INTERFACE

void markdown_to_html(
  struct Blob *input_markdown,







<
<







15
16
17
18
19
20
21


22
23
24
25
26
27
28
**
*******************************************************************************
**
** This file contains callbacks for the markdown parser that generate
** XHTML output.
*/



#include "config.h"
#include "markdown_html.h"

#if INTERFACE

void markdown_to_html(
  struct Blob *input_markdown,
403
404
405
406
407
408
409
410
411
    "*_", /* emphasis characters */
    output_title /* opaque data */
  };
  blob_reset(output_title);
  blob_reset(output_body);
  markdown(output_body, input_markdown, &html_renderer);
}

#endif /* def FOSSIL_ENABLE_MARKDOWN */







<
<
401
402
403
404
405
406
407


    "*_", /* emphasis characters */
    output_title /* opaque data */
  };
  blob_reset(output_title);
  blob_reset(output_body);
  markdown(output_body, input_markdown, &html_renderer);
}


Changes to src/th_main.c.
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
  }
#endif
#if defined(FOSSIL_ENABLE_JSON)
  else if( 0 == fossil_strnicmp( zArg, "json", 4 ) ){
    rc = 1;
  }
#endif
#if defined(FOSSIL_ENABLE_MARKDOWN)
  else if( 0 == fossil_strnicmp( zArg, "markdown", 8 ) ){
    rc = 1;
  }
#endif
  if( g.thTrace ){
    Th_Trace("[hasfeature %#h] => %d<br />\n", argl[1], zArg, rc);
  }
  Th_SetResultInt(interp, rc);
  return TH_OK;
}








<



<







302
303
304
305
306
307
308

309
310
311

312
313
314
315
316
317
318
  }
#endif
#if defined(FOSSIL_ENABLE_JSON)
  else if( 0 == fossil_strnicmp( zArg, "json", 4 ) ){
    rc = 1;
  }
#endif

  else if( 0 == fossil_strnicmp( zArg, "markdown", 8 ) ){
    rc = 1;
  }

  if( g.thTrace ){
    Th_Trace("[hasfeature %#h] => %d<br />\n", argl[1], zArg, rc);
  }
  Th_SetResultInt(interp, rc);
  return TH_OK;
}

Added test/markdown-test1.md.


















































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

Markdown Formatter Test Document
================================

This document is designed to test the markdown formatter.

 * A bullet item.
     *  A subitem
 * Second bullet

More text

 1. Enumeration
    1.1.  Subitem 1
    1.2.  Subitem 2
 2. Second enumeration.

Another paragraph.



Other Features
--------------

Text can show *emphasis* or _emphasis_ or **strong emphassis**.
Changes to win/Makefile.mingw.
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#
# FOSSIL_ENABLE_SYMBOLS = 1

#### Enable JSON (http://www.json.org) support using "cson"
#
# FOSSIL_ENABLE_JSON = 1

#### Enable markdown support
#
# FOSSIL_ENABLE_MARKDOWN = 1

#### Enable HTTPS support via OpenSSL (links to libssl and libcrypto)
#
# FOSSIL_ENABLE_SSL = 1

#### Enable scripting support via Tcl/Tk
#
# FOSSIL_ENABLE_TCL = 1







<
<
<
<







42
43
44
45
46
47
48




49
50
51
52
53
54
55
#
# FOSSIL_ENABLE_SYMBOLS = 1

#### Enable JSON (http://www.json.org) support using "cson"
#
# FOSSIL_ENABLE_JSON = 1





#### Enable HTTPS support via OpenSSL (links to libssl and libcrypto)
#
# FOSSIL_ENABLE_SSL = 1

#### Enable scripting support via Tcl/Tk
#
# FOSSIL_ENABLE_TCL = 1
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206

# With JSON support
ifdef FOSSIL_ENABLE_JSON
TCC += -DFOSSIL_ENABLE_JSON=1
RCC += -DFOSSIL_ENABLE_JSON=1
endif

# With markdown support
ifdef FOSSIL_ENABLE_MARKDOWN
TCC += -DFOSSIL_ENABLE_MARKDOWN=1
RCC += -DFOSSIL_ENABLE_MARKDOWN=1
endif

#### We add the -static option here so that we can build a static
#    executable that will run in a chroot jail.
#
LIB = -static

# MinGW: If available, use the Unicode capable runtime startup code.
ifndef BROKEN_MINGW_CMDLINE







<
<
<
<
<
<







183
184
185
186
187
188
189






190
191
192
193
194
195
196

# With JSON support
ifdef FOSSIL_ENABLE_JSON
TCC += -DFOSSIL_ENABLE_JSON=1
RCC += -DFOSSIL_ENABLE_JSON=1
endif







#### We add the -static option here so that we can build a static
#    executable that will run in a chroot jail.
#
LIB = -static

# MinGW: If available, use the Unicode capable runtime startup code.
ifndef BROKEN_MINGW_CMDLINE
Changes to win/Makefile.msc.
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
ZINCDIR = $(B)\compat\zlib
ZLIBDIR = $(B)\compat\zlib
ZLIB    = zlib.lib

# Uncomment to enable JSON API
# FOSSIL_ENABLE_JSON = 1

# Uncomment to enable markdown support
# FOSSIL_ENABLE_MARKDOWN = 1

INCL   = -I. -I$(SRCDIR) -I$B\win\include -I$(ZINCDIR)

CFLAGS = -nologo -MT -O2
BCC    = $(CC) $(CFLAGS)
TCC    = $(CC) -c $(CFLAGS) $(MSCDEF) $(SSL) $(INCL)
RCC    = rc -D_WIN32 -D_MSC_VER $(INCL)
LIBS   = $(ZLIB) ws2_32.lib advapi32.lib $(SSLLIB)
LIBDIR = -LIBPATH:$(ZLIBDIR)

!ifdef FOSSIL_ENABLE_JSON
TCC = $(TCC) -DFOSSIL_ENABLE_JSON
RCC = $(RCC) -DFOSSIL_ENABLE_JSON
!endif

!ifdef FOSSIL_ENABLE_MARKDOWN
TCC = $(TCC) -DFOSSIL_ENABLE_MARKDOWN
RCC = $(RCC) -DFOSSIL_ENABLE_MARKDOWN
!endif

SQLITE_OPTIONS = /DSQLITE_OMIT_LOAD_EXTENSION=1 \
                 /DSQLITE_THREADSAFE=0 \
                 /DSQLITE_DEFAULT_FILE_FORMAT=4 \
                 /DSQLITE_ENABLE_STAT3 \
                 /Dlocaltime=fossil_localtime \
                 /DSQLITE_ENABLE_LOCKING_STYLE=0








<
<
<














<
<
<
<
<







24
25
26
27
28
29
30



31
32
33
34
35
36
37
38
39
40
41
42
43
44





45
46
47
48
49
50
51
ZINCDIR = $(B)\compat\zlib
ZLIBDIR = $(B)\compat\zlib
ZLIB    = zlib.lib

# Uncomment to enable JSON API
# FOSSIL_ENABLE_JSON = 1




INCL   = -I. -I$(SRCDIR) -I$B\win\include -I$(ZINCDIR)

CFLAGS = -nologo -MT -O2
BCC    = $(CC) $(CFLAGS)
TCC    = $(CC) -c $(CFLAGS) $(MSCDEF) $(SSL) $(INCL)
RCC    = rc -D_WIN32 -D_MSC_VER $(INCL)
LIBS   = $(ZLIB) ws2_32.lib advapi32.lib $(SSLLIB)
LIBDIR = -LIBPATH:$(ZLIBDIR)

!ifdef FOSSIL_ENABLE_JSON
TCC = $(TCC) -DFOSSIL_ENABLE_JSON
RCC = $(RCC) -DFOSSIL_ENABLE_JSON
!endif






SQLITE_OPTIONS = /DSQLITE_OMIT_LOAD_EXTENSION=1 \
                 /DSQLITE_THREADSAFE=0 \
                 /DSQLITE_DEFAULT_FILE_FORMAT=4 \
                 /DSQLITE_ENABLE_STAT3 \
                 /Dlocaltime=fossil_localtime \
                 /DSQLITE_ENABLE_LOCKING_STYLE=0