Fossil SCM

Refactored the generic ajax-related parts of src/fileedit.c into src/ajax.c for eventual re-use in other pages. Added /ajax "page" to act as a dispatcher for page-agnostic ajax routes.

stephan 2020-06-11 07:22 trunk
Commit c313cac828fd5e21e2ea63d91c7ca8449d333120ca1ea614c8058631c187831f
+176
--- a/src/ajax.c
+++ b/src/ajax.c
@@ -0,0 +1,176 @@
1
+/*
2
+** Copyright (c) 2020 D. Richard Hipp
3
+**
4
+** This program is free software; you can redistribute it and/or
5
+** modify it under the terms of the Simplified BSD License (also
6
+** known as the "2-Clause License" or "FreeBSD License".)
7
+**
8
+** This program is distributed in the hope that it will be useful,
9
+** but without any warranty; without even the implied warranty of
10
+** merchantability or fitness for a particular purpose.
11
+**
12
+** Author contact information:
13
+** [email protected]
14
+** http://www.hwaci.com/drh/
15
+**
16
+*******************************************************************************
17
+**
18
+** This file contains shared Ajax-related code for /fileedit, the wiki/forum
19
+** editors, and friends.
20
+*/
21
+#include "config.h"
22
+#include "ajax.h "
23
+#include <assert.h>
24
+#include <stdarg.h>
25
+
26
+#if INTERFACE
27
+/* enum ajax_render_preview_flags: */
28
+#define AJAX_PREVIEW_LINE_NUMBERS 1
29
+/* enum ajax_render_modes: */
30
+#define AJAX_RENDER_GUESS 0 /* Guess rendering mode based on mimetype. */
31
+/* GUESS must be 0. All others have unspecified values. */
32
+#define AJAX_RENDER_PLAIN_TEXT 1 /* Render as plain text. */
33
+#define AJAX_RENDER_HTML_IFRAME 2 /* Render as HTML inside an IFRAME. */
34
+#define AJAX_RENDER_HTML_INLINE 3 /* Render as HTML without an IFRAME. */
35
+#define AJAX_RENDER_WIKI 4 /* Render as wiki/markdown. */
36
+#endif
37
+
38
+/*
39
+** Emits JS code which initializes the
40
+** fossil.page.previewModes object to a map of AJAX_RENDER_xxx values
41
+** and symbolic names for use by client-side scripts.
42
+**
43
+** If addScriptTag is true then the output is wrapped in a SCRIPT tag
44
+** with the current nonce, else no SCRIPT tag is emitted.
45
+**
46
+** Requires thatstyle
47
+**
48
+** Requires that builtin_emit_script_fossil_bootstrap() has already been
49
+** called in order to initialize the window.fossil.page object.
50
+*/
51
+void ajax_emit_js_preview_modes(int addScriptTag){
52
+ emit_script_tag(0,0);
53
+ CX("\n"_);
54
+ }
55
+ CX("fossil.page.pditional
56
+**Blob *pContent, u64 diffFlags)0, diffFlagsOrig, pContent, &out, &DCfg);
57
+ i if(DIFF_SIDEBYSIDE & diffFlags)/* nothing to do */
58
+ }eelse{
59
+ CX("",&out);
60
+ }
61
+ blob_reset(&out);
62
+}
63
+
64
+/*
65
+** Uses P(zKey) to fetch a CGI environment variable. If that var is
66
+** NULL or starts with '0' or 'f' then this function returns false,
67
+** else it returns true.
68
+*/
69
+int ajax_p_bool(char const *zKey){
70
+ const char * zVal = P(zKey);
71
+ return (!zal || emit_script_tag(1,0 /fileedit, the wiki/forum
72
+** editors, and friends.
73
+*/
74
+#include "config.h"
75
+#include "ajax.h "
76
+#include <assert.h>
77
+#include <stdarg.h>
78
+
79
+#if INTERFACE
80
+/* enum ajax_render_preview_flags: */
81
+#define AJAX_PREVIEW_LINE_NUMBERS 1
82
+/* enum ajax_render_modes: */
83
+#define AJAX_RENDER_GUESS 0 /* Guess rendering mode based on mimetype. */
84
+/* GUESS must be 0. All others have unspecified values. */
85
+#define AJAX_RENDER_PLAIN_TEXT 1 /* Render as plain text. */
86
+#define AJAX_RENDER_HTML_IFRAME 2 /* Render as HTML inside an IFRAME. */
87
+#define AJAX_RENDER_HTML_INLINE 3 /* Render as HTML without an IFRAME. */
88
+#define AJAX_RENDER_WIKI 4 /* Render as wiki/markdown. */
89
+#endif
90
+
91
+/*
92
+** Emits JS code which initializes the
93
+** fossil.page.previewModes object to a map of AJAX_RENDER_xxx values
94
+** anre; you can redistri/*
95
+** Copyright (c) 2020 D. Richard Hipp
96
+**
97
+** This program is free software; you can redistribute it and/or
98
+** modify it under the terms of the Simplified BSD License (also
99
+** known as the "2-Clause License" or "FreeBSD License".)
100
+**
101
+** This program is distributed in the hope that it will be useful,
102
+** but without any warranty; without even the implied warranty of
103
+** merchantability or fitness for a particular purpose.
104
+**
105
+** Author contact information:
106
+** [email protected]
107
+** http://www.hwaci.com/drh/
108
+**
109
+*******************************************************************************
110
+**
111
+** This file contains shared Ajax-related code for /fileedit, the wiki/forum
112
+** editors, and friends.
113
+*/
114
+#include "config.h"
115
+#include "ajax.h "
116
+#include <assert.h>
117
+#include <stdarg.h>
118
+
119
+#if INTERFACE
120
+/* enum ajax_render_preview_flags: */
121
+#define AJAX_PREVIEW_LINE_NUMBERS 1
122
+/* enum ajax_render_modes: */
123
+#define AJAX_RENDER_GUESS 0 /* Guess rendering mode based on mimetype. */
124
+/* GUESS must be 0. All others have unspecified values. */
125
+#define AJAX_RENDER_PLAIN_TEXT 1 /* Render as plain text. */
126
+#define AJAX_RENDER_HTML_IFRAME 2 /* Render as HTML inside an IFRAME. */
127
+#define AJAX_RENDER_HTML_INLINE 3 /* Render as HTML without an IFRAME. */
128
+#define AJAX_RENDER_WIKI 4 /* Render as wiki/markdown. */
129
+#endif
130
+
131
+/*
132
+** Emits JS code which initializes the
133
+** fossil.page.previewModes object to a map of AJAX_RENDER_xxx values
134
+** and symbolic names for use by client-side scripts.
135
+**
136
+** If addScriptTag is true then the output is wrapped in a SCRIPT tag
137
+** with the current nonce, else no SCRIPT tag is emitted.script_fossil_bootstrap() has already been
138
+** called in order to initialize the window.fossil.page object.
139
+*/
140
+void ajax_emit_js_preview_modes(int addScriptTag){
141
+ emit_script_tag(0,0);
142
+ CX("\n"_);
143
+ }
144
+ CX("fossil.page.pditional
145
+**Blob *pContent, u64 diffFlags)0, diffFlagsOrig, pContent, &out, &DCfg);
146
+ i if(DIFF_SIDEBYSIDE & diffFlags)/* nothing to do */
147
+ }eelse{
148
+ CX("",&out);
149
+ }
150
+ blob_reset(&out);
151
+}
152
+
153
+/*
154
+** Uses P(zKey) to fetch a CGI environment variable. If that var is
155
+** NULL or starts with '0' or 'f' then this function returns false,
156
+** else it returns true.
157
+*/
158
+int ajax_p_bool(char const *zKey){
159
+ const char * zVal = P(zKey);
160
+ return (!zal || emit_script_tag(1,0 /fileedit, the wiki/forum
161
+** editors, and friends.
162
+*/
163
+#include "config.h"
164
+#include "ajax.h "
165
+#include <assert.h>
166
+#include <stdarg.h>
167
+
168
+#if INTERFARENDER_HTML_IFRAME 2 /* Render as HTML inside an IFRAME. */
169
+#define AJAX_RENDER_HTML_INLINE 3 /* Render as HTML without an IFRAME. */
170
+#define AJAX_RENDER_WIKI 4 /* Render as wiki/markdown. */
171
+#endif
172
+
173
+/*
174
+** Emits JS code which initializes the
175
+** fossil.page.previewModes object to a map of AJAX_RENDER_xxx values
176
+** anstatic
--- a/src/ajax.c
+++ b/src/ajax.c
@@ -0,0 +1,176 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
--- a/src/ajax.c
+++ b/src/ajax.c
@@ -0,0 +1,176 @@
1 /*
2 ** Copyright (c) 2020 D. Richard Hipp
3 **
4 ** This program is free software; you can redistribute it and/or
5 ** modify it under the terms of the Simplified BSD License (also
6 ** known as the "2-Clause License" or "FreeBSD License".)
7 **
8 ** This program is distributed in the hope that it will be useful,
9 ** but without any warranty; without even the implied warranty of
10 ** merchantability or fitness for a particular purpose.
11 **
12 ** Author contact information:
13 ** [email protected]
14 ** http://www.hwaci.com/drh/
15 **
16 *******************************************************************************
17 **
18 ** This file contains shared Ajax-related code for /fileedit, the wiki/forum
19 ** editors, and friends.
20 */
21 #include "config.h"
22 #include "ajax.h "
23 #include <assert.h>
24 #include <stdarg.h>
25
26 #if INTERFACE
27 /* enum ajax_render_preview_flags: */
28 #define AJAX_PREVIEW_LINE_NUMBERS 1
29 /* enum ajax_render_modes: */
30 #define AJAX_RENDER_GUESS 0 /* Guess rendering mode based on mimetype. */
31 /* GUESS must be 0. All others have unspecified values. */
32 #define AJAX_RENDER_PLAIN_TEXT 1 /* Render as plain text. */
33 #define AJAX_RENDER_HTML_IFRAME 2 /* Render as HTML inside an IFRAME. */
34 #define AJAX_RENDER_HTML_INLINE 3 /* Render as HTML without an IFRAME. */
35 #define AJAX_RENDER_WIKI 4 /* Render as wiki/markdown. */
36 #endif
37
38 /*
39 ** Emits JS code which initializes the
40 ** fossil.page.previewModes object to a map of AJAX_RENDER_xxx values
41 ** and symbolic names for use by client-side scripts.
42 **
43 ** If addScriptTag is true then the output is wrapped in a SCRIPT tag
44 ** with the current nonce, else no SCRIPT tag is emitted.
45 **
46 ** Requires thatstyle
47 **
48 ** Requires that builtin_emit_script_fossil_bootstrap() has already been
49 ** called in order to initialize the window.fossil.page object.
50 */
51 void ajax_emit_js_preview_modes(int addScriptTag){
52 emit_script_tag(0,0);
53 CX("\n"_);
54 }
55 CX("fossil.page.pditional
56 **Blob *pContent, u64 diffFlags)0, diffFlagsOrig, pContent, &out, &DCfg);
57 i if(DIFF_SIDEBYSIDE & diffFlags)/* nothing to do */
58 }eelse{
59 CX("",&out);
60 }
61 blob_reset(&out);
62 }
63
64 /*
65 ** Uses P(zKey) to fetch a CGI environment variable. If that var is
66 ** NULL or starts with '0' or 'f' then this function returns false,
67 ** else it returns true.
68 */
69 int ajax_p_bool(char const *zKey){
70 const char * zVal = P(zKey);
71 return (!zal || emit_script_tag(1,0 /fileedit, the wiki/forum
72 ** editors, and friends.
73 */
74 #include "config.h"
75 #include "ajax.h "
76 #include <assert.h>
77 #include <stdarg.h>
78
79 #if INTERFACE
80 /* enum ajax_render_preview_flags: */
81 #define AJAX_PREVIEW_LINE_NUMBERS 1
82 /* enum ajax_render_modes: */
83 #define AJAX_RENDER_GUESS 0 /* Guess rendering mode based on mimetype. */
84 /* GUESS must be 0. All others have unspecified values. */
85 #define AJAX_RENDER_PLAIN_TEXT 1 /* Render as plain text. */
86 #define AJAX_RENDER_HTML_IFRAME 2 /* Render as HTML inside an IFRAME. */
87 #define AJAX_RENDER_HTML_INLINE 3 /* Render as HTML without an IFRAME. */
88 #define AJAX_RENDER_WIKI 4 /* Render as wiki/markdown. */
89 #endif
90
91 /*
92 ** Emits JS code which initializes the
93 ** fossil.page.previewModes object to a map of AJAX_RENDER_xxx values
94 ** anre; you can redistri/*
95 ** Copyright (c) 2020 D. Richard Hipp
96 **
97 ** This program is free software; you can redistribute it and/or
98 ** modify it under the terms of the Simplified BSD License (also
99 ** known as the "2-Clause License" or "FreeBSD License".)
100 **
101 ** This program is distributed in the hope that it will be useful,
102 ** but without any warranty; without even the implied warranty of
103 ** merchantability or fitness for a particular purpose.
104 **
105 ** Author contact information:
106 ** [email protected]
107 ** http://www.hwaci.com/drh/
108 **
109 *******************************************************************************
110 **
111 ** This file contains shared Ajax-related code for /fileedit, the wiki/forum
112 ** editors, and friends.
113 */
114 #include "config.h"
115 #include "ajax.h "
116 #include <assert.h>
117 #include <stdarg.h>
118
119 #if INTERFACE
120 /* enum ajax_render_preview_flags: */
121 #define AJAX_PREVIEW_LINE_NUMBERS 1
122 /* enum ajax_render_modes: */
123 #define AJAX_RENDER_GUESS 0 /* Guess rendering mode based on mimetype. */
124 /* GUESS must be 0. All others have unspecified values. */
125 #define AJAX_RENDER_PLAIN_TEXT 1 /* Render as plain text. */
126 #define AJAX_RENDER_HTML_IFRAME 2 /* Render as HTML inside an IFRAME. */
127 #define AJAX_RENDER_HTML_INLINE 3 /* Render as HTML without an IFRAME. */
128 #define AJAX_RENDER_WIKI 4 /* Render as wiki/markdown. */
129 #endif
130
131 /*
132 ** Emits JS code which initializes the
133 ** fossil.page.previewModes object to a map of AJAX_RENDER_xxx values
134 ** and symbolic names for use by client-side scripts.
135 **
136 ** If addScriptTag is true then the output is wrapped in a SCRIPT tag
137 ** with the current nonce, else no SCRIPT tag is emitted.script_fossil_bootstrap() has already been
138 ** called in order to initialize the window.fossil.page object.
139 */
140 void ajax_emit_js_preview_modes(int addScriptTag){
141 emit_script_tag(0,0);
142 CX("\n"_);
143 }
144 CX("fossil.page.pditional
145 **Blob *pContent, u64 diffFlags)0, diffFlagsOrig, pContent, &out, &DCfg);
146 i if(DIFF_SIDEBYSIDE & diffFlags)/* nothing to do */
147 }eelse{
148 CX("",&out);
149 }
150 blob_reset(&out);
151 }
152
153 /*
154 ** Uses P(zKey) to fetch a CGI environment variable. If that var is
155 ** NULL or starts with '0' or 'f' then this function returns false,
156 ** else it returns true.
157 */
158 int ajax_p_bool(char const *zKey){
159 const char * zVal = P(zKey);
160 return (!zal || emit_script_tag(1,0 /fileedit, the wiki/forum
161 ** editors, and friends.
162 */
163 #include "config.h"
164 #include "ajax.h "
165 #include <assert.h>
166 #include <stdarg.h>
167
168 #if INTERFARENDER_HTML_IFRAME 2 /* Render as HTML inside an IFRAME. */
169 #define AJAX_RENDER_HTML_INLINE 3 /* Render as HTML without an IFRAME. */
170 #define AJAX_RENDER_WIKI 4 /* Render as wiki/markdown. */
171 #endif
172
173 /*
174 ** Emits JS code which initializes the
175 ** fossil.page.previewModes object to a map of AJAX_RENDER_xxx values
176 ** anstatic
+65 -320
--- src/fileedit.c
+++ src/fileedit.c
@@ -919,112 +919,10 @@
919919
}else{
920920
return 0;
921921
}
922922
}
923923
924
-enum fileedit_render_preview_flags {
925
-FE_PREVIEW_LINE_NUMBERS = 1
926
-};
927
-enum fileedit_render_modes {
928
-/* GUESS must be 0. All others have unspecified values. */
929
-FE_RENDER_GUESS = 0,
930
-FE_RENDER_PLAIN_TEXT,
931
-FE_RENDER_HTML_IFRAME,
932
-FE_RENDER_HTML_INLINE,
933
-FE_RENDER_WIKI
934
-};
935
-
936
-static int fileedit_render_mode_for_mimetype(const char * zMimetype){
937
- int rc = FE_RENDER_PLAIN_TEXT;
938
- if( zMimetype ){
939
- if( fossil_strcmp(zMimetype, "text/html")==0 ){
940
- rc = FE_RENDER_HTML_IFRAME;
941
- }else if( fossil_strcmp(zMimetype, "text/x-fossil-wiki")==0
942
- || fossil_strcmp(zMimetype, "text/x-markdown")==0 ){
943
- rc = FE_RENDER_WIKI;
944
- }
945
- }
946
- return rc;
947
-}
948
-
949
-/*
950
-** Performs the PREVIEW mode for /filepage.
951
-**
952
-** If *renderMode==FE_RENDER_GUESS then *renderMode gets set to the
953
-** mode which is guessed at for the rendering.
954
-*/
955
-static void fileedit_render_preview(Blob * pContent,
956
- const char *zFilename,
957
- int flags, int * renderMode,
958
- int nIframeHeightEm){
959
- const char * zMime;
960
- zMime = mimetype_from_name(zFilename);
961
- if(FE_RENDER_GUESS==*renderMode){
962
- *renderMode = fileedit_render_mode_for_mimetype(zMime);
963
- }
964
- switch(*renderMode){
965
- case FE_RENDER_HTML_IFRAME:{
966
- char * z64 = encode64(blob_str(pContent), blob_size(pContent));
967
- CX("<iframe width='100%%' frameborder='0' "
968
- "marginwidth='0' style='height:%dem' "
969
- "marginheight='0' sandbox='allow-same-origin' "
970
- "id='ifm1' src='data:text/html;base64,%z'"
971
- "></iframe>",
972
- nIframeHeightEm ? nIframeHeightEm : 40,
973
- z64);
974
- break;
975
- }
976
- case FE_RENDER_HTML_INLINE:{
977
- CX("%b",pContent);
978
- break;
979
- }
980
- case FE_RENDER_WIKI:
981
- safe_html_context(DOCSRC_FILE);
982
- wiki_render_by_mimetype(pContent, zMime);
983
- break;
984
- default:{
985
- const char *zExt = strrchr(zFilename,'.');
986
- const char *zContent = blob_str(pContent);
987
- if(FE_PREVIEW_LINE_NUMBERS & flags){
988
- output_text_with_line_numbers(zContent, "on");
989
- }else if(zExt && zExt[1]){
990
- CX("<pre><code class='language-%s'>%h</code></pre>",
991
- zExt+1, zContent);
992
- }else{
993
- CX("<pre>%h</pre>", zContent);
994
- }
995
- break;
996
- }
997
- }
998
-}
999
-
1000
-/*
1001
-** Renders diffs for the /fileedit page. pContent is the
1002
-** locally-edited content. frid is the RID of the file's blob entry
1003
-** from which pContent is based. zManifestUuid is the checkin version
1004
-** to which RID belongs - it is purely informational, for labeling the
1005
-** diff view. isSbs is true for side-by-side diffs, false for unified.
1006
-*/
1007
-static void fileedit_render_diff(Blob * pContent, int frid,
1008
- const char * zManifestUuid,
1009
- u64 diffFlags){
1010
- Blob orig = empty_blob;
1011
- Blob out = empty_blob;
1012
-
1013
- content_get(frid, &orig);
1014
- text_diff(&orig, pContent, &out, 0, diffFlags);
1015
- if(blob_size(&out)==0){
1016
- /* nothing to do */
1017
- }else if(DIFF_SIDEBYSIDE & diffFlags){
1018
- CX("%b",&out);
1019
- }else{
1020
- CX("<pre class='udiff'>%b</pre>",&out);
1021
- }
1022
- blob_reset(&orig);
1023
- blob_reset(&out);
1024
-}
1025
-
1026924
/*
1027925
** Given a repo-relative filename and a manifest RID, returns the UUID
1028926
** of the corresponding file entry. Returns NULL if no match is
1029927
** found. If pFilePerm is not NULL, the file's permission flag value
1030928
** is written to *pFilePerm.
@@ -1044,99 +942,25 @@
1044942
}
1045943
db_finalize(&stmt);
1046944
return zFileUuid;
1047945
}
1048946
1049
-/*
1050
-** Helper for /fileedit_xyz routes. Clears the CGI content buffer,
1051
-** sets an error status code, and queues up a JSON response in the
1052
-** form of an object:
1053
-**
1054
-** {error: formatted message}
1055
-**
1056
-** After calling this, the caller should immediately return.
1057
- */
1058
-static void fileedit_ajax_error(int httpCode, const char * zFmt, ...){
1059
- Blob msg = empty_blob;
1060
- Blob content = empty_blob;
1061
- va_list vargs;
1062
- va_start(vargs,zFmt);
1063
- blob_vappendf(&msg, zFmt, vargs);
1064
- va_end(vargs);
1065
- blob_appendf(&content,"{\"error\":%!j}", blob_str(&msg));
1066
- blob_reset(&msg);
1067
- cgi_set_content(&content);
1068
- cgi_set_status(httpCode, "Error");
1069
- cgi_set_content_type("application/json");
1070
-}
1071
-
1072
-/*
1073
-** Performs bootstrapping common to the /fileedit_xyz AJAX routes.
1074
-** Returns 0 if bootstrapping fails (wrong permissions), in which
1075
-** case it has reported the error and the route should immediately
1076
-** return. Returns true on success.
1077
-**
1078
-** Must be passed true if the request being set up requires POST,
1079
-** else false.
1080
-*/
1081
-static int fileedit_ajax_boostrap(int requirePost){
1082
- login_check_credentials();
1083
- if( !g.perm.Write ){
1084
- fileedit_ajax_error(403,"Write permissions required.");
1085
- return 0;
1086
- }else if(0==cgi_csrf_safe(requirePost)){
1087
- fileedit_ajax_error(403,
1088
- "CSRF violation (make sure sending of HTTP "
1089
- "Referer headers is enabled for XHR "
1090
- "connections).");
1091
- return 0;
1092
- }
1093
- return 1;
1094
-}
1095947
/*
1096948
** Returns true if the current user is allowed to edit the given
1097949
** filename, as determined by fileedit_is_editable(), else false,
1098950
** in which case it queues up an error response and the caller
1099951
** must return immediately.
1100952
*/
1101953
static int fileedit_ajax_check_filename(const char * zFilename){
1102954
if(0==fileedit_is_editable(zFilename)){
1103
- fileedit_ajax_error(403, "File is disallowed by the "
1104
- "fileedit-glob setting.");
955
+ ajax_route_error(403, "File is disallowed by the "
956
+ "fileedit-glob setting.");
1105957
return 0;
1106958
}
1107959
return 1;
1108960
}
1109961
1110
-
1111
-/*
1112
-** If zFn is not NULL, it is assigned the value of the first one of
1113
-** the "filename" or "fn" CGI parameters which is set.
1114
-**
1115
-** If zCi is not NULL, it is assigned the value of the first one of
1116
-** the "checkin" or "ci" CGI parameters which is set.
1117
-**
1118
-** If a parameter is not NULL, it will be assigned NULL if the
1119
-** corresponding parameter is not set.
1120
-**
1121
-** Returns the number of non-NULL values it assigns to arguments. Thus
1122
-** if passed (&x, NULL), it returns 1 if it assigns non-NULL to *x and
1123
-** 0 if it assigns NULL to *x.
1124
-*/
1125
-static int fileedit_get_fnci_args( const char **zFn, const char **zCi ){
1126
- int rc = 0;
1127
- if(zCi!=0){
1128
- *zCi = PD("checkin",P("ci"));
1129
- if( *zCi ) ++rc;
1130
- }
1131
- if(zFn!=0){
1132
- *zFn = PD("filename",P("fn"));
1133
- if (*zFn) ++rc;
1134
- }
1135
- return rc;
1136
-}
1137
-
1138962
/*
1139963
** Passed the values of the "checkin" and "filename" request
1140964
** properties, this function verifies that they are valid and
1141965
** populates:
1142966
**
@@ -1166,22 +990,22 @@
1166990
if(checkFile && !fileedit_ajax_check_filename(zFilename)){
1167991
return 0;
1168992
}
1169993
*vid = symbolic_name_to_rid(zRev, "ci");
1170994
if(0==*vid){
1171
- fileedit_ajax_error(404,"Cannot resolve name as a checkin: %s",
1172
- zRev);
995
+ ajax_route_error(404,"Cannot resolve name as a checkin: %s",
996
+ zRev);
1173997
return 0;
1174998
}else if(*vid<0){
1175
- fileedit_ajax_error(400,"Checkin name is ambiguous: %s",
1176
- zRev);
999
+ ajax_route_error(400,"Checkin name is ambiguous: %s",
1000
+ zRev);
11771001
return 0;
11781002
}
11791003
if(checkFile){
11801004
zFileUuid = fileedit_file_uuid(zFilename, *vid, 0);
11811005
if(zFileUuid==0){
1182
- fileedit_ajax_error(404,"Checkin does not contain file.");
1006
+ ajax_route_error(404, "Checkin does not contain file.");
11831007
return 0;
11841008
}
11851009
}
11861010
if(zRevUuid!=0){
11871011
*zRevUuid = rid_to_uuid(*vid);
@@ -1205,11 +1029,11 @@
12051029
** checkin=CHECKIN_NAME
12061030
**
12071031
** User must have Write access to use this page.
12081032
**
12091033
** Responds with the raw content of the given page. On error it
1210
-** produces a JSON response as documented for fileedit_ajax_error().
1034
+** produces a JSON response as documented for ajax_route_error().
12111035
**
12121036
** Extra response headers:
12131037
**
12141038
** x-fileedit-file-perm: empty or "x" or "l", representing PERM_REG,
12151039
** PERM_EXE, or PERM_LINK, respectively.
@@ -1221,12 +1045,12 @@
12211045
const char * zRev = 0;
12221046
int vid, frid;
12231047
Blob content = empty_blob;
12241048
const char * zMime;
12251049
1226
- fileedit_get_fnci_args( &zFilename, &zRev );
1227
- if(!fileedit_ajax_boostrap(0)
1050
+ ajax_get_fnci_args( &zFilename, &zRev );
1051
+ if(!ajax_route_bootstrap(1,0)
12281052
|| !fileedit_ajax_setup_filerev(zRev, 0, &vid,
12291053
zFilename, &frid)){
12301054
return;
12311055
}
12321056
zMime = mimetype_from_name(zFilename);
@@ -1256,81 +1080,10 @@
12561080
}
12571081
cgi_set_content_type(zMime);
12581082
cgi_set_content(&content);
12591083
}
12601084
1261
-/*
1262
-** AJAX route /fileedit?ajax=preview
1263
-**
1264
-** Required query parameters:
1265
-**
1266
-** filename=FILENAME
1267
-** content=text
1268
-**
1269
-** Optional query parameters:
1270
-**
1271
-** render_mode=integer (FE_RENDER_xxx) (default=FE_RENDER_GUESS)
1272
-**
1273
-** ln=0 or 1 to disable/enable line number mode in
1274
-** FE_RENDER_PLAIN_TEXT mode.
1275
-**
1276
-** iframe_height=integer (default=40) Height, in EMs of HTML preview
1277
-** iframe.
1278
-**
1279
-** User must have Write access to use this page.
1280
-**
1281
-** Responds with the HTML content of the preview. On error it produces
1282
-** a JSON response as documented for fileedit_ajax_error().
1283
-**
1284
-** Extra response headers:
1285
-**
1286
-** x-fileedit-render-mode: string representing the rendering mode
1287
-** which was really used (which will differ from the requested mode
1288
-** only if mode 0 (guess) was requested). The names are documented
1289
-** below in code and match those in the emitted JS object
1290
-** fossil.page.previewModes.
1291
-*/
1292
-static void fileedit_ajax_preview(void){
1293
- const char * zFilename = 0;
1294
- const char * zContent = P("content");
1295
- int renderMode = atoi(PD("render_mode","0"));
1296
- int ln = atoi(PD("ln","0"));
1297
- int iframeHeight = atoi(PD("iframe_height","40"));
1298
- Blob content = empty_blob;
1299
- const char * zRenderMode = 0;
1300
- fileedit_get_fnci_args( &zFilename, 0 );
1301
- if(!fileedit_ajax_boostrap(1)
1302
- || !fileedit_ajax_check_filename(zFilename)){
1303
- return;
1304
- }
1305
- cgi_set_content_type("text/html");
1306
- blob_init(&content, zContent, -1);
1307
- fileedit_render_preview(&content, zFilename,
1308
- ln ? FE_PREVIEW_LINE_NUMBERS : 0,
1309
- &renderMode, iframeHeight);
1310
- /*
1311
- ** Now tell the caller if we did indeed use FE_RENDER_WIKI, so that
1312
- ** they can re-set the <base href> to an appropriate value (which
1313
- ** requires knowing the content's current checkin version, which we
1314
- ** don't have here).
1315
- */
1316
- switch(renderMode){
1317
- /* The strings used here MUST correspond to those used in the JS-side
1318
- ** fossil.page.previewModes map.
1319
- */
1320
- case FE_RENDER_WIKI: zRenderMode = "wiki"; break;
1321
- case FE_RENDER_HTML_INLINE: zRenderMode = "htmlInline"; break;
1322
- case FE_RENDER_HTML_IFRAME: zRenderMode = "htmlIframe"; break;
1323
- case FE_RENDER_PLAIN_TEXT: zRenderMode = "text"; break;
1324
- case FE_RENDER_GUESS:
1325
- assert(!"cannot happen");
1326
- }
1327
- if(zRenderMode!=0){
1328
- cgi_printf_header("x-fileedit-render-mode: %s\r\n", zRenderMode);
1329
- }
1330
-}
1331
-
13321085
/*
13331086
** AJAX route /fileedit?ajax=diff
13341087
**
13351088
** Required query parameters:
13361089
**
@@ -1348,11 +1101,11 @@
13481101
** patch-style siff can be produced.
13491102
**
13501103
** User must have Write access to use this page.
13511104
**
13521105
** Responds with the HTML content of the diff. On error it produces a
1353
-** JSON response as documented for fileedit_ajax_error().
1106
+** JSON response as documented for ajax_route_error().
13541107
*/
13551108
static void fileedit_ajax_diff(void){
13561109
/*
13571110
** Reminder: we only need the filename to perform valdiation
13581111
** against fileedit_is_editable(), else this route could be
@@ -1378,22 +1131,27 @@
13781131
diffFlags |= DIFF_IGNORE_ALLWS;
13791132
}else if(1==iFlag){
13801133
diffFlags |= DIFF_IGNORE_EOLWS;
13811134
}
13821135
diffFlags |= DIFF_STRIP_EOLCR;
1383
- fileedit_get_fnci_args( &zFilename, &zRev );
1384
- if(!fileedit_ajax_boostrap(1)
1136
+ ajax_get_fnci_args( &zFilename, &zRev );
1137
+ if(!ajax_route_bootstrap(1,1)
13851138
|| !fileedit_ajax_setup_filerev(zRev, &zRevUuid, &vid,
13861139
zFilename, &frid)){
13871140
return;
13881141
}
13891142
if(!zContent){
13901143
zContent = "";
13911144
}
13921145
cgi_set_content_type("text/html");
13931146
blob_init(&content, zContent, -1);
1394
- fileedit_render_diff(&content, frid, zRevUuid, diffFlags);
1147
+ {
1148
+ Blob orig = empty_blob;
1149
+ content_get(frid, &orig);
1150
+ ajax_render_diff(&orig, &content, diffFlags);
1151
+ blob_reset(&orig);
1152
+ }
13951153
fossil_free(zRevUuid);
13961154
blob_reset(&content);
13971155
}
13981156
13991157
/*
@@ -1558,19 +1316,19 @@
15581316
** checkin: UUID,
15591317
** editableFiles: [ filename1, ... filenameN ] // sorted by name
15601318
** }
15611319
**
15621320
** On error it produces a JSON response as documented for
1563
-** fileedit_ajax_error().
1321
+** ajax_route_error().
15641322
*/
15651323
static void fileedit_ajax_filelist(void){
15661324
const char * zCi = PD("checkin",P("ci"));
15671325
Blob sql = empty_blob;
15681326
Stmt q = empty_Stmt;
15691327
int i = 0;
15701328
1571
- if(!fileedit_ajax_boostrap(0)){
1329
+ if(!ajax_route_bootstrap(1,0)){
15721330
return;
15731331
}
15741332
cgi_set_content_type("application/json");
15751333
if(zCi!=0){
15761334
char * zCiFull = 0;
@@ -1617,11 +1375,11 @@
16171375
CX("}");
16181376
}
16191377
CX("]");
16201378
db_finalize(&q);
16211379
}else{
1622
- fileedit_ajax_error(500, "Unhandled URL argument.");
1380
+ ajax_route_error(500, "Unhandled URL argument.");
16231381
}
16241382
}
16251383
16261384
/*
16271385
** AJAX route /fileedit?ajax=commit
@@ -1658,11 +1416,11 @@
16581416
** dryRun: bool,
16591417
** manifest: text of manifest,
16601418
** }
16611419
**
16621420
** On error it produces a JSON response as documented for
1663
-** fileedit_ajax_error().
1421
+** ajax_route_error().
16641422
*/
16651423
static void fileedit_ajax_commit(void){
16661424
Blob err = empty_blob; /* Error messages */
16671425
Blob manifest = empty_blob; /* raw new manifest */
16681426
CheckinMiniInfo cimi; /* checkin state */
@@ -1670,30 +1428,30 @@
16701428
int newVid = 0; /* new version's RID */
16711429
char * zNewUuid = 0; /* newVid's UUID */
16721430
char const * zMimetype;
16731431
char * zBranch = 0;
16741432
1675
- if(!fileedit_ajax_boostrap(1)){
1433
+ if(!ajax_route_bootstrap(1,1)){
16761434
return;
16771435
}
16781436
db_begin_transaction();
16791437
CheckinMiniInfo_init(&cimi);
16801438
rc = fileedit_setup_cimi_from_p(&cimi, &err, 0);
16811439
if(0!=rc){
1682
- fileedit_ajax_error(rc,"%b",&err);
1440
+ ajax_route_error(rc,"%b",&err);
16831441
goto end_cleanup;
16841442
}
16851443
if(blob_size(&cimi.comment)==0){
1686
- fileedit_ajax_error(400,"Empty checkin comment is not permitted.");
1444
+ ajax_route_error(400,"Empty checkin comment is not permitted.");
16871445
goto end_cleanup;
16881446
}
16891447
if(0!=atoi(PD("include_manifest","0"))){
16901448
cimi.pMfOut = &manifest;
16911449
}
16921450
checkin_mini(&cimi, &newVid, &err);
16931451
if(blob_size(&err)){
1694
- fileedit_ajax_error(500,"%b",&err);
1452
+ ajax_route_error(500,"%b",&err);
16951453
goto end_cleanup;
16961454
}
16971455
assert(newVid>0);
16981456
zNewUuid = rid_to_uuid(newVid);
16991457
cgi_set_content_type("application/json");
@@ -1748,21 +1506,20 @@
17481506
** use of the name parameter.
17491507
**
17501508
** Which additional parameters are used by each distinct ajax value is
17511509
** an internal implementation detail and may change with any given
17521510
** build of this code. An unknown "name" value triggers an error, as
1753
-** documented for fileedit_ajax_error().
1511
+** documented for ajax_route_error().
17541512
*/
17551513
void fileedit_page(void){
17561514
const char * zFilename = 0; /* filename. We'll accept 'name'
17571515
because that param is handled
17581516
specially by the core. */
17591517
const char * zRev = 0; /* checkin version */
17601518
const char * zFileMime = 0; /* File mime type guess */
17611519
CheckinMiniInfo cimi; /* Checkin state */
1762
- int previewHtmlHeight = 0; /* iframe height (EMs) */
1763
- int previewRenderMode = FE_RENDER_GUESS; /* preview mode */
1520
+ int previewRenderMode = AJAX_RENDER_GUESS; /* preview mode */
17641521
Blob err = empty_blob; /* Error report */
17651522
Blob endScript = empty_blob; /* Script code to run at the
17661523
end. This content will be
17671524
combined into a single JS
17681525
function call, thus each
@@ -1773,21 +1530,21 @@
17731530
17741531
/* Allow no access to this page without check-in privilege */
17751532
login_check_credentials();
17761533
if( !g.perm.Write ){
17771534
if(zAjax!=0){
1778
- fileedit_ajax_error(403, "Write permissions required.");
1535
+ ajax_route_error(403, "Write permissions required.");
17791536
}else{
17801537
login_needed(g.anon.Write);
17811538
}
17821539
return;
17831540
}
17841541
/* No access to anything on this page if the fileedit-glob is empty */
17851542
if( fileedit_glob()==0 ){
17861543
if(zAjax!=0){
1787
- fileedit_ajax_error(403, "Online editing is disabled for this "
1788
- "repository.");
1544
+ ajax_route_error(403, "Online editing is disabled for this "
1545
+ "repository.");
17891546
return;
17901547
}
17911548
style_header("File Editor (disabled)");
17921549
CX("<h1>Online File Editing Is Disabled</h1>\n");
17931550
if( g.perm.Admin ){
@@ -1807,22 +1564,21 @@
18071564
/* Dispatch AJAX methods based tail of the request URI.
18081565
** The AJAX parts do their own permissions/CSRF check and
18091566
** fail with a JSON-format response if needed.
18101567
*/
18111568
if( 0!=zAjax ){
1569
+ /* preview mode is handled via /ajax/preview-text */
18121570
if(0==strcmp("content",zAjax)){
18131571
fileedit_ajax_content();
1814
- }else if(0==strcmp("preview",zAjax)){
1815
- fileedit_ajax_preview();
18161572
}else if(0==strcmp("filelist",zAjax)){
18171573
fileedit_ajax_filelist();
18181574
}else if(0==strcmp("diff",zAjax)){
18191575
fileedit_ajax_diff();
18201576
}else if(0==strcmp("commit",zAjax)){
18211577
fileedit_ajax_commit();
18221578
}else{
1823
- fileedit_ajax_error(500, "Unhandled ajax route name.");
1579
+ ajax_route_error(500, "Unhandled ajax route name.");
18241580
}
18251581
return;
18261582
}
18271583
18281584
db_begin_transaction();
@@ -1855,21 +1611,19 @@
18551611
** render the errors. Any up-coming errors, barring malloc failure
18561612
** or similar, are not "that" fatal. We can/should continue
18571613
** rendering the page, then output the error message at the end.
18581614
********************************************************************/
18591615
1860
- {
1861
- /* The CSS for this page lives in a common file but much of it we
1862
- ** don't want inadvertently being used by other pages. We don't
1863
- ** have a common, page-specific container we can filter our CSS
1864
- ** selectors, but we do have the BODY, which we can decorate with
1865
- ** whatever CSS we wish...
1866
- */
1867
- style_emit_script_tag(0,0);
1868
- CX("document.body.classList.add('fileedit');\n");
1869
- style_emit_script_tag(1,0);
1870
- }
1616
+ /* The CSS for this page lives in a common file but much of it we
1617
+ ** don't want inadvertently being used by other pages. We don't
1618
+ ** have a common, page-specific container we can filter our CSS
1619
+ ** selectors, but we do have the BODY, which we can decorate with
1620
+ ** whatever CSS we wish...
1621
+ */
1622
+ style_emit_script_tag(0,0);
1623
+ CX("document.body.classList.add('fileedit');\n");
1624
+ style_emit_script_tag(1,0);
18711625
18721626
/* Status bar */
18731627
CX("<div id='fossil-status-bar' "
18741628
"title='Status message area. Double-click to clear them.'>"
18751629
"Status messages will go here.</div>\n"
@@ -1948,46 +1702,30 @@
19481702
"If on, the preview will automatically "
19491703
"refresh when this tab is selected.");
19501704
19511705
/* Default preview rendering mode selection... */
19521706
previewRenderMode = zFileMime
1953
- ? fileedit_render_mode_for_mimetype(zFileMime)
1954
- : FE_RENDER_GUESS;
1707
+ ? ajax_render_mode_for_mimetype(zFileMime)
1708
+ : AJAX_RENDER_GUESS;
19551709
style_select_list_int("select-preview-mode",
19561710
"preview_render_mode",
19571711
"Preview Mode",
19581712
"Preview mode format.",
19591713
previewRenderMode,
1960
- "Guess", FE_RENDER_GUESS,
1961
- "Wiki/Markdown", FE_RENDER_WIKI,
1962
- "HTML (iframe)", FE_RENDER_HTML_IFRAME,
1963
- "HTML (inline)", FE_RENDER_HTML_INLINE,
1964
- "Plain Text", FE_RENDER_PLAIN_TEXT,
1714
+ "Guess", AJAX_RENDER_GUESS,
1715
+ "Wiki/Markdown", AJAX_RENDER_WIKI,
1716
+ "HTML (iframe)", AJAX_RENDER_HTML_IFRAME,
1717
+ "HTML (inline)", AJAX_RENDER_HTML_INLINE,
1718
+ "Plain Text", AJAX_RENDER_PLAIN_TEXT,
19651719
NULL);
1966
- /*
1967
- ** Set up a JS-side mapping of the FE_RENDER_xyz values. This is
1968
- ** used for dynamically toggling certain UI components on and off.
1969
- */
1970
- blob_appendf(&endScript, "fossil.page.previewModes={"
1971
- "guess: %d, %d: 'guess', wiki: %d, %d: 'wiki',"
1972
- "htmlIframe: %d, %d: 'htmlIframe', "
1973
- "htmlInline: %d, %d: 'htmlInline', "
1974
- "text: %d, %d: 'text'"
1975
- "};\n",
1976
- FE_RENDER_GUESS, FE_RENDER_GUESS,
1977
- FE_RENDER_WIKI, FE_RENDER_WIKI,
1978
- FE_RENDER_HTML_IFRAME, FE_RENDER_HTML_IFRAME,
1979
- FE_RENDER_HTML_INLINE, FE_RENDER_HTML_INLINE,
1980
- FE_RENDER_PLAIN_TEXT, FE_RENDER_PLAIN_TEXT);
19811720
/* Allow selection of HTML preview iframe height */
1982
- previewHtmlHeight = 40;
19831721
style_select_list_int("select-preview-html-ems",
19841722
"preview_html_ems",
19851723
"HTML Preview IFrame Height (EMs)",
19861724
"Height (in EMs) of the iframe used for "
19871725
"HTML preview",
1988
- previewHtmlHeight,
1726
+ 40 /*default*/,
19891727
"", 20, "", 40,
19901728
"", 60, "", 80,
19911729
"", 100, NULL);
19921730
/* Selection of line numbers for text preview */
19931731
style_labeled_checkbox("cb-line-numbers",
@@ -2189,28 +1927,28 @@
21891927
{
21901928
/* Dynamically populate the editor, display any error in the err
21911929
** blob, and/or switch to tab #0, where the file selector
21921930
** lives... */
21931931
blob_appendf(&endScript,
2194
- "window.addEventListener('load',");
1932
+ "fossil.onPageLoad(");
21951933
if(zRev && zFilename){
21961934
assert(0==blob_size(&err));
21971935
blob_appendf(&endScript,
21981936
"()=>fossil.page.loadFile(%!j,%!j)",
21991937
zFilename, cimi.zParentUuid);
22001938
}else{
2201
- blob_appendf(&endScript,"function(){");
1939
+ blob_appendf(&endScript,"function(){\n");
22021940
if(blob_size(&err)>0){
22031941
blob_appendf(&endScript,
22041942
"fossil.error(%!j);\n",
22051943
blob_str(&err));
22061944
}
22071945
blob_appendf(&endScript,
22081946
"fossil.page.tabs.switchToTab(0);\n");
22091947
blob_appendf(&endScript,"}");
22101948
}
2211
- blob_appendf(&endScript,", false);\n");
1949
+ blob_appendf(&endScript,");\n");
22121950
}
22131951
22141952
blob_reset(&err);
22151953
CheckinMiniInfo_cleanup(&cimi);
22161954
style_emit_script_fossil_bootstrap(0);
@@ -2217,21 +1955,28 @@
22171955
append_diff_javascript(1);
22181956
style_emit_script_fetch(0);
22191957
style_emit_script_tabs(0)/*also emits fossil.dom*/;
22201958
style_emit_script_confirmer(0);
22211959
style_emit_script_builtin(0, "fossil.storage.js");
1960
+
1961
+ /*
1962
+ ** Set up a JS-side mapping of the AJAX_RENDER_xyz values. This is
1963
+ ** used for dynamically toggling certain UI components on and off.
1964
+ ** Must come before fossil.page.fileedit.js.
1965
+ */
1966
+ ajax_emit_js_preview_modes(1);
1967
+
22221968
style_emit_script_builtin(0, "fossil.page.fileedit.js");
22231969
if(blob_size(&endScript)>0){
22241970
style_emit_script_tag(0,0);
2225
- CX("(function(){\n");
2226
- CX("try{\n%b\n}"
1971
+ CX("\n(function(){\n");
1972
+ CX("try{\n%b}\n"
22271973
"catch(e){"
2228
- "fossil.error(e);\n"
2229
- "console.error('Exception:',e);\n"
1974
+ "fossil.error(e); console.error('Exception:',e);"
22301975
"}\n",
22311976
&endScript);
22321977
CX("})();");
22331978
style_emit_script_tag(1,0);
22341979
}
22351980
db_end_transaction(0);
22361981
style_footer();
22371982
}
22381983
--- src/fileedit.c
+++ src/fileedit.c
@@ -919,112 +919,10 @@
919 }else{
920 return 0;
921 }
922 }
923
924 enum fileedit_render_preview_flags {
925 FE_PREVIEW_LINE_NUMBERS = 1
926 };
927 enum fileedit_render_modes {
928 /* GUESS must be 0. All others have unspecified values. */
929 FE_RENDER_GUESS = 0,
930 FE_RENDER_PLAIN_TEXT,
931 FE_RENDER_HTML_IFRAME,
932 FE_RENDER_HTML_INLINE,
933 FE_RENDER_WIKI
934 };
935
936 static int fileedit_render_mode_for_mimetype(const char * zMimetype){
937 int rc = FE_RENDER_PLAIN_TEXT;
938 if( zMimetype ){
939 if( fossil_strcmp(zMimetype, "text/html")==0 ){
940 rc = FE_RENDER_HTML_IFRAME;
941 }else if( fossil_strcmp(zMimetype, "text/x-fossil-wiki")==0
942 || fossil_strcmp(zMimetype, "text/x-markdown")==0 ){
943 rc = FE_RENDER_WIKI;
944 }
945 }
946 return rc;
947 }
948
949 /*
950 ** Performs the PREVIEW mode for /filepage.
951 **
952 ** If *renderMode==FE_RENDER_GUESS then *renderMode gets set to the
953 ** mode which is guessed at for the rendering.
954 */
955 static void fileedit_render_preview(Blob * pContent,
956 const char *zFilename,
957 int flags, int * renderMode,
958 int nIframeHeightEm){
959 const char * zMime;
960 zMime = mimetype_from_name(zFilename);
961 if(FE_RENDER_GUESS==*renderMode){
962 *renderMode = fileedit_render_mode_for_mimetype(zMime);
963 }
964 switch(*renderMode){
965 case FE_RENDER_HTML_IFRAME:{
966 char * z64 = encode64(blob_str(pContent), blob_size(pContent));
967 CX("<iframe width='100%%' frameborder='0' "
968 "marginwidth='0' style='height:%dem' "
969 "marginheight='0' sandbox='allow-same-origin' "
970 "id='ifm1' src='data:text/html;base64,%z'"
971 "></iframe>",
972 nIframeHeightEm ? nIframeHeightEm : 40,
973 z64);
974 break;
975 }
976 case FE_RENDER_HTML_INLINE:{
977 CX("%b",pContent);
978 break;
979 }
980 case FE_RENDER_WIKI:
981 safe_html_context(DOCSRC_FILE);
982 wiki_render_by_mimetype(pContent, zMime);
983 break;
984 default:{
985 const char *zExt = strrchr(zFilename,'.');
986 const char *zContent = blob_str(pContent);
987 if(FE_PREVIEW_LINE_NUMBERS & flags){
988 output_text_with_line_numbers(zContent, "on");
989 }else if(zExt && zExt[1]){
990 CX("<pre><code class='language-%s'>%h</code></pre>",
991 zExt+1, zContent);
992 }else{
993 CX("<pre>%h</pre>", zContent);
994 }
995 break;
996 }
997 }
998 }
999
1000 /*
1001 ** Renders diffs for the /fileedit page. pContent is the
1002 ** locally-edited content. frid is the RID of the file's blob entry
1003 ** from which pContent is based. zManifestUuid is the checkin version
1004 ** to which RID belongs - it is purely informational, for labeling the
1005 ** diff view. isSbs is true for side-by-side diffs, false for unified.
1006 */
1007 static void fileedit_render_diff(Blob * pContent, int frid,
1008 const char * zManifestUuid,
1009 u64 diffFlags){
1010 Blob orig = empty_blob;
1011 Blob out = empty_blob;
1012
1013 content_get(frid, &orig);
1014 text_diff(&orig, pContent, &out, 0, diffFlags);
1015 if(blob_size(&out)==0){
1016 /* nothing to do */
1017 }else if(DIFF_SIDEBYSIDE & diffFlags){
1018 CX("%b",&out);
1019 }else{
1020 CX("<pre class='udiff'>%b</pre>",&out);
1021 }
1022 blob_reset(&orig);
1023 blob_reset(&out);
1024 }
1025
1026 /*
1027 ** Given a repo-relative filename and a manifest RID, returns the UUID
1028 ** of the corresponding file entry. Returns NULL if no match is
1029 ** found. If pFilePerm is not NULL, the file's permission flag value
1030 ** is written to *pFilePerm.
@@ -1044,99 +942,25 @@
1044 }
1045 db_finalize(&stmt);
1046 return zFileUuid;
1047 }
1048
1049 /*
1050 ** Helper for /fileedit_xyz routes. Clears the CGI content buffer,
1051 ** sets an error status code, and queues up a JSON response in the
1052 ** form of an object:
1053 **
1054 ** {error: formatted message}
1055 **
1056 ** After calling this, the caller should immediately return.
1057 */
1058 static void fileedit_ajax_error(int httpCode, const char * zFmt, ...){
1059 Blob msg = empty_blob;
1060 Blob content = empty_blob;
1061 va_list vargs;
1062 va_start(vargs,zFmt);
1063 blob_vappendf(&msg, zFmt, vargs);
1064 va_end(vargs);
1065 blob_appendf(&content,"{\"error\":%!j}", blob_str(&msg));
1066 blob_reset(&msg);
1067 cgi_set_content(&content);
1068 cgi_set_status(httpCode, "Error");
1069 cgi_set_content_type("application/json");
1070 }
1071
1072 /*
1073 ** Performs bootstrapping common to the /fileedit_xyz AJAX routes.
1074 ** Returns 0 if bootstrapping fails (wrong permissions), in which
1075 ** case it has reported the error and the route should immediately
1076 ** return. Returns true on success.
1077 **
1078 ** Must be passed true if the request being set up requires POST,
1079 ** else false.
1080 */
1081 static int fileedit_ajax_boostrap(int requirePost){
1082 login_check_credentials();
1083 if( !g.perm.Write ){
1084 fileedit_ajax_error(403,"Write permissions required.");
1085 return 0;
1086 }else if(0==cgi_csrf_safe(requirePost)){
1087 fileedit_ajax_error(403,
1088 "CSRF violation (make sure sending of HTTP "
1089 "Referer headers is enabled for XHR "
1090 "connections).");
1091 return 0;
1092 }
1093 return 1;
1094 }
1095 /*
1096 ** Returns true if the current user is allowed to edit the given
1097 ** filename, as determined by fileedit_is_editable(), else false,
1098 ** in which case it queues up an error response and the caller
1099 ** must return immediately.
1100 */
1101 static int fileedit_ajax_check_filename(const char * zFilename){
1102 if(0==fileedit_is_editable(zFilename)){
1103 fileedit_ajax_error(403, "File is disallowed by the "
1104 "fileedit-glob setting.");
1105 return 0;
1106 }
1107 return 1;
1108 }
1109
1110
1111 /*
1112 ** If zFn is not NULL, it is assigned the value of the first one of
1113 ** the "filename" or "fn" CGI parameters which is set.
1114 **
1115 ** If zCi is not NULL, it is assigned the value of the first one of
1116 ** the "checkin" or "ci" CGI parameters which is set.
1117 **
1118 ** If a parameter is not NULL, it will be assigned NULL if the
1119 ** corresponding parameter is not set.
1120 **
1121 ** Returns the number of non-NULL values it assigns to arguments. Thus
1122 ** if passed (&x, NULL), it returns 1 if it assigns non-NULL to *x and
1123 ** 0 if it assigns NULL to *x.
1124 */
1125 static int fileedit_get_fnci_args( const char **zFn, const char **zCi ){
1126 int rc = 0;
1127 if(zCi!=0){
1128 *zCi = PD("checkin",P("ci"));
1129 if( *zCi ) ++rc;
1130 }
1131 if(zFn!=0){
1132 *zFn = PD("filename",P("fn"));
1133 if (*zFn) ++rc;
1134 }
1135 return rc;
1136 }
1137
1138 /*
1139 ** Passed the values of the "checkin" and "filename" request
1140 ** properties, this function verifies that they are valid and
1141 ** populates:
1142 **
@@ -1166,22 +990,22 @@
1166 if(checkFile && !fileedit_ajax_check_filename(zFilename)){
1167 return 0;
1168 }
1169 *vid = symbolic_name_to_rid(zRev, "ci");
1170 if(0==*vid){
1171 fileedit_ajax_error(404,"Cannot resolve name as a checkin: %s",
1172 zRev);
1173 return 0;
1174 }else if(*vid<0){
1175 fileedit_ajax_error(400,"Checkin name is ambiguous: %s",
1176 zRev);
1177 return 0;
1178 }
1179 if(checkFile){
1180 zFileUuid = fileedit_file_uuid(zFilename, *vid, 0);
1181 if(zFileUuid==0){
1182 fileedit_ajax_error(404,"Checkin does not contain file.");
1183 return 0;
1184 }
1185 }
1186 if(zRevUuid!=0){
1187 *zRevUuid = rid_to_uuid(*vid);
@@ -1205,11 +1029,11 @@
1205 ** checkin=CHECKIN_NAME
1206 **
1207 ** User must have Write access to use this page.
1208 **
1209 ** Responds with the raw content of the given page. On error it
1210 ** produces a JSON response as documented for fileedit_ajax_error().
1211 **
1212 ** Extra response headers:
1213 **
1214 ** x-fileedit-file-perm: empty or "x" or "l", representing PERM_REG,
1215 ** PERM_EXE, or PERM_LINK, respectively.
@@ -1221,12 +1045,12 @@
1221 const char * zRev = 0;
1222 int vid, frid;
1223 Blob content = empty_blob;
1224 const char * zMime;
1225
1226 fileedit_get_fnci_args( &zFilename, &zRev );
1227 if(!fileedit_ajax_boostrap(0)
1228 || !fileedit_ajax_setup_filerev(zRev, 0, &vid,
1229 zFilename, &frid)){
1230 return;
1231 }
1232 zMime = mimetype_from_name(zFilename);
@@ -1256,81 +1080,10 @@
1256 }
1257 cgi_set_content_type(zMime);
1258 cgi_set_content(&content);
1259 }
1260
1261 /*
1262 ** AJAX route /fileedit?ajax=preview
1263 **
1264 ** Required query parameters:
1265 **
1266 ** filename=FILENAME
1267 ** content=text
1268 **
1269 ** Optional query parameters:
1270 **
1271 ** render_mode=integer (FE_RENDER_xxx) (default=FE_RENDER_GUESS)
1272 **
1273 ** ln=0 or 1 to disable/enable line number mode in
1274 ** FE_RENDER_PLAIN_TEXT mode.
1275 **
1276 ** iframe_height=integer (default=40) Height, in EMs of HTML preview
1277 ** iframe.
1278 **
1279 ** User must have Write access to use this page.
1280 **
1281 ** Responds with the HTML content of the preview. On error it produces
1282 ** a JSON response as documented for fileedit_ajax_error().
1283 **
1284 ** Extra response headers:
1285 **
1286 ** x-fileedit-render-mode: string representing the rendering mode
1287 ** which was really used (which will differ from the requested mode
1288 ** only if mode 0 (guess) was requested). The names are documented
1289 ** below in code and match those in the emitted JS object
1290 ** fossil.page.previewModes.
1291 */
1292 static void fileedit_ajax_preview(void){
1293 const char * zFilename = 0;
1294 const char * zContent = P("content");
1295 int renderMode = atoi(PD("render_mode","0"));
1296 int ln = atoi(PD("ln","0"));
1297 int iframeHeight = atoi(PD("iframe_height","40"));
1298 Blob content = empty_blob;
1299 const char * zRenderMode = 0;
1300 fileedit_get_fnci_args( &zFilename, 0 );
1301 if(!fileedit_ajax_boostrap(1)
1302 || !fileedit_ajax_check_filename(zFilename)){
1303 return;
1304 }
1305 cgi_set_content_type("text/html");
1306 blob_init(&content, zContent, -1);
1307 fileedit_render_preview(&content, zFilename,
1308 ln ? FE_PREVIEW_LINE_NUMBERS : 0,
1309 &renderMode, iframeHeight);
1310 /*
1311 ** Now tell the caller if we did indeed use FE_RENDER_WIKI, so that
1312 ** they can re-set the <base href> to an appropriate value (which
1313 ** requires knowing the content's current checkin version, which we
1314 ** don't have here).
1315 */
1316 switch(renderMode){
1317 /* The strings used here MUST correspond to those used in the JS-side
1318 ** fossil.page.previewModes map.
1319 */
1320 case FE_RENDER_WIKI: zRenderMode = "wiki"; break;
1321 case FE_RENDER_HTML_INLINE: zRenderMode = "htmlInline"; break;
1322 case FE_RENDER_HTML_IFRAME: zRenderMode = "htmlIframe"; break;
1323 case FE_RENDER_PLAIN_TEXT: zRenderMode = "text"; break;
1324 case FE_RENDER_GUESS:
1325 assert(!"cannot happen");
1326 }
1327 if(zRenderMode!=0){
1328 cgi_printf_header("x-fileedit-render-mode: %s\r\n", zRenderMode);
1329 }
1330 }
1331
1332 /*
1333 ** AJAX route /fileedit?ajax=diff
1334 **
1335 ** Required query parameters:
1336 **
@@ -1348,11 +1101,11 @@
1348 ** patch-style siff can be produced.
1349 **
1350 ** User must have Write access to use this page.
1351 **
1352 ** Responds with the HTML content of the diff. On error it produces a
1353 ** JSON response as documented for fileedit_ajax_error().
1354 */
1355 static void fileedit_ajax_diff(void){
1356 /*
1357 ** Reminder: we only need the filename to perform valdiation
1358 ** against fileedit_is_editable(), else this route could be
@@ -1378,22 +1131,27 @@
1378 diffFlags |= DIFF_IGNORE_ALLWS;
1379 }else if(1==iFlag){
1380 diffFlags |= DIFF_IGNORE_EOLWS;
1381 }
1382 diffFlags |= DIFF_STRIP_EOLCR;
1383 fileedit_get_fnci_args( &zFilename, &zRev );
1384 if(!fileedit_ajax_boostrap(1)
1385 || !fileedit_ajax_setup_filerev(zRev, &zRevUuid, &vid,
1386 zFilename, &frid)){
1387 return;
1388 }
1389 if(!zContent){
1390 zContent = "";
1391 }
1392 cgi_set_content_type("text/html");
1393 blob_init(&content, zContent, -1);
1394 fileedit_render_diff(&content, frid, zRevUuid, diffFlags);
 
 
 
 
 
1395 fossil_free(zRevUuid);
1396 blob_reset(&content);
1397 }
1398
1399 /*
@@ -1558,19 +1316,19 @@
1558 ** checkin: UUID,
1559 ** editableFiles: [ filename1, ... filenameN ] // sorted by name
1560 ** }
1561 **
1562 ** On error it produces a JSON response as documented for
1563 ** fileedit_ajax_error().
1564 */
1565 static void fileedit_ajax_filelist(void){
1566 const char * zCi = PD("checkin",P("ci"));
1567 Blob sql = empty_blob;
1568 Stmt q = empty_Stmt;
1569 int i = 0;
1570
1571 if(!fileedit_ajax_boostrap(0)){
1572 return;
1573 }
1574 cgi_set_content_type("application/json");
1575 if(zCi!=0){
1576 char * zCiFull = 0;
@@ -1617,11 +1375,11 @@
1617 CX("}");
1618 }
1619 CX("]");
1620 db_finalize(&q);
1621 }else{
1622 fileedit_ajax_error(500, "Unhandled URL argument.");
1623 }
1624 }
1625
1626 /*
1627 ** AJAX route /fileedit?ajax=commit
@@ -1658,11 +1416,11 @@
1658 ** dryRun: bool,
1659 ** manifest: text of manifest,
1660 ** }
1661 **
1662 ** On error it produces a JSON response as documented for
1663 ** fileedit_ajax_error().
1664 */
1665 static void fileedit_ajax_commit(void){
1666 Blob err = empty_blob; /* Error messages */
1667 Blob manifest = empty_blob; /* raw new manifest */
1668 CheckinMiniInfo cimi; /* checkin state */
@@ -1670,30 +1428,30 @@
1670 int newVid = 0; /* new version's RID */
1671 char * zNewUuid = 0; /* newVid's UUID */
1672 char const * zMimetype;
1673 char * zBranch = 0;
1674
1675 if(!fileedit_ajax_boostrap(1)){
1676 return;
1677 }
1678 db_begin_transaction();
1679 CheckinMiniInfo_init(&cimi);
1680 rc = fileedit_setup_cimi_from_p(&cimi, &err, 0);
1681 if(0!=rc){
1682 fileedit_ajax_error(rc,"%b",&err);
1683 goto end_cleanup;
1684 }
1685 if(blob_size(&cimi.comment)==0){
1686 fileedit_ajax_error(400,"Empty checkin comment is not permitted.");
1687 goto end_cleanup;
1688 }
1689 if(0!=atoi(PD("include_manifest","0"))){
1690 cimi.pMfOut = &manifest;
1691 }
1692 checkin_mini(&cimi, &newVid, &err);
1693 if(blob_size(&err)){
1694 fileedit_ajax_error(500,"%b",&err);
1695 goto end_cleanup;
1696 }
1697 assert(newVid>0);
1698 zNewUuid = rid_to_uuid(newVid);
1699 cgi_set_content_type("application/json");
@@ -1748,21 +1506,20 @@
1748 ** use of the name parameter.
1749 **
1750 ** Which additional parameters are used by each distinct ajax value is
1751 ** an internal implementation detail and may change with any given
1752 ** build of this code. An unknown "name" value triggers an error, as
1753 ** documented for fileedit_ajax_error().
1754 */
1755 void fileedit_page(void){
1756 const char * zFilename = 0; /* filename. We'll accept 'name'
1757 because that param is handled
1758 specially by the core. */
1759 const char * zRev = 0; /* checkin version */
1760 const char * zFileMime = 0; /* File mime type guess */
1761 CheckinMiniInfo cimi; /* Checkin state */
1762 int previewHtmlHeight = 0; /* iframe height (EMs) */
1763 int previewRenderMode = FE_RENDER_GUESS; /* preview mode */
1764 Blob err = empty_blob; /* Error report */
1765 Blob endScript = empty_blob; /* Script code to run at the
1766 end. This content will be
1767 combined into a single JS
1768 function call, thus each
@@ -1773,21 +1530,21 @@
1773
1774 /* Allow no access to this page without check-in privilege */
1775 login_check_credentials();
1776 if( !g.perm.Write ){
1777 if(zAjax!=0){
1778 fileedit_ajax_error(403, "Write permissions required.");
1779 }else{
1780 login_needed(g.anon.Write);
1781 }
1782 return;
1783 }
1784 /* No access to anything on this page if the fileedit-glob is empty */
1785 if( fileedit_glob()==0 ){
1786 if(zAjax!=0){
1787 fileedit_ajax_error(403, "Online editing is disabled for this "
1788 "repository.");
1789 return;
1790 }
1791 style_header("File Editor (disabled)");
1792 CX("<h1>Online File Editing Is Disabled</h1>\n");
1793 if( g.perm.Admin ){
@@ -1807,22 +1564,21 @@
1807 /* Dispatch AJAX methods based tail of the request URI.
1808 ** The AJAX parts do their own permissions/CSRF check and
1809 ** fail with a JSON-format response if needed.
1810 */
1811 if( 0!=zAjax ){
 
1812 if(0==strcmp("content",zAjax)){
1813 fileedit_ajax_content();
1814 }else if(0==strcmp("preview",zAjax)){
1815 fileedit_ajax_preview();
1816 }else if(0==strcmp("filelist",zAjax)){
1817 fileedit_ajax_filelist();
1818 }else if(0==strcmp("diff",zAjax)){
1819 fileedit_ajax_diff();
1820 }else if(0==strcmp("commit",zAjax)){
1821 fileedit_ajax_commit();
1822 }else{
1823 fileedit_ajax_error(500, "Unhandled ajax route name.");
1824 }
1825 return;
1826 }
1827
1828 db_begin_transaction();
@@ -1855,21 +1611,19 @@
1855 ** render the errors. Any up-coming errors, barring malloc failure
1856 ** or similar, are not "that" fatal. We can/should continue
1857 ** rendering the page, then output the error message at the end.
1858 ********************************************************************/
1859
1860 {
1861 /* The CSS for this page lives in a common file but much of it we
1862 ** don't want inadvertently being used by other pages. We don't
1863 ** have a common, page-specific container we can filter our CSS
1864 ** selectors, but we do have the BODY, which we can decorate with
1865 ** whatever CSS we wish...
1866 */
1867 style_emit_script_tag(0,0);
1868 CX("document.body.classList.add('fileedit');\n");
1869 style_emit_script_tag(1,0);
1870 }
1871
1872 /* Status bar */
1873 CX("<div id='fossil-status-bar' "
1874 "title='Status message area. Double-click to clear them.'>"
1875 "Status messages will go here.</div>\n"
@@ -1948,46 +1702,30 @@
1948 "If on, the preview will automatically "
1949 "refresh when this tab is selected.");
1950
1951 /* Default preview rendering mode selection... */
1952 previewRenderMode = zFileMime
1953 ? fileedit_render_mode_for_mimetype(zFileMime)
1954 : FE_RENDER_GUESS;
1955 style_select_list_int("select-preview-mode",
1956 "preview_render_mode",
1957 "Preview Mode",
1958 "Preview mode format.",
1959 previewRenderMode,
1960 "Guess", FE_RENDER_GUESS,
1961 "Wiki/Markdown", FE_RENDER_WIKI,
1962 "HTML (iframe)", FE_RENDER_HTML_IFRAME,
1963 "HTML (inline)", FE_RENDER_HTML_INLINE,
1964 "Plain Text", FE_RENDER_PLAIN_TEXT,
1965 NULL);
1966 /*
1967 ** Set up a JS-side mapping of the FE_RENDER_xyz values. This is
1968 ** used for dynamically toggling certain UI components on and off.
1969 */
1970 blob_appendf(&endScript, "fossil.page.previewModes={"
1971 "guess: %d, %d: 'guess', wiki: %d, %d: 'wiki',"
1972 "htmlIframe: %d, %d: 'htmlIframe', "
1973 "htmlInline: %d, %d: 'htmlInline', "
1974 "text: %d, %d: 'text'"
1975 "};\n",
1976 FE_RENDER_GUESS, FE_RENDER_GUESS,
1977 FE_RENDER_WIKI, FE_RENDER_WIKI,
1978 FE_RENDER_HTML_IFRAME, FE_RENDER_HTML_IFRAME,
1979 FE_RENDER_HTML_INLINE, FE_RENDER_HTML_INLINE,
1980 FE_RENDER_PLAIN_TEXT, FE_RENDER_PLAIN_TEXT);
1981 /* Allow selection of HTML preview iframe height */
1982 previewHtmlHeight = 40;
1983 style_select_list_int("select-preview-html-ems",
1984 "preview_html_ems",
1985 "HTML Preview IFrame Height (EMs)",
1986 "Height (in EMs) of the iframe used for "
1987 "HTML preview",
1988 previewHtmlHeight,
1989 "", 20, "", 40,
1990 "", 60, "", 80,
1991 "", 100, NULL);
1992 /* Selection of line numbers for text preview */
1993 style_labeled_checkbox("cb-line-numbers",
@@ -2189,28 +1927,28 @@
2189 {
2190 /* Dynamically populate the editor, display any error in the err
2191 ** blob, and/or switch to tab #0, where the file selector
2192 ** lives... */
2193 blob_appendf(&endScript,
2194 "window.addEventListener('load',");
2195 if(zRev && zFilename){
2196 assert(0==blob_size(&err));
2197 blob_appendf(&endScript,
2198 "()=>fossil.page.loadFile(%!j,%!j)",
2199 zFilename, cimi.zParentUuid);
2200 }else{
2201 blob_appendf(&endScript,"function(){");
2202 if(blob_size(&err)>0){
2203 blob_appendf(&endScript,
2204 "fossil.error(%!j);\n",
2205 blob_str(&err));
2206 }
2207 blob_appendf(&endScript,
2208 "fossil.page.tabs.switchToTab(0);\n");
2209 blob_appendf(&endScript,"}");
2210 }
2211 blob_appendf(&endScript,", false);\n");
2212 }
2213
2214 blob_reset(&err);
2215 CheckinMiniInfo_cleanup(&cimi);
2216 style_emit_script_fossil_bootstrap(0);
@@ -2217,21 +1955,28 @@
2217 append_diff_javascript(1);
2218 style_emit_script_fetch(0);
2219 style_emit_script_tabs(0)/*also emits fossil.dom*/;
2220 style_emit_script_confirmer(0);
2221 style_emit_script_builtin(0, "fossil.storage.js");
 
 
 
 
 
 
 
 
2222 style_emit_script_builtin(0, "fossil.page.fileedit.js");
2223 if(blob_size(&endScript)>0){
2224 style_emit_script_tag(0,0);
2225 CX("(function(){\n");
2226 CX("try{\n%b\n}"
2227 "catch(e){"
2228 "fossil.error(e);\n"
2229 "console.error('Exception:',e);\n"
2230 "}\n",
2231 &endScript);
2232 CX("})();");
2233 style_emit_script_tag(1,0);
2234 }
2235 db_end_transaction(0);
2236 style_footer();
2237 }
2238
--- src/fileedit.c
+++ src/fileedit.c
@@ -919,112 +919,10 @@
919 }else{
920 return 0;
921 }
922 }
923
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
924 /*
925 ** Given a repo-relative filename and a manifest RID, returns the UUID
926 ** of the corresponding file entry. Returns NULL if no match is
927 ** found. If pFilePerm is not NULL, the file's permission flag value
928 ** is written to *pFilePerm.
@@ -1044,99 +942,25 @@
942 }
943 db_finalize(&stmt);
944 return zFileUuid;
945 }
946
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
947 /*
948 ** Returns true if the current user is allowed to edit the given
949 ** filename, as determined by fileedit_is_editable(), else false,
950 ** in which case it queues up an error response and the caller
951 ** must return immediately.
952 */
953 static int fileedit_ajax_check_filename(const char * zFilename){
954 if(0==fileedit_is_editable(zFilename)){
955 ajax_route_error(403, "File is disallowed by the "
956 "fileedit-glob setting.");
957 return 0;
958 }
959 return 1;
960 }
961
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
962 /*
963 ** Passed the values of the "checkin" and "filename" request
964 ** properties, this function verifies that they are valid and
965 ** populates:
966 **
@@ -1166,22 +990,22 @@
990 if(checkFile && !fileedit_ajax_check_filename(zFilename)){
991 return 0;
992 }
993 *vid = symbolic_name_to_rid(zRev, "ci");
994 if(0==*vid){
995 ajax_route_error(404,"Cannot resolve name as a checkin: %s",
996 zRev);
997 return 0;
998 }else if(*vid<0){
999 ajax_route_error(400,"Checkin name is ambiguous: %s",
1000 zRev);
1001 return 0;
1002 }
1003 if(checkFile){
1004 zFileUuid = fileedit_file_uuid(zFilename, *vid, 0);
1005 if(zFileUuid==0){
1006 ajax_route_error(404, "Checkin does not contain file.");
1007 return 0;
1008 }
1009 }
1010 if(zRevUuid!=0){
1011 *zRevUuid = rid_to_uuid(*vid);
@@ -1205,11 +1029,11 @@
1029 ** checkin=CHECKIN_NAME
1030 **
1031 ** User must have Write access to use this page.
1032 **
1033 ** Responds with the raw content of the given page. On error it
1034 ** produces a JSON response as documented for ajax_route_error().
1035 **
1036 ** Extra response headers:
1037 **
1038 ** x-fileedit-file-perm: empty or "x" or "l", representing PERM_REG,
1039 ** PERM_EXE, or PERM_LINK, respectively.
@@ -1221,12 +1045,12 @@
1045 const char * zRev = 0;
1046 int vid, frid;
1047 Blob content = empty_blob;
1048 const char * zMime;
1049
1050 ajax_get_fnci_args( &zFilename, &zRev );
1051 if(!ajax_route_bootstrap(1,0)
1052 || !fileedit_ajax_setup_filerev(zRev, 0, &vid,
1053 zFilename, &frid)){
1054 return;
1055 }
1056 zMime = mimetype_from_name(zFilename);
@@ -1256,81 +1080,10 @@
1080 }
1081 cgi_set_content_type(zMime);
1082 cgi_set_content(&content);
1083 }
1084
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1085 /*
1086 ** AJAX route /fileedit?ajax=diff
1087 **
1088 ** Required query parameters:
1089 **
@@ -1348,11 +1101,11 @@
1101 ** patch-style siff can be produced.
1102 **
1103 ** User must have Write access to use this page.
1104 **
1105 ** Responds with the HTML content of the diff. On error it produces a
1106 ** JSON response as documented for ajax_route_error().
1107 */
1108 static void fileedit_ajax_diff(void){
1109 /*
1110 ** Reminder: we only need the filename to perform valdiation
1111 ** against fileedit_is_editable(), else this route could be
@@ -1378,22 +1131,27 @@
1131 diffFlags |= DIFF_IGNORE_ALLWS;
1132 }else if(1==iFlag){
1133 diffFlags |= DIFF_IGNORE_EOLWS;
1134 }
1135 diffFlags |= DIFF_STRIP_EOLCR;
1136 ajax_get_fnci_args( &zFilename, &zRev );
1137 if(!ajax_route_bootstrap(1,1)
1138 || !fileedit_ajax_setup_filerev(zRev, &zRevUuid, &vid,
1139 zFilename, &frid)){
1140 return;
1141 }
1142 if(!zContent){
1143 zContent = "";
1144 }
1145 cgi_set_content_type("text/html");
1146 blob_init(&content, zContent, -1);
1147 {
1148 Blob orig = empty_blob;
1149 content_get(frid, &orig);
1150 ajax_render_diff(&orig, &content, diffFlags);
1151 blob_reset(&orig);
1152 }
1153 fossil_free(zRevUuid);
1154 blob_reset(&content);
1155 }
1156
1157 /*
@@ -1558,19 +1316,19 @@
1316 ** checkin: UUID,
1317 ** editableFiles: [ filename1, ... filenameN ] // sorted by name
1318 ** }
1319 **
1320 ** On error it produces a JSON response as documented for
1321 ** ajax_route_error().
1322 */
1323 static void fileedit_ajax_filelist(void){
1324 const char * zCi = PD("checkin",P("ci"));
1325 Blob sql = empty_blob;
1326 Stmt q = empty_Stmt;
1327 int i = 0;
1328
1329 if(!ajax_route_bootstrap(1,0)){
1330 return;
1331 }
1332 cgi_set_content_type("application/json");
1333 if(zCi!=0){
1334 char * zCiFull = 0;
@@ -1617,11 +1375,11 @@
1375 CX("}");
1376 }
1377 CX("]");
1378 db_finalize(&q);
1379 }else{
1380 ajax_route_error(500, "Unhandled URL argument.");
1381 }
1382 }
1383
1384 /*
1385 ** AJAX route /fileedit?ajax=commit
@@ -1658,11 +1416,11 @@
1416 ** dryRun: bool,
1417 ** manifest: text of manifest,
1418 ** }
1419 **
1420 ** On error it produces a JSON response as documented for
1421 ** ajax_route_error().
1422 */
1423 static void fileedit_ajax_commit(void){
1424 Blob err = empty_blob; /* Error messages */
1425 Blob manifest = empty_blob; /* raw new manifest */
1426 CheckinMiniInfo cimi; /* checkin state */
@@ -1670,30 +1428,30 @@
1428 int newVid = 0; /* new version's RID */
1429 char * zNewUuid = 0; /* newVid's UUID */
1430 char const * zMimetype;
1431 char * zBranch = 0;
1432
1433 if(!ajax_route_bootstrap(1,1)){
1434 return;
1435 }
1436 db_begin_transaction();
1437 CheckinMiniInfo_init(&cimi);
1438 rc = fileedit_setup_cimi_from_p(&cimi, &err, 0);
1439 if(0!=rc){
1440 ajax_route_error(rc,"%b",&err);
1441 goto end_cleanup;
1442 }
1443 if(blob_size(&cimi.comment)==0){
1444 ajax_route_error(400,"Empty checkin comment is not permitted.");
1445 goto end_cleanup;
1446 }
1447 if(0!=atoi(PD("include_manifest","0"))){
1448 cimi.pMfOut = &manifest;
1449 }
1450 checkin_mini(&cimi, &newVid, &err);
1451 if(blob_size(&err)){
1452 ajax_route_error(500,"%b",&err);
1453 goto end_cleanup;
1454 }
1455 assert(newVid>0);
1456 zNewUuid = rid_to_uuid(newVid);
1457 cgi_set_content_type("application/json");
@@ -1748,21 +1506,20 @@
1506 ** use of the name parameter.
1507 **
1508 ** Which additional parameters are used by each distinct ajax value is
1509 ** an internal implementation detail and may change with any given
1510 ** build of this code. An unknown "name" value triggers an error, as
1511 ** documented for ajax_route_error().
1512 */
1513 void fileedit_page(void){
1514 const char * zFilename = 0; /* filename. We'll accept 'name'
1515 because that param is handled
1516 specially by the core. */
1517 const char * zRev = 0; /* checkin version */
1518 const char * zFileMime = 0; /* File mime type guess */
1519 CheckinMiniInfo cimi; /* Checkin state */
1520 int previewRenderMode = AJAX_RENDER_GUESS; /* preview mode */
 
1521 Blob err = empty_blob; /* Error report */
1522 Blob endScript = empty_blob; /* Script code to run at the
1523 end. This content will be
1524 combined into a single JS
1525 function call, thus each
@@ -1773,21 +1530,21 @@
1530
1531 /* Allow no access to this page without check-in privilege */
1532 login_check_credentials();
1533 if( !g.perm.Write ){
1534 if(zAjax!=0){
1535 ajax_route_error(403, "Write permissions required.");
1536 }else{
1537 login_needed(g.anon.Write);
1538 }
1539 return;
1540 }
1541 /* No access to anything on this page if the fileedit-glob is empty */
1542 if( fileedit_glob()==0 ){
1543 if(zAjax!=0){
1544 ajax_route_error(403, "Online editing is disabled for this "
1545 "repository.");
1546 return;
1547 }
1548 style_header("File Editor (disabled)");
1549 CX("<h1>Online File Editing Is Disabled</h1>\n");
1550 if( g.perm.Admin ){
@@ -1807,22 +1564,21 @@
1564 /* Dispatch AJAX methods based tail of the request URI.
1565 ** The AJAX parts do their own permissions/CSRF check and
1566 ** fail with a JSON-format response if needed.
1567 */
1568 if( 0!=zAjax ){
1569 /* preview mode is handled via /ajax/preview-text */
1570 if(0==strcmp("content",zAjax)){
1571 fileedit_ajax_content();
 
 
1572 }else if(0==strcmp("filelist",zAjax)){
1573 fileedit_ajax_filelist();
1574 }else if(0==strcmp("diff",zAjax)){
1575 fileedit_ajax_diff();
1576 }else if(0==strcmp("commit",zAjax)){
1577 fileedit_ajax_commit();
1578 }else{
1579 ajax_route_error(500, "Unhandled ajax route name.");
1580 }
1581 return;
1582 }
1583
1584 db_begin_transaction();
@@ -1855,21 +1611,19 @@
1611 ** render the errors. Any up-coming errors, barring malloc failure
1612 ** or similar, are not "that" fatal. We can/should continue
1613 ** rendering the page, then output the error message at the end.
1614 ********************************************************************/
1615
1616 /* The CSS for this page lives in a common file but much of it we
1617 ** don't want inadvertently being used by other pages. We don't
1618 ** have a common, page-specific container we can filter our CSS
1619 ** selectors, but we do have the BODY, which we can decorate with
1620 ** whatever CSS we wish...
1621 */
1622 style_emit_script_tag(0,0);
1623 CX("document.body.classList.add('fileedit');\n");
1624 style_emit_script_tag(1,0);
 
 
1625
1626 /* Status bar */
1627 CX("<div id='fossil-status-bar' "
1628 "title='Status message area. Double-click to clear them.'>"
1629 "Status messages will go here.</div>\n"
@@ -1948,46 +1702,30 @@
1702 "If on, the preview will automatically "
1703 "refresh when this tab is selected.");
1704
1705 /* Default preview rendering mode selection... */
1706 previewRenderMode = zFileMime
1707 ? ajax_render_mode_for_mimetype(zFileMime)
1708 : AJAX_RENDER_GUESS;
1709 style_select_list_int("select-preview-mode",
1710 "preview_render_mode",
1711 "Preview Mode",
1712 "Preview mode format.",
1713 previewRenderMode,
1714 "Guess", AJAX_RENDER_GUESS,
1715 "Wiki/Markdown", AJAX_RENDER_WIKI,
1716 "HTML (iframe)", AJAX_RENDER_HTML_IFRAME,
1717 "HTML (inline)", AJAX_RENDER_HTML_INLINE,
1718 "Plain Text", AJAX_RENDER_PLAIN_TEXT,
1719 NULL);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1720 /* Allow selection of HTML preview iframe height */
 
1721 style_select_list_int("select-preview-html-ems",
1722 "preview_html_ems",
1723 "HTML Preview IFrame Height (EMs)",
1724 "Height (in EMs) of the iframe used for "
1725 "HTML preview",
1726 40 /*default*/,
1727 "", 20, "", 40,
1728 "", 60, "", 80,
1729 "", 100, NULL);
1730 /* Selection of line numbers for text preview */
1731 style_labeled_checkbox("cb-line-numbers",
@@ -2189,28 +1927,28 @@
1927 {
1928 /* Dynamically populate the editor, display any error in the err
1929 ** blob, and/or switch to tab #0, where the file selector
1930 ** lives... */
1931 blob_appendf(&endScript,
1932 "fossil.onPageLoad(");
1933 if(zRev && zFilename){
1934 assert(0==blob_size(&err));
1935 blob_appendf(&endScript,
1936 "()=>fossil.page.loadFile(%!j,%!j)",
1937 zFilename, cimi.zParentUuid);
1938 }else{
1939 blob_appendf(&endScript,"function(){\n");
1940 if(blob_size(&err)>0){
1941 blob_appendf(&endScript,
1942 "fossil.error(%!j);\n",
1943 blob_str(&err));
1944 }
1945 blob_appendf(&endScript,
1946 "fossil.page.tabs.switchToTab(0);\n");
1947 blob_appendf(&endScript,"}");
1948 }
1949 blob_appendf(&endScript,");\n");
1950 }
1951
1952 blob_reset(&err);
1953 CheckinMiniInfo_cleanup(&cimi);
1954 style_emit_script_fossil_bootstrap(0);
@@ -2217,21 +1955,28 @@
1955 append_diff_javascript(1);
1956 style_emit_script_fetch(0);
1957 style_emit_script_tabs(0)/*also emits fossil.dom*/;
1958 style_emit_script_confirmer(0);
1959 style_emit_script_builtin(0, "fossil.storage.js");
1960
1961 /*
1962 ** Set up a JS-side mapping of the AJAX_RENDER_xyz values. This is
1963 ** used for dynamically toggling certain UI components on and off.
1964 ** Must come before fossil.page.fileedit.js.
1965 */
1966 ajax_emit_js_preview_modes(1);
1967
1968 style_emit_script_builtin(0, "fossil.page.fileedit.js");
1969 if(blob_size(&endScript)>0){
1970 style_emit_script_tag(0,0);
1971 CX("\n(function(){\n");
1972 CX("try{\n%b}\n"
1973 "catch(e){"
1974 "fossil.error(e); console.error('Exception:',e);"
 
1975 "}\n",
1976 &endScript);
1977 CX("})();");
1978 style_emit_script_tag(1,0);
1979 }
1980 db_end_transaction(0);
1981 style_footer();
1982 }
1983
--- src/fossil.page.fileedit.js
+++ src/fossil.page.fileedit.js
@@ -1104,13 +1104,13 @@
11041104
fd.append('ln',E('[name=preview_ln]').checked ? 1 : 0);
11051105
fd.append('iframe_height', E('[name=preview_html_ems]').value);
11061106
fd.append('content',content || '');
11071107
F.message(
11081108
"Fetching preview..."
1109
- ).fetch('fileedit/preview',{
1109
+ ).fetch('ajax/preview-text',{
11101110
payload: fd,
1111
- responseHeaders: 'x-fileedit-render-mode',
1111
+ responseHeaders: 'x-ajax-render-mode',
11121112
onload: (r,header)=>{
11131113
P.selectPreviewMode(P.previewModes[header]);
11141114
if('wiki'===header) P.baseHrefForFile();
11151115
else P.baseHrefRestore();
11161116
callback(r);
11171117
--- src/fossil.page.fileedit.js
+++ src/fossil.page.fileedit.js
@@ -1104,13 +1104,13 @@
1104 fd.append('ln',E('[name=preview_ln]').checked ? 1 : 0);
1105 fd.append('iframe_height', E('[name=preview_html_ems]').value);
1106 fd.append('content',content || '');
1107 F.message(
1108 "Fetching preview..."
1109 ).fetch('fileedit/preview',{
1110 payload: fd,
1111 responseHeaders: 'x-fileedit-render-mode',
1112 onload: (r,header)=>{
1113 P.selectPreviewMode(P.previewModes[header]);
1114 if('wiki'===header) P.baseHrefForFile();
1115 else P.baseHrefRestore();
1116 callback(r);
1117
--- src/fossil.page.fileedit.js
+++ src/fossil.page.fileedit.js
@@ -1104,13 +1104,13 @@
1104 fd.append('ln',E('[name=preview_ln]').checked ? 1 : 0);
1105 fd.append('iframe_height', E('[name=preview_html_ems]').value);
1106 fd.append('content',content || '');
1107 F.message(
1108 "Fetching preview..."
1109 ).fetch('ajax/preview-text',{
1110 payload: fd,
1111 responseHeaders: 'x-ajax-render-mode',
1112 onload: (r,header)=>{
1113 P.selectPreviewMode(P.previewModes[header]);
1114 if('wiki'===header) P.baseHrefForFile();
1115 else P.baseHrefRestore();
1116 callback(r);
1117
+12
--- src/main.mk
+++ src/main.mk
@@ -15,10 +15,11 @@
1515
1616
TESTFLAGS := -quiet
1717
1818
SRC = \
1919
$(SRCDIR)/add.c \
20
+ $(SRCDIR)/ajax.c \
2021
$(SRCDIR)/alerts.c \
2122
$(SRCDIR)/allrepo.c \
2223
$(SRCDIR)/attach.c \
2324
$(SRCDIR)/backlink.c \
2425
$(SRCDIR)/backoffice.c \
@@ -259,10 +260,11 @@
259260
$(SRCDIR)/useredit.js \
260261
$(SRCDIR)/wiki.wiki
261262
262263
TRANS_SRC = \
263264
$(OBJDIR)/add_.c \
265
+ $(OBJDIR)/ajax_.c \
264266
$(OBJDIR)/alerts_.c \
265267
$(OBJDIR)/allrepo_.c \
266268
$(OBJDIR)/attach_.c \
267269
$(OBJDIR)/backlink_.c \
268270
$(OBJDIR)/backoffice_.c \
@@ -403,10 +405,11 @@
403405
$(OBJDIR)/xfersetup_.c \
404406
$(OBJDIR)/zip_.c
405407
406408
OBJ = \
407409
$(OBJDIR)/add.o \
410
+ $(OBJDIR)/ajax.o \
408411
$(OBJDIR)/alerts.o \
409412
$(OBJDIR)/allrepo.o \
410413
$(OBJDIR)/attach.o \
411414
$(OBJDIR)/backlink.o \
412415
$(OBJDIR)/backoffice.o \
@@ -740,10 +743,11 @@
740743
$(OBJDIR)/builtin_data.h: $(OBJDIR)/mkbuiltin $(EXTRA_FILES)
741744
$(OBJDIR)/mkbuiltin --prefix $(SRCDIR)/ $(EXTRA_FILES) >$@
742745
743746
$(OBJDIR)/headers: $(OBJDIR)/page_index.h $(OBJDIR)/builtin_data.h $(OBJDIR)/default_css.h $(OBJDIR)/makeheaders $(OBJDIR)/VERSION.h
744747
$(OBJDIR)/makeheaders $(OBJDIR)/add_.c:$(OBJDIR)/add.h \
748
+ $(OBJDIR)/ajax_.c:$(OBJDIR)/ajax.h \
745749
$(OBJDIR)/alerts_.c:$(OBJDIR)/alerts.h \
746750
$(OBJDIR)/allrepo_.c:$(OBJDIR)/allrepo.h \
747751
$(OBJDIR)/attach_.c:$(OBJDIR)/attach.h \
748752
$(OBJDIR)/backlink_.c:$(OBJDIR)/backlink.h \
749753
$(OBJDIR)/backoffice_.c:$(OBJDIR)/backoffice.h \
@@ -895,10 +899,18 @@
895899
896900
$(OBJDIR)/add.o: $(OBJDIR)/add_.c $(OBJDIR)/add.h $(SRCDIR)/config.h
897901
$(XTCC) -o $(OBJDIR)/add.o -c $(OBJDIR)/add_.c
898902
899903
$(OBJDIR)/add.h: $(OBJDIR)/headers
904
+
905
+$(OBJDIR)/ajax_.c: $(SRCDIR)/ajax.c $(OBJDIR)/translate
906
+ $(OBJDIR)/translate $(SRCDIR)/ajax.c >$@
907
+
908
+$(OBJDIR)/ajax.o: $(OBJDIR)/ajax_.c $(OBJDIR)/ajax.h $(SRCDIR)/config.h
909
+ $(XTCC) -o $(OBJDIR)/ajax.o -c $(OBJDIR)/ajax_.c
910
+
911
+$(OBJDIR)/ajax.h: $(OBJDIR)/headers
900912
901913
$(OBJDIR)/alerts_.c: $(SRCDIR)/alerts.c $(OBJDIR)/translate
902914
$(OBJDIR)/translate $(SRCDIR)/alerts.c >$@
903915
904916
$(OBJDIR)/alerts.o: $(OBJDIR)/alerts_.c $(OBJDIR)/alerts.h $(SRCDIR)/config.h
905917
--- src/main.mk
+++ src/main.mk
@@ -15,10 +15,11 @@
15
16 TESTFLAGS := -quiet
17
18 SRC = \
19 $(SRCDIR)/add.c \
 
20 $(SRCDIR)/alerts.c \
21 $(SRCDIR)/allrepo.c \
22 $(SRCDIR)/attach.c \
23 $(SRCDIR)/backlink.c \
24 $(SRCDIR)/backoffice.c \
@@ -259,10 +260,11 @@
259 $(SRCDIR)/useredit.js \
260 $(SRCDIR)/wiki.wiki
261
262 TRANS_SRC = \
263 $(OBJDIR)/add_.c \
 
264 $(OBJDIR)/alerts_.c \
265 $(OBJDIR)/allrepo_.c \
266 $(OBJDIR)/attach_.c \
267 $(OBJDIR)/backlink_.c \
268 $(OBJDIR)/backoffice_.c \
@@ -403,10 +405,11 @@
403 $(OBJDIR)/xfersetup_.c \
404 $(OBJDIR)/zip_.c
405
406 OBJ = \
407 $(OBJDIR)/add.o \
 
408 $(OBJDIR)/alerts.o \
409 $(OBJDIR)/allrepo.o \
410 $(OBJDIR)/attach.o \
411 $(OBJDIR)/backlink.o \
412 $(OBJDIR)/backoffice.o \
@@ -740,10 +743,11 @@
740 $(OBJDIR)/builtin_data.h: $(OBJDIR)/mkbuiltin $(EXTRA_FILES)
741 $(OBJDIR)/mkbuiltin --prefix $(SRCDIR)/ $(EXTRA_FILES) >$@
742
743 $(OBJDIR)/headers: $(OBJDIR)/page_index.h $(OBJDIR)/builtin_data.h $(OBJDIR)/default_css.h $(OBJDIR)/makeheaders $(OBJDIR)/VERSION.h
744 $(OBJDIR)/makeheaders $(OBJDIR)/add_.c:$(OBJDIR)/add.h \
 
745 $(OBJDIR)/alerts_.c:$(OBJDIR)/alerts.h \
746 $(OBJDIR)/allrepo_.c:$(OBJDIR)/allrepo.h \
747 $(OBJDIR)/attach_.c:$(OBJDIR)/attach.h \
748 $(OBJDIR)/backlink_.c:$(OBJDIR)/backlink.h \
749 $(OBJDIR)/backoffice_.c:$(OBJDIR)/backoffice.h \
@@ -895,10 +899,18 @@
895
896 $(OBJDIR)/add.o: $(OBJDIR)/add_.c $(OBJDIR)/add.h $(SRCDIR)/config.h
897 $(XTCC) -o $(OBJDIR)/add.o -c $(OBJDIR)/add_.c
898
899 $(OBJDIR)/add.h: $(OBJDIR)/headers
 
 
 
 
 
 
 
 
900
901 $(OBJDIR)/alerts_.c: $(SRCDIR)/alerts.c $(OBJDIR)/translate
902 $(OBJDIR)/translate $(SRCDIR)/alerts.c >$@
903
904 $(OBJDIR)/alerts.o: $(OBJDIR)/alerts_.c $(OBJDIR)/alerts.h $(SRCDIR)/config.h
905
--- src/main.mk
+++ src/main.mk
@@ -15,10 +15,11 @@
15
16 TESTFLAGS := -quiet
17
18 SRC = \
19 $(SRCDIR)/add.c \
20 $(SRCDIR)/ajax.c \
21 $(SRCDIR)/alerts.c \
22 $(SRCDIR)/allrepo.c \
23 $(SRCDIR)/attach.c \
24 $(SRCDIR)/backlink.c \
25 $(SRCDIR)/backoffice.c \
@@ -259,10 +260,11 @@
260 $(SRCDIR)/useredit.js \
261 $(SRCDIR)/wiki.wiki
262
263 TRANS_SRC = \
264 $(OBJDIR)/add_.c \
265 $(OBJDIR)/ajax_.c \
266 $(OBJDIR)/alerts_.c \
267 $(OBJDIR)/allrepo_.c \
268 $(OBJDIR)/attach_.c \
269 $(OBJDIR)/backlink_.c \
270 $(OBJDIR)/backoffice_.c \
@@ -403,10 +405,11 @@
405 $(OBJDIR)/xfersetup_.c \
406 $(OBJDIR)/zip_.c
407
408 OBJ = \
409 $(OBJDIR)/add.o \
410 $(OBJDIR)/ajax.o \
411 $(OBJDIR)/alerts.o \
412 $(OBJDIR)/allrepo.o \
413 $(OBJDIR)/attach.o \
414 $(OBJDIR)/backlink.o \
415 $(OBJDIR)/backoffice.o \
@@ -740,10 +743,11 @@
743 $(OBJDIR)/builtin_data.h: $(OBJDIR)/mkbuiltin $(EXTRA_FILES)
744 $(OBJDIR)/mkbuiltin --prefix $(SRCDIR)/ $(EXTRA_FILES) >$@
745
746 $(OBJDIR)/headers: $(OBJDIR)/page_index.h $(OBJDIR)/builtin_data.h $(OBJDIR)/default_css.h $(OBJDIR)/makeheaders $(OBJDIR)/VERSION.h
747 $(OBJDIR)/makeheaders $(OBJDIR)/add_.c:$(OBJDIR)/add.h \
748 $(OBJDIR)/ajax_.c:$(OBJDIR)/ajax.h \
749 $(OBJDIR)/alerts_.c:$(OBJDIR)/alerts.h \
750 $(OBJDIR)/allrepo_.c:$(OBJDIR)/allrepo.h \
751 $(OBJDIR)/attach_.c:$(OBJDIR)/attach.h \
752 $(OBJDIR)/backlink_.c:$(OBJDIR)/backlink.h \
753 $(OBJDIR)/backoffice_.c:$(OBJDIR)/backoffice.h \
@@ -895,10 +899,18 @@
899
900 $(OBJDIR)/add.o: $(OBJDIR)/add_.c $(OBJDIR)/add.h $(SRCDIR)/config.h
901 $(XTCC) -o $(OBJDIR)/add.o -c $(OBJDIR)/add_.c
902
903 $(OBJDIR)/add.h: $(OBJDIR)/headers
904
905 $(OBJDIR)/ajax_.c: $(SRCDIR)/ajax.c $(OBJDIR)/translate
906 $(OBJDIR)/translate $(SRCDIR)/ajax.c >$@
907
908 $(OBJDIR)/ajax.o: $(OBJDIR)/ajax_.c $(OBJDIR)/ajax.h $(SRCDIR)/config.h
909 $(XTCC) -o $(OBJDIR)/ajax.o -c $(OBJDIR)/ajax_.c
910
911 $(OBJDIR)/ajax.h: $(OBJDIR)/headers
912
913 $(OBJDIR)/alerts_.c: $(SRCDIR)/alerts.c $(OBJDIR)/translate
914 $(OBJDIR)/translate $(SRCDIR)/alerts.c >$@
915
916 $(OBJDIR)/alerts.o: $(OBJDIR)/alerts_.c $(OBJDIR)/alerts.h $(SRCDIR)/config.h
917
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -26,10 +26,11 @@
2626
# Set the separate extra_files variable further down for how to add non-C
2727
# files, such as string and BLOB resources.
2828
#
2929
set src {
3030
add
31
+ ajax
3132
alerts
3233
allrepo
3334
attach
3435
backlink
3536
backoffice
@@ -479,10 +480,11 @@
479480
writeln "\$(OBJDIR)/headers:\t\$(OBJDIR)/page_index.h \$(OBJDIR)/builtin_data.h \$(OBJDIR)/default_css.h \$(OBJDIR)/makeheaders \$(OBJDIR)/VERSION.h"
480481
writeln "\t\$(OBJDIR)/makeheaders $mhargs"
481482
writeln "\ttouch \$(OBJDIR)/headers"
482483
writeln "\$(OBJDIR)/headers: Makefile"
483484
writeln "\$(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 : \$(SRCDIR)/json_detail.h"
485
+
484486
writeln "Makefile:"
485487
set extra_h(dispatch) " \$(OBJDIR)/page_index.h "
486488
set extra_h(builtin) " \$(OBJDIR)/builtin_data.h "
487489
set extra_h(style) " \$(OBJDIR)/default_css.h "
488490
@@ -1442,11 +1444,10 @@
14421444
$(OBJDIR)\json_status$O : $(SRCDIR)\json_detail.h
14431445
$(OBJDIR)\json_tag$O : $(SRCDIR)\json_detail.h
14441446
$(OBJDIR)\json_timeline$O : $(SRCDIR)\json_detail.h
14451447
$(OBJDIR)\json_user$O : $(SRCDIR)\json_detail.h
14461448
$(OBJDIR)\json_wiki$O : $(SRCDIR)\json_detail.h
1447
-
14481449
14491450
}
14501451
foreach s [lsort $src] {
14511452
writeln "\$(OBJDIR)\\$s\$O : ${s}_.c ${s}.h"
14521453
writeln "\t\$(TCC) -o\$@ -c ${s}_.c\n"
14531454
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -26,10 +26,11 @@
26 # Set the separate extra_files variable further down for how to add non-C
27 # files, such as string and BLOB resources.
28 #
29 set src {
30 add
 
31 alerts
32 allrepo
33 attach
34 backlink
35 backoffice
@@ -479,10 +480,11 @@
479 writeln "\$(OBJDIR)/headers:\t\$(OBJDIR)/page_index.h \$(OBJDIR)/builtin_data.h \$(OBJDIR)/default_css.h \$(OBJDIR)/makeheaders \$(OBJDIR)/VERSION.h"
480 writeln "\t\$(OBJDIR)/makeheaders $mhargs"
481 writeln "\ttouch \$(OBJDIR)/headers"
482 writeln "\$(OBJDIR)/headers: Makefile"
483 writeln "\$(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 : \$(SRCDIR)/json_detail.h"
 
484 writeln "Makefile:"
485 set extra_h(dispatch) " \$(OBJDIR)/page_index.h "
486 set extra_h(builtin) " \$(OBJDIR)/builtin_data.h "
487 set extra_h(style) " \$(OBJDIR)/default_css.h "
488
@@ -1442,11 +1444,10 @@
1442 $(OBJDIR)\json_status$O : $(SRCDIR)\json_detail.h
1443 $(OBJDIR)\json_tag$O : $(SRCDIR)\json_detail.h
1444 $(OBJDIR)\json_timeline$O : $(SRCDIR)\json_detail.h
1445 $(OBJDIR)\json_user$O : $(SRCDIR)\json_detail.h
1446 $(OBJDIR)\json_wiki$O : $(SRCDIR)\json_detail.h
1447
1448
1449 }
1450 foreach s [lsort $src] {
1451 writeln "\$(OBJDIR)\\$s\$O : ${s}_.c ${s}.h"
1452 writeln "\t\$(TCC) -o\$@ -c ${s}_.c\n"
1453
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -26,10 +26,11 @@
26 # Set the separate extra_files variable further down for how to add non-C
27 # files, such as string and BLOB resources.
28 #
29 set src {
30 add
31 ajax
32 alerts
33 allrepo
34 attach
35 backlink
36 backoffice
@@ -479,10 +480,11 @@
480 writeln "\$(OBJDIR)/headers:\t\$(OBJDIR)/page_index.h \$(OBJDIR)/builtin_data.h \$(OBJDIR)/default_css.h \$(OBJDIR)/makeheaders \$(OBJDIR)/VERSION.h"
481 writeln "\t\$(OBJDIR)/makeheaders $mhargs"
482 writeln "\ttouch \$(OBJDIR)/headers"
483 writeln "\$(OBJDIR)/headers: Makefile"
484 writeln "\$(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 : \$(SRCDIR)/json_detail.h"
485
486 writeln "Makefile:"
487 set extra_h(dispatch) " \$(OBJDIR)/page_index.h "
488 set extra_h(builtin) " \$(OBJDIR)/builtin_data.h "
489 set extra_h(style) " \$(OBJDIR)/default_css.h "
490
@@ -1442,11 +1444,10 @@
1444 $(OBJDIR)\json_status$O : $(SRCDIR)\json_detail.h
1445 $(OBJDIR)\json_tag$O : $(SRCDIR)\json_detail.h
1446 $(OBJDIR)\json_timeline$O : $(SRCDIR)\json_detail.h
1447 $(OBJDIR)\json_user$O : $(SRCDIR)\json_detail.h
1448 $(OBJDIR)\json_wiki$O : $(SRCDIR)\json_detail.h
 
1449
1450 }
1451 foreach s [lsort $src] {
1452 writeln "\$(OBJDIR)\\$s\$O : ${s}_.c ${s}.h"
1453 writeln "\t\$(TCC) -o\$@ -c ${s}_.c\n"
1454
--- src/style.c
+++ src/style.c
@@ -1619,11 +1619,10 @@
16191619
** a leading slash, and has %R/ prepended to it.
16201620
**
16211621
** Meaning that no follow-up call to pass a non-0 first argument
16221622
** to close the tag. zSrc is ignored if the first argument is not
16231623
** 0.
1624
-**
16251624
*/
16261625
void style_emit_script_tag(int isCloser, const char * zSrc){
16271626
if(0==isCloser){
16281627
if(zSrc!=0 && zSrc[0]!=0){
16291628
CX("<script src='%R/%T'></script>\n", zSrc);
16301629
--- src/style.c
+++ src/style.c
@@ -1619,11 +1619,10 @@
1619 ** a leading slash, and has %R/ prepended to it.
1620 **
1621 ** Meaning that no follow-up call to pass a non-0 first argument
1622 ** to close the tag. zSrc is ignored if the first argument is not
1623 ** 0.
1624 **
1625 */
1626 void style_emit_script_tag(int isCloser, const char * zSrc){
1627 if(0==isCloser){
1628 if(zSrc!=0 && zSrc[0]!=0){
1629 CX("<script src='%R/%T'></script>\n", zSrc);
1630
--- src/style.c
+++ src/style.c
@@ -1619,11 +1619,10 @@
1619 ** a leading slash, and has %R/ prepended to it.
1620 **
1621 ** Meaning that no follow-up call to pass a non-0 first argument
1622 ** to close the tag. zSrc is ignored if the first argument is not
1623 ** 0.
 
1624 */
1625 void style_emit_script_tag(int isCloser, const char * zSrc){
1626 if(0==isCloser){
1627 if(zSrc!=0 && zSrc[0]!=0){
1628 CX("<script src='%R/%T'></script>\n", zSrc);
1629
+10 -4
--- win/Makefile.dmc
+++ win/Makefile.dmc
@@ -28,13 +28,13 @@
2828
2929
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
3030
3131
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
3232
33
-SRC = add_.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 http_.c http_socket_.c http_ssl_.c http_transport_.c import_.c info_.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 wysiwyg_.c xfer_.c xfersetup_.c zip_.c
33
+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 http_.c http_socket_.c http_ssl_.c http_transport_.c import_.c info_.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 wysiwyg_.c xfer_.c xfersetup_.c zip_.c
3434
35
-OBJ = $(OBJDIR)\add$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)\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 $(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)\wysiwyg$O $(OBJDIR)\xfer$O $(OBJDIR)\xfersetup$O $(OBJDIR)\zip$O $(OBJDIR)\shell$O $(OBJDIR)\sqlite3$O $(OBJDIR)\th$O $(OBJDIR)\th_lang$O
35
+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)\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 $(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)\wysiwyg$O $(OBJDIR)\xfer$O $(OBJDIR)\xfersetup$O $(OBJDIR)\zip$O $(OBJDIR)\shell$O $(OBJDIR)\sqlite3$O $(OBJDIR)\th$O $(OBJDIR)\th_lang$O
3636
3737
3838
RC=$(DMDIR)\bin\rcc
3939
RCFLAGS=-32 -w1 -I$(SRCDIR) /D__DMC__
4040
@@ -49,11 +49,11 @@
4949
5050
$(OBJDIR)\fossil.res: $B\win\fossil.rc
5151
$(RC) $(RCFLAGS) -o$@ $**
5252
5353
$(OBJDIR)\link: $B\win\Makefile.dmc $(OBJDIR)\fossil.res
54
- +echo add 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 http http_socket http_ssl http_transport import info 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 wysiwyg xfer xfersetup zip shell sqlite3 th th_lang > $@
54
+ +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 http http_socket http_ssl http_transport import info 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 wysiwyg xfer xfersetup zip shell sqlite3 th th_lang > $@
5555
+echo fossil >> $@
5656
+echo fossil >> $@
5757
+echo $(LIBS) >> $@
5858
+echo. >> $@
5959
+echo fossil >> $@
@@ -134,10 +134,16 @@
134134
$(OBJDIR)\add$O : add_.c add.h
135135
$(TCC) -o$@ -c add_.c
136136
137137
add_.c : $(SRCDIR)\add.c
138138
+translate$E $** > $@
139
+
140
+$(OBJDIR)\ajax$O : ajax_.c ajax.h
141
+ $(TCC) -o$@ -c ajax_.c
142
+
143
+ajax_.c : $(SRCDIR)\ajax.c
144
+ +translate$E $** > $@
139145
140146
$(OBJDIR)\alerts$O : alerts_.c alerts.h
141147
$(TCC) -o$@ -c alerts_.c
142148
143149
alerts_.c : $(SRCDIR)\alerts.c
@@ -982,7 +988,7 @@
982988
983989
zip_.c : $(SRCDIR)\zip.c
984990
+translate$E $** > $@
985991
986992
headers: makeheaders$E page_index.h builtin_data.h default_css.h VERSION.h
987
- +makeheaders$E add_.c:add.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 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 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 wysiwyg_.c:wysiwyg.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
993
+ +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 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 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 wysiwyg_.c:wysiwyg.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
988994
@copy /Y nul: headers
989995
--- win/Makefile.dmc
+++ win/Makefile.dmc
@@ -28,13 +28,13 @@
28
29 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
30
31 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
32
33 SRC = add_.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 http_.c http_socket_.c http_ssl_.c http_transport_.c import_.c info_.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 wysiwyg_.c xfer_.c xfersetup_.c zip_.c
34
35 OBJ = $(OBJDIR)\add$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)\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 $(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)\wysiwyg$O $(OBJDIR)\xfer$O $(OBJDIR)\xfersetup$O $(OBJDIR)\zip$O $(OBJDIR)\shell$O $(OBJDIR)\sqlite3$O $(OBJDIR)\th$O $(OBJDIR)\th_lang$O
36
37
38 RC=$(DMDIR)\bin\rcc
39 RCFLAGS=-32 -w1 -I$(SRCDIR) /D__DMC__
40
@@ -49,11 +49,11 @@
49
50 $(OBJDIR)\fossil.res: $B\win\fossil.rc
51 $(RC) $(RCFLAGS) -o$@ $**
52
53 $(OBJDIR)\link: $B\win\Makefile.dmc $(OBJDIR)\fossil.res
54 +echo add 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 http http_socket http_ssl http_transport import info 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 wysiwyg xfer xfersetup zip shell sqlite3 th th_lang > $@
55 +echo fossil >> $@
56 +echo fossil >> $@
57 +echo $(LIBS) >> $@
58 +echo. >> $@
59 +echo fossil >> $@
@@ -134,10 +134,16 @@
134 $(OBJDIR)\add$O : add_.c add.h
135 $(TCC) -o$@ -c add_.c
136
137 add_.c : $(SRCDIR)\add.c
138 +translate$E $** > $@
 
 
 
 
 
 
139
140 $(OBJDIR)\alerts$O : alerts_.c alerts.h
141 $(TCC) -o$@ -c alerts_.c
142
143 alerts_.c : $(SRCDIR)\alerts.c
@@ -982,7 +988,7 @@
982
983 zip_.c : $(SRCDIR)\zip.c
984 +translate$E $** > $@
985
986 headers: makeheaders$E page_index.h builtin_data.h default_css.h VERSION.h
987 +makeheaders$E add_.c:add.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 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 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 wysiwyg_.c:wysiwyg.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
988 @copy /Y nul: headers
989
--- win/Makefile.dmc
+++ win/Makefile.dmc
@@ -28,13 +28,13 @@
28
29 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
30
31 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
32
33 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 http_.c http_socket_.c http_ssl_.c http_transport_.c import_.c info_.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 wysiwyg_.c xfer_.c xfersetup_.c zip_.c
34
35 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)\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 $(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)\wysiwyg$O $(OBJDIR)\xfer$O $(OBJDIR)\xfersetup$O $(OBJDIR)\zip$O $(OBJDIR)\shell$O $(OBJDIR)\sqlite3$O $(OBJDIR)\th$O $(OBJDIR)\th_lang$O
36
37
38 RC=$(DMDIR)\bin\rcc
39 RCFLAGS=-32 -w1 -I$(SRCDIR) /D__DMC__
40
@@ -49,11 +49,11 @@
49
50 $(OBJDIR)\fossil.res: $B\win\fossil.rc
51 $(RC) $(RCFLAGS) -o$@ $**
52
53 $(OBJDIR)\link: $B\win\Makefile.dmc $(OBJDIR)\fossil.res
54 +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 http http_socket http_ssl http_transport import info 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 wysiwyg xfer xfersetup zip shell sqlite3 th th_lang > $@
55 +echo fossil >> $@
56 +echo fossil >> $@
57 +echo $(LIBS) >> $@
58 +echo. >> $@
59 +echo fossil >> $@
@@ -134,10 +134,16 @@
134 $(OBJDIR)\add$O : add_.c add.h
135 $(TCC) -o$@ -c add_.c
136
137 add_.c : $(SRCDIR)\add.c
138 +translate$E $** > $@
139
140 $(OBJDIR)\ajax$O : ajax_.c ajax.h
141 $(TCC) -o$@ -c ajax_.c
142
143 ajax_.c : $(SRCDIR)\ajax.c
144 +translate$E $** > $@
145
146 $(OBJDIR)\alerts$O : alerts_.c alerts.h
147 $(TCC) -o$@ -c alerts_.c
148
149 alerts_.c : $(SRCDIR)\alerts.c
@@ -982,7 +988,7 @@
988
989 zip_.c : $(SRCDIR)\zip.c
990 +translate$E $** > $@
991
992 headers: makeheaders$E page_index.h builtin_data.h default_css.h VERSION.h
993 +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 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 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 wysiwyg_.c:wysiwyg.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
994 @copy /Y nul: headers
995
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -437,10 +437,11 @@
437437
XBCC = $(BCC) $(CFLAGS)
438438
XTCC = $(TCC) $(CFLAGS) -I. -I$(SRCDIR)
439439
440440
SRC = \
441441
$(SRCDIR)/add.c \
442
+ $(SRCDIR)/ajax.c \
442443
$(SRCDIR)/alerts.c \
443444
$(SRCDIR)/allrepo.c \
444445
$(SRCDIR)/attach.c \
445446
$(SRCDIR)/backlink.c \
446447
$(SRCDIR)/backoffice.c \
@@ -681,10 +682,11 @@
681682
$(SRCDIR)/useredit.js \
682683
$(SRCDIR)/wiki.wiki
683684
684685
TRANS_SRC = \
685686
$(OBJDIR)/add_.c \
687
+ $(OBJDIR)/ajax_.c \
686688
$(OBJDIR)/alerts_.c \
687689
$(OBJDIR)/allrepo_.c \
688690
$(OBJDIR)/attach_.c \
689691
$(OBJDIR)/backlink_.c \
690692
$(OBJDIR)/backoffice_.c \
@@ -825,10 +827,11 @@
825827
$(OBJDIR)/xfersetup_.c \
826828
$(OBJDIR)/zip_.c
827829
828830
OBJ = \
829831
$(OBJDIR)/add.o \
832
+ $(OBJDIR)/ajax.o \
830833
$(OBJDIR)/alerts.o \
831834
$(OBJDIR)/allrepo.o \
832835
$(OBJDIR)/attach.o \
833836
$(OBJDIR)/backlink.o \
834837
$(OBJDIR)/backoffice.o \
@@ -1189,10 +1192,11 @@
11891192
$(OBJDIR)/builtin_data.h: $(MKBUILTIN) $(EXTRA_FILES)
11901193
$(MKBUILTIN) --prefix $(SRCDIR)/ $(EXTRA_FILES) >$@
11911194
11921195
$(OBJDIR)/headers: $(OBJDIR)/page_index.h $(OBJDIR)/builtin_data.h $(OBJDIR)/default_css.h $(MAKEHEADERS) $(OBJDIR)/VERSION.h
11931196
$(MAKEHEADERS) $(OBJDIR)/add_.c:$(OBJDIR)/add.h \
1197
+ $(OBJDIR)/ajax_.c:$(OBJDIR)/ajax.h \
11941198
$(OBJDIR)/alerts_.c:$(OBJDIR)/alerts.h \
11951199
$(OBJDIR)/allrepo_.c:$(OBJDIR)/allrepo.h \
11961200
$(OBJDIR)/attach_.c:$(OBJDIR)/attach.h \
11971201
$(OBJDIR)/backlink_.c:$(OBJDIR)/backlink.h \
11981202
$(OBJDIR)/backoffice_.c:$(OBJDIR)/backoffice.h \
@@ -1346,10 +1350,18 @@
13461350
13471351
$(OBJDIR)/add.o: $(OBJDIR)/add_.c $(OBJDIR)/add.h $(SRCDIR)/config.h
13481352
$(XTCC) -o $(OBJDIR)/add.o -c $(OBJDIR)/add_.c
13491353
13501354
$(OBJDIR)/add.h: $(OBJDIR)/headers
1355
+
1356
+$(OBJDIR)/ajax_.c: $(SRCDIR)/ajax.c $(TRANSLATE)
1357
+ $(TRANSLATE) $(SRCDIR)/ajax.c >$@
1358
+
1359
+$(OBJDIR)/ajax.o: $(OBJDIR)/ajax_.c $(OBJDIR)/ajax.h $(SRCDIR)/config.h
1360
+ $(XTCC) -o $(OBJDIR)/ajax.o -c $(OBJDIR)/ajax_.c
1361
+
1362
+$(OBJDIR)/ajax.h: $(OBJDIR)/headers
13511363
13521364
$(OBJDIR)/alerts_.c: $(SRCDIR)/alerts.c $(TRANSLATE)
13531365
$(TRANSLATE) $(SRCDIR)/alerts.c >$@
13541366
13551367
$(OBJDIR)/alerts.o: $(OBJDIR)/alerts_.c $(OBJDIR)/alerts.h $(SRCDIR)/config.h
13561368
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -437,10 +437,11 @@
437 XBCC = $(BCC) $(CFLAGS)
438 XTCC = $(TCC) $(CFLAGS) -I. -I$(SRCDIR)
439
440 SRC = \
441 $(SRCDIR)/add.c \
 
442 $(SRCDIR)/alerts.c \
443 $(SRCDIR)/allrepo.c \
444 $(SRCDIR)/attach.c \
445 $(SRCDIR)/backlink.c \
446 $(SRCDIR)/backoffice.c \
@@ -681,10 +682,11 @@
681 $(SRCDIR)/useredit.js \
682 $(SRCDIR)/wiki.wiki
683
684 TRANS_SRC = \
685 $(OBJDIR)/add_.c \
 
686 $(OBJDIR)/alerts_.c \
687 $(OBJDIR)/allrepo_.c \
688 $(OBJDIR)/attach_.c \
689 $(OBJDIR)/backlink_.c \
690 $(OBJDIR)/backoffice_.c \
@@ -825,10 +827,11 @@
825 $(OBJDIR)/xfersetup_.c \
826 $(OBJDIR)/zip_.c
827
828 OBJ = \
829 $(OBJDIR)/add.o \
 
830 $(OBJDIR)/alerts.o \
831 $(OBJDIR)/allrepo.o \
832 $(OBJDIR)/attach.o \
833 $(OBJDIR)/backlink.o \
834 $(OBJDIR)/backoffice.o \
@@ -1189,10 +1192,11 @@
1189 $(OBJDIR)/builtin_data.h: $(MKBUILTIN) $(EXTRA_FILES)
1190 $(MKBUILTIN) --prefix $(SRCDIR)/ $(EXTRA_FILES) >$@
1191
1192 $(OBJDIR)/headers: $(OBJDIR)/page_index.h $(OBJDIR)/builtin_data.h $(OBJDIR)/default_css.h $(MAKEHEADERS) $(OBJDIR)/VERSION.h
1193 $(MAKEHEADERS) $(OBJDIR)/add_.c:$(OBJDIR)/add.h \
 
1194 $(OBJDIR)/alerts_.c:$(OBJDIR)/alerts.h \
1195 $(OBJDIR)/allrepo_.c:$(OBJDIR)/allrepo.h \
1196 $(OBJDIR)/attach_.c:$(OBJDIR)/attach.h \
1197 $(OBJDIR)/backlink_.c:$(OBJDIR)/backlink.h \
1198 $(OBJDIR)/backoffice_.c:$(OBJDIR)/backoffice.h \
@@ -1346,10 +1350,18 @@
1346
1347 $(OBJDIR)/add.o: $(OBJDIR)/add_.c $(OBJDIR)/add.h $(SRCDIR)/config.h
1348 $(XTCC) -o $(OBJDIR)/add.o -c $(OBJDIR)/add_.c
1349
1350 $(OBJDIR)/add.h: $(OBJDIR)/headers
 
 
 
 
 
 
 
 
1351
1352 $(OBJDIR)/alerts_.c: $(SRCDIR)/alerts.c $(TRANSLATE)
1353 $(TRANSLATE) $(SRCDIR)/alerts.c >$@
1354
1355 $(OBJDIR)/alerts.o: $(OBJDIR)/alerts_.c $(OBJDIR)/alerts.h $(SRCDIR)/config.h
1356
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -437,10 +437,11 @@
437 XBCC = $(BCC) $(CFLAGS)
438 XTCC = $(TCC) $(CFLAGS) -I. -I$(SRCDIR)
439
440 SRC = \
441 $(SRCDIR)/add.c \
442 $(SRCDIR)/ajax.c \
443 $(SRCDIR)/alerts.c \
444 $(SRCDIR)/allrepo.c \
445 $(SRCDIR)/attach.c \
446 $(SRCDIR)/backlink.c \
447 $(SRCDIR)/backoffice.c \
@@ -681,10 +682,11 @@
682 $(SRCDIR)/useredit.js \
683 $(SRCDIR)/wiki.wiki
684
685 TRANS_SRC = \
686 $(OBJDIR)/add_.c \
687 $(OBJDIR)/ajax_.c \
688 $(OBJDIR)/alerts_.c \
689 $(OBJDIR)/allrepo_.c \
690 $(OBJDIR)/attach_.c \
691 $(OBJDIR)/backlink_.c \
692 $(OBJDIR)/backoffice_.c \
@@ -825,10 +827,11 @@
827 $(OBJDIR)/xfersetup_.c \
828 $(OBJDIR)/zip_.c
829
830 OBJ = \
831 $(OBJDIR)/add.o \
832 $(OBJDIR)/ajax.o \
833 $(OBJDIR)/alerts.o \
834 $(OBJDIR)/allrepo.o \
835 $(OBJDIR)/attach.o \
836 $(OBJDIR)/backlink.o \
837 $(OBJDIR)/backoffice.o \
@@ -1189,10 +1192,11 @@
1192 $(OBJDIR)/builtin_data.h: $(MKBUILTIN) $(EXTRA_FILES)
1193 $(MKBUILTIN) --prefix $(SRCDIR)/ $(EXTRA_FILES) >$@
1194
1195 $(OBJDIR)/headers: $(OBJDIR)/page_index.h $(OBJDIR)/builtin_data.h $(OBJDIR)/default_css.h $(MAKEHEADERS) $(OBJDIR)/VERSION.h
1196 $(MAKEHEADERS) $(OBJDIR)/add_.c:$(OBJDIR)/add.h \
1197 $(OBJDIR)/ajax_.c:$(OBJDIR)/ajax.h \
1198 $(OBJDIR)/alerts_.c:$(OBJDIR)/alerts.h \
1199 $(OBJDIR)/allrepo_.c:$(OBJDIR)/allrepo.h \
1200 $(OBJDIR)/attach_.c:$(OBJDIR)/attach.h \
1201 $(OBJDIR)/backlink_.c:$(OBJDIR)/backlink.h \
1202 $(OBJDIR)/backoffice_.c:$(OBJDIR)/backoffice.h \
@@ -1346,10 +1350,18 @@
1350
1351 $(OBJDIR)/add.o: $(OBJDIR)/add_.c $(OBJDIR)/add.h $(SRCDIR)/config.h
1352 $(XTCC) -o $(OBJDIR)/add.o -c $(OBJDIR)/add_.c
1353
1354 $(OBJDIR)/add.h: $(OBJDIR)/headers
1355
1356 $(OBJDIR)/ajax_.c: $(SRCDIR)/ajax.c $(TRANSLATE)
1357 $(TRANSLATE) $(SRCDIR)/ajax.c >$@
1358
1359 $(OBJDIR)/ajax.o: $(OBJDIR)/ajax_.c $(OBJDIR)/ajax.h $(SRCDIR)/config.h
1360 $(XTCC) -o $(OBJDIR)/ajax.o -c $(OBJDIR)/ajax_.c
1361
1362 $(OBJDIR)/ajax.h: $(OBJDIR)/headers
1363
1364 $(OBJDIR)/alerts_.c: $(SRCDIR)/alerts.c $(TRANSLATE)
1365 $(TRANSLATE) $(SRCDIR)/alerts.c >$@
1366
1367 $(OBJDIR)/alerts.o: $(OBJDIR)/alerts_.c $(OBJDIR)/alerts.h $(SRCDIR)/config.h
1368
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -359,10 +359,11 @@
359359
MINIZ_OPTIONS = /DMINIZ_NO_STDIO \
360360
/DMINIZ_NO_TIME \
361361
/DMINIZ_NO_ARCHIVE_APIS
362362
363363
SRC = "$(OX)\add_.c" \
364
+ "$(OX)\ajax_.c" \
364365
"$(OX)\alerts_.c" \
365366
"$(OX)\allrepo_.c" \
366367
"$(OX)\attach_.c" \
367368
"$(OX)\backlink_.c" \
368369
"$(OX)\backoffice_.c" \
@@ -601,10 +602,11 @@
601602
"$(SRCDIR)\tree.js" \
602603
"$(SRCDIR)\useredit.js" \
603604
"$(SRCDIR)\wiki.wiki"
604605
605606
OBJ = "$(OX)\add$O" \
607
+ "$(OX)\ajax$O" \
606608
"$(OX)\alerts$O" \
607609
"$(OX)\allrepo$O" \
608610
"$(OX)\attach$O" \
609611
"$(OX)\backlink$O" \
610612
"$(OX)\backoffice$O" \
@@ -826,10 +828,11 @@
826828
if exist "$(B)\win\fossil.exe.manifest" \
827829
$(MTC) -nologo -manifest "$(B)\win\fossil.exe.manifest" -outputresource:$@;1
828830
829831
"$(OX)\linkopts": "$(B)\win\Makefile.msc"
830832
echo "$(OX)\add.obj" > $@
833
+ echo "$(OX)\ajax.obj" >> $@
831834
echo "$(OX)\alerts.obj" >> $@
832835
echo "$(OX)\allrepo.obj" >> $@
833836
echo "$(OX)\attach.obj" >> $@
834837
echo "$(OX)\backlink.obj" >> $@
835838
echo "$(OX)\backoffice.obj" >> $@
@@ -1196,10 +1199,16 @@
11961199
"$(OX)\add$O" : "$(OX)\add_.c" "$(OX)\add.h"
11971200
$(TCC) /Fo$@ /Fd$(@D)\ -c "$(OX)\add_.c"
11981201
11991202
"$(OX)\add_.c" : "$(SRCDIR)\add.c"
12001203
"$(OBJDIR)\translate$E" $** > $@
1204
+
1205
+"$(OX)\ajax$O" : "$(OX)\ajax_.c" "$(OX)\ajax.h"
1206
+ $(TCC) /Fo$@ /Fd$(@D)\ -c "$(OX)\ajax_.c"
1207
+
1208
+"$(OX)\ajax_.c" : "$(SRCDIR)\ajax.c"
1209
+ "$(OBJDIR)\translate$E" $** > $@
12011210
12021211
"$(OX)\alerts$O" : "$(OX)\alerts_.c" "$(OX)\alerts.h"
12031212
$(TCC) /Fo$@ /Fd$(@D)\ -c "$(OX)\alerts_.c"
12041213
12051214
"$(OX)\alerts_.c" : "$(SRCDIR)\alerts.c"
@@ -2048,10 +2057,11 @@
20482057
"$(OX)\fossil.res" : "$(B)\win\fossil.rc"
20492058
$(RCC) /fo $@ $**
20502059
20512060
"$(OX)\headers": "$(OBJDIR)\makeheaders$E" "$(OX)\page_index.h" "$(OX)\builtin_data.h" "$(OX)\default_css.h" "$(OX)\VERSION.h"
20522061
"$(OBJDIR)\makeheaders$E" "$(OX)\add_.c":"$(OX)\add.h" \
2062
+ "$(OX)\ajax_.c":"$(OX)\ajax.h" \
20532063
"$(OX)\alerts_.c":"$(OX)\alerts.h" \
20542064
"$(OX)\allrepo_.c":"$(OX)\allrepo.h" \
20552065
"$(OX)\attach_.c":"$(OX)\attach.h" \
20562066
"$(OX)\backlink_.c":"$(OX)\backlink.h" \
20572067
"$(OX)\backoffice_.c":"$(OX)\backoffice.h" \
20582068
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -359,10 +359,11 @@
359 MINIZ_OPTIONS = /DMINIZ_NO_STDIO \
360 /DMINIZ_NO_TIME \
361 /DMINIZ_NO_ARCHIVE_APIS
362
363 SRC = "$(OX)\add_.c" \
 
364 "$(OX)\alerts_.c" \
365 "$(OX)\allrepo_.c" \
366 "$(OX)\attach_.c" \
367 "$(OX)\backlink_.c" \
368 "$(OX)\backoffice_.c" \
@@ -601,10 +602,11 @@
601 "$(SRCDIR)\tree.js" \
602 "$(SRCDIR)\useredit.js" \
603 "$(SRCDIR)\wiki.wiki"
604
605 OBJ = "$(OX)\add$O" \
 
606 "$(OX)\alerts$O" \
607 "$(OX)\allrepo$O" \
608 "$(OX)\attach$O" \
609 "$(OX)\backlink$O" \
610 "$(OX)\backoffice$O" \
@@ -826,10 +828,11 @@
826 if exist "$(B)\win\fossil.exe.manifest" \
827 $(MTC) -nologo -manifest "$(B)\win\fossil.exe.manifest" -outputresource:$@;1
828
829 "$(OX)\linkopts": "$(B)\win\Makefile.msc"
830 echo "$(OX)\add.obj" > $@
 
831 echo "$(OX)\alerts.obj" >> $@
832 echo "$(OX)\allrepo.obj" >> $@
833 echo "$(OX)\attach.obj" >> $@
834 echo "$(OX)\backlink.obj" >> $@
835 echo "$(OX)\backoffice.obj" >> $@
@@ -1196,10 +1199,16 @@
1196 "$(OX)\add$O" : "$(OX)\add_.c" "$(OX)\add.h"
1197 $(TCC) /Fo$@ /Fd$(@D)\ -c "$(OX)\add_.c"
1198
1199 "$(OX)\add_.c" : "$(SRCDIR)\add.c"
1200 "$(OBJDIR)\translate$E" $** > $@
 
 
 
 
 
 
1201
1202 "$(OX)\alerts$O" : "$(OX)\alerts_.c" "$(OX)\alerts.h"
1203 $(TCC) /Fo$@ /Fd$(@D)\ -c "$(OX)\alerts_.c"
1204
1205 "$(OX)\alerts_.c" : "$(SRCDIR)\alerts.c"
@@ -2048,10 +2057,11 @@
2048 "$(OX)\fossil.res" : "$(B)\win\fossil.rc"
2049 $(RCC) /fo $@ $**
2050
2051 "$(OX)\headers": "$(OBJDIR)\makeheaders$E" "$(OX)\page_index.h" "$(OX)\builtin_data.h" "$(OX)\default_css.h" "$(OX)\VERSION.h"
2052 "$(OBJDIR)\makeheaders$E" "$(OX)\add_.c":"$(OX)\add.h" \
 
2053 "$(OX)\alerts_.c":"$(OX)\alerts.h" \
2054 "$(OX)\allrepo_.c":"$(OX)\allrepo.h" \
2055 "$(OX)\attach_.c":"$(OX)\attach.h" \
2056 "$(OX)\backlink_.c":"$(OX)\backlink.h" \
2057 "$(OX)\backoffice_.c":"$(OX)\backoffice.h" \
2058
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -359,10 +359,11 @@
359 MINIZ_OPTIONS = /DMINIZ_NO_STDIO \
360 /DMINIZ_NO_TIME \
361 /DMINIZ_NO_ARCHIVE_APIS
362
363 SRC = "$(OX)\add_.c" \
364 "$(OX)\ajax_.c" \
365 "$(OX)\alerts_.c" \
366 "$(OX)\allrepo_.c" \
367 "$(OX)\attach_.c" \
368 "$(OX)\backlink_.c" \
369 "$(OX)\backoffice_.c" \
@@ -601,10 +602,11 @@
602 "$(SRCDIR)\tree.js" \
603 "$(SRCDIR)\useredit.js" \
604 "$(SRCDIR)\wiki.wiki"
605
606 OBJ = "$(OX)\add$O" \
607 "$(OX)\ajax$O" \
608 "$(OX)\alerts$O" \
609 "$(OX)\allrepo$O" \
610 "$(OX)\attach$O" \
611 "$(OX)\backlink$O" \
612 "$(OX)\backoffice$O" \
@@ -826,10 +828,11 @@
828 if exist "$(B)\win\fossil.exe.manifest" \
829 $(MTC) -nologo -manifest "$(B)\win\fossil.exe.manifest" -outputresource:$@;1
830
831 "$(OX)\linkopts": "$(B)\win\Makefile.msc"
832 echo "$(OX)\add.obj" > $@
833 echo "$(OX)\ajax.obj" >> $@
834 echo "$(OX)\alerts.obj" >> $@
835 echo "$(OX)\allrepo.obj" >> $@
836 echo "$(OX)\attach.obj" >> $@
837 echo "$(OX)\backlink.obj" >> $@
838 echo "$(OX)\backoffice.obj" >> $@
@@ -1196,10 +1199,16 @@
1199 "$(OX)\add$O" : "$(OX)\add_.c" "$(OX)\add.h"
1200 $(TCC) /Fo$@ /Fd$(@D)\ -c "$(OX)\add_.c"
1201
1202 "$(OX)\add_.c" : "$(SRCDIR)\add.c"
1203 "$(OBJDIR)\translate$E" $** > $@
1204
1205 "$(OX)\ajax$O" : "$(OX)\ajax_.c" "$(OX)\ajax.h"
1206 $(TCC) /Fo$@ /Fd$(@D)\ -c "$(OX)\ajax_.c"
1207
1208 "$(OX)\ajax_.c" : "$(SRCDIR)\ajax.c"
1209 "$(OBJDIR)\translate$E" $** > $@
1210
1211 "$(OX)\alerts$O" : "$(OX)\alerts_.c" "$(OX)\alerts.h"
1212 $(TCC) /Fo$@ /Fd$(@D)\ -c "$(OX)\alerts_.c"
1213
1214 "$(OX)\alerts_.c" : "$(SRCDIR)\alerts.c"
@@ -2048,10 +2057,11 @@
2057 "$(OX)\fossil.res" : "$(B)\win\fossil.rc"
2058 $(RCC) /fo $@ $**
2059
2060 "$(OX)\headers": "$(OBJDIR)\makeheaders$E" "$(OX)\page_index.h" "$(OX)\builtin_data.h" "$(OX)\default_css.h" "$(OX)\VERSION.h"
2061 "$(OBJDIR)\makeheaders$E" "$(OX)\add_.c":"$(OX)\add.h" \
2062 "$(OX)\ajax_.c":"$(OX)\ajax.h" \
2063 "$(OX)\alerts_.c":"$(OX)\alerts.h" \
2064 "$(OX)\allrepo_.c":"$(OX)\allrepo.h" \
2065 "$(OX)\attach_.c":"$(OX)\attach.h" \
2066 "$(OX)\backlink_.c":"$(OX)\backlink.h" \
2067 "$(OX)\backoffice_.c":"$(OX)\backoffice.h" \
2068

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button