Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Add support for interwiki links. |
|---|---|
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
f4dc114a780fea418993a34843e11b8c |
| User & Date: | drh 2020-08-23 15:55:37.831 |
Context
|
2020-08-23
| ||
| 18:12 | For the wiki_render_page_list_json() function, only include pages on the list if they have one or more artifacts. This seems to clears the bug described by [forum:a9e345482e|"Wiki editor inop" forum post] check-in: 5244a5484a user: drh tags: trunk | |
| 16:02 | Merge the interwiki enhancement from trunk. check-in: 26ac4b1ccf user: drh tags: sec2020 | |
| 15:55 | Add support for interwiki links. check-in: f4dc114a78 user: drh tags: trunk | |
| 15:52 | Add the /intermap page for adjusting the interwiki mapping using a Web interface. Closed-Leaf check-in: dab94dda30 user: drh tags: interwiki | |
|
2020-08-22
| ||
| 19:07 | Update the Fossil Wiki and Markdown cheat-sheets to include hyperlinks to one another. check-in: 0ae2dbd40a user: drh tags: trunk | |
Changes
Changes to src/configure.c.
| ︙ | ︙ | |||
35 36 37 38 39 40 41 | #define CONFIGSET_PROJ 0x000008 /* Project name */ #define CONFIGSET_SHUN 0x000010 /* Shun settings */ #define CONFIGSET_USER 0x000020 /* The USER table */ #define CONFIGSET_ADDR 0x000040 /* The CONCEALED table */ #define CONFIGSET_XFER 0x000080 /* Transfer configuration */ #define CONFIGSET_ALIAS 0x000100 /* URL Aliases */ #define CONFIGSET_SCRIBER 0x000200 /* Email subscribers */ | > | | | | | | | | | | | > | | 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 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
#define CONFIGSET_PROJ 0x000008 /* Project name */
#define CONFIGSET_SHUN 0x000010 /* Shun settings */
#define CONFIGSET_USER 0x000020 /* The USER table */
#define CONFIGSET_ADDR 0x000040 /* The CONCEALED table */
#define CONFIGSET_XFER 0x000080 /* Transfer configuration */
#define CONFIGSET_ALIAS 0x000100 /* URL Aliases */
#define CONFIGSET_SCRIBER 0x000200 /* Email subscribers */
#define CONFIGSET_IWIKI 0x000400 /* Interwiki codes */
#define CONFIGSET_ALL 0x0007ff /* Everything */
#define CONFIGSET_OVERWRITE 0x100000 /* Causes overwrite instead of merge */
/*
** This mask is used for the common TH1 configuration settings (i.e. those
** that are not specific to one particular subsystem, such as the transfer
** subsystem).
*/
#define CONFIGSET_TH1 (CONFIGSET_SKIN|CONFIGSET_TKT|CONFIGSET_XFER)
#endif /* INTERFACE */
/*
** Names of the configuration sets
*/
static struct {
const char *zName; /* Name of the configuration set */
int groupMask; /* Mask for that configuration set */
const char *zHelp; /* What it does */
} aGroupName[] = {
{ "/email", CONFIGSET_ADDR, "Concealed email addresses in tickets" },
{ "/project", CONFIGSET_PROJ, "Project name and description" },
{ "/skin", CONFIGSET_SKIN | CONFIGSET_CSS,
"Web interface appearance settings" },
{ "/css", CONFIGSET_CSS, "Style sheet" },
{ "/shun", CONFIGSET_SHUN, "List of shunned artifacts" },
{ "/ticket", CONFIGSET_TKT, "Ticket setup", },
{ "/user", CONFIGSET_USER, "Users and privilege settings" },
{ "/xfer", CONFIGSET_XFER, "Transfer setup", },
{ "/alias", CONFIGSET_ALIAS, "URL Aliases", },
{ "/subscriber", CONFIGSET_SCRIBER, "Email notification subscriber list" },
{ "/interwiki", CONFIGSET_IWIKI, "Inter-wiki link prefixes" },
{ "/all", CONFIGSET_ALL, "All of the above" },
};
/*
** The following is a list of settings that we are willing to
** transfer.
**
|
| ︙ | ︙ | |||
173 174 175 176 177 178 179 180 181 182 183 184 185 186 |
{ "@shun", CONFIGSET_SHUN },
{ "@alias", CONFIGSET_ALIAS },
{ "@subscriber", CONFIGSET_SCRIBER },
{ "xfer-common-script", CONFIGSET_XFER },
{ "xfer-push-script", CONFIGSET_XFER },
{ "xfer-commit-script", CONFIGSET_XFER },
{ "xfer-ticket-script", CONFIGSET_XFER },
};
static int iConfig = 0;
| > > | 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 |
{ "@shun", CONFIGSET_SHUN },
{ "@alias", CONFIGSET_ALIAS },
{ "@subscriber", CONFIGSET_SCRIBER },
{ "@interwiki", CONFIGSET_IWIKI },
{ "xfer-common-script", CONFIGSET_XFER },
{ "xfer-push-script", CONFIGSET_XFER },
{ "xfer-commit-script", CONFIGSET_XFER },
{ "xfer-ticket-script", CONFIGSET_XFER },
};
static int iConfig = 0;
|
| ︙ | ︙ | |||
255 256 257 258 259 260 261 262 263 264 265 266 267 268 |
m &= ~CONFIGSET_ADDR;
}
return m;
}
}
if( strncmp(zName, "walias:/", 8)==0 ){
return CONFIGSET_ALIAS;
}
return 0;
}
/*
** A mask of all configuration tables that have been reset already.
*/
| > > > | 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 |
m &= ~CONFIGSET_ADDR;
}
return m;
}
}
if( strncmp(zName, "walias:/", 8)==0 ){
return CONFIGSET_ALIAS;
}
if( strncmp(zName, "interwiki:", 10)==0 ){
return CONFIGSET_IWIKI;
}
return 0;
}
/*
** A mask of all configuration tables that have been reset already.
*/
|
| ︙ | ︙ | |||
585 586 587 588 589 590 591 592 593 594 595 596 597 598 |
db_prepare(&q, "SELECT mtime, quote(name), quote(value) FROM config"
" WHERE name GLOB 'walias:/*' AND mtime>=%lld", iStart);
while( db_step(&q)==SQLITE_ROW ){
blob_appendf(&rec,"%s %s value %s",
db_column_text(&q, 0),
db_column_text(&q, 1),
db_column_text(&q, 2)
);
blob_appendf(pOut, "config /config %d\n%s\n",
blob_size(&rec), blob_str(&rec));
nCard++;
blob_reset(&rec);
}
db_finalize(&q);
| > > > > > > > > > > > > > > > > | 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 |
db_prepare(&q, "SELECT mtime, quote(name), quote(value) FROM config"
" WHERE name GLOB 'walias:/*' AND mtime>=%lld", iStart);
while( db_step(&q)==SQLITE_ROW ){
blob_appendf(&rec,"%s %s value %s",
db_column_text(&q, 0),
db_column_text(&q, 1),
db_column_text(&q, 2)
);
blob_appendf(pOut, "config /config %d\n%s\n",
blob_size(&rec), blob_str(&rec));
nCard++;
blob_reset(&rec);
}
db_finalize(&q);
}
if( groupMask & CONFIGSET_IWIKI ){
db_prepare(&q, "SELECT mtime, quote(name), quote(value) FROM config"
" WHERE name GLOB 'interwiki:*' AND mtime>=%lld", iStart);
while( db_step(&q)==SQLITE_ROW ){
blob_appendf(&rec,"%s %s value %s",
db_column_text(&q, 0),
db_column_text(&q, 1),
db_column_text(&q, 2)
);
blob_appendf(pOut, "config /config %d\n%s\n",
blob_size(&rec), blob_str(&rec));
nCard++;
blob_reset(&rec);
}
db_finalize(&q);
|
| ︙ | ︙ |
Added src/interwiki.c.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 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 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 |
/*
** Copyright (c) 2020 D. Richard Hipp
**
** This program is free software; you can redistribute it and/or
** modify it under the terms of the Simplified BSD License (also
** known as the "2-Clause License" or "FreeBSD License".)
**
** This program is distributed in the hope that it will be useful,
** but without any warranty; without even the implied warranty of
** merchantability or fitness for a particular purpose.
**
** Author contact information:
** drh@hwaci.com
** http://www.hwaci.com/drh/
**
*******************************************************************************
**
** This file contains subroutines used for recognizing, configuring, and
** handling interwiki hyperlinks.
*/
#include "config.h"
#include "interwiki.h"
/*
** If zTarget is an interwiki link, return a pointer to a URL for that
** link target in memory obtained from fossil_malloc(). If zTarget is
** not a valid interwiki link, return NULL.
**
** An interwiki link target is of the form:
**
** Code:PageName
**
** "Code" is a brief code that describes the intended target wiki.
** The code must be ASCII alpha-numeric. No symbols or non-ascii
** characters are allows. Case is ignored for the code.
** Codes are assigned by "intermap:*" entries in the CONFIG table.
** The link is only valid if there exists an entry in the CONFIG table
** that matches "intermap:Code".
**
** Each value of each intermap:Code entry in the CONFIG table is a JSON
** object with the following fields:
**
** {
** "base": Base URL for the remote site.
** "hash": Append this to "base" for Hash targets.
** "wiki": Append this to "base" for Wiki targets.
** }
**
** If the remote wiki is Fossil, then the correct value for "hash"
** is "/info/" and the correct value for "wiki" is "/wiki?name=".
** If (for example) Wikipedia is the remote, then "hash" should be
** omitted and the correct value for "wiki" is "/wiki/".
**
** PageName is link name of the target wiki. Several different forms
** of PageName are recognized.
**
** Path If PageName is empty or begins with a "/" character, then
** it is a pathname that is appended to "base".
**
** Hash If PageName is a hexadecimal string of 4 or more
** characters, then PageName is appended to "hash" which
** is then appended to "base".
**
** Wiki If PageName does not start with "/" and it is
** not a hexadecimal string of 4 or more characters, then
** PageName is appended to "wiki" and that combination is
** appended to "base".
**
** See https://en.wikipedia.org/wiki/Interwiki_links for further information
** on interwiki links.
*/
char *interwiki_url(const char *zTarget){
int nCode;
int i;
const char *zPage;
int nPage;
char *zUrl = 0;
Stmt q;
for(i=0; fossil_isalnum(zTarget[i]); i++){}
if( zTarget[i]!=':' ) return 0;
nCode = i;
if( nCode==4 && strncmp(zTarget,"wiki",4)==0 ) return 0;
zPage = zTarget + nCode + 1;
nPage = (int)strlen(zPage);
db_prepare(&q,
"SELECT json_extract(value,'$.base'),"
" json_extract(value,'$.hash'),"
" json_extract(value,'$.wiki')"
" FROM config WHERE name=lower('interwiki:%.*q')",
nCode, zTarget);
while( db_step(&q)==SQLITE_ROW ){
const char *zBase = db_column_text(&q,0);
if( zBase==0 || zBase[0]==0 ) break;
if( nPage==0 || zPage[0]=='/' ){
/* Path */
zUrl = mprintf("%s%s", zBase, zPage);
}else if( nPage>=4 && validate16(zPage,nPage) ){
/* Hash */
const char *zHash = db_column_text(&q,1);
if( zHash && zHash[0] ){
zUrl = mprintf("%s%s%s", zBase, zHash, zPage);
}
}else{
/* Wiki */
const char *zWiki = db_column_text(&q,2);
if( zWiki && zWiki[0] ){
zUrl = mprintf("%s%s%s", zBase, zWiki, zPage);
}
}
break;
}
db_finalize(&q);
return zUrl;
}
/*
** Verify that a name is a valid interwiki "Code". Rules:
**
** * ascii
** * alphanumeric
*/
static int interwiki_valid_name(const char *zName){
int i;
for(i=0; zName[i]; i++){
if( !fossil_isalnum(zName[i]) ) return 0;
}
return 1;
}
/*
** COMMAND: interwiki*
**
** Usage: %fossil interwiki COMMAND ...
**
** Manage the "intermap" that defines the mapping from interwiki tags
** to complete URLs for interwiki links.
**
** > fossil interwiki delete TAG ...
**
** Delete one or more interwiki maps.
**
** > fossil interwiki edit TAG --base URL --hash PATH --wiki PATH
**
** Create a interwiki referenced call TAG. The base URL is
** the --base option, which is required. The --hash and --wiki
** paths are optional. The TAG must be lower-case alphanumeric
** and must be unique. A new entry is created if it does not
** already exit.
**
** > fossil interwiki list
**
** Show all interwiki mappings.
*/
void interwiki_cmd(void){
const char *zCmd;
int nCmd;
db_find_and_open_repository(0, 0);
if( g.argc<3 ){
usage("SUBCOMMAND ...");
}
zCmd = g.argv[2];
nCmd = (int)strlen(zCmd);
if( strncmp(zCmd,"edit",nCmd)==0 ){
const char *zName;
const char *zBase = find_option("base",0,1);
const char *zHash = find_option("hash",0,1);
const char *zWiki = find_option("wiki",0,1);
verify_all_options();
if( g.argc!=4 ) usage("add TAG ?OPTIONS?");
zName = g.argv[3];
if( zBase){
fossil_fatal("the --base option is required");
}
if( !interwiki_valid_name(zName) ){
fossil_fatal("not a valid interwiki tag: \"%s\"", zName);
}
db_begin_write();
db_multi_exec(
"REPLACE INTO config(name,value,mtime)"
" VALUES('interwiki:'||lower(%Q),"
" json_object('base',%Q,'hash',%Q,'wiki',%Q),"
" now());",
zName, zBase, zHash, zWiki
);
setup_incr_cfgcnt();
db_commit_transaction();
}else
if( strncmp(zCmd, "delete", nCmd)==0 ){
int i;
verify_all_options();
if( g.argc<4 ) usage("delete ID ...");
db_begin_write();
for(i=3; i<g.argc; i++){
const char *zName = g.argv[i];
db_multi_exec(
"DELETE FROM config WHERE name='interwiki:%q'",
zName
);
}
setup_incr_cfgcnt();
db_commit_transaction();
}else
if( strncmp(zCmd, "list", nCmd)==0 ){
Stmt q;
int n = 0;
verify_all_options();
db_prepare(&q,
"SELECT substr(name,11),"
" json_extract(value,'$.base'),"
" json_extract(value,'$.hash'),"
" json_extract(value,'$.wiki')"
" FROM config WHERE name glob 'interwiki:*'"
);
while( db_step(&q)==SQLITE_ROW ){
const char *zBase, *z, *zName;
if( n++ ) fossil_print("\n");
zName = db_column_text(&q,0);
zBase = db_column_text(&q,1);
fossil_print("%-15s %s\n", zName, zBase);
z = db_column_text(&q,2);
if( z ){
fossil_print("%15s %s%s\n", "", zBase, z);
}
z = db_column_text(&q,3);
if( z ){
fossil_print("%15s %s%s\n", "", zBase, z);
}
}
db_finalize(&q);
}else
{
fossil_fatal("unknown command \"%s\" - should be one of: "
"delete edit list", zCmd);
}
}
/*
** Append text to the "Markdown" or "Wiki" rules pages that shows
** a table of all interwiki tags available on this system.
*/
void interwiki_append_map_table(Blob *out){
int n = 0;
Stmt q;
db_prepare(&q,
"SELECT substr(name,11), json_extract(value,'$.base')"
" FROM config WHERE name glob 'interwiki:*'"
" ORDER BY name;"
);
while( db_step(&q)==SQLITE_ROW ){
if( n==0 ){
blob_appendf(out, "<blockquote><table>\n");
}
blob_appendf(out,"<tr><td>%h</td><td> → </td>",
db_column_text(&q,0));
blob_appendf(out,"<td>%h</td></tr>\n",
db_column_text(&q,1));
n++;
}
db_finalize(&q);
if( n>0 ){
blob_appendf(out,"</table></blockquote>\n");
}else{
blob_appendf(out,"<i>None</i></blockquote>\n");
}
}
/*
** WEBPAGE: /intermap
**
** View and modify the interwiki tag map or "intermap".
** This page is visible to administrators only.
*/
void interwiki_page(void){
Stmt q;
int n = 0;
const char *z;
const char *zTag = "";
const char *zBase = "";
const char *zHash = "";
const char *zWiki = "";
char *zErr = 0;
login_check_credentials();
if( !g.perm.Setup ){
login_needed(0);
return;
}
if( P("submit")!=0 && cgi_csrf_safe(1) ){
zTag = PT("tag");
zBase = PT("base");
zHash = PT("hash");
zWiki = PT("wiki");
if( zTag==0 || zTag[0]==0 || !interwiki_valid_name(zTag) ){
zErr = mprintf("Not a valid interwiki tag name: \"%s\"", zTag ? zTag : "");
}else if( zBase==0 || zBase[0]==0 ){
db_multi_exec("DELETE FROM config WHERE name='interwiki:%q';", zTag);
}else{
if( zHash && zHash[0]==0 ) zHash = 0;
if( zWiki && zWiki[0]==0 ) zWiki = 0;
db_multi_exec(
"REPLACE INTO config(name,value,mtime)"
"VALUES('interwiki:'||lower(%Q),"
" json_object('base',%Q,'hash',%Q,'wiki',%Q),"
" now());",
zTag, zBase, zHash, zWiki);
}
}
style_header("Interwiki Map Configuration");
@ <p>Interwiki links are hyperlink targets of the form
@ <blockquote><i>Tag</i><b>:</b><i>PageName</i></blockquote>
@ <p>Such links resolve to links to <i>PageName</i> on a separate server
@ identified by <i>Tag</i>. The Interwiki Map or "intermap" is a mapping
@ from <i>Tags</i> to complete Server URLs.
db_prepare(&q,
"SELECT substr(name,11),"
" json_extract(value,'$.base'),"
" json_extract(value,'$.hash'),"
" json_extract(value,'$.wiki')"
" FROM config WHERE name glob 'interwiki:*'"
);
while( db_step(&q)==SQLITE_ROW ){
if( n==0 ){
@ The current mapping is as follows:
@ <ol>
}
@ <li><p> %h(db_column_text(&q,0))
@ <ul>
@ <li> Base-URL: <tt>%h(db_column_text(&q,1))</tt>
z = db_column_text(&q,2);
if( z==0 ){
@ <li> Hash-path: <i>NULL</i>
}else{
@ <li> Hash-path: <tt>%h(z)</tt>
}
z = db_column_text(&q,3);
if( z==0 ){
@ <li> Wiki-path: <i>NULL</i>
}else{
@ <li> Wiki-path: <tt>%h(z)</tt>
}
@ </ul>
n++;
}
db_finalize(&q);
if( n ){
@ </ol>
}else{
@ No mappings are currently defined.
}
@ <p>To add a new mapping, fill out the form below providing a unique name
@ for the tag. To edit an exist mapping, fill out the form and use the
@ existing name as the tag. To delete an existing mapping, fill in the
@ tag field but leave the "Base URL" field blank.</p>
if( zErr ){
@ <p class="error">%h(zErr)</p>
}
@ <form method="POST" action="%R/intermap">
login_insert_csrf_secret();
@ <table border="0">
@ <tr><td class="form_label" id="imtag">Tag:</td>
@ <td><input type="text" id="tag" aria-labeledby="imtag" name="tag" \
@ size="15" value="%h(zTag)"></td></tr>
@ <tr><td class="form_label" id="imbase">Base URL:</td>
@ <td><input type="text" id="base" aria-labeledby="imbase" name="base" \
@ size="70" value="%h(zBase)"></td></tr>
@ <tr><td class="form_label" id="imhash">Hash-path:</td>
@ <td><input type="text" id="hash" aria-labeledby="imhash" name="hash" \
@ size="20" value="%h(zHash)">
@ (use "<tt>/info/</tt>" when the target is Fossil)</td></tr>
@ <tr><td class="form_label" id="imwiki">Wiki-path:</td>
@ <td><input type="text" id="wiki" aria-labeledby="imwiki" name="wiki" \
@ size="20" value="%h(zWiki)">
@ (use "<tt>/wiki?name=</tt>" when the target is Fossil)</td></tr>
@ <tr><td></td>
@ <td><input type="submit" name="submit" value="Apply Changes"></td></tr>
@ </table>
@ </form>
style_footer();
}
|
Changes to src/main.mk.
| ︙ | ︙ | |||
71 72 73 74 75 76 77 78 79 80 81 82 83 84 | $(SRCDIR)/hook.c \ $(SRCDIR)/http.c \ $(SRCDIR)/http_socket.c \ $(SRCDIR)/http_ssl.c \ $(SRCDIR)/http_transport.c \ $(SRCDIR)/import.c \ $(SRCDIR)/info.c \ $(SRCDIR)/json.c \ $(SRCDIR)/json_artifact.c \ $(SRCDIR)/json_branch.c \ $(SRCDIR)/json_config.c \ $(SRCDIR)/json_diff.c \ $(SRCDIR)/json_dir.c \ $(SRCDIR)/json_finfo.c \ | > | 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 | $(SRCDIR)/hook.c \ $(SRCDIR)/http.c \ $(SRCDIR)/http_socket.c \ $(SRCDIR)/http_ssl.c \ $(SRCDIR)/http_transport.c \ $(SRCDIR)/import.c \ $(SRCDIR)/info.c \ $(SRCDIR)/interwiki.c \ $(SRCDIR)/json.c \ $(SRCDIR)/json_artifact.c \ $(SRCDIR)/json_branch.c \ $(SRCDIR)/json_config.c \ $(SRCDIR)/json_diff.c \ $(SRCDIR)/json_dir.c \ $(SRCDIR)/json_finfo.c \ |
| ︙ | ︙ | |||
323 324 325 326 327 328 329 330 331 332 333 334 335 336 | $(OBJDIR)/hook_.c \ $(OBJDIR)/http_.c \ $(OBJDIR)/http_socket_.c \ $(OBJDIR)/http_ssl_.c \ $(OBJDIR)/http_transport_.c \ $(OBJDIR)/import_.c \ $(OBJDIR)/info_.c \ $(OBJDIR)/json_.c \ $(OBJDIR)/json_artifact_.c \ $(OBJDIR)/json_branch_.c \ $(OBJDIR)/json_config_.c \ $(OBJDIR)/json_diff_.c \ $(OBJDIR)/json_dir_.c \ $(OBJDIR)/json_finfo_.c \ | > | 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 | $(OBJDIR)/hook_.c \ $(OBJDIR)/http_.c \ $(OBJDIR)/http_socket_.c \ $(OBJDIR)/http_ssl_.c \ $(OBJDIR)/http_transport_.c \ $(OBJDIR)/import_.c \ $(OBJDIR)/info_.c \ $(OBJDIR)/interwiki_.c \ $(OBJDIR)/json_.c \ $(OBJDIR)/json_artifact_.c \ $(OBJDIR)/json_branch_.c \ $(OBJDIR)/json_config_.c \ $(OBJDIR)/json_diff_.c \ $(OBJDIR)/json_dir_.c \ $(OBJDIR)/json_finfo_.c \ |
| ︙ | ︙ | |||
468 469 470 471 472 473 474 475 476 477 478 479 480 481 | $(OBJDIR)/hook.o \ $(OBJDIR)/http.o \ $(OBJDIR)/http_socket.o \ $(OBJDIR)/http_ssl.o \ $(OBJDIR)/http_transport.o \ $(OBJDIR)/import.o \ $(OBJDIR)/info.o \ $(OBJDIR)/json.o \ $(OBJDIR)/json_artifact.o \ $(OBJDIR)/json_branch.o \ $(OBJDIR)/json_config.o \ $(OBJDIR)/json_diff.o \ $(OBJDIR)/json_dir.o \ $(OBJDIR)/json_finfo.o \ | > | 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 | $(OBJDIR)/hook.o \ $(OBJDIR)/http.o \ $(OBJDIR)/http_socket.o \ $(OBJDIR)/http_ssl.o \ $(OBJDIR)/http_transport.o \ $(OBJDIR)/import.o \ $(OBJDIR)/info.o \ $(OBJDIR)/interwiki.o \ $(OBJDIR)/json.o \ $(OBJDIR)/json_artifact.o \ $(OBJDIR)/json_branch.o \ $(OBJDIR)/json_config.o \ $(OBJDIR)/json_diff.o \ $(OBJDIR)/json_dir.o \ $(OBJDIR)/json_finfo.o \ |
| ︙ | ︙ | |||
803 804 805 806 807 808 809 810 811 812 813 814 815 816 | $(OBJDIR)/hook_.c:$(OBJDIR)/hook.h \ $(OBJDIR)/http_.c:$(OBJDIR)/http.h \ $(OBJDIR)/http_socket_.c:$(OBJDIR)/http_socket.h \ $(OBJDIR)/http_ssl_.c:$(OBJDIR)/http_ssl.h \ $(OBJDIR)/http_transport_.c:$(OBJDIR)/http_transport.h \ $(OBJDIR)/import_.c:$(OBJDIR)/import.h \ $(OBJDIR)/info_.c:$(OBJDIR)/info.h \ $(OBJDIR)/json_.c:$(OBJDIR)/json.h \ $(OBJDIR)/json_artifact_.c:$(OBJDIR)/json_artifact.h \ $(OBJDIR)/json_branch_.c:$(OBJDIR)/json_branch.h \ $(OBJDIR)/json_config_.c:$(OBJDIR)/json_config.h \ $(OBJDIR)/json_diff_.c:$(OBJDIR)/json_diff.h \ $(OBJDIR)/json_dir_.c:$(OBJDIR)/json_dir.h \ $(OBJDIR)/json_finfo_.c:$(OBJDIR)/json_finfo.h \ | > | 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 | $(OBJDIR)/hook_.c:$(OBJDIR)/hook.h \ $(OBJDIR)/http_.c:$(OBJDIR)/http.h \ $(OBJDIR)/http_socket_.c:$(OBJDIR)/http_socket.h \ $(OBJDIR)/http_ssl_.c:$(OBJDIR)/http_ssl.h \ $(OBJDIR)/http_transport_.c:$(OBJDIR)/http_transport.h \ $(OBJDIR)/import_.c:$(OBJDIR)/import.h \ $(OBJDIR)/info_.c:$(OBJDIR)/info.h \ $(OBJDIR)/interwiki_.c:$(OBJDIR)/interwiki.h \ $(OBJDIR)/json_.c:$(OBJDIR)/json.h \ $(OBJDIR)/json_artifact_.c:$(OBJDIR)/json_artifact.h \ $(OBJDIR)/json_branch_.c:$(OBJDIR)/json_branch.h \ $(OBJDIR)/json_config_.c:$(OBJDIR)/json_config.h \ $(OBJDIR)/json_diff_.c:$(OBJDIR)/json_diff.h \ $(OBJDIR)/json_dir_.c:$(OBJDIR)/json_dir.h \ $(OBJDIR)/json_finfo_.c:$(OBJDIR)/json_finfo.h \ |
| ︙ | ︙ | |||
1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 | $(OBJDIR)/info_.c: $(SRCDIR)/info.c $(OBJDIR)/translate $(OBJDIR)/translate $(SRCDIR)/info.c >$@ $(OBJDIR)/info.o: $(OBJDIR)/info_.c $(OBJDIR)/info.h $(SRCDIR)/config.h $(XTCC) -o $(OBJDIR)/info.o -c $(OBJDIR)/info_.c $(OBJDIR)/info.h: $(OBJDIR)/headers $(OBJDIR)/json_.c: $(SRCDIR)/json.c $(OBJDIR)/translate $(OBJDIR)/translate $(SRCDIR)/json.c >$@ $(OBJDIR)/json.o: $(OBJDIR)/json_.c $(OBJDIR)/json.h $(SRCDIR)/config.h $(XTCC) -o $(OBJDIR)/json.o -c $(OBJDIR)/json_.c | > > > > > > > > | 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 | $(OBJDIR)/info_.c: $(SRCDIR)/info.c $(OBJDIR)/translate $(OBJDIR)/translate $(SRCDIR)/info.c >$@ $(OBJDIR)/info.o: $(OBJDIR)/info_.c $(OBJDIR)/info.h $(SRCDIR)/config.h $(XTCC) -o $(OBJDIR)/info.o -c $(OBJDIR)/info_.c $(OBJDIR)/info.h: $(OBJDIR)/headers $(OBJDIR)/interwiki_.c: $(SRCDIR)/interwiki.c $(OBJDIR)/translate $(OBJDIR)/translate $(SRCDIR)/interwiki.c >$@ $(OBJDIR)/interwiki.o: $(OBJDIR)/interwiki_.c $(OBJDIR)/interwiki.h $(SRCDIR)/config.h $(XTCC) -o $(OBJDIR)/interwiki.o -c $(OBJDIR)/interwiki_.c $(OBJDIR)/interwiki.h: $(OBJDIR)/headers $(OBJDIR)/json_.c: $(SRCDIR)/json.c $(OBJDIR)/translate $(OBJDIR)/translate $(SRCDIR)/json.c >$@ $(OBJDIR)/json.o: $(OBJDIR)/json_.c $(OBJDIR)/json.h $(SRCDIR)/config.h $(XTCC) -o $(OBJDIR)/json.o -c $(OBJDIR)/json_.c |
| ︙ | ︙ |
Changes to src/makemake.tcl.
| ︙ | ︙ | |||
81 82 83 84 85 86 87 88 89 90 91 92 93 94 | hname hook http http_socket http_transport import info json json_artifact json_branch json_config json_diff json_dir json_finfo | > | 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | hname hook http http_socket http_transport import info interwiki json json_artifact json_branch json_config json_diff json_dir json_finfo |
| ︙ | ︙ |
Changes to src/markdown.md.
| ︙ | ︙ | |||
42 43 44 45 46 47 48 | > If **URL** begins with "http:", "https:', "ftp:' or "mailto:", > it may optionally be written **\<URL\>** (format 4). > Other **URL** formats include: > <ul> > <li> A relative pathname. > <li> A pathname starting with "/" in which case the Fossil server | | | | > | 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | > If **URL** begins with "http:", "https:', "ftp:' or "mailto:", > it may optionally be written **\<URL\>** (format 4). > Other **URL** formats include: > <ul> > <li> A relative pathname. > <li> A pathname starting with "/" in which case the Fossil server > URL prefix is prepended > <li> A wiki page name, or a wiki page name preceded by "wiki:" > <li> An artifact or ticket hash or hash prefix > <li> A date and time stamp: "YYYY-MM-DD HH:MM:SS" or a subset that > includes at least the day of the month. > <li> An [interwiki link](#intermap) of the form "<i>Tag</i><b>:</b><i>PageName</i>"</ul> > In format 8, then the URL becomes the display text. This is useful for > hyperlinks that refer to wiki pages and check-in and ticket hashes. ## Fonts ## > * _\*italic\*_ |
| ︙ | ︙ | |||
151 152 153 154 155 156 157 | > repository is prepended. This allows for repository-relative hyperlinks. > * For documents that begin with a top-level heading (ex: **# heading #**), > the heading is omitted from the body of the document and becomes the > document title displayed at the top of the Fossil page. [daringfireball.net]: http://daringfireball.net/projects/markdown/syntax | < | | | 152 153 154 155 156 157 158 159 160 | > repository is prepended. This allows for repository-relative hyperlinks. > * For documents that begin with a top-level heading (ex: **# heading #**), > the heading is omitted from the body of the document and becomes the > document title displayed at the top of the Fossil page. [daringfireball.net]: http://daringfireball.net/projects/markdown/syntax <a name="intermap"></a> ## Interwiki Tag Map |
Changes to src/setup.c.
| ︙ | ︙ | |||
1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 |
@ Include letters for each type of document for which unsafe HTML should
@ be allowed. For example, to allow unsafe HTML only for checked-in files,
@ make this setting be just "<b>b</b>". To allow unsafe HTML anywhere except
@ in forum posts, make this setting be "<b>btw</b>". The default is an
@ empty string which means that Fossil never allows Markdown documents
@ to generate unsafe HTML.
@ (Property: "safe-html")</p>
@ <hr />
onoff_attribute("Use HTML as wiki markup language",
"wiki-use-html", "wiki-use-html", 0, 0);
@ <p>Use HTML as the wiki markup language. Wiki links will still be parsed
@ but all other wiki formatting will be ignored.</p>
@ <p><strong>CAUTION:</strong> when
@ enabling, <i>all</i> HTML tags and attributes are accepted in the wiki.
| > > > > > | 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 |
@ Include letters for each type of document for which unsafe HTML should
@ be allowed. For example, to allow unsafe HTML only for checked-in files,
@ make this setting be just "<b>b</b>". To allow unsafe HTML anywhere except
@ in forum posts, make this setting be "<b>btw</b>". The default is an
@ empty string which means that Fossil never allows Markdown documents
@ to generate unsafe HTML.
@ (Property: "safe-html")</p>
@ <hr />
@ The current interwiki tag map is as follows:
interwiki_append_map_table(cgi_output_blob());
@ <p>Visit <a href="./intermap">%R/intermap</a> for details or to
@ modify the interwiki tag map.
@ <hr />
onoff_attribute("Use HTML as wiki markup language",
"wiki-use-html", "wiki-use-html", 0, 0);
@ <p>Use HTML as the wiki markup language. Wiki links will still be parsed
@ but all other wiki formatting will be ignored.</p>
@ <p><strong>CAUTION:</strong> when
@ enabling, <i>all</i> HTML tags and attributes are accepted in the wiki.
|
| ︙ | ︙ |
Changes to src/wiki.c.
| ︙ | ︙ | |||
221 222 223 224 225 226 227 228 229 230 231 232 233 234 |
style_submenu_element("Formatted", "%R/md_rules");
}else{
style_submenu_element("Plain-Text", "%R/md_rules?txt=1");
}
style_submenu_element("Wiki", "%R/wiki_rules");
blob_init(&x, builtin_text("markdown.md"), -1);
blob_materialize(&x);
safe_html_context(DOCSRC_TRUSTED);
wiki_render_by_mimetype(&x, fTxt ? "text/plain" : "text/x-markdown");
blob_reset(&x);
style_footer();
}
/*
| > | 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 |
style_submenu_element("Formatted", "%R/md_rules");
}else{
style_submenu_element("Plain-Text", "%R/md_rules?txt=1");
}
style_submenu_element("Wiki", "%R/wiki_rules");
blob_init(&x, builtin_text("markdown.md"), -1);
blob_materialize(&x);
interwiki_append_map_table(&x);
safe_html_context(DOCSRC_TRUSTED);
wiki_render_by_mimetype(&x, fTxt ? "text/plain" : "text/x-markdown");
blob_reset(&x);
style_footer();
}
/*
|
| ︙ | ︙ | |||
244 245 246 247 248 249 250 251 252 253 254 255 256 257 |
style_submenu_element("Formatted", "%R/wiki_rules");
}else{
style_submenu_element("Plain-Text", "%R/wiki_rules?txt=1");
}
style_submenu_element("Markdown","%R/md_rules");
blob_init(&x, builtin_text("wiki.wiki"), -1);
blob_materialize(&x);
safe_html_context(DOCSRC_TRUSTED);
wiki_render_by_mimetype(&x, fTxt ? "text/plain" : "text/x-fossil-wiki");
blob_reset(&x);
style_footer();
}
/*
| > | 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 |
style_submenu_element("Formatted", "%R/wiki_rules");
}else{
style_submenu_element("Plain-Text", "%R/wiki_rules?txt=1");
}
style_submenu_element("Markdown","%R/md_rules");
blob_init(&x, builtin_text("wiki.wiki"), -1);
blob_materialize(&x);
interwiki_append_map_table(&x);
safe_html_context(DOCSRC_TRUSTED);
wiki_render_by_mimetype(&x, fTxt ? "text/plain" : "text/x-fossil-wiki");
blob_reset(&x);
style_footer();
}
/*
|
| ︙ | ︙ |
Changes to src/wiki.wiki.
| ︙ | ︙ | |||
41 42 43 44 45 46 47 |
is not a bullet or enumeration list item is rendered indented.
Only a single level of indentation is supported by wiki.
Use HTML for deeper indentation.
5. <b>Hyperlinks.</b>
Text within square brackets <nowiki>("[...]")</nowiki> becomes a
hyperlink. The target can be a wiki page name, the artifact ID of
| | > > | 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
is not a bullet or enumeration list item is rendered indented.
Only a single level of indentation is supported by wiki.
Use HTML for deeper indentation.
5. <b>Hyperlinks.</b>
Text within square brackets <nowiki>("[...]")</nowiki> becomes a
hyperlink. The target can be a wiki page name, the artifact ID of
a check-in or ticket, the name of an image, a URL, or an
[#intermap|interwiki link] of the form
"<i>Tag</i><b>:</b><i>PageName</i>".
By default, the target is displayed as the text of the hyperlink.
But you can specify alternative text after the target name
separated by a "|" character.
You can also link to internal anchor names using
<nowiki>[#anchor-name],</nowiki> providing you have added the necessary
"<a name='anchor-name'></a>" tag to your wiki page.
|
| ︙ | ︙ | |||
76 77 78 79 80 81 82 |
7. <b>Special Markup.</b>
The <nowiki> tag disables all wiki formatting rules through
the matching </nowiki> element. The <verbatim> tag works
like <pre> with the addition that it also disables all wiki
and HTML markup through the matching </verbatim>.
| | | < | 78 79 80 81 82 83 84 85 86 |
7. <b>Special Markup.</b>
The <nowiki> tag disables all wiki formatting rules through
the matching </nowiki> element. The <verbatim> tag works
like <pre> with the addition that it also disables all wiki
and HTML markup through the matching </verbatim>.
<a name="intermap"></a>
<h2>Interwiki Tag Map</h2>
|
Changes to src/wikiformat.c.
| ︙ | ︙ | |||
1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 |
**
** [0123456789abcdef]
**
** [WikiPageName]
** [wiki:WikiPageName]
**
** [2010-02-27 07:13]
*/
void wiki_resolve_hyperlink(
Blob *pOut, /* Write the HTML output here */
int mFlags, /* Rendering option flags */
const char *zTarget, /* Hyperlink target; text within [...] */
char *zClose, /* Write hyperlink closing text here */
int nClose, /* Bytes available in zClose[] */
const char *zOrig, /* Complete document text */
const char *zTitle /* Title of the link */
){
const char *zTerm = "</a>";
const char *z;
char *zExtra = 0;
const char *zExtraNS = 0;
if( zTitle ){
zExtra = mprintf(" title='%h'", zTitle);
zExtraNS = zExtra+1;
}
assert( nClose>=20 );
if( strncmp(zTarget, "http:", 5)==0
| > > > | 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 |
**
** [0123456789abcdef]
**
** [WikiPageName]
** [wiki:WikiPageName]
**
** [2010-02-27 07:13]
**
** [InterMap:Link] -> Interwiki link
*/
void wiki_resolve_hyperlink(
Blob *pOut, /* Write the HTML output here */
int mFlags, /* Rendering option flags */
const char *zTarget, /* Hyperlink target; text within [...] */
char *zClose, /* Write hyperlink closing text here */
int nClose, /* Bytes available in zClose[] */
const char *zOrig, /* Complete document text */
const char *zTitle /* Title of the link */
){
const char *zTerm = "</a>";
const char *z;
char *zExtra = 0;
const char *zExtraNS = 0;
char *zRemote = 0;
if( zTitle ){
zExtra = mprintf(" title='%h'", zTitle);
zExtraNS = zExtra+1;
}
assert( nClose>=20 );
if( strncmp(zTarget, "http:", 5)==0
|
| ︙ | ︙ | |||
1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 |
}
}else if( g.perm.Hyperlink ){
blob_appendf(pOut, "%z[",xhref(zExtraNS, "%R/info/%s", zTarget));
zTerm = "]</a>";
}else{
zTerm = "";
}
}else if( (z = validWikiPageName(mFlags, zTarget))!=0 ){
/* The link is to a valid wiki page name */
const char *zOverride = wiki_is_overridden(zTarget);
if( zOverride ){
blob_appendf(pOut, "<a href=\"%R/info/%S\"%s>", zOverride, zExtra);
}else{
blob_appendf(pOut, "<a href=\"%R/wiki?name=%T\"%s>", z, zExtra);
| > > > | 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 |
}
}else if( g.perm.Hyperlink ){
blob_appendf(pOut, "%z[",xhref(zExtraNS, "%R/info/%s", zTarget));
zTerm = "]</a>";
}else{
zTerm = "";
}
}else if( (zRemote = interwiki_url(zTarget))!=0 ){
blob_appendf(pOut, "<a href=\"%z\"%s>", zRemote, zExtra);
zTerm = "</a>";
}else if( (z = validWikiPageName(mFlags, zTarget))!=0 ){
/* The link is to a valid wiki page name */
const char *zOverride = wiki_is_overridden(zTarget);
if( zOverride ){
blob_appendf(pOut, "<a href=\"%R/info/%S\"%s>", zOverride, zExtra);
}else{
blob_appendf(pOut, "<a href=\"%R/wiki?name=%T\"%s>", z, zExtra);
|
| ︙ | ︙ |
Changes to win/Makefile.dmc.
| ︙ | ︙ | |||
26 27 28 29 30 31 32 | TCC = $(DMDIR)\bin\dmc $(CFLAGS) $(DMCDEF) $(SSL) $(INCL) LIBS = $(DMDIR)\extra\lib\ zlib wsock32 advapi32 dnsapi SQLITE_OPTIONS = -DNDEBUG=1 -DSQLITE_DQS=0 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_WAL_SYNCHRONOUS=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_OMIT_DECLTYPE -DSQLITE_OMIT_DEPRECATED -DSQLITE_OMIT_PROGRESS_CALLBACK -DSQLITE_OMIT_SHARED_CACHE -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_MAX_EXPR_DEPTH=0 -DSQLITE_USE_ALLOCA -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_HAVE_ZLIB -DSQLITE_INTROSPECTION_PRAGMAS -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_TRUSTED_SCHEMA=0 SHELL_OPTIONS = -DNDEBUG=1 -DSQLITE_DQS=0 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_WAL_SYNCHRONOUS=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_OMIT_DECLTYPE -DSQLITE_OMIT_DEPRECATED -DSQLITE_OMIT_PROGRESS_CALLBACK -DSQLITE_OMIT_SHARED_CACHE -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_MAX_EXPR_DEPTH=0 -DSQLITE_USE_ALLOCA -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_HAVE_ZLIB -DSQLITE_INTROSPECTION_PRAGMAS -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_TRUSTED_SCHEMA=0 -Dmain=sqlite3_shell -DSQLITE_SHELL_IS_UTF8=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) -DSQLITE_SHELL_DBNAME_PROC=sqlcmd_get_dbname -DSQLITE_SHELL_INIT_PROC=sqlcmd_init_proc -Daccess=file_access -Dsystem=fossil_system -Dgetenv=fossil_getenv -Dfopen=fossil_fopen | | | | | 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 60 61 | TCC = $(DMDIR)\bin\dmc $(CFLAGS) $(DMCDEF) $(SSL) $(INCL) LIBS = $(DMDIR)\extra\lib\ zlib wsock32 advapi32 dnsapi SQLITE_OPTIONS = -DNDEBUG=1 -DSQLITE_DQS=0 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_WAL_SYNCHRONOUS=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_OMIT_DECLTYPE -DSQLITE_OMIT_DEPRECATED -DSQLITE_OMIT_PROGRESS_CALLBACK -DSQLITE_OMIT_SHARED_CACHE -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_MAX_EXPR_DEPTH=0 -DSQLITE_USE_ALLOCA -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_HAVE_ZLIB -DSQLITE_INTROSPECTION_PRAGMAS -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_TRUSTED_SCHEMA=0 SHELL_OPTIONS = -DNDEBUG=1 -DSQLITE_DQS=0 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_WAL_SYNCHRONOUS=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_OMIT_DECLTYPE -DSQLITE_OMIT_DEPRECATED -DSQLITE_OMIT_PROGRESS_CALLBACK -DSQLITE_OMIT_SHARED_CACHE -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_MAX_EXPR_DEPTH=0 -DSQLITE_USE_ALLOCA -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_STMTVTAB -DSQLITE_HAVE_ZLIB -DSQLITE_INTROSPECTION_PRAGMAS -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_TRUSTED_SCHEMA=0 -Dmain=sqlite3_shell -DSQLITE_SHELL_IS_UTF8=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) -DSQLITE_SHELL_DBNAME_PROC=sqlcmd_get_dbname -DSQLITE_SHELL_INIT_PROC=sqlcmd_init_proc -Daccess=file_access -Dsystem=fossil_system -Dgetenv=fossil_getenv -Dfopen=fossil_fopen SRC = add_.c ajax_.c alerts_.c allrepo_.c attach_.c backlink_.c backoffice_.c bag_.c bisect_.c blob_.c branch_.c browse_.c builtin_.c bundle_.c cache_.c capabilities_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c cookies_.c db_.c delta_.c deltacmd_.c deltafunc_.c descendants_.c diff_.c diffcmd_.c dispatch_.c doc_.c encode_.c etag_.c event_.c export_.c extcgi_.c file_.c fileedit_.c finfo_.c foci_.c forum_.c fshell_.c fusefs_.c fuzz_.c glob_.c graph_.c gzip_.c hname_.c hook_.c http_.c http_socket_.c http_ssl_.c http_transport_.c import_.c info_.c interwiki_.c json_.c json_artifact_.c json_branch_.c json_config_.c json_diff_.c json_dir_.c json_finfo_.c json_login_.c json_query_.c json_report_.c json_status_.c json_tag_.c json_timeline_.c json_user_.c json_wiki_.c leaf_.c loadctrl_.c login_.c lookslike_.c main_.c manifest_.c markdown_.c markdown_html_.c md5_.c merge_.c merge3_.c moderate_.c name_.c path_.c piechart_.c pivot_.c popen_.c pqueue_.c printf_.c publish_.c purge_.c rebuild_.c regexp_.c repolist_.c report_.c rss_.c schema_.c search_.c security_audit_.c setup_.c setupuser_.c sha1_.c sha1hard_.c sha3_.c shun_.c sitemap_.c skins_.c smtp_.c sqlcmd_.c stash_.c stat_.c statrep_.c style_.c sync_.c tag_.c tar_.c terminal_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c unicode_.c unversioned_.c update_.c url_.c user_.c utf8_.c util_.c verify_.c vfile_.c webmail_.c wiki_.c wikiformat_.c winfile_.c winhttp_.c xfer_.c xfersetup_.c zip_.c OBJ = $(OBJDIR)\add$O $(OBJDIR)\ajax$O $(OBJDIR)\alerts$O $(OBJDIR)\allrepo$O $(OBJDIR)\attach$O $(OBJDIR)\backlink$O $(OBJDIR)\backoffice$O $(OBJDIR)\bag$O $(OBJDIR)\bisect$O $(OBJDIR)\blob$O $(OBJDIR)\branch$O $(OBJDIR)\browse$O $(OBJDIR)\builtin$O $(OBJDIR)\bundle$O $(OBJDIR)\cache$O $(OBJDIR)\capabilities$O $(OBJDIR)\captcha$O $(OBJDIR)\cgi$O $(OBJDIR)\checkin$O $(OBJDIR)\checkout$O $(OBJDIR)\clearsign$O $(OBJDIR)\clone$O $(OBJDIR)\comformat$O $(OBJDIR)\configure$O $(OBJDIR)\content$O $(OBJDIR)\cookies$O $(OBJDIR)\db$O $(OBJDIR)\delta$O $(OBJDIR)\deltacmd$O $(OBJDIR)\deltafunc$O $(OBJDIR)\descendants$O $(OBJDIR)\diff$O $(OBJDIR)\diffcmd$O $(OBJDIR)\dispatch$O $(OBJDIR)\doc$O $(OBJDIR)\encode$O $(OBJDIR)\etag$O $(OBJDIR)\event$O $(OBJDIR)\export$O $(OBJDIR)\extcgi$O $(OBJDIR)\file$O $(OBJDIR)\fileedit$O $(OBJDIR)\finfo$O $(OBJDIR)\foci$O $(OBJDIR)\forum$O $(OBJDIR)\fshell$O $(OBJDIR)\fusefs$O $(OBJDIR)\fuzz$O $(OBJDIR)\glob$O $(OBJDIR)\graph$O $(OBJDIR)\gzip$O $(OBJDIR)\hname$O $(OBJDIR)\hook$O $(OBJDIR)\http$O $(OBJDIR)\http_socket$O $(OBJDIR)\http_ssl$O $(OBJDIR)\http_transport$O $(OBJDIR)\import$O $(OBJDIR)\info$O $(OBJDIR)\interwiki$O $(OBJDIR)\json$O $(OBJDIR)\json_artifact$O $(OBJDIR)\json_branch$O $(OBJDIR)\json_config$O $(OBJDIR)\json_diff$O $(OBJDIR)\json_dir$O $(OBJDIR)\json_finfo$O $(OBJDIR)\json_login$O $(OBJDIR)\json_query$O $(OBJDIR)\json_report$O $(OBJDIR)\json_status$O $(OBJDIR)\json_tag$O $(OBJDIR)\json_timeline$O $(OBJDIR)\json_user$O $(OBJDIR)\json_wiki$O $(OBJDIR)\leaf$O $(OBJDIR)\loadctrl$O $(OBJDIR)\login$O $(OBJDIR)\lookslike$O $(OBJDIR)\main$O $(OBJDIR)\manifest$O $(OBJDIR)\markdown$O $(OBJDIR)\markdown_html$O $(OBJDIR)\md5$O $(OBJDIR)\merge$O $(OBJDIR)\merge3$O $(OBJDIR)\moderate$O $(OBJDIR)\name$O $(OBJDIR)\path$O $(OBJDIR)\piechart$O $(OBJDIR)\pivot$O $(OBJDIR)\popen$O $(OBJDIR)\pqueue$O $(OBJDIR)\printf$O $(OBJDIR)\publish$O $(OBJDIR)\purge$O $(OBJDIR)\rebuild$O $(OBJDIR)\regexp$O $(OBJDIR)\repolist$O $(OBJDIR)\report$O $(OBJDIR)\rss$O $(OBJDIR)\schema$O $(OBJDIR)\search$O $(OBJDIR)\security_audit$O $(OBJDIR)\setup$O $(OBJDIR)\setupuser$O $(OBJDIR)\sha1$O $(OBJDIR)\sha1hard$O $(OBJDIR)\sha3$O $(OBJDIR)\shun$O $(OBJDIR)\sitemap$O $(OBJDIR)\skins$O $(OBJDIR)\smtp$O $(OBJDIR)\sqlcmd$O $(OBJDIR)\stash$O $(OBJDIR)\stat$O $(OBJDIR)\statrep$O $(OBJDIR)\style$O $(OBJDIR)\sync$O $(OBJDIR)\tag$O $(OBJDIR)\tar$O $(OBJDIR)\terminal$O $(OBJDIR)\th_main$O $(OBJDIR)\timeline$O $(OBJDIR)\tkt$O $(OBJDIR)\tktsetup$O $(OBJDIR)\undo$O $(OBJDIR)\unicode$O $(OBJDIR)\unversioned$O $(OBJDIR)\update$O $(OBJDIR)\url$O $(OBJDIR)\user$O $(OBJDIR)\utf8$O $(OBJDIR)\util$O $(OBJDIR)\verify$O $(OBJDIR)\vfile$O $(OBJDIR)\webmail$O $(OBJDIR)\wiki$O $(OBJDIR)\wikiformat$O $(OBJDIR)\winfile$O $(OBJDIR)\winhttp$O $(OBJDIR)\xfer$O $(OBJDIR)\xfersetup$O $(OBJDIR)\zip$O $(OBJDIR)\shell$O $(OBJDIR)\sqlite3$O $(OBJDIR)\th$O $(OBJDIR)\th_lang$O RC=$(DMDIR)\bin\rcc RCFLAGS=-32 -w1 -I$(SRCDIR) /D__DMC__ APPNAME = $(OBJDIR)\fossil$(E) all: $(APPNAME) $(APPNAME) : translate$E mkindex$E codecheck1$E headers $(OBJ) $(OBJDIR)\link cd $(OBJDIR) codecheck1$E $(SRC) $(DMDIR)\bin\link @link $(OBJDIR)\fossil.res: $B\win\fossil.rc $(RC) $(RCFLAGS) -o$@ $** $(OBJDIR)\link: $B\win\Makefile.dmc $(OBJDIR)\fossil.res +echo add ajax alerts allrepo attach backlink backoffice bag bisect blob branch browse builtin bundle cache capabilities captcha cgi checkin checkout clearsign clone comformat configure content cookies db delta deltacmd deltafunc descendants diff diffcmd dispatch doc encode etag event export extcgi file fileedit finfo foci forum fshell fusefs fuzz glob graph gzip hname hook http http_socket http_ssl http_transport import info interwiki json json_artifact json_branch json_config json_diff json_dir json_finfo json_login json_query json_report json_status json_tag json_timeline json_user json_wiki leaf loadctrl login lookslike main manifest markdown markdown_html md5 merge merge3 moderate name path piechart pivot popen pqueue printf publish purge rebuild regexp repolist report rss schema search security_audit setup setupuser sha1 sha1hard sha3 shun sitemap skins smtp sqlcmd stash stat statrep style sync tag tar terminal th_main timeline tkt tktsetup undo unicode unversioned update url user utf8 util verify vfile webmail wiki wikiformat winfile winhttp xfer xfersetup zip shell sqlite3 th th_lang > $@ +echo fossil >> $@ +echo fossil >> $@ +echo $(LIBS) >> $@ +echo. >> $@ +echo fossil >> $@ translate$E: $(SRCDIR)\translate.c |
| ︙ | ︙ | |||
473 474 475 476 477 478 479 480 481 482 483 484 485 486 | +translate$E $** > $@ $(OBJDIR)\info$O : info_.c info.h $(TCC) -o$@ -c info_.c info_.c : $(SRCDIR)\info.c +translate$E $** > $@ $(OBJDIR)\json$O : json_.c json.h $(TCC) -o$@ -c json_.c json_.c : $(SRCDIR)\json.c +translate$E $** > $@ | > > > > > > | 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 | +translate$E $** > $@ $(OBJDIR)\info$O : info_.c info.h $(TCC) -o$@ -c info_.c info_.c : $(SRCDIR)\info.c +translate$E $** > $@ $(OBJDIR)\interwiki$O : interwiki_.c interwiki.h $(TCC) -o$@ -c interwiki_.c interwiki_.c : $(SRCDIR)\interwiki.c +translate$E $** > $@ $(OBJDIR)\json$O : json_.c json.h $(TCC) -o$@ -c json_.c json_.c : $(SRCDIR)\json.c +translate$E $** > $@ |
| ︙ | ︙ | |||
979 980 981 982 983 984 985 | $(OBJDIR)\zip$O : zip_.c zip.h $(TCC) -o$@ -c zip_.c zip_.c : $(SRCDIR)\zip.c +translate$E $** > $@ headers: makeheaders$E page_index.h builtin_data.h VERSION.h | | | 985 986 987 988 989 990 991 992 993 | $(OBJDIR)\zip$O : zip_.c zip.h $(TCC) -o$@ -c zip_.c zip_.c : $(SRCDIR)\zip.c +translate$E $** > $@ headers: makeheaders$E page_index.h builtin_data.h VERSION.h +makeheaders$E add_.c:add.h ajax_.c:ajax.h alerts_.c:alerts.h allrepo_.c:allrepo.h attach_.c:attach.h backlink_.c:backlink.h backoffice_.c:backoffice.h bag_.c:bag.h bisect_.c:bisect.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h builtin_.c:builtin.h bundle_.c:bundle.h cache_.c:cache.h capabilities_.c:capabilities.h captcha_.c:captcha.h cgi_.c:cgi.h checkin_.c:checkin.h checkout_.c:checkout.h clearsign_.c:clearsign.h clone_.c:clone.h comformat_.c:comformat.h configure_.c:configure.h content_.c:content.h cookies_.c:cookies.h db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h deltafunc_.c:deltafunc.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h dispatch_.c:dispatch.h doc_.c:doc.h encode_.c:encode.h etag_.c:etag.h event_.c:event.h export_.c:export.h extcgi_.c:extcgi.h file_.c:file.h fileedit_.c:fileedit.h finfo_.c:finfo.h foci_.c:foci.h forum_.c:forum.h fshell_.c:fshell.h fusefs_.c:fusefs.h fuzz_.c:fuzz.h glob_.c:glob.h graph_.c:graph.h gzip_.c:gzip.h hname_.c:hname.h hook_.c:hook.h http_.c:http.h http_socket_.c:http_socket.h http_ssl_.c:http_ssl.h http_transport_.c:http_transport.h import_.c:import.h info_.c:info.h interwiki_.c:interwiki.h json_.c:json.h json_artifact_.c:json_artifact.h json_branch_.c:json_branch.h json_config_.c:json_config.h json_diff_.c:json_diff.h json_dir_.c:json_dir.h json_finfo_.c:json_finfo.h json_login_.c:json_login.h json_query_.c:json_query.h json_report_.c:json_report.h json_status_.c:json_status.h json_tag_.c:json_tag.h json_timeline_.c:json_timeline.h json_user_.c:json_user.h json_wiki_.c:json_wiki.h leaf_.c:leaf.h loadctrl_.c:loadctrl.h login_.c:login.h lookslike_.c:lookslike.h main_.c:main.h manifest_.c:manifest.h markdown_.c:markdown.h markdown_html_.c:markdown_html.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h moderate_.c:moderate.h name_.c:name.h path_.c:path.h piechart_.c:piechart.h pivot_.c:pivot.h popen_.c:popen.h pqueue_.c:pqueue.h printf_.c:printf.h publish_.c:publish.h purge_.c:purge.h rebuild_.c:rebuild.h regexp_.c:regexp.h repolist_.c:repolist.h report_.c:report.h rss_.c:rss.h schema_.c:schema.h search_.c:search.h security_audit_.c:security_audit.h setup_.c:setup.h setupuser_.c:setupuser.h sha1_.c:sha1.h sha1hard_.c:sha1hard.h sha3_.c:sha3.h shun_.c:shun.h sitemap_.c:sitemap.h skins_.c:skins.h smtp_.c:smtp.h sqlcmd_.c:sqlcmd.h stash_.c:stash.h stat_.c:stat.h statrep_.c:statrep.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h tar_.c:tar.h terminal_.c:terminal.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h unicode_.c:unicode.h unversioned_.c:unversioned.h update_.c:update.h url_.c:url.h user_.c:user.h utf8_.c:utf8.h util_.c:util.h verify_.c:verify.h vfile_.c:vfile.h webmail_.c:webmail.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winfile_.c:winfile.h winhttp_.c:winhttp.h xfer_.c:xfer.h xfersetup_.c:xfersetup.h zip_.c:zip.h $(SRCDIR)\sqlite3.h $(SRCDIR)\th.h VERSION.h $(SRCDIR)\cson_amalgamation.h @copy /Y nul: headers |
Changes to win/Makefile.mingw.
| ︙ | ︙ | |||
483 484 485 486 487 488 489 490 491 492 493 494 495 496 | $(SRCDIR)/hook.c \ $(SRCDIR)/http.c \ $(SRCDIR)/http_socket.c \ $(SRCDIR)/http_ssl.c \ $(SRCDIR)/http_transport.c \ $(SRCDIR)/import.c \ $(SRCDIR)/info.c \ $(SRCDIR)/json.c \ $(SRCDIR)/json_artifact.c \ $(SRCDIR)/json_branch.c \ $(SRCDIR)/json_config.c \ $(SRCDIR)/json_diff.c \ $(SRCDIR)/json_dir.c \ $(SRCDIR)/json_finfo.c \ | > | 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 | $(SRCDIR)/hook.c \ $(SRCDIR)/http.c \ $(SRCDIR)/http_socket.c \ $(SRCDIR)/http_ssl.c \ $(SRCDIR)/http_transport.c \ $(SRCDIR)/import.c \ $(SRCDIR)/info.c \ $(SRCDIR)/interwiki.c \ $(SRCDIR)/json.c \ $(SRCDIR)/json_artifact.c \ $(SRCDIR)/json_branch.c \ $(SRCDIR)/json_config.c \ $(SRCDIR)/json_diff.c \ $(SRCDIR)/json_dir.c \ $(SRCDIR)/json_finfo.c \ |
| ︙ | ︙ | |||
735 736 737 738 739 740 741 742 743 744 745 746 747 748 | $(OBJDIR)/hook_.c \ $(OBJDIR)/http_.c \ $(OBJDIR)/http_socket_.c \ $(OBJDIR)/http_ssl_.c \ $(OBJDIR)/http_transport_.c \ $(OBJDIR)/import_.c \ $(OBJDIR)/info_.c \ $(OBJDIR)/json_.c \ $(OBJDIR)/json_artifact_.c \ $(OBJDIR)/json_branch_.c \ $(OBJDIR)/json_config_.c \ $(OBJDIR)/json_diff_.c \ $(OBJDIR)/json_dir_.c \ $(OBJDIR)/json_finfo_.c \ | > | 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 | $(OBJDIR)/hook_.c \ $(OBJDIR)/http_.c \ $(OBJDIR)/http_socket_.c \ $(OBJDIR)/http_ssl_.c \ $(OBJDIR)/http_transport_.c \ $(OBJDIR)/import_.c \ $(OBJDIR)/info_.c \ $(OBJDIR)/interwiki_.c \ $(OBJDIR)/json_.c \ $(OBJDIR)/json_artifact_.c \ $(OBJDIR)/json_branch_.c \ $(OBJDIR)/json_config_.c \ $(OBJDIR)/json_diff_.c \ $(OBJDIR)/json_dir_.c \ $(OBJDIR)/json_finfo_.c \ |
| ︙ | ︙ | |||
880 881 882 883 884 885 886 887 888 889 890 891 892 893 | $(OBJDIR)/hook.o \ $(OBJDIR)/http.o \ $(OBJDIR)/http_socket.o \ $(OBJDIR)/http_ssl.o \ $(OBJDIR)/http_transport.o \ $(OBJDIR)/import.o \ $(OBJDIR)/info.o \ $(OBJDIR)/json.o \ $(OBJDIR)/json_artifact.o \ $(OBJDIR)/json_branch.o \ $(OBJDIR)/json_config.o \ $(OBJDIR)/json_diff.o \ $(OBJDIR)/json_dir.o \ $(OBJDIR)/json_finfo.o \ | > | 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 | $(OBJDIR)/hook.o \ $(OBJDIR)/http.o \ $(OBJDIR)/http_socket.o \ $(OBJDIR)/http_ssl.o \ $(OBJDIR)/http_transport.o \ $(OBJDIR)/import.o \ $(OBJDIR)/info.o \ $(OBJDIR)/interwiki.o \ $(OBJDIR)/json.o \ $(OBJDIR)/json_artifact.o \ $(OBJDIR)/json_branch.o \ $(OBJDIR)/json_config.o \ $(OBJDIR)/json_diff.o \ $(OBJDIR)/json_dir.o \ $(OBJDIR)/json_finfo.o \ |
| ︙ | ︙ | |||
1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 | $(OBJDIR)/hook_.c:$(OBJDIR)/hook.h \ $(OBJDIR)/http_.c:$(OBJDIR)/http.h \ $(OBJDIR)/http_socket_.c:$(OBJDIR)/http_socket.h \ $(OBJDIR)/http_ssl_.c:$(OBJDIR)/http_ssl.h \ $(OBJDIR)/http_transport_.c:$(OBJDIR)/http_transport.h \ $(OBJDIR)/import_.c:$(OBJDIR)/import.h \ $(OBJDIR)/info_.c:$(OBJDIR)/info.h \ $(OBJDIR)/json_.c:$(OBJDIR)/json.h \ $(OBJDIR)/json_artifact_.c:$(OBJDIR)/json_artifact.h \ $(OBJDIR)/json_branch_.c:$(OBJDIR)/json_branch.h \ $(OBJDIR)/json_config_.c:$(OBJDIR)/json_config.h \ $(OBJDIR)/json_diff_.c:$(OBJDIR)/json_diff.h \ $(OBJDIR)/json_dir_.c:$(OBJDIR)/json_dir.h \ $(OBJDIR)/json_finfo_.c:$(OBJDIR)/json_finfo.h \ | > | 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 | $(OBJDIR)/hook_.c:$(OBJDIR)/hook.h \ $(OBJDIR)/http_.c:$(OBJDIR)/http.h \ $(OBJDIR)/http_socket_.c:$(OBJDIR)/http_socket.h \ $(OBJDIR)/http_ssl_.c:$(OBJDIR)/http_ssl.h \ $(OBJDIR)/http_transport_.c:$(OBJDIR)/http_transport.h \ $(OBJDIR)/import_.c:$(OBJDIR)/import.h \ $(OBJDIR)/info_.c:$(OBJDIR)/info.h \ $(OBJDIR)/interwiki_.c:$(OBJDIR)/interwiki.h \ $(OBJDIR)/json_.c:$(OBJDIR)/json.h \ $(OBJDIR)/json_artifact_.c:$(OBJDIR)/json_artifact.h \ $(OBJDIR)/json_branch_.c:$(OBJDIR)/json_branch.h \ $(OBJDIR)/json_config_.c:$(OBJDIR)/json_config.h \ $(OBJDIR)/json_diff_.c:$(OBJDIR)/json_diff.h \ $(OBJDIR)/json_dir_.c:$(OBJDIR)/json_dir.h \ $(OBJDIR)/json_finfo_.c:$(OBJDIR)/json_finfo.h \ |
| ︙ | ︙ | |||
1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 | $(OBJDIR)/info_.c: $(SRCDIR)/info.c $(TRANSLATE) $(TRANSLATE) $(SRCDIR)/info.c >$@ $(OBJDIR)/info.o: $(OBJDIR)/info_.c $(OBJDIR)/info.h $(SRCDIR)/config.h $(XTCC) -o $(OBJDIR)/info.o -c $(OBJDIR)/info_.c $(OBJDIR)/info.h: $(OBJDIR)/headers $(OBJDIR)/json_.c: $(SRCDIR)/json.c $(TRANSLATE) $(TRANSLATE) $(SRCDIR)/json.c >$@ $(OBJDIR)/json.o: $(OBJDIR)/json_.c $(OBJDIR)/json.h $(SRCDIR)/config.h $(XTCC) -o $(OBJDIR)/json.o -c $(OBJDIR)/json_.c | > > > > > > > > | 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 | $(OBJDIR)/info_.c: $(SRCDIR)/info.c $(TRANSLATE) $(TRANSLATE) $(SRCDIR)/info.c >$@ $(OBJDIR)/info.o: $(OBJDIR)/info_.c $(OBJDIR)/info.h $(SRCDIR)/config.h $(XTCC) -o $(OBJDIR)/info.o -c $(OBJDIR)/info_.c $(OBJDIR)/info.h: $(OBJDIR)/headers $(OBJDIR)/interwiki_.c: $(SRCDIR)/interwiki.c $(TRANSLATE) $(TRANSLATE) $(SRCDIR)/interwiki.c >$@ $(OBJDIR)/interwiki.o: $(OBJDIR)/interwiki_.c $(OBJDIR)/interwiki.h $(SRCDIR)/config.h $(XTCC) -o $(OBJDIR)/interwiki.o -c $(OBJDIR)/interwiki_.c $(OBJDIR)/interwiki.h: $(OBJDIR)/headers $(OBJDIR)/json_.c: $(SRCDIR)/json.c $(TRANSLATE) $(TRANSLATE) $(SRCDIR)/json.c >$@ $(OBJDIR)/json.o: $(OBJDIR)/json_.c $(OBJDIR)/json.h $(SRCDIR)/config.h $(XTCC) -o $(OBJDIR)/json.o -c $(OBJDIR)/json_.c |
| ︙ | ︙ |
Changes to win/Makefile.msc.
| ︙ | ︙ | |||
405 406 407 408 409 410 411 412 413 414 415 416 417 418 |
"$(OX)\hook_.c" \
"$(OX)\http_.c" \
"$(OX)\http_socket_.c" \
"$(OX)\http_ssl_.c" \
"$(OX)\http_transport_.c" \
"$(OX)\import_.c" \
"$(OX)\info_.c" \
"$(OX)\json_.c" \
"$(OX)\json_artifact_.c" \
"$(OX)\json_branch_.c" \
"$(OX)\json_config_.c" \
"$(OX)\json_diff_.c" \
"$(OX)\json_dir_.c" \
"$(OX)\json_finfo_.c" \
| > | 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 |
"$(OX)\hook_.c" \
"$(OX)\http_.c" \
"$(OX)\http_socket_.c" \
"$(OX)\http_ssl_.c" \
"$(OX)\http_transport_.c" \
"$(OX)\import_.c" \
"$(OX)\info_.c" \
"$(OX)\interwiki_.c" \
"$(OX)\json_.c" \
"$(OX)\json_artifact_.c" \
"$(OX)\json_branch_.c" \
"$(OX)\json_config_.c" \
"$(OX)\json_diff_.c" \
"$(OX)\json_dir_.c" \
"$(OX)\json_finfo_.c" \
|
| ︙ | ︙ | |||
656 657 658 659 660 661 662 663 664 665 666 667 668 669 |
"$(OX)\hook$O" \
"$(OX)\http$O" \
"$(OX)\http_socket$O" \
"$(OX)\http_ssl$O" \
"$(OX)\http_transport$O" \
"$(OX)\import$O" \
"$(OX)\info$O" \
"$(OX)\json$O" \
"$(OX)\json_artifact$O" \
"$(OX)\json_branch$O" \
"$(OX)\json_config$O" \
"$(OX)\json_diff$O" \
"$(OX)\json_dir$O" \
"$(OX)\json_finfo$O" \
| > | 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 |
"$(OX)\hook$O" \
"$(OX)\http$O" \
"$(OX)\http_socket$O" \
"$(OX)\http_ssl$O" \
"$(OX)\http_transport$O" \
"$(OX)\import$O" \
"$(OX)\info$O" \
"$(OX)\interwiki$O" \
"$(OX)\json$O" \
"$(OX)\json_artifact$O" \
"$(OX)\json_branch$O" \
"$(OX)\json_config$O" \
"$(OX)\json_diff$O" \
"$(OX)\json_dir$O" \
"$(OX)\json_finfo$O" \
|
| ︙ | ︙ | |||
882 883 884 885 886 887 888 889 890 891 892 893 894 895 | echo "$(OX)\hook.obj" >> $@ echo "$(OX)\http.obj" >> $@ echo "$(OX)\http_socket.obj" >> $@ echo "$(OX)\http_ssl.obj" >> $@ echo "$(OX)\http_transport.obj" >> $@ echo "$(OX)\import.obj" >> $@ echo "$(OX)\info.obj" >> $@ echo "$(OX)\json.obj" >> $@ echo "$(OX)\json_artifact.obj" >> $@ echo "$(OX)\json_branch.obj" >> $@ echo "$(OX)\json_config.obj" >> $@ echo "$(OX)\json_diff.obj" >> $@ echo "$(OX)\json_dir.obj" >> $@ echo "$(OX)\json_finfo.obj" >> $@ | > | 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 | echo "$(OX)\hook.obj" >> $@ echo "$(OX)\http.obj" >> $@ echo "$(OX)\http_socket.obj" >> $@ echo "$(OX)\http_ssl.obj" >> $@ echo "$(OX)\http_transport.obj" >> $@ echo "$(OX)\import.obj" >> $@ echo "$(OX)\info.obj" >> $@ echo "$(OX)\interwiki.obj" >> $@ echo "$(OX)\json.obj" >> $@ echo "$(OX)\json_artifact.obj" >> $@ echo "$(OX)\json_branch.obj" >> $@ echo "$(OX)\json_config.obj" >> $@ echo "$(OX)\json_diff.obj" >> $@ echo "$(OX)\json_dir.obj" >> $@ echo "$(OX)\json_finfo.obj" >> $@ |
| ︙ | ︙ | |||
1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 | "$(OBJDIR)\translate$E" $** > $@ "$(OX)\info$O" : "$(OX)\info_.c" "$(OX)\info.h" $(TCC) /Fo$@ /Fd$(@D)\ -c "$(OX)\info_.c" "$(OX)\info_.c" : "$(SRCDIR)\info.c" "$(OBJDIR)\translate$E" $** > $@ "$(OX)\json$O" : "$(OX)\json_.c" "$(OX)\json.h" $(TCC) /Fo$@ /Fd$(@D)\ -c "$(OX)\json_.c" "$(OX)\json_.c" : "$(SRCDIR)\json.c" "$(OBJDIR)\translate$E" $** > $@ | > > > > > > | 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 | "$(OBJDIR)\translate$E" $** > $@ "$(OX)\info$O" : "$(OX)\info_.c" "$(OX)\info.h" $(TCC) /Fo$@ /Fd$(@D)\ -c "$(OX)\info_.c" "$(OX)\info_.c" : "$(SRCDIR)\info.c" "$(OBJDIR)\translate$E" $** > $@ "$(OX)\interwiki$O" : "$(OX)\interwiki_.c" "$(OX)\interwiki.h" $(TCC) /Fo$@ /Fd$(@D)\ -c "$(OX)\interwiki_.c" "$(OX)\interwiki_.c" : "$(SRCDIR)\interwiki.c" "$(OBJDIR)\translate$E" $** > $@ "$(OX)\json$O" : "$(OX)\json_.c" "$(OX)\json.h" $(TCC) /Fo$@ /Fd$(@D)\ -c "$(OX)\json_.c" "$(OX)\json_.c" : "$(SRCDIR)\json.c" "$(OBJDIR)\translate$E" $** > $@ |
| ︙ | ︙ | |||
2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 | "$(OX)\hook_.c":"$(OX)\hook.h" \ "$(OX)\http_.c":"$(OX)\http.h" \ "$(OX)\http_socket_.c":"$(OX)\http_socket.h" \ "$(OX)\http_ssl_.c":"$(OX)\http_ssl.h" \ "$(OX)\http_transport_.c":"$(OX)\http_transport.h" \ "$(OX)\import_.c":"$(OX)\import.h" \ "$(OX)\info_.c":"$(OX)\info.h" \ "$(OX)\json_.c":"$(OX)\json.h" \ "$(OX)\json_artifact_.c":"$(OX)\json_artifact.h" \ "$(OX)\json_branch_.c":"$(OX)\json_branch.h" \ "$(OX)\json_config_.c":"$(OX)\json_config.h" \ "$(OX)\json_diff_.c":"$(OX)\json_diff.h" \ "$(OX)\json_dir_.c":"$(OX)\json_dir.h" \ "$(OX)\json_finfo_.c":"$(OX)\json_finfo.h" \ | > | 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 | "$(OX)\hook_.c":"$(OX)\hook.h" \ "$(OX)\http_.c":"$(OX)\http.h" \ "$(OX)\http_socket_.c":"$(OX)\http_socket.h" \ "$(OX)\http_ssl_.c":"$(OX)\http_ssl.h" \ "$(OX)\http_transport_.c":"$(OX)\http_transport.h" \ "$(OX)\import_.c":"$(OX)\import.h" \ "$(OX)\info_.c":"$(OX)\info.h" \ "$(OX)\interwiki_.c":"$(OX)\interwiki.h" \ "$(OX)\json_.c":"$(OX)\json.h" \ "$(OX)\json_artifact_.c":"$(OX)\json_artifact.h" \ "$(OX)\json_branch_.c":"$(OX)\json_branch.h" \ "$(OX)\json_config_.c":"$(OX)\json_config.h" \ "$(OX)\json_diff_.c":"$(OX)\json_diff.h" \ "$(OX)\json_dir_.c":"$(OX)\json_dir.h" \ "$(OX)\json_finfo_.c":"$(OX)\json_finfo.h" \ |
| ︙ | ︙ |
Changes to www/changes.wiki.
1 2 3 4 5 | <title>Change Log</title> <a name='v2_13'></a> <h2>Changes for Version 2.13 (pending)</h2> | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 |
<title>Change Log</title>
<a name='v2_13'></a>
<h2>Changes for Version 2.13 (pending)</h2>
* Added support for [./interwiki.md|interwiki links].
<a name='v2_12'></a>
<h2>Changes for Version 2.12.1 (2020-08-20)</h2>
* (2.12.1): Fix client-side vulnerabilities discovered by Max Justicz.
* Security fix in the "[/help?cmd=git|fossil git export]" command.
The same fix is also backported to version 2.10.1 and 2.11.1.
|
| ︙ | ︙ |
Added www/interwiki.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 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 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 |
# Interwiki Links
Interwiki links are a short-hand notation for links that target
external wikis or websites. For example, the following two
hyperlinks mean the same thing (assuming an appropriate [intermap](#intermap)
configuration):
* [](wikipedia:Interwiki_links)
* [](https://en.wikipedia.org/wiki/Interwiki_links)
Another example: The Fossil Forum is hosted in a separate repository
from the Fossil source code. This page is part of the
source code repository. Interwiki links can be used to more easily
refer to the forum repository:
* [](forum:d5508c3bf44c6393df09c)
* [](https://fossil-scm.org/forum/info/d5508c3bf44c6393df09c)
## Advantages Over Full URL Targets
* Interwiki links are easier to write. There is less typing,
and fewer opportunities to make mistakes.
* Interwiki links are easier to read. With well-chosen
intermap tags, the links are easier to understand.
* Interwiki links continue to work after a domain change on the
target. If the target of a link moves to a different domain,
an interwiki link will continue to work, if the intermap is adjusted,
but a hard-coded link will be permanently broken.
* Interwiki links allow clones to use a different target domain from the
original repository.
## Details
Fossil supports interwiki links in both the
[Fossil Wiki](/wiki_rules) and [Markdown](/md_rules) markup
styles. An interwiki link consists of a tag followed a colon
and the link target:
> <i>Tag</i><b>:</b><i>PageName</i>
The Tag must consist of ASCII alphanumeric characters only - no
punctuation or whitespace or characters greater than U+007A.
The PageName is the link notation on the target wiki.
Three different classes of PageNames are recognized by Fossil:
1. <b>Path Links</b> → the PageName is begins with the "/" character
or is an empty string.
2. <b>Hash Links</b> → the PageName is a hexadecimal number with
at least four digits.
3. <b>Wiki Links</b> → An PageName that is not a Path or Hash.
The Intermap defines a base URL for each Tag. Path links are appended
directly to the URL contained in the Intermap. The Intermap can define
additional text to put in between the base URL and the PageName for
Hash and Wiki links, respectively.
<a name="intermap"></a>
## Intermap
The intermap defines a mapping from interwiki Tags to full URLs. The
Intermap can be viewed and managed using the [fossil interwiki][iwiki]
command or the [/intermap][imap] webpages.
[iwiki]: /help?cmd=interwiki
[imap]: /help?cmd=/intermap
Each intermap entry stores, at a minimum, the base URL for the remote
wiki. The intermap entry might also store additional path text that
is used for Hash and Wiki links. If only the base URL is provided,
then the intermap will only allow Path style interwiki links. The
Hash and Wiki style interwiki links are only allowed if the necessary
extensions for provided in the intermap.
## Disadvantages and Limitations
* Configuration is required. The intermap must be set up correctly
before interwiki links will work. This contrasts with ordinary
links that just work without any configuration. Cloning a repository
copies the intermap, but normal syncs to not keep the intermap in
sync. Use the "[fossil config pull interwiki][fcfg]" command to
synchronize the intermap.
* The is no backlink tracking. For ordinary intrawiki links, Fossil keeps
track of both the source and target, and when displaying targets it
commonly shows links to that target. For example, if you mention a
check-in as part of a comment of another check-in, that new check-in
shows up in the "References" section of the target check-in.
([example](31af805348690958). In other words, Fossil tracks not just
"_source→target_", but it also tracks "_target→source_".
But backtracking do not work for interwiki links, since the Fossil
running on the target has no way of knowing scanning the source and
hence has no way of knowing that it is a target of a link from the source.
[fcfg]: /help?cmd=config
## Intermap Storage Details
The intermap is stored in the CONFIG table of the repository database,
in entries with names of the form "<tt>interwiki:</tt><i>Tag</i>". The
value for each such entry is a JSON string that defines the base URL
and extensions for Hash and Wiki links.
## See Also
1. [](https://en.wikipedia.org/wiki/Interwiki_links)
2. [](https://www.mediawiki.org/wiki/Manual:Interwiki)
3. [](https://duckduckgo.com/?q=interwiki+links&ia=web)
|
Changes to www/mkindex.tcl.
| ︙ | ︙ | |||
59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
hashes.md {Hashes: Fossil Artifact Identification}
hashpolicy.wiki {Hash Policy: Choosing Between SHA1 and SHA3-256}
/help {Lists of Commands and Webpages}
hints.wiki {Fossil Tips And Usage Hints}
history.md {The Purpose And History Of Fossil}
index.wiki {Home Page}
inout.wiki {Import And Export To And From Git}
image-format-vs-repo-size.md {Image Format vs Fossil Repo Size}
javascript.md {Use of JavaScript in Fossil}
makefile.wiki {The Fossil Build Process}
mirrorlimitations.md {Limitations On Git Mirrors}
mirrortogithub.md {How To Mirror A Fossil Repository On GitHub}
/md_rules {Markdown Formatting Rules}
newrepo.wiki {How To Create A New Fossil Repository}
| > | 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
hashes.md {Hashes: Fossil Artifact Identification}
hashpolicy.wiki {Hash Policy: Choosing Between SHA1 and SHA3-256}
/help {Lists of Commands and Webpages}
hints.wiki {Fossil Tips And Usage Hints}
history.md {The Purpose And History Of Fossil}
index.wiki {Home Page}
inout.wiki {Import And Export To And From Git}
interwiki.md {Interwiki Links}
image-format-vs-repo-size.md {Image Format vs Fossil Repo Size}
javascript.md {Use of JavaScript in Fossil}
makefile.wiki {The Fossil Build Process}
mirrorlimitations.md {Limitations On Git Mirrors}
mirrortogithub.md {How To Mirror A Fossil Repository On GitHub}
/md_rules {Markdown Formatting Rules}
newrepo.wiki {How To Create A New Fossil Repository}
|
| ︙ | ︙ |
Changes to www/permutedindex.html.
| ︙ | ︙ | |||
182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 | <li><a href="image-format-vs-repo-size.md"><b>Image Format vs Fossil Repo Size</b></a></li> <li><a href="tech_overview.wiki">Implementation Of Fossil — A Technical Overview Of The Design And</a></li> <li><a href="inout.wiki"><b>Import And Export To And From Git</b></a></li> <li><a href="build.wiki">Installing Fossil — Compiling and</a></li> <li><a href="fossil-from-msvc.wiki"><b>Integrating Fossil in the Microsoft Express 2010 IDE</b></a></li> <li><a href="selfcheck.wiki">Integrity Self Checks — Fossil Repository</a></li> <li><a href="webui.wiki">Interface — The Fossil Web</a></li> <li><a href="javascript.md">JavaScript in Fossil — Use of</a></li> <li><a href="th1.md">Language — The TH1 Scripting</a></li> <li><a href="copyright-release.html">License Agreement — Contributor</a></li> <li><a href="mirrorlimitations.md"><b>Limitations On Git Mirrors</b></a></li> <li><a href="../../../help"><b>Lists of Commands and Webpages</b></a></li> <li><a href="password.wiki">Management And Authentication — Password</a></li> <li><a href="../../../sitemap">Map — Site</a></li> <li><a href="../../../md_rules"><b>Markdown Formatting Rules</b></a></li> <li><a href="backoffice.md">mechanism of Fossil — The Backoffice</a></li> <li><a href="branching.wiki">Merging, and Tagging — Branching, Forking,</a></li> <li><a href="fossil-from-msvc.wiki">Microsoft Express 2010 IDE — Integrating Fossil in the</a></li> | > > | 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 | <li><a href="image-format-vs-repo-size.md"><b>Image Format vs Fossil Repo Size</b></a></li> <li><a href="tech_overview.wiki">Implementation Of Fossil — A Technical Overview Of The Design And</a></li> <li><a href="inout.wiki"><b>Import And Export To And From Git</b></a></li> <li><a href="build.wiki">Installing Fossil — Compiling and</a></li> <li><a href="fossil-from-msvc.wiki"><b>Integrating Fossil in the Microsoft Express 2010 IDE</b></a></li> <li><a href="selfcheck.wiki">Integrity Self Checks — Fossil Repository</a></li> <li><a href="webui.wiki">Interface — The Fossil Web</a></li> <li><a href="interwiki.md"><b>Interwiki Links</b></a></li> <li><a href="javascript.md">JavaScript in Fossil — Use of</a></li> <li><a href="th1.md">Language — The TH1 Scripting</a></li> <li><a href="copyright-release.html">License Agreement — Contributor</a></li> <li><a href="mirrorlimitations.md"><b>Limitations On Git Mirrors</b></a></li> <li><a href="interwiki.md">Links — Interwiki</a></li> <li><a href="../../../help"><b>Lists of Commands and Webpages</b></a></li> <li><a href="password.wiki">Management And Authentication — Password</a></li> <li><a href="../../../sitemap">Map — Site</a></li> <li><a href="../../../md_rules"><b>Markdown Formatting Rules</b></a></li> <li><a href="backoffice.md">mechanism of Fossil — The Backoffice</a></li> <li><a href="branching.wiki">Merging, and Tagging — Branching, Forking,</a></li> <li><a href="fossil-from-msvc.wiki">Microsoft Express 2010 IDE — Integrating Fossil in the</a></li> |
| ︙ | ︙ |