Fossil SCM

Split the /reports webpage out into a separate source-code file for ease of editing and maintenance. No functional changes.

drh 2015-01-27 02:40 trunk
Commit 39cd06c9f764cf6d98b690a0864d623103723d6f
+12
--- src/main.mk
+++ src/main.mk
@@ -104,10 +104,11 @@
104104
$(SRCDIR)/sitemap.c \
105105
$(SRCDIR)/skins.c \
106106
$(SRCDIR)/sqlcmd.c \
107107
$(SRCDIR)/stash.c \
108108
$(SRCDIR)/stat.c \
109
+ $(SRCDIR)/statrep.c \
109110
$(SRCDIR)/style.c \
110111
$(SRCDIR)/sync.c \
111112
$(SRCDIR)/tag.c \
112113
$(SRCDIR)/tar.c \
113114
$(SRCDIR)/th_main.c \
@@ -251,10 +252,11 @@
251252
$(OBJDIR)/sitemap_.c \
252253
$(OBJDIR)/skins_.c \
253254
$(OBJDIR)/sqlcmd_.c \
254255
$(OBJDIR)/stash_.c \
255256
$(OBJDIR)/stat_.c \
257
+ $(OBJDIR)/statrep_.c \
256258
$(OBJDIR)/style_.c \
257259
$(OBJDIR)/sync_.c \
258260
$(OBJDIR)/tag_.c \
259261
$(OBJDIR)/tar_.c \
260262
$(OBJDIR)/th_main_.c \
@@ -370,10 +372,11 @@
370372
$(OBJDIR)/sitemap.o \
371373
$(OBJDIR)/skins.o \
372374
$(OBJDIR)/sqlcmd.o \
373375
$(OBJDIR)/stash.o \
374376
$(OBJDIR)/stat.o \
377
+ $(OBJDIR)/statrep.o \
375378
$(OBJDIR)/style.o \
376379
$(OBJDIR)/sync.o \
377380
$(OBJDIR)/tag.o \
378381
$(OBJDIR)/tar.o \
379382
$(OBJDIR)/th_main.o \
@@ -598,10 +601,11 @@
598601
$(OBJDIR)/sitemap_.c:$(OBJDIR)/sitemap.h \
599602
$(OBJDIR)/skins_.c:$(OBJDIR)/skins.h \
600603
$(OBJDIR)/sqlcmd_.c:$(OBJDIR)/sqlcmd.h \
601604
$(OBJDIR)/stash_.c:$(OBJDIR)/stash.h \
602605
$(OBJDIR)/stat_.c:$(OBJDIR)/stat.h \
606
+ $(OBJDIR)/statrep_.c:$(OBJDIR)/statrep.h \
603607
$(OBJDIR)/style_.c:$(OBJDIR)/style.h \
604608
$(OBJDIR)/sync_.c:$(OBJDIR)/sync.h \
605609
$(OBJDIR)/tag_.c:$(OBJDIR)/tag.h \
606610
$(OBJDIR)/tar_.c:$(OBJDIR)/tar.h \
607611
$(OBJDIR)/th_main_.c:$(OBJDIR)/th_main.h \
@@ -1365,10 +1369,18 @@
13651369
13661370
$(OBJDIR)/stat.o: $(OBJDIR)/stat_.c $(OBJDIR)/stat.h $(SRCDIR)/config.h
13671371
$(XTCC) -o $(OBJDIR)/stat.o -c $(OBJDIR)/stat_.c
13681372
13691373
$(OBJDIR)/stat.h: $(OBJDIR)/headers
1374
+
1375
+$(OBJDIR)/statrep_.c: $(SRCDIR)/statrep.c $(OBJDIR)/translate
1376
+ $(OBJDIR)/translate $(SRCDIR)/statrep.c >$@
1377
+
1378
+$(OBJDIR)/statrep.o: $(OBJDIR)/statrep_.c $(OBJDIR)/statrep.h $(SRCDIR)/config.h
1379
+ $(XTCC) -o $(OBJDIR)/statrep.o -c $(OBJDIR)/statrep_.c
1380
+
1381
+$(OBJDIR)/statrep.h: $(OBJDIR)/headers
13701382
13711383
$(OBJDIR)/style_.c: $(SRCDIR)/style.c $(OBJDIR)/translate
13721384
$(OBJDIR)/translate $(SRCDIR)/style.c >$@
13731385
13741386
$(OBJDIR)/style.o: $(OBJDIR)/style_.c $(OBJDIR)/style.h $(SRCDIR)/config.h
13751387
--- src/main.mk
+++ src/main.mk
@@ -104,10 +104,11 @@
104 $(SRCDIR)/sitemap.c \
105 $(SRCDIR)/skins.c \
106 $(SRCDIR)/sqlcmd.c \
107 $(SRCDIR)/stash.c \
108 $(SRCDIR)/stat.c \
 
109 $(SRCDIR)/style.c \
110 $(SRCDIR)/sync.c \
111 $(SRCDIR)/tag.c \
112 $(SRCDIR)/tar.c \
113 $(SRCDIR)/th_main.c \
@@ -251,10 +252,11 @@
251 $(OBJDIR)/sitemap_.c \
252 $(OBJDIR)/skins_.c \
253 $(OBJDIR)/sqlcmd_.c \
254 $(OBJDIR)/stash_.c \
255 $(OBJDIR)/stat_.c \
 
256 $(OBJDIR)/style_.c \
257 $(OBJDIR)/sync_.c \
258 $(OBJDIR)/tag_.c \
259 $(OBJDIR)/tar_.c \
260 $(OBJDIR)/th_main_.c \
@@ -370,10 +372,11 @@
370 $(OBJDIR)/sitemap.o \
371 $(OBJDIR)/skins.o \
372 $(OBJDIR)/sqlcmd.o \
373 $(OBJDIR)/stash.o \
374 $(OBJDIR)/stat.o \
 
375 $(OBJDIR)/style.o \
376 $(OBJDIR)/sync.o \
377 $(OBJDIR)/tag.o \
378 $(OBJDIR)/tar.o \
379 $(OBJDIR)/th_main.o \
@@ -598,10 +601,11 @@
598 $(OBJDIR)/sitemap_.c:$(OBJDIR)/sitemap.h \
599 $(OBJDIR)/skins_.c:$(OBJDIR)/skins.h \
600 $(OBJDIR)/sqlcmd_.c:$(OBJDIR)/sqlcmd.h \
601 $(OBJDIR)/stash_.c:$(OBJDIR)/stash.h \
602 $(OBJDIR)/stat_.c:$(OBJDIR)/stat.h \
 
603 $(OBJDIR)/style_.c:$(OBJDIR)/style.h \
604 $(OBJDIR)/sync_.c:$(OBJDIR)/sync.h \
605 $(OBJDIR)/tag_.c:$(OBJDIR)/tag.h \
606 $(OBJDIR)/tar_.c:$(OBJDIR)/tar.h \
607 $(OBJDIR)/th_main_.c:$(OBJDIR)/th_main.h \
@@ -1365,10 +1369,18 @@
1365
1366 $(OBJDIR)/stat.o: $(OBJDIR)/stat_.c $(OBJDIR)/stat.h $(SRCDIR)/config.h
1367 $(XTCC) -o $(OBJDIR)/stat.o -c $(OBJDIR)/stat_.c
1368
1369 $(OBJDIR)/stat.h: $(OBJDIR)/headers
 
 
 
 
 
 
 
 
1370
1371 $(OBJDIR)/style_.c: $(SRCDIR)/style.c $(OBJDIR)/translate
1372 $(OBJDIR)/translate $(SRCDIR)/style.c >$@
1373
1374 $(OBJDIR)/style.o: $(OBJDIR)/style_.c $(OBJDIR)/style.h $(SRCDIR)/config.h
1375
--- src/main.mk
+++ src/main.mk
@@ -104,10 +104,11 @@
104 $(SRCDIR)/sitemap.c \
105 $(SRCDIR)/skins.c \
106 $(SRCDIR)/sqlcmd.c \
107 $(SRCDIR)/stash.c \
108 $(SRCDIR)/stat.c \
109 $(SRCDIR)/statrep.c \
110 $(SRCDIR)/style.c \
111 $(SRCDIR)/sync.c \
112 $(SRCDIR)/tag.c \
113 $(SRCDIR)/tar.c \
114 $(SRCDIR)/th_main.c \
@@ -251,10 +252,11 @@
252 $(OBJDIR)/sitemap_.c \
253 $(OBJDIR)/skins_.c \
254 $(OBJDIR)/sqlcmd_.c \
255 $(OBJDIR)/stash_.c \
256 $(OBJDIR)/stat_.c \
257 $(OBJDIR)/statrep_.c \
258 $(OBJDIR)/style_.c \
259 $(OBJDIR)/sync_.c \
260 $(OBJDIR)/tag_.c \
261 $(OBJDIR)/tar_.c \
262 $(OBJDIR)/th_main_.c \
@@ -370,10 +372,11 @@
372 $(OBJDIR)/sitemap.o \
373 $(OBJDIR)/skins.o \
374 $(OBJDIR)/sqlcmd.o \
375 $(OBJDIR)/stash.o \
376 $(OBJDIR)/stat.o \
377 $(OBJDIR)/statrep.o \
378 $(OBJDIR)/style.o \
379 $(OBJDIR)/sync.o \
380 $(OBJDIR)/tag.o \
381 $(OBJDIR)/tar.o \
382 $(OBJDIR)/th_main.o \
@@ -598,10 +601,11 @@
601 $(OBJDIR)/sitemap_.c:$(OBJDIR)/sitemap.h \
602 $(OBJDIR)/skins_.c:$(OBJDIR)/skins.h \
603 $(OBJDIR)/sqlcmd_.c:$(OBJDIR)/sqlcmd.h \
604 $(OBJDIR)/stash_.c:$(OBJDIR)/stash.h \
605 $(OBJDIR)/stat_.c:$(OBJDIR)/stat.h \
606 $(OBJDIR)/statrep_.c:$(OBJDIR)/statrep.h \
607 $(OBJDIR)/style_.c:$(OBJDIR)/style.h \
608 $(OBJDIR)/sync_.c:$(OBJDIR)/sync.h \
609 $(OBJDIR)/tag_.c:$(OBJDIR)/tag.h \
610 $(OBJDIR)/tar_.c:$(OBJDIR)/tar.h \
611 $(OBJDIR)/th_main_.c:$(OBJDIR)/th_main.h \
@@ -1365,10 +1369,18 @@
1369
1370 $(OBJDIR)/stat.o: $(OBJDIR)/stat_.c $(OBJDIR)/stat.h $(SRCDIR)/config.h
1371 $(XTCC) -o $(OBJDIR)/stat.o -c $(OBJDIR)/stat_.c
1372
1373 $(OBJDIR)/stat.h: $(OBJDIR)/headers
1374
1375 $(OBJDIR)/statrep_.c: $(SRCDIR)/statrep.c $(OBJDIR)/translate
1376 $(OBJDIR)/translate $(SRCDIR)/statrep.c >$@
1377
1378 $(OBJDIR)/statrep.o: $(OBJDIR)/statrep_.c $(OBJDIR)/statrep.h $(SRCDIR)/config.h
1379 $(XTCC) -o $(OBJDIR)/statrep.o -c $(OBJDIR)/statrep_.c
1380
1381 $(OBJDIR)/statrep.h: $(OBJDIR)/headers
1382
1383 $(OBJDIR)/style_.c: $(SRCDIR)/style.c $(OBJDIR)/translate
1384 $(OBJDIR)/translate $(SRCDIR)/style.c >$@
1385
1386 $(OBJDIR)/style.o: $(OBJDIR)/style_.c $(OBJDIR)/style.h $(SRCDIR)/config.h
1387
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -110,10 +110,11 @@
110110
sitemap
111111
skins
112112
sqlcmd
113113
stash
114114
stat
115
+ statrep
115116
style
116117
sync
117118
tag
118119
tar
119120
th_main
120121
121122
ADDED src/statrep.c
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -110,10 +110,11 @@
110 sitemap
111 skins
112 sqlcmd
113 stash
114 stat
 
115 style
116 sync
117 tag
118 tar
119 th_main
120
121 DDED src/statrep.c
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -110,10 +110,11 @@
110 sitemap
111 skins
112 sqlcmd
113 stash
114 stat
115 statrep
116 style
117 sync
118 tag
119 tar
120 th_main
121
122 DDED src/statrep.c
--- a/src/statrep.c
+++ b/src/statrep.c
@@ -0,0 +1 @@
1
+eea"z
--- a/src/statrep.c
+++ b/src/statrep.c
@@ -0,0 +1 @@
 
--- a/src/statrep.c
+++ b/src/statrep.c
@@ -0,0 +1 @@
1 eea"z
--- src/timeline.c
+++ src/timeline.c
@@ -2044,688 +2044,7 @@
20442044
const char *zUuid = db_column_text(&q, 0);
20452045
@ <li>
20462046
@ <a href="%s(g.zTop)/timeline?p=%s(zUuid)&amp;d=%s(zUuid)&amp;unhide">%S(zUuid)</a>
20472047
}
20482048
db_finalize(&q);
2049
- style_footer();
2050
-}
2051
-
2052
-
2053
-/*
2054
-** Used by stats_report_xxxxx() to remember which type of events
2055
-** to show. Populated by stats_report_init_view() and holds the
2056
-** return value of that function.
2057
-*/
2058
-static int statsReportType = 0;
2059
-
2060
-/*
2061
-** Set by stats_report_init_view() to one of the y=XXXX values
2062
-** accepted by /timeline?y=XXXX.
2063
-*/
2064
-static const char *statsReportTimelineYFlag = NULL;
2065
-
2066
-/*
2067
-** Creates a TEMP VIEW named v_reports which is a wrapper around the
2068
-** EVENT table filtered on event.type. It looks for the request
2069
-** parameter 'type' (reminder: we "should" use 'y' for consistency
2070
-** with /timeline, but /reports uses 'y' for the year) and expects it
2071
-** to contain one of the conventional values from event.type or the
2072
-** value "all", which is treated as equivalent to "*". By default (if
2073
-** no 'y' is specified), "*" is assumed (that is also the default for
2074
-** invalid/unknown filter values). That 'y' filter is the one used for
2075
-** the event list. Note that a filter of "*" or "all" is equivalent to
2076
-** querying against the full event table. The view, however, adds an
2077
-** abstraction level to simplify the implementation code for the
2078
-** various /reports pages.
2079
-**
2080
-** Returns one of: 'c', 'w', 'g', 't', 'e', representing the type of
2081
-** filter it applies, or '*' if no filter is applied (i.e. if "all" is
2082
-** used).
2083
-*/
2084
-static int stats_report_init_view(){
2085
- const char *zType = PD("type","*"); /* analog to /timeline?y=... */
2086
- const char *zRealType = NULL; /* normalized form of zType */
2087
- int rc = 0; /* result code */
2088
- assert( !statsReportType && "Must not be called more than once." );
2089
- switch( (zType && *zType) ? *zType : 0 ){
2090
- case 'c':
2091
- case 'C':
2092
- zRealType = "ci";
2093
- rc = *zRealType;
2094
- break;
2095
- case 'e':
2096
- case 'E':
2097
- zRealType = "e";
2098
- rc = *zRealType;
2099
- break;
2100
- case 'g':
2101
- case 'G':
2102
- zRealType = "g";
2103
- rc = *zRealType;
2104
- break;
2105
- case 't':
2106
- case 'T':
2107
- zRealType = "t";
2108
- rc = *zRealType;
2109
- break;
2110
- case 'w':
2111
- case 'W':
2112
- zRealType = "w";
2113
- rc = *zRealType;
2114
- break;
2115
- default:
2116
- rc = '*';
2117
- break;
2118
- }
2119
- assert(0 != rc);
2120
- if(zRealType){
2121
- statsReportTimelineYFlag = zRealType;
2122
- db_multi_exec("CREATE TEMP VIEW v_reports AS "
2123
- "SELECT * FROM event WHERE type GLOB %Q",
2124
- zRealType);
2125
- }else{
2126
- statsReportTimelineYFlag = "a";
2127
- db_multi_exec("CREATE TEMP VIEW v_reports AS "
2128
- "SELECT * FROM event");
2129
- }
2130
- return statsReportType = rc;
2131
-}
2132
-
2133
-/*
2134
-** Returns a string suitable (for a given value of suitable) for
2135
-** use in a label with the header of the /reports pages, dependent
2136
-** on the 'type' flag. See stats_report_init_view().
2137
-** The returned bytes are static.
2138
-*/
2139
-static const char *stats_report_label_for_type(){
2140
- assert( statsReportType && "Must call stats_report_init_view() first." );
2141
- switch( statsReportType ){
2142
- case 'c':
2143
- return "checkins";
2144
- case 'e':
2145
- return "events";
2146
- case 'w':
2147
- return "wiki changes";
2148
- case 't':
2149
- return "ticket changes";
2150
- case 'g':
2151
- return "tag changes";
2152
- default:
2153
- return "all types";
2154
- }
2155
-}
2156
-
2157
-/*
2158
-** A helper for the /reports family of pages which prints out a menu
2159
-** of links for the various type=XXX flags. zCurrentViewName must be
2160
-** the name/value of the 'view' parameter which is in effect at the
2161
-** time this is called. e.g. if called from the 'byuser' view then
2162
-** zCurrentViewName must be "byuser". Any URL parameters which need to
2163
-** be added to the generated URLs should be passed in zParam. The
2164
-** caller is expected to have already encoded any zParam in the %T or
2165
-** %t encoding. */
2166
-static void stats_report_event_types_menu(const char *zCurrentViewName,
2167
- const char *zParam){
2168
- char *zTop;
2169
- if(zParam && !*zParam){
2170
- zParam = NULL;
2171
- }
2172
- zTop = mprintf("%s/reports?view=%s%s%s", g.zTop, zCurrentViewName,
2173
- zParam ? "&" : "", zParam);
2174
- cgi_printf("<div>");
2175
- cgi_printf("<span>Types:</span> ");
2176
- if('*' == statsReportType){
2177
- cgi_printf(" <strong>all</strong>", zTop);
2178
- }else{
2179
- cgi_printf(" <a href='%s'>all</a>", zTop);
2180
- }
2181
- if('c' == statsReportType){
2182
- cgi_printf(" <strong>checkins</strong>", zTop);
2183
- }else{
2184
- cgi_printf(" <a href='%s&type=ci'>checkins</a>", zTop);
2185
- }
2186
- if('e' == statsReportType){
2187
- cgi_printf(" <strong>events</strong>", zTop);
2188
- }else{
2189
- cgi_printf(" <a href='%s&type=e'>events</a>", zTop);
2190
- }
2191
- if( 't' == statsReportType ){
2192
- cgi_printf(" <strong>tickets</strong>", zTop);
2193
- }else{
2194
- cgi_printf(" <a href='%s&type=t'>tickets</a>", zTop);
2195
- }
2196
- if( 'g' == statsReportType ){
2197
- cgi_printf(" <strong>tags</strong>", zTop);
2198
- }else{
2199
- cgi_printf(" <a href='%s&type=g'>tags</a>", zTop);
2200
- }
2201
- if( 'w' == statsReportType ){
2202
- cgi_printf(" <strong>wiki</strong>", zTop);
2203
- }else{
2204
- cgi_printf(" <a href='%s&type=w'>wiki</a>", zTop);
2205
- }
2206
- fossil_free(zTop);
2207
- cgi_printf("</div>");
2208
-}
2209
-
2210
-
2211
-/*
2212
-** Helper for stats_report_by_month_year(), which generates a list of
2213
-** week numbers. zTimeframe should be either a timeframe in the form YYYY
2214
-** or YYYY-MM.
2215
-*/
2216
-static void stats_report_output_week_links(const char *zTimeframe){
2217
- Stmt stWeek = empty_Stmt;
2218
- char yearPart[5] = {0,0,0,0,0};
2219
- memcpy(yearPart, zTimeframe, 4);
2220
- db_prepare(&stWeek,
2221
- "SELECT DISTINCT strftime('%%W',mtime) AS wk, "
2222
- "count(*) AS n, "
2223
- "substr(date(mtime),1,%d) AS ym "
2224
- "FROM v_reports "
2225
- "WHERE ym=%Q AND mtime < current_timestamp "
2226
- "GROUP BY wk ORDER BY wk",
2227
- strlen(zTimeframe),
2228
- zTimeframe);
2229
- while( SQLITE_ROW == db_step(&stWeek) ){
2230
- const char *zWeek = db_column_text(&stWeek,0);
2231
- const int nCount = db_column_int(&stWeek,1);
2232
- cgi_printf("<a href='%s/timeline?"
2233
- "yw=%t-%t&n=%d&y=%s'>%s</a>",
2234
- g.zTop, yearPart, zWeek,
2235
- nCount, statsReportTimelineYFlag, zWeek);
2236
- }
2237
- db_finalize(&stWeek);
2238
-}
2239
-
2240
-/*
2241
-** Implements the "byyear" and "bymonth" reports for /reports.
2242
-** If includeMonth is true then it generates the "bymonth" report,
2243
-** else the "byyear" report. If zUserName is not NULL and not empty
2244
-** then the report is restricted to events created by the named user
2245
-** account.
2246
-*/
2247
-static void stats_report_by_month_year(char includeMonth,
2248
- char includeWeeks,
2249
- const char *zUserName){
2250
- Stmt query = empty_Stmt;
2251
- int nRowNumber = 0; /* current TR number */
2252
- int nEventTotal = 0; /* Total event count */
2253
- int rowClass = 0; /* counter for alternating
2254
- row colors */
2255
- Blob sql = empty_blob; /* SQL */
2256
- const char *zTimeLabel = includeMonth ? "Year/Month" : "Year";
2257
- char zPrevYear[5] = {0}; /* For keeping track of when
2258
- we change years while looping */
2259
- int nEventsPerYear = 0; /* Total event count for the
2260
- current year */
2261
- char showYearTotal = 0; /* Flag telling us when to show
2262
- the per-year event totals */
2263
- Blob header = empty_blob; /* Page header text */
2264
- int nMaxEvents = 1; /* for calculating length of graph
2265
- bars. */
2266
- int iterations = 0; /* number of weeks/months we iterate
2267
- over */
2268
- stats_report_init_view();
2269
- stats_report_event_types_menu( includeMonth ? "bymonth" : "byyear", NULL );
2270
- blob_appendf(&header, "Timeline Events (%s) by year%s",
2271
- stats_report_label_for_type(),
2272
- (includeMonth ? "/month" : ""));
2273
- blob_append_sql(&sql,
2274
- "SELECT substr(date(mtime),1,%d) AS timeframe, "
2275
- "count(*) AS eventCount "
2276
- "FROM v_reports ",
2277
- includeMonth ? 7 : 4);
2278
- if(zUserName&&*zUserName){
2279
- blob_append_sql(&sql, " WHERE user=%Q ", zUserName);
2280
- blob_appendf(&header," for user %q", zUserName);
2281
- }
2282
- blob_append(&sql,
2283
- " GROUP BY timeframe"
2284
- " ORDER BY timeframe DESC",
2285
- -1);
2286
- db_prepare(&query, "%s", blob_sql_text(&sql));
2287
- blob_reset(&sql);
2288
- @ <h1>%b(&header)</h1>
2289
- @ <table class='statistics-report-table-events' border='0' cellpadding='2'
2290
- @ cellspacing='0' id='statsTable'>
2291
- @ <thead>
2292
- @ <th>%s(zTimeLabel)</th>
2293
- @ <th>Events</th>
2294
- @ <th width='90%%'><!-- relative commits graph --></th>
2295
- @ </thead><tbody>
2296
- blob_reset(&header);
2297
- /*
2298
- Run the query twice. The first time we calculate the maximum
2299
- number of events for a given row. Maybe someone with better SQL
2300
- Fu can re-implement this with a single query.
2301
- */
2302
- while( SQLITE_ROW == db_step(&query) ){
2303
- const int nCount = db_column_int(&query, 1);
2304
- if(nCount>nMaxEvents){
2305
- nMaxEvents = nCount;
2306
- }
2307
- ++iterations;
2308
- }
2309
- db_reset(&query);
2310
- while( SQLITE_ROW == db_step(&query) ){
2311
- const char *zTimeframe = db_column_text(&query, 0);
2312
- const int nCount = db_column_int(&query, 1);
2313
- int nSize = nCount
2314
- ? (int)(100 * nCount / nMaxEvents)
2315
- : 1;
2316
- showYearTotal = 0;
2317
- if(!nSize) nSize = 1;
2318
- if(includeMonth){
2319
- /* For Month/year view, add a separator for each distinct year. */
2320
- if(!*zPrevYear ||
2321
- (0!=fossil_strncmp(zPrevYear,zTimeframe,4))){
2322
- showYearTotal = *zPrevYear;
2323
- if(showYearTotal){
2324
- rowClass = ++nRowNumber % 2;
2325
- @ <tr class='row%d(rowClass)'>
2326
- @ <td></td>
2327
- @ <td colspan='2'>Yearly total: %d(nEventsPerYear)</td>
2328
- @</tr>
2329
- }
2330
- nEventsPerYear = 0;
2331
- memcpy(zPrevYear,zTimeframe,4);
2332
- rowClass = ++nRowNumber % 2;
2333
- @ <tr class='row%d(rowClass)'>
2334
- @ <th colspan='3' class='statistics-report-row-year'>%s(zPrevYear)</th>
2335
- @ </tr>
2336
- }
2337
- }
2338
- rowClass = ++nRowNumber % 2;
2339
- nEventTotal += nCount;
2340
- nEventsPerYear += nCount;
2341
- @<tr class='row%d(rowClass)'>
2342
- @ <td>
2343
- if(includeMonth){
2344
- cgi_printf("<a href='%s/timeline?"
2345
- "ym=%t&n=%d&y=%s",
2346
- g.zTop, zTimeframe, nCount,
2347
- statsReportTimelineYFlag );
2348
- /* Reminder: n=nCount is not actually correct for bymonth unless
2349
- that was the only user who caused events.
2350
- */
2351
- if( zUserName && *zUserName ){
2352
- cgi_printf("&u=%t", zUserName);
2353
- }
2354
- cgi_printf("' target='_new'>%s</a>",zTimeframe);
2355
- }else {
2356
- cgi_printf("<a href='?view=byweek&y=%s&type=%c",
2357
- zTimeframe, (char)statsReportType);
2358
- if(zUserName && *zUserName){
2359
- cgi_printf("&u=%t", zUserName);
2360
- }
2361
- cgi_printf("'>%s</a>", zTimeframe);
2362
- }
2363
- @ </td><td>%d(nCount)</td>
2364
- @ <td>
2365
- @ <div class='statistics-report-graph-line'
2366
- @ style='width:%d(nSize)%%;'>&nbsp;</div>
2367
- @ </td>
2368
- @</tr>
2369
- if(includeWeeks){
2370
- /* This part works fine for months but it terribly slow (4.5s on my PC),
2371
- so it's only shown for by-year for now. Suggestions/patches for
2372
- a better/faster layout are welcomed. */
2373
- @ <tr class='row%d(rowClass)'>
2374
- @ <td colspan='2' class='statistics-report-week-number-label'>Week #:</td>
2375
- @ <td class='statistics-report-week-of-year-list'>
2376
- stats_report_output_week_links(zTimeframe);
2377
- @ </td></tr>
2378
- }
2379
-
2380
- /*
2381
- Potential improvement: calculate the min/max event counts and
2382
- use percent-based graph bars.
2383
- */
2384
- }
2385
- db_finalize(&query);
2386
- if(includeMonth && !showYearTotal && *zPrevYear){
2387
- /* Add final year total separator. */
2388
- rowClass = ++nRowNumber % 2;
2389
- @ <tr class='row%d(rowClass)'>
2390
- @ <td></td>
2391
- @ <td colspan='2'>Yearly total: %d(nEventsPerYear)</td>
2392
- @</tr>
2393
- }
2394
- @ </tbody></table>
2395
- if(nEventTotal){
2396
- const char *zAvgLabel = includeMonth ? "month" : "year";
2397
- int nAvg = iterations ? (nEventTotal/iterations) : 0;
2398
- @ <br><div>Total events: %d(nEventTotal)
2399
- @ <br>Average per active %s(zAvgLabel): %d(nAvg)
2400
- @ </div>
2401
- }
2402
- if( !includeMonth ){
2403
- output_table_sorting_javascript("statsTable","tnx",-1);
2404
- }
2405
-}
2406
-
2407
-/*
2408
-** Implements the "byuser" view for /reports.
2409
-*/
2410
-static void stats_report_by_user(){
2411
- Stmt query = empty_Stmt;
2412
- int nRowNumber = 0; /* current TR number */
2413
- int nEventTotal = 0; /* Total event count */
2414
- int rowClass = 0; /* counter for alternating
2415
- row colors */
2416
- int nMaxEvents = 1; /* max number of events for
2417
- all rows. */
2418
- stats_report_init_view();
2419
- stats_report_event_types_menu("byuser", NULL);
2420
- db_prepare(&query,
2421
- "SELECT user, "
2422
- "COUNT(*) AS eventCount "
2423
- "FROM v_reports "
2424
- "GROUP BY user ORDER BY eventCount DESC");
2425
- @ <h1>Timeline Events
2426
- @ (%s(stats_report_label_for_type())) by User</h1>
2427
- @ <table class='statistics-report-table-events' border='0'
2428
- @ cellpadding='2' cellspacing='0' id='statsTable'>
2429
- @ <thead><tr>
2430
- @ <th>User</th>
2431
- @ <th>Events</th>
2432
- @ <th width='90%%'><!-- relative commits graph --></th>
2433
- @ </tr></thead><tbody>
2434
- while( SQLITE_ROW == db_step(&query) ){
2435
- const int nCount = db_column_int(&query, 1);
2436
- if(nCount>nMaxEvents){
2437
- nMaxEvents = nCount;
2438
- }
2439
- }
2440
- db_reset(&query);
2441
- while( SQLITE_ROW == db_step(&query) ){
2442
- const char *zUser = db_column_text(&query, 0);
2443
- const int nCount = db_column_int(&query, 1);
2444
- int nSize = nCount
2445
- ? (int)(100 * nCount / nMaxEvents)
2446
- : 0;
2447
- if(!nCount) continue /* arguable! Possible? */;
2448
- else if(!nSize) nSize = 1;
2449
- rowClass = ++nRowNumber % 2;
2450
- nEventTotal += nCount;
2451
- @<tr class='row%d(rowClass)'>
2452
- @ <td>
2453
- @ <a href="?view=bymonth&user=%h(zUser)&type=%c((char)statsReportType)">%h(zUser)</a>
2454
- @ </td><td data-sortkey='%08x(-nCount)'>%d(nCount)</td>
2455
- @ <td>
2456
- @ <div class='statistics-report-graph-line'
2457
- @ style='width:%d(nSize)%%;'>&nbsp;</div>
2458
- @ </td>
2459
- @</tr>
2460
- /*
2461
- Potential improvement: calculate the min/max event counts and
2462
- use percent-based graph bars.
2463
- */
2464
- }
2465
- @ </tbody></table>
2466
- db_finalize(&query);
2467
- output_table_sorting_javascript("statsTable","tkx",2);
2468
-}
2469
-
2470
-/*
2471
-** Implements the "byweekday" view for /reports.
2472
-*/
2473
-static void stats_report_day_of_week(){
2474
- Stmt query = empty_Stmt;
2475
- int nRowNumber = 0; /* current TR number */
2476
- int nEventTotal = 0; /* Total event count */
2477
- int rowClass = 0; /* counter for alternating
2478
- row colors */
2479
- int nMaxEvents = 1; /* max number of events for
2480
- all rows. */
2481
- static const char *const daysOfWeek[] = {
2482
- "Monday", "Tuesday", "Wednesday", "Thursday",
2483
- "Friday", "Saturday", "Sunday"
2484
- };
2485
-
2486
- stats_report_init_view();
2487
- stats_report_event_types_menu("byweekday", NULL);
2488
- db_prepare(&query,
2489
- "SELECT cast(mtime %% 7 AS INTEGER) dow, "
2490
- "COUNT(*) AS eventCount "
2491
- "FROM v_reports "
2492
- "GROUP BY dow ORDER BY dow");
2493
- @ <h1>Timeline Events
2494
- @ (%s(stats_report_label_for_type())) by Day of the Week</h1>
2495
- @ <table class='statistics-report-table-events' border='0'
2496
- @ cellpadding='2' cellspacing='0' id='statsTable'>
2497
- @ <thead><tr>
2498
- @ <th>DoW</th>
2499
- @ <th>Day</th>
2500
- @ <th>Events</th>
2501
- @ <th width='90%%'><!-- relative commits graph --></th>
2502
- @ </tr></thead><tbody>
2503
- while( SQLITE_ROW == db_step(&query) ){
2504
- const int nCount = db_column_int(&query, 1);
2505
- if(nCount>nMaxEvents){
2506
- nMaxEvents = nCount;
2507
- }
2508
- }
2509
- db_reset(&query);
2510
- while( SQLITE_ROW == db_step(&query) ){
2511
- const int dayNum =db_column_int(&query, 0);
2512
- const int nCount = db_column_int(&query, 1);
2513
- int nSize = nCount
2514
- ? (int)(100 * nCount / nMaxEvents)
2515
- : 0;
2516
- if(!nCount) continue /* arguable! Possible? */;
2517
- else if(!nSize) nSize = 1;
2518
- rowClass = ++nRowNumber % 2;
2519
- nEventTotal += nCount;
2520
- @<tr class='row%d(rowClass)'>
2521
- @ <td>%d(dayNum)</td>
2522
- @ <td>%s(daysOfWeek[dayNum])</td>
2523
- @ <td>%d(nCount)</td>
2524
- @ <td>
2525
- @ <div class='statistics-report-graph-line'
2526
- @ style='width:%d(nSize)%%;'>&nbsp;</div>
2527
- @ </td>
2528
- @</tr>
2529
- }
2530
- @ </tbody></table>
2531
- db_finalize(&query);
2532
- output_table_sorting_javascript("statsTable","ntnx",1);
2533
-}
2534
-
2535
-
2536
-/*
2537
-** Helper for stats_report_by_month_year(), which generates a list of
2538
-** week numbers. zTimeframe should be either a timeframe in the form YYYY
2539
-** or YYYY-MM.
2540
-*/
2541
-static void stats_report_year_weeks(const char *zUserName){
2542
- const char *zYear = P("y");
2543
- int nYear = zYear ? strlen(zYear) : 0;
2544
- int i = 0;
2545
- Stmt qYears = empty_Stmt;
2546
- char *zDefaultYear = NULL;
2547
- Blob sql = empty_blob;
2548
- int nMaxEvents = 1; /* max number of events for
2549
- all rows. */
2550
- int iterations = 0; /* # of active time periods. */
2551
- stats_report_init_view();
2552
- if(4==nYear){
2553
- Blob urlParams = empty_blob;
2554
- blob_appendf(&urlParams, "y=%T", zYear);
2555
- stats_report_event_types_menu("byweek", blob_str(&urlParams));
2556
- blob_reset(&urlParams);
2557
- }else{
2558
- stats_report_event_types_menu("byweek", NULL);
2559
- }
2560
- blob_append(&sql,
2561
- "SELECT DISTINCT substr(date(mtime),1,4) AS y "
2562
- "FROM v_reports WHERE 1 ", -1);
2563
- if(zUserName&&*zUserName){
2564
- blob_append_sql(&sql,"AND user=%Q ", zUserName);
2565
- }
2566
- blob_append(&sql,"GROUP BY y ORDER BY y", -1);
2567
- db_prepare(&qYears, "%s", blob_sql_text(&sql));
2568
- blob_reset(&sql);
2569
- cgi_printf("Select year: ");
2570
- while( SQLITE_ROW == db_step(&qYears) ){
2571
- const char *zT = db_column_text(&qYears, 0);
2572
- if( i++ ){
2573
- cgi_printf(" ");
2574
- }
2575
- cgi_printf("<a href='?view=byweek&y=%s&type=%c", zT,
2576
- (char)statsReportType);
2577
- if(zUserName && *zUserName){
2578
- cgi_printf("&user=%t",zUserName);
2579
- }
2580
- cgi_printf("'>%s</a>",zT);
2581
- }
2582
- db_finalize(&qYears);
2583
- cgi_printf("<br/>");
2584
- if(!zYear || !*zYear){
2585
- zDefaultYear = db_text("????", "SELECT strftime('%%Y')");
2586
- zYear = zDefaultYear;
2587
- nYear = 4;
2588
- }
2589
- if(4 == nYear){
2590
- Stmt stWeek = empty_Stmt;
2591
- int rowCount = 0;
2592
- int total = 0;
2593
- Blob header = empty_blob;
2594
- blob_appendf(&header, "Timeline events (%s) for the calendar weeks "
2595
- "of %h", stats_report_label_for_type(),
2596
- zYear);
2597
- blob_append_sql(&sql,
2598
- "SELECT DISTINCT strftime('%%W',mtime) AS wk, "
2599
- "count(*) AS n "
2600
- "FROM v_reports "
2601
- "WHERE %Q=substr(date(mtime),1,4) "
2602
- "AND mtime < current_timestamp ",
2603
- zYear);
2604
- if(zUserName&&*zUserName){
2605
- blob_append_sql(&sql, " AND user=%Q ", zUserName);
2606
- blob_appendf(&header," for user %h", zUserName);
2607
- }
2608
- blob_append_sql(&sql, "GROUP BY wk ORDER BY wk DESC");
2609
- cgi_printf("<h1>%h</h1>", blob_str(&header));
2610
- blob_reset(&header);
2611
- cgi_printf("<table class='statistics-report-table-events' "
2612
- "border='0' cellpadding='2' width='100%%' "
2613
- "cellspacing='0' id='statsTable'>");
2614
- cgi_printf("<thead><tr>"
2615
- "<th>Week</th>"
2616
- "<th>Events</th>"
2617
- "<th width='90%%'><!-- relative commits graph --></th>"
2618
- "</tr></thead>"
2619
- "<tbody>");
2620
- db_prepare(&stWeek, "%s", blob_sql_text(&sql));
2621
- blob_reset(&sql);
2622
- while( SQLITE_ROW == db_step(&stWeek) ){
2623
- const int nCount = db_column_int(&stWeek, 1);
2624
- if(nCount>nMaxEvents){
2625
- nMaxEvents = nCount;
2626
- }
2627
- ++iterations;
2628
- }
2629
- db_reset(&stWeek);
2630
- while( SQLITE_ROW == db_step(&stWeek) ){
2631
- const char *zWeek = db_column_text(&stWeek,0);
2632
- const int nCount = db_column_int(&stWeek,1);
2633
- int nSize = nCount
2634
- ? (int)(100 * nCount / nMaxEvents)
2635
- : 0;
2636
- if(!nSize) nSize = 1;
2637
- total += nCount;
2638
- cgi_printf("<tr class='row%d'>", ++rowCount % 2 );
2639
- cgi_printf("<td><a href='%s/timeline?yw=%t-%s&n=%d&y=%s",
2640
- g.zTop, zYear, zWeek, nCount,
2641
- statsReportTimelineYFlag);
2642
- if(zUserName && *zUserName){
2643
- cgi_printf("&u=%t",zUserName);
2644
- }
2645
- cgi_printf("'>%s</a></td>",zWeek);
2646
-
2647
- cgi_printf("<td>%d</td>",nCount);
2648
- cgi_printf("<td>");
2649
- if(nCount){
2650
- cgi_printf("<div class='statistics-report-graph-line'"
2651
- "style='width:%d%%;'>&nbsp;</div>",
2652
- nSize);
2653
- }
2654
- cgi_printf("</td></tr>");
2655
- }
2656
- db_finalize(&stWeek);
2657
- free(zDefaultYear);
2658
- cgi_printf("</tbody></table>");
2659
- if(total){
2660
- int nAvg = iterations ? (total/iterations) : 0;
2661
- cgi_printf("<br><div>Total events: %d<br>"
2662
- "Average per active week: %d</div>",
2663
- total, nAvg);
2664
- }
2665
- output_table_sorting_javascript("statsTable","tnx",-1);
2666
- }
2667
-}
2668
-
2669
-/*
2670
-** WEBPAGE: reports
2671
-**
2672
-** Shows activity reports for the repository.
2673
-**
2674
-** Query Parameters:
2675
-**
2676
-** view=REPORT_NAME Valid values: bymonth, byyear, byuser
2677
-** user=NAME Restricts statistics to the given user
2678
-** type=TYPE Restricts the report to a specific event type:
2679
-** ci (checkin), w (wiki), t (ticket), g (tag)
2680
-** Defaulting to all event types.
2681
-**
2682
-** The view-specific query parameters include:
2683
-**
2684
-** view=byweek:
2685
-**
2686
-** y=YYYY The year to report (default is the server's
2687
-** current year).
2688
-*/
2689
-void stats_report_page(){
2690
- HQuery url; /* URL for various branch links */
2691
- const char *zView = P("view"); /* Which view/report to show. */
2692
- const char *zUserName = P("user");
2693
-
2694
- login_check_credentials();
2695
- if( !g.perm.Read ){ login_needed(); return; }
2696
- if(!zUserName) zUserName = P("u");
2697
- url_initialize(&url, "reports");
2698
- if(zUserName && *zUserName){
2699
- url_add_parameter(&url,"user", zUserName);
2700
- timeline_submenu(&url, "(Remove User Flag)", "view", zView, "user");
2701
- }
2702
- timeline_submenu(&url, "By Year", "view", "byyear", 0);
2703
- timeline_submenu(&url, "By Month", "view", "bymonth", 0);
2704
- timeline_submenu(&url, "By Week", "view", "byweek", 0);
2705
- timeline_submenu(&url, "By Weekday", "view", "byweekday", 0);
2706
- timeline_submenu(&url, "By User", "view", "byuser", "user");
2707
- url_reset(&url);
2708
- style_header("Activity Reports");
2709
- if(0==fossil_strcmp(zView,"byyear")){
2710
- stats_report_by_month_year(0, 0, zUserName);
2711
- }else if(0==fossil_strcmp(zView,"bymonth")){
2712
- stats_report_by_month_year(1, 0, zUserName);
2713
- }else if(0==fossil_strcmp(zView,"byweek")){
2714
- stats_report_year_weeks(zUserName);
2715
- }else if(0==fossil_strcmp(zView,"byuser")){
2716
- stats_report_by_user();
2717
- }else if(0==fossil_strcmp(zView,"byweekday")){
2718
- stats_report_day_of_week();
2719
- }else{
2720
- @ <h1>Select a report to show:</h1>
2721
- @ <ul>
2722
- @ <li><a href='?view=byyear'>Events by year</a></li>
2723
- @ <li><a href='?view=bymonth'>Events by month</a></li>
2724
- @ <li><a href='?view=byweek'>Events by calendar week</a></li>
2725
- @ <li><a href='?view=byweekday'>Events by day of the week</a></li>
2726
- @ <li><a href='?view=byuser'>Events by user</a></li>
2727
- @ </ul>
2728
- }
2729
-
27302049
style_footer();
27312050
}
27322051
--- src/timeline.c
+++ src/timeline.c
@@ -2044,688 +2044,7 @@
2044 const char *zUuid = db_column_text(&q, 0);
2045 @ <li>
2046 @ <a href="%s(g.zTop)/timeline?p=%s(zUuid)&amp;d=%s(zUuid)&amp;unhide">%S(zUuid)</a>
2047 }
2048 db_finalize(&q);
2049 style_footer();
2050 }
2051
2052
2053 /*
2054 ** Used by stats_report_xxxxx() to remember which type of events
2055 ** to show. Populated by stats_report_init_view() and holds the
2056 ** return value of that function.
2057 */
2058 static int statsReportType = 0;
2059
2060 /*
2061 ** Set by stats_report_init_view() to one of the y=XXXX values
2062 ** accepted by /timeline?y=XXXX.
2063 */
2064 static const char *statsReportTimelineYFlag = NULL;
2065
2066 /*
2067 ** Creates a TEMP VIEW named v_reports which is a wrapper around the
2068 ** EVENT table filtered on event.type. It looks for the request
2069 ** parameter 'type' (reminder: we "should" use 'y' for consistency
2070 ** with /timeline, but /reports uses 'y' for the year) and expects it
2071 ** to contain one of the conventional values from event.type or the
2072 ** value "all", which is treated as equivalent to "*". By default (if
2073 ** no 'y' is specified), "*" is assumed (that is also the default for
2074 ** invalid/unknown filter values). That 'y' filter is the one used for
2075 ** the event list. Note that a filter of "*" or "all" is equivalent to
2076 ** querying against the full event table. The view, however, adds an
2077 ** abstraction level to simplify the implementation code for the
2078 ** various /reports pages.
2079 **
2080 ** Returns one of: 'c', 'w', 'g', 't', 'e', representing the type of
2081 ** filter it applies, or '*' if no filter is applied (i.e. if "all" is
2082 ** used).
2083 */
2084 static int stats_report_init_view(){
2085 const char *zType = PD("type","*"); /* analog to /timeline?y=... */
2086 const char *zRealType = NULL; /* normalized form of zType */
2087 int rc = 0; /* result code */
2088 assert( !statsReportType && "Must not be called more than once." );
2089 switch( (zType && *zType) ? *zType : 0 ){
2090 case 'c':
2091 case 'C':
2092 zRealType = "ci";
2093 rc = *zRealType;
2094 break;
2095 case 'e':
2096 case 'E':
2097 zRealType = "e";
2098 rc = *zRealType;
2099 break;
2100 case 'g':
2101 case 'G':
2102 zRealType = "g";
2103 rc = *zRealType;
2104 break;
2105 case 't':
2106 case 'T':
2107 zRealType = "t";
2108 rc = *zRealType;
2109 break;
2110 case 'w':
2111 case 'W':
2112 zRealType = "w";
2113 rc = *zRealType;
2114 break;
2115 default:
2116 rc = '*';
2117 break;
2118 }
2119 assert(0 != rc);
2120 if(zRealType){
2121 statsReportTimelineYFlag = zRealType;
2122 db_multi_exec("CREATE TEMP VIEW v_reports AS "
2123 "SELECT * FROM event WHERE type GLOB %Q",
2124 zRealType);
2125 }else{
2126 statsReportTimelineYFlag = "a";
2127 db_multi_exec("CREATE TEMP VIEW v_reports AS "
2128 "SELECT * FROM event");
2129 }
2130 return statsReportType = rc;
2131 }
2132
2133 /*
2134 ** Returns a string suitable (for a given value of suitable) for
2135 ** use in a label with the header of the /reports pages, dependent
2136 ** on the 'type' flag. See stats_report_init_view().
2137 ** The returned bytes are static.
2138 */
2139 static const char *stats_report_label_for_type(){
2140 assert( statsReportType && "Must call stats_report_init_view() first." );
2141 switch( statsReportType ){
2142 case 'c':
2143 return "checkins";
2144 case 'e':
2145 return "events";
2146 case 'w':
2147 return "wiki changes";
2148 case 't':
2149 return "ticket changes";
2150 case 'g':
2151 return "tag changes";
2152 default:
2153 return "all types";
2154 }
2155 }
2156
2157 /*
2158 ** A helper for the /reports family of pages which prints out a menu
2159 ** of links for the various type=XXX flags. zCurrentViewName must be
2160 ** the name/value of the 'view' parameter which is in effect at the
2161 ** time this is called. e.g. if called from the 'byuser' view then
2162 ** zCurrentViewName must be "byuser". Any URL parameters which need to
2163 ** be added to the generated URLs should be passed in zParam. The
2164 ** caller is expected to have already encoded any zParam in the %T or
2165 ** %t encoding. */
2166 static void stats_report_event_types_menu(const char *zCurrentViewName,
2167 const char *zParam){
2168 char *zTop;
2169 if(zParam && !*zParam){
2170 zParam = NULL;
2171 }
2172 zTop = mprintf("%s/reports?view=%s%s%s", g.zTop, zCurrentViewName,
2173 zParam ? "&" : "", zParam);
2174 cgi_printf("<div>");
2175 cgi_printf("<span>Types:</span> ");
2176 if('*' == statsReportType){
2177 cgi_printf(" <strong>all</strong>", zTop);
2178 }else{
2179 cgi_printf(" <a href='%s'>all</a>", zTop);
2180 }
2181 if('c' == statsReportType){
2182 cgi_printf(" <strong>checkins</strong>", zTop);
2183 }else{
2184 cgi_printf(" <a href='%s&type=ci'>checkins</a>", zTop);
2185 }
2186 if('e' == statsReportType){
2187 cgi_printf(" <strong>events</strong>", zTop);
2188 }else{
2189 cgi_printf(" <a href='%s&type=e'>events</a>", zTop);
2190 }
2191 if( 't' == statsReportType ){
2192 cgi_printf(" <strong>tickets</strong>", zTop);
2193 }else{
2194 cgi_printf(" <a href='%s&type=t'>tickets</a>", zTop);
2195 }
2196 if( 'g' == statsReportType ){
2197 cgi_printf(" <strong>tags</strong>", zTop);
2198 }else{
2199 cgi_printf(" <a href='%s&type=g'>tags</a>", zTop);
2200 }
2201 if( 'w' == statsReportType ){
2202 cgi_printf(" <strong>wiki</strong>", zTop);
2203 }else{
2204 cgi_printf(" <a href='%s&type=w'>wiki</a>", zTop);
2205 }
2206 fossil_free(zTop);
2207 cgi_printf("</div>");
2208 }
2209
2210
2211 /*
2212 ** Helper for stats_report_by_month_year(), which generates a list of
2213 ** week numbers. zTimeframe should be either a timeframe in the form YYYY
2214 ** or YYYY-MM.
2215 */
2216 static void stats_report_output_week_links(const char *zTimeframe){
2217 Stmt stWeek = empty_Stmt;
2218 char yearPart[5] = {0,0,0,0,0};
2219 memcpy(yearPart, zTimeframe, 4);
2220 db_prepare(&stWeek,
2221 "SELECT DISTINCT strftime('%%W',mtime) AS wk, "
2222 "count(*) AS n, "
2223 "substr(date(mtime),1,%d) AS ym "
2224 "FROM v_reports "
2225 "WHERE ym=%Q AND mtime < current_timestamp "
2226 "GROUP BY wk ORDER BY wk",
2227 strlen(zTimeframe),
2228 zTimeframe);
2229 while( SQLITE_ROW == db_step(&stWeek) ){
2230 const char *zWeek = db_column_text(&stWeek,0);
2231 const int nCount = db_column_int(&stWeek,1);
2232 cgi_printf("<a href='%s/timeline?"
2233 "yw=%t-%t&n=%d&y=%s'>%s</a>",
2234 g.zTop, yearPart, zWeek,
2235 nCount, statsReportTimelineYFlag, zWeek);
2236 }
2237 db_finalize(&stWeek);
2238 }
2239
2240 /*
2241 ** Implements the "byyear" and "bymonth" reports for /reports.
2242 ** If includeMonth is true then it generates the "bymonth" report,
2243 ** else the "byyear" report. If zUserName is not NULL and not empty
2244 ** then the report is restricted to events created by the named user
2245 ** account.
2246 */
2247 static void stats_report_by_month_year(char includeMonth,
2248 char includeWeeks,
2249 const char *zUserName){
2250 Stmt query = empty_Stmt;
2251 int nRowNumber = 0; /* current TR number */
2252 int nEventTotal = 0; /* Total event count */
2253 int rowClass = 0; /* counter for alternating
2254 row colors */
2255 Blob sql = empty_blob; /* SQL */
2256 const char *zTimeLabel = includeMonth ? "Year/Month" : "Year";
2257 char zPrevYear[5] = {0}; /* For keeping track of when
2258 we change years while looping */
2259 int nEventsPerYear = 0; /* Total event count for the
2260 current year */
2261 char showYearTotal = 0; /* Flag telling us when to show
2262 the per-year event totals */
2263 Blob header = empty_blob; /* Page header text */
2264 int nMaxEvents = 1; /* for calculating length of graph
2265 bars. */
2266 int iterations = 0; /* number of weeks/months we iterate
2267 over */
2268 stats_report_init_view();
2269 stats_report_event_types_menu( includeMonth ? "bymonth" : "byyear", NULL );
2270 blob_appendf(&header, "Timeline Events (%s) by year%s",
2271 stats_report_label_for_type(),
2272 (includeMonth ? "/month" : ""));
2273 blob_append_sql(&sql,
2274 "SELECT substr(date(mtime),1,%d) AS timeframe, "
2275 "count(*) AS eventCount "
2276 "FROM v_reports ",
2277 includeMonth ? 7 : 4);
2278 if(zUserName&&*zUserName){
2279 blob_append_sql(&sql, " WHERE user=%Q ", zUserName);
2280 blob_appendf(&header," for user %q", zUserName);
2281 }
2282 blob_append(&sql,
2283 " GROUP BY timeframe"
2284 " ORDER BY timeframe DESC",
2285 -1);
2286 db_prepare(&query, "%s", blob_sql_text(&sql));
2287 blob_reset(&sql);
2288 @ <h1>%b(&header)</h1>
2289 @ <table class='statistics-report-table-events' border='0' cellpadding='2'
2290 @ cellspacing='0' id='statsTable'>
2291 @ <thead>
2292 @ <th>%s(zTimeLabel)</th>
2293 @ <th>Events</th>
2294 @ <th width='90%%'><!-- relative commits graph --></th>
2295 @ </thead><tbody>
2296 blob_reset(&header);
2297 /*
2298 Run the query twice. The first time we calculate the maximum
2299 number of events for a given row. Maybe someone with better SQL
2300 Fu can re-implement this with a single query.
2301 */
2302 while( SQLITE_ROW == db_step(&query) ){
2303 const int nCount = db_column_int(&query, 1);
2304 if(nCount>nMaxEvents){
2305 nMaxEvents = nCount;
2306 }
2307 ++iterations;
2308 }
2309 db_reset(&query);
2310 while( SQLITE_ROW == db_step(&query) ){
2311 const char *zTimeframe = db_column_text(&query, 0);
2312 const int nCount = db_column_int(&query, 1);
2313 int nSize = nCount
2314 ? (int)(100 * nCount / nMaxEvents)
2315 : 1;
2316 showYearTotal = 0;
2317 if(!nSize) nSize = 1;
2318 if(includeMonth){
2319 /* For Month/year view, add a separator for each distinct year. */
2320 if(!*zPrevYear ||
2321 (0!=fossil_strncmp(zPrevYear,zTimeframe,4))){
2322 showYearTotal = *zPrevYear;
2323 if(showYearTotal){
2324 rowClass = ++nRowNumber % 2;
2325 @ <tr class='row%d(rowClass)'>
2326 @ <td></td>
2327 @ <td colspan='2'>Yearly total: %d(nEventsPerYear)</td>
2328 @</tr>
2329 }
2330 nEventsPerYear = 0;
2331 memcpy(zPrevYear,zTimeframe,4);
2332 rowClass = ++nRowNumber % 2;
2333 @ <tr class='row%d(rowClass)'>
2334 @ <th colspan='3' class='statistics-report-row-year'>%s(zPrevYear)</th>
2335 @ </tr>
2336 }
2337 }
2338 rowClass = ++nRowNumber % 2;
2339 nEventTotal += nCount;
2340 nEventsPerYear += nCount;
2341 @<tr class='row%d(rowClass)'>
2342 @ <td>
2343 if(includeMonth){
2344 cgi_printf("<a href='%s/timeline?"
2345 "ym=%t&n=%d&y=%s",
2346 g.zTop, zTimeframe, nCount,
2347 statsReportTimelineYFlag );
2348 /* Reminder: n=nCount is not actually correct for bymonth unless
2349 that was the only user who caused events.
2350 */
2351 if( zUserName && *zUserName ){
2352 cgi_printf("&u=%t", zUserName);
2353 }
2354 cgi_printf("' target='_new'>%s</a>",zTimeframe);
2355 }else {
2356 cgi_printf("<a href='?view=byweek&y=%s&type=%c",
2357 zTimeframe, (char)statsReportType);
2358 if(zUserName && *zUserName){
2359 cgi_printf("&u=%t", zUserName);
2360 }
2361 cgi_printf("'>%s</a>", zTimeframe);
2362 }
2363 @ </td><td>%d(nCount)</td>
2364 @ <td>
2365 @ <div class='statistics-report-graph-line'
2366 @ style='width:%d(nSize)%%;'>&nbsp;</div>
2367 @ </td>
2368 @</tr>
2369 if(includeWeeks){
2370 /* This part works fine for months but it terribly slow (4.5s on my PC),
2371 so it's only shown for by-year for now. Suggestions/patches for
2372 a better/faster layout are welcomed. */
2373 @ <tr class='row%d(rowClass)'>
2374 @ <td colspan='2' class='statistics-report-week-number-label'>Week #:</td>
2375 @ <td class='statistics-report-week-of-year-list'>
2376 stats_report_output_week_links(zTimeframe);
2377 @ </td></tr>
2378 }
2379
2380 /*
2381 Potential improvement: calculate the min/max event counts and
2382 use percent-based graph bars.
2383 */
2384 }
2385 db_finalize(&query);
2386 if(includeMonth && !showYearTotal && *zPrevYear){
2387 /* Add final year total separator. */
2388 rowClass = ++nRowNumber % 2;
2389 @ <tr class='row%d(rowClass)'>
2390 @ <td></td>
2391 @ <td colspan='2'>Yearly total: %d(nEventsPerYear)</td>
2392 @</tr>
2393 }
2394 @ </tbody></table>
2395 if(nEventTotal){
2396 const char *zAvgLabel = includeMonth ? "month" : "year";
2397 int nAvg = iterations ? (nEventTotal/iterations) : 0;
2398 @ <br><div>Total events: %d(nEventTotal)
2399 @ <br>Average per active %s(zAvgLabel): %d(nAvg)
2400 @ </div>
2401 }
2402 if( !includeMonth ){
2403 output_table_sorting_javascript("statsTable","tnx",-1);
2404 }
2405 }
2406
2407 /*
2408 ** Implements the "byuser" view for /reports.
2409 */
2410 static void stats_report_by_user(){
2411 Stmt query = empty_Stmt;
2412 int nRowNumber = 0; /* current TR number */
2413 int nEventTotal = 0; /* Total event count */
2414 int rowClass = 0; /* counter for alternating
2415 row colors */
2416 int nMaxEvents = 1; /* max number of events for
2417 all rows. */
2418 stats_report_init_view();
2419 stats_report_event_types_menu("byuser", NULL);
2420 db_prepare(&query,
2421 "SELECT user, "
2422 "COUNT(*) AS eventCount "
2423 "FROM v_reports "
2424 "GROUP BY user ORDER BY eventCount DESC");
2425 @ <h1>Timeline Events
2426 @ (%s(stats_report_label_for_type())) by User</h1>
2427 @ <table class='statistics-report-table-events' border='0'
2428 @ cellpadding='2' cellspacing='0' id='statsTable'>
2429 @ <thead><tr>
2430 @ <th>User</th>
2431 @ <th>Events</th>
2432 @ <th width='90%%'><!-- relative commits graph --></th>
2433 @ </tr></thead><tbody>
2434 while( SQLITE_ROW == db_step(&query) ){
2435 const int nCount = db_column_int(&query, 1);
2436 if(nCount>nMaxEvents){
2437 nMaxEvents = nCount;
2438 }
2439 }
2440 db_reset(&query);
2441 while( SQLITE_ROW == db_step(&query) ){
2442 const char *zUser = db_column_text(&query, 0);
2443 const int nCount = db_column_int(&query, 1);
2444 int nSize = nCount
2445 ? (int)(100 * nCount / nMaxEvents)
2446 : 0;
2447 if(!nCount) continue /* arguable! Possible? */;
2448 else if(!nSize) nSize = 1;
2449 rowClass = ++nRowNumber % 2;
2450 nEventTotal += nCount;
2451 @<tr class='row%d(rowClass)'>
2452 @ <td>
2453 @ <a href="?view=bymonth&user=%h(zUser)&type=%c((char)statsReportType)">%h(zUser)</a>
2454 @ </td><td data-sortkey='%08x(-nCount)'>%d(nCount)</td>
2455 @ <td>
2456 @ <div class='statistics-report-graph-line'
2457 @ style='width:%d(nSize)%%;'>&nbsp;</div>
2458 @ </td>
2459 @</tr>
2460 /*
2461 Potential improvement: calculate the min/max event counts and
2462 use percent-based graph bars.
2463 */
2464 }
2465 @ </tbody></table>
2466 db_finalize(&query);
2467 output_table_sorting_javascript("statsTable","tkx",2);
2468 }
2469
2470 /*
2471 ** Implements the "byweekday" view for /reports.
2472 */
2473 static void stats_report_day_of_week(){
2474 Stmt query = empty_Stmt;
2475 int nRowNumber = 0; /* current TR number */
2476 int nEventTotal = 0; /* Total event count */
2477 int rowClass = 0; /* counter for alternating
2478 row colors */
2479 int nMaxEvents = 1; /* max number of events for
2480 all rows. */
2481 static const char *const daysOfWeek[] = {
2482 "Monday", "Tuesday", "Wednesday", "Thursday",
2483 "Friday", "Saturday", "Sunday"
2484 };
2485
2486 stats_report_init_view();
2487 stats_report_event_types_menu("byweekday", NULL);
2488 db_prepare(&query,
2489 "SELECT cast(mtime %% 7 AS INTEGER) dow, "
2490 "COUNT(*) AS eventCount "
2491 "FROM v_reports "
2492 "GROUP BY dow ORDER BY dow");
2493 @ <h1>Timeline Events
2494 @ (%s(stats_report_label_for_type())) by Day of the Week</h1>
2495 @ <table class='statistics-report-table-events' border='0'
2496 @ cellpadding='2' cellspacing='0' id='statsTable'>
2497 @ <thead><tr>
2498 @ <th>DoW</th>
2499 @ <th>Day</th>
2500 @ <th>Events</th>
2501 @ <th width='90%%'><!-- relative commits graph --></th>
2502 @ </tr></thead><tbody>
2503 while( SQLITE_ROW == db_step(&query) ){
2504 const int nCount = db_column_int(&query, 1);
2505 if(nCount>nMaxEvents){
2506 nMaxEvents = nCount;
2507 }
2508 }
2509 db_reset(&query);
2510 while( SQLITE_ROW == db_step(&query) ){
2511 const int dayNum =db_column_int(&query, 0);
2512 const int nCount = db_column_int(&query, 1);
2513 int nSize = nCount
2514 ? (int)(100 * nCount / nMaxEvents)
2515 : 0;
2516 if(!nCount) continue /* arguable! Possible? */;
2517 else if(!nSize) nSize = 1;
2518 rowClass = ++nRowNumber % 2;
2519 nEventTotal += nCount;
2520 @<tr class='row%d(rowClass)'>
2521 @ <td>%d(dayNum)</td>
2522 @ <td>%s(daysOfWeek[dayNum])</td>
2523 @ <td>%d(nCount)</td>
2524 @ <td>
2525 @ <div class='statistics-report-graph-line'
2526 @ style='width:%d(nSize)%%;'>&nbsp;</div>
2527 @ </td>
2528 @</tr>
2529 }
2530 @ </tbody></table>
2531 db_finalize(&query);
2532 output_table_sorting_javascript("statsTable","ntnx",1);
2533 }
2534
2535
2536 /*
2537 ** Helper for stats_report_by_month_year(), which generates a list of
2538 ** week numbers. zTimeframe should be either a timeframe in the form YYYY
2539 ** or YYYY-MM.
2540 */
2541 static void stats_report_year_weeks(const char *zUserName){
2542 const char *zYear = P("y");
2543 int nYear = zYear ? strlen(zYear) : 0;
2544 int i = 0;
2545 Stmt qYears = empty_Stmt;
2546 char *zDefaultYear = NULL;
2547 Blob sql = empty_blob;
2548 int nMaxEvents = 1; /* max number of events for
2549 all rows. */
2550 int iterations = 0; /* # of active time periods. */
2551 stats_report_init_view();
2552 if(4==nYear){
2553 Blob urlParams = empty_blob;
2554 blob_appendf(&urlParams, "y=%T", zYear);
2555 stats_report_event_types_menu("byweek", blob_str(&urlParams));
2556 blob_reset(&urlParams);
2557 }else{
2558 stats_report_event_types_menu("byweek", NULL);
2559 }
2560 blob_append(&sql,
2561 "SELECT DISTINCT substr(date(mtime),1,4) AS y "
2562 "FROM v_reports WHERE 1 ", -1);
2563 if(zUserName&&*zUserName){
2564 blob_append_sql(&sql,"AND user=%Q ", zUserName);
2565 }
2566 blob_append(&sql,"GROUP BY y ORDER BY y", -1);
2567 db_prepare(&qYears, "%s", blob_sql_text(&sql));
2568 blob_reset(&sql);
2569 cgi_printf("Select year: ");
2570 while( SQLITE_ROW == db_step(&qYears) ){
2571 const char *zT = db_column_text(&qYears, 0);
2572 if( i++ ){
2573 cgi_printf(" ");
2574 }
2575 cgi_printf("<a href='?view=byweek&y=%s&type=%c", zT,
2576 (char)statsReportType);
2577 if(zUserName && *zUserName){
2578 cgi_printf("&user=%t",zUserName);
2579 }
2580 cgi_printf("'>%s</a>",zT);
2581 }
2582 db_finalize(&qYears);
2583 cgi_printf("<br/>");
2584 if(!zYear || !*zYear){
2585 zDefaultYear = db_text("????", "SELECT strftime('%%Y')");
2586 zYear = zDefaultYear;
2587 nYear = 4;
2588 }
2589 if(4 == nYear){
2590 Stmt stWeek = empty_Stmt;
2591 int rowCount = 0;
2592 int total = 0;
2593 Blob header = empty_blob;
2594 blob_appendf(&header, "Timeline events (%s) for the calendar weeks "
2595 "of %h", stats_report_label_for_type(),
2596 zYear);
2597 blob_append_sql(&sql,
2598 "SELECT DISTINCT strftime('%%W',mtime) AS wk, "
2599 "count(*) AS n "
2600 "FROM v_reports "
2601 "WHERE %Q=substr(date(mtime),1,4) "
2602 "AND mtime < current_timestamp ",
2603 zYear);
2604 if(zUserName&&*zUserName){
2605 blob_append_sql(&sql, " AND user=%Q ", zUserName);
2606 blob_appendf(&header," for user %h", zUserName);
2607 }
2608 blob_append_sql(&sql, "GROUP BY wk ORDER BY wk DESC");
2609 cgi_printf("<h1>%h</h1>", blob_str(&header));
2610 blob_reset(&header);
2611 cgi_printf("<table class='statistics-report-table-events' "
2612 "border='0' cellpadding='2' width='100%%' "
2613 "cellspacing='0' id='statsTable'>");
2614 cgi_printf("<thead><tr>"
2615 "<th>Week</th>"
2616 "<th>Events</th>"
2617 "<th width='90%%'><!-- relative commits graph --></th>"
2618 "</tr></thead>"
2619 "<tbody>");
2620 db_prepare(&stWeek, "%s", blob_sql_text(&sql));
2621 blob_reset(&sql);
2622 while( SQLITE_ROW == db_step(&stWeek) ){
2623 const int nCount = db_column_int(&stWeek, 1);
2624 if(nCount>nMaxEvents){
2625 nMaxEvents = nCount;
2626 }
2627 ++iterations;
2628 }
2629 db_reset(&stWeek);
2630 while( SQLITE_ROW == db_step(&stWeek) ){
2631 const char *zWeek = db_column_text(&stWeek,0);
2632 const int nCount = db_column_int(&stWeek,1);
2633 int nSize = nCount
2634 ? (int)(100 * nCount / nMaxEvents)
2635 : 0;
2636 if(!nSize) nSize = 1;
2637 total += nCount;
2638 cgi_printf("<tr class='row%d'>", ++rowCount % 2 );
2639 cgi_printf("<td><a href='%s/timeline?yw=%t-%s&n=%d&y=%s",
2640 g.zTop, zYear, zWeek, nCount,
2641 statsReportTimelineYFlag);
2642 if(zUserName && *zUserName){
2643 cgi_printf("&u=%t",zUserName);
2644 }
2645 cgi_printf("'>%s</a></td>",zWeek);
2646
2647 cgi_printf("<td>%d</td>",nCount);
2648 cgi_printf("<td>");
2649 if(nCount){
2650 cgi_printf("<div class='statistics-report-graph-line'"
2651 "style='width:%d%%;'>&nbsp;</div>",
2652 nSize);
2653 }
2654 cgi_printf("</td></tr>");
2655 }
2656 db_finalize(&stWeek);
2657 free(zDefaultYear);
2658 cgi_printf("</tbody></table>");
2659 if(total){
2660 int nAvg = iterations ? (total/iterations) : 0;
2661 cgi_printf("<br><div>Total events: %d<br>"
2662 "Average per active week: %d</div>",
2663 total, nAvg);
2664 }
2665 output_table_sorting_javascript("statsTable","tnx",-1);
2666 }
2667 }
2668
2669 /*
2670 ** WEBPAGE: reports
2671 **
2672 ** Shows activity reports for the repository.
2673 **
2674 ** Query Parameters:
2675 **
2676 ** view=REPORT_NAME Valid values: bymonth, byyear, byuser
2677 ** user=NAME Restricts statistics to the given user
2678 ** type=TYPE Restricts the report to a specific event type:
2679 ** ci (checkin), w (wiki), t (ticket), g (tag)
2680 ** Defaulting to all event types.
2681 **
2682 ** The view-specific query parameters include:
2683 **
2684 ** view=byweek:
2685 **
2686 ** y=YYYY The year to report (default is the server's
2687 ** current year).
2688 */
2689 void stats_report_page(){
2690 HQuery url; /* URL for various branch links */
2691 const char *zView = P("view"); /* Which view/report to show. */
2692 const char *zUserName = P("user");
2693
2694 login_check_credentials();
2695 if( !g.perm.Read ){ login_needed(); return; }
2696 if(!zUserName) zUserName = P("u");
2697 url_initialize(&url, "reports");
2698 if(zUserName && *zUserName){
2699 url_add_parameter(&url,"user", zUserName);
2700 timeline_submenu(&url, "(Remove User Flag)", "view", zView, "user");
2701 }
2702 timeline_submenu(&url, "By Year", "view", "byyear", 0);
2703 timeline_submenu(&url, "By Month", "view", "bymonth", 0);
2704 timeline_submenu(&url, "By Week", "view", "byweek", 0);
2705 timeline_submenu(&url, "By Weekday", "view", "byweekday", 0);
2706 timeline_submenu(&url, "By User", "view", "byuser", "user");
2707 url_reset(&url);
2708 style_header("Activity Reports");
2709 if(0==fossil_strcmp(zView,"byyear")){
2710 stats_report_by_month_year(0, 0, zUserName);
2711 }else if(0==fossil_strcmp(zView,"bymonth")){
2712 stats_report_by_month_year(1, 0, zUserName);
2713 }else if(0==fossil_strcmp(zView,"byweek")){
2714 stats_report_year_weeks(zUserName);
2715 }else if(0==fossil_strcmp(zView,"byuser")){
2716 stats_report_by_user();
2717 }else if(0==fossil_strcmp(zView,"byweekday")){
2718 stats_report_day_of_week();
2719 }else{
2720 @ <h1>Select a report to show:</h1>
2721 @ <ul>
2722 @ <li><a href='?view=byyear'>Events by year</a></li>
2723 @ <li><a href='?view=bymonth'>Events by month</a></li>
2724 @ <li><a href='?view=byweek'>Events by calendar week</a></li>
2725 @ <li><a href='?view=byweekday'>Events by day of the week</a></li>
2726 @ <li><a href='?view=byuser'>Events by user</a></li>
2727 @ </ul>
2728 }
2729
2730 style_footer();
2731 }
2732
--- src/timeline.c
+++ src/timeline.c
@@ -2044,688 +2044,7 @@
2044 const char *zUuid = db_column_text(&q, 0);
2045 @ <li>
2046 @ <a href="%s(g.zTop)/timeline?p=%s(zUuid)&amp;d=%s(zUuid)&amp;unhide">%S(zUuid)</a>
2047 }
2048 db_finalize(&q);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2049 style_footer();
2050 }
2051
+10 -4
--- win/Makefile.dmc
+++ win/Makefile.dmc
@@ -28,13 +28,13 @@
2828
2929
SQLITE_OPTIONS = -DNDEBUG=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_OMIT_DEPRECATED -DSQLITE_ENABLE_EXPLAIN_COMMENTS
3030
3131
SHELL_OPTIONS = -Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) -DSQLITE_SHELL_DBNAME_PROC=fossil_open -Daccess=file_access -Dsystem=fossil_system -Dgetenv=fossil_getenv -Dfopen=fossil_fopen
3232
33
-SRC = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.c builtin_.c bundle_.c cache_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c doc_.c encode_.c event_.c export_.c file_.c finfo_.c foci_.c fusefs_.c glob_.c graph_.c gzip_.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 pivot_.c popen_.c pqueue_.c printf_.c publish_.c purge_.c rebuild_.c regexp_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c sitemap_.c skins_.c sqlcmd_.c stash_.c stat_.c style_.c sync_.c tag_.c tar_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c unicode_.c update_.c url_.c user_.c utf8_.c util_.c verify_.c vfile_.c wiki_.c wikiformat_.c winfile_.c winhttp_.c wysiwyg_.c xfer_.c xfersetup_.c zip_.c
33
+SRC = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.c builtin_.c bundle_.c cache_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c doc_.c encode_.c event_.c export_.c file_.c finfo_.c foci_.c fusefs_.c glob_.c graph_.c gzip_.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 pivot_.c popen_.c pqueue_.c printf_.c publish_.c purge_.c rebuild_.c regexp_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c sitemap_.c skins_.c sqlcmd_.c stash_.c stat_.c statrep_.c style_.c sync_.c tag_.c tar_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c unicode_.c update_.c url_.c user_.c utf8_.c util_.c verify_.c vfile_.c wiki_.c wikiformat_.c winfile_.c winhttp_.c wysiwyg_.c xfer_.c xfersetup_.c zip_.c
3434
35
-OBJ = $(OBJDIR)\add$O $(OBJDIR)\allrepo$O $(OBJDIR)\attach$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)\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)\db$O $(OBJDIR)\delta$O $(OBJDIR)\deltacmd$O $(OBJDIR)\descendants$O $(OBJDIR)\diff$O $(OBJDIR)\diffcmd$O $(OBJDIR)\doc$O $(OBJDIR)\encode$O $(OBJDIR)\event$O $(OBJDIR)\export$O $(OBJDIR)\file$O $(OBJDIR)\finfo$O $(OBJDIR)\foci$O $(OBJDIR)\fusefs$O $(OBJDIR)\glob$O $(OBJDIR)\graph$O $(OBJDIR)\gzip$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)\pivot$O $(OBJDIR)\popen$O $(OBJDIR)\pqueue$O $(OBJDIR)\printf$O $(OBJDIR)\publish$O $(OBJDIR)\purge$O $(OBJDIR)\rebuild$O $(OBJDIR)\regexp$O $(OBJDIR)\report$O $(OBJDIR)\rss$O $(OBJDIR)\schema$O $(OBJDIR)\search$O $(OBJDIR)\setup$O $(OBJDIR)\sha1$O $(OBJDIR)\shun$O $(OBJDIR)\sitemap$O $(OBJDIR)\skins$O $(OBJDIR)\sqlcmd$O $(OBJDIR)\stash$O $(OBJDIR)\stat$O $(OBJDIR)\style$O $(OBJDIR)\sync$O $(OBJDIR)\tag$O $(OBJDIR)\tar$O $(OBJDIR)\th_main$O $(OBJDIR)\timeline$O $(OBJDIR)\tkt$O $(OBJDIR)\tktsetup$O $(OBJDIR)\undo$O $(OBJDIR)\unicode$O $(OBJDIR)\update$O $(OBJDIR)\url$O $(OBJDIR)\user$O $(OBJDIR)\utf8$O $(OBJDIR)\util$O $(OBJDIR)\verify$O $(OBJDIR)\vfile$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)\allrepo$O $(OBJDIR)\attach$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)\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)\db$O $(OBJDIR)\delta$O $(OBJDIR)\deltacmd$O $(OBJDIR)\descendants$O $(OBJDIR)\diff$O $(OBJDIR)\diffcmd$O $(OBJDIR)\doc$O $(OBJDIR)\encode$O $(OBJDIR)\event$O $(OBJDIR)\export$O $(OBJDIR)\file$O $(OBJDIR)\finfo$O $(OBJDIR)\foci$O $(OBJDIR)\fusefs$O $(OBJDIR)\glob$O $(OBJDIR)\graph$O $(OBJDIR)\gzip$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)\pivot$O $(OBJDIR)\popen$O $(OBJDIR)\pqueue$O $(OBJDIR)\printf$O $(OBJDIR)\publish$O $(OBJDIR)\purge$O $(OBJDIR)\rebuild$O $(OBJDIR)\regexp$O $(OBJDIR)\report$O $(OBJDIR)\rss$O $(OBJDIR)\schema$O $(OBJDIR)\search$O $(OBJDIR)\setup$O $(OBJDIR)\sha1$O $(OBJDIR)\shun$O $(OBJDIR)\sitemap$O $(OBJDIR)\skins$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)\th_main$O $(OBJDIR)\timeline$O $(OBJDIR)\tkt$O $(OBJDIR)\tktsetup$O $(OBJDIR)\undo$O $(OBJDIR)\unicode$O $(OBJDIR)\update$O $(OBJDIR)\url$O $(OBJDIR)\user$O $(OBJDIR)\utf8$O $(OBJDIR)\util$O $(OBJDIR)\verify$O $(OBJDIR)\vfile$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 allrepo attach bag bisect blob branch browse builtin bundle cache captcha cgi checkin checkout clearsign clone comformat configure content db delta deltacmd descendants diff diffcmd doc encode event export file finfo foci fusefs glob graph gzip 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 pivot popen pqueue printf publish purge rebuild regexp report rss schema search setup sha1 shun sitemap skins sqlcmd stash stat style sync tag tar th_main timeline tkt tktsetup undo unicode update url user utf8 util verify vfile wiki wikiformat winfile winhttp wysiwyg xfer xfersetup zip shell sqlite3 th th_lang > $@
54
+ +echo add allrepo attach bag bisect blob branch browse builtin bundle cache captcha cgi checkin checkout clearsign clone comformat configure content db delta deltacmd descendants diff diffcmd doc encode event export file finfo foci fusefs glob graph gzip 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 pivot popen pqueue printf publish purge rebuild regexp report rss schema search setup sha1 shun sitemap skins sqlcmd stash stat statrep style sync tag tar th_main timeline tkt tktsetup undo unicode update url user utf8 util verify vfile 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 >> $@
@@ -674,10 +674,16 @@
674674
$(OBJDIR)\stat$O : stat_.c stat.h
675675
$(TCC) -o$@ -c stat_.c
676676
677677
stat_.c : $(SRCDIR)\stat.c
678678
+translate$E $** > $@
679
+
680
+$(OBJDIR)\statrep$O : statrep_.c statrep.h
681
+ $(TCC) -o$@ -c statrep_.c
682
+
683
+statrep_.c : $(SRCDIR)\statrep.c
684
+ +translate$E $** > $@
679685
680686
$(OBJDIR)\style$O : style_.c style.h
681687
$(TCC) -o$@ -c style_.c
682688
683689
style_.c : $(SRCDIR)\style.c
@@ -826,7 +832,7 @@
826832
827833
zip_.c : $(SRCDIR)\zip.c
828834
+translate$E $** > $@
829835
830836
headers: makeheaders$E page_index.h builtin_data.h VERSION.h
831
- +makeheaders$E add_.c:add.h allrepo_.c:allrepo.h attach_.c:attach.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 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 db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h doc_.c:doc.h encode_.c:encode.h event_.c:event.h export_.c:export.h file_.c:file.h finfo_.c:finfo.h foci_.c:foci.h fusefs_.c:fusefs.h glob_.c:glob.h graph_.c:graph.h gzip_.c:gzip.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 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 report_.c:report.h rss_.c:rss.h schema_.c:schema.h search_.c:search.h setup_.c:setup.h sha1_.c:sha1.h shun_.c:shun.h sitemap_.c:sitemap.h skins_.c:skins.h sqlcmd_.c:sqlcmd.h stash_.c:stash.h stat_.c:stat.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h tar_.c:tar.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 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 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
837
+ +makeheaders$E add_.c:add.h allrepo_.c:allrepo.h attach_.c:attach.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 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 db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h doc_.c:doc.h encode_.c:encode.h event_.c:event.h export_.c:export.h file_.c:file.h finfo_.c:finfo.h foci_.c:foci.h fusefs_.c:fusefs.h glob_.c:glob.h graph_.c:graph.h gzip_.c:gzip.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 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 report_.c:report.h rss_.c:rss.h schema_.c:schema.h search_.c:search.h setup_.c:setup.h sha1_.c:sha1.h shun_.c:shun.h sitemap_.c:sitemap.h skins_.c:skins.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 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 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 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
832838
@copy /Y nul: headers
833839
--- win/Makefile.dmc
+++ win/Makefile.dmc
@@ -28,13 +28,13 @@
28
29 SQLITE_OPTIONS = -DNDEBUG=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_OMIT_DEPRECATED -DSQLITE_ENABLE_EXPLAIN_COMMENTS
30
31 SHELL_OPTIONS = -Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) -DSQLITE_SHELL_DBNAME_PROC=fossil_open -Daccess=file_access -Dsystem=fossil_system -Dgetenv=fossil_getenv -Dfopen=fossil_fopen
32
33 SRC = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.c builtin_.c bundle_.c cache_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c doc_.c encode_.c event_.c export_.c file_.c finfo_.c foci_.c fusefs_.c glob_.c graph_.c gzip_.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 pivot_.c popen_.c pqueue_.c printf_.c publish_.c purge_.c rebuild_.c regexp_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c sitemap_.c skins_.c sqlcmd_.c stash_.c stat_.c style_.c sync_.c tag_.c tar_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c unicode_.c update_.c url_.c user_.c utf8_.c util_.c verify_.c vfile_.c wiki_.c wikiformat_.c winfile_.c winhttp_.c wysiwyg_.c xfer_.c xfersetup_.c zip_.c
34
35 OBJ = $(OBJDIR)\add$O $(OBJDIR)\allrepo$O $(OBJDIR)\attach$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)\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)\db$O $(OBJDIR)\delta$O $(OBJDIR)\deltacmd$O $(OBJDIR)\descendants$O $(OBJDIR)\diff$O $(OBJDIR)\diffcmd$O $(OBJDIR)\doc$O $(OBJDIR)\encode$O $(OBJDIR)\event$O $(OBJDIR)\export$O $(OBJDIR)\file$O $(OBJDIR)\finfo$O $(OBJDIR)\foci$O $(OBJDIR)\fusefs$O $(OBJDIR)\glob$O $(OBJDIR)\graph$O $(OBJDIR)\gzip$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)\pivot$O $(OBJDIR)\popen$O $(OBJDIR)\pqueue$O $(OBJDIR)\printf$O $(OBJDIR)\publish$O $(OBJDIR)\purge$O $(OBJDIR)\rebuild$O $(OBJDIR)\regexp$O $(OBJDIR)\report$O $(OBJDIR)\rss$O $(OBJDIR)\schema$O $(OBJDIR)\search$O $(OBJDIR)\setup$O $(OBJDIR)\sha1$O $(OBJDIR)\shun$O $(OBJDIR)\sitemap$O $(OBJDIR)\skins$O $(OBJDIR)\sqlcmd$O $(OBJDIR)\stash$O $(OBJDIR)\stat$O $(OBJDIR)\style$O $(OBJDIR)\sync$O $(OBJDIR)\tag$O $(OBJDIR)\tar$O $(OBJDIR)\th_main$O $(OBJDIR)\timeline$O $(OBJDIR)\tkt$O $(OBJDIR)\tktsetup$O $(OBJDIR)\undo$O $(OBJDIR)\unicode$O $(OBJDIR)\update$O $(OBJDIR)\url$O $(OBJDIR)\user$O $(OBJDIR)\utf8$O $(OBJDIR)\util$O $(OBJDIR)\verify$O $(OBJDIR)\vfile$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 allrepo attach bag bisect blob branch browse builtin bundle cache captcha cgi checkin checkout clearsign clone comformat configure content db delta deltacmd descendants diff diffcmd doc encode event export file finfo foci fusefs glob graph gzip 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 pivot popen pqueue printf publish purge rebuild regexp report rss schema search setup sha1 shun sitemap skins sqlcmd stash stat style sync tag tar th_main timeline tkt tktsetup undo unicode update url user utf8 util verify vfile 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 >> $@
@@ -674,10 +674,16 @@
674 $(OBJDIR)\stat$O : stat_.c stat.h
675 $(TCC) -o$@ -c stat_.c
676
677 stat_.c : $(SRCDIR)\stat.c
678 +translate$E $** > $@
 
 
 
 
 
 
679
680 $(OBJDIR)\style$O : style_.c style.h
681 $(TCC) -o$@ -c style_.c
682
683 style_.c : $(SRCDIR)\style.c
@@ -826,7 +832,7 @@
826
827 zip_.c : $(SRCDIR)\zip.c
828 +translate$E $** > $@
829
830 headers: makeheaders$E page_index.h builtin_data.h VERSION.h
831 +makeheaders$E add_.c:add.h allrepo_.c:allrepo.h attach_.c:attach.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 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 db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h doc_.c:doc.h encode_.c:encode.h event_.c:event.h export_.c:export.h file_.c:file.h finfo_.c:finfo.h foci_.c:foci.h fusefs_.c:fusefs.h glob_.c:glob.h graph_.c:graph.h gzip_.c:gzip.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 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 report_.c:report.h rss_.c:rss.h schema_.c:schema.h search_.c:search.h setup_.c:setup.h sha1_.c:sha1.h shun_.c:shun.h sitemap_.c:sitemap.h skins_.c:skins.h sqlcmd_.c:sqlcmd.h stash_.c:stash.h stat_.c:stat.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h tar_.c:tar.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 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 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
832 @copy /Y nul: headers
833
--- win/Makefile.dmc
+++ win/Makefile.dmc
@@ -28,13 +28,13 @@
28
29 SQLITE_OPTIONS = -DNDEBUG=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_OMIT_DEPRECATED -DSQLITE_ENABLE_EXPLAIN_COMMENTS
30
31 SHELL_OPTIONS = -Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) -DSQLITE_SHELL_DBNAME_PROC=fossil_open -Daccess=file_access -Dsystem=fossil_system -Dgetenv=fossil_getenv -Dfopen=fossil_fopen
32
33 SRC = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.c builtin_.c bundle_.c cache_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c doc_.c encode_.c event_.c export_.c file_.c finfo_.c foci_.c fusefs_.c glob_.c graph_.c gzip_.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 pivot_.c popen_.c pqueue_.c printf_.c publish_.c purge_.c rebuild_.c regexp_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c sitemap_.c skins_.c sqlcmd_.c stash_.c stat_.c statrep_.c style_.c sync_.c tag_.c tar_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c unicode_.c update_.c url_.c user_.c utf8_.c util_.c verify_.c vfile_.c wiki_.c wikiformat_.c winfile_.c winhttp_.c wysiwyg_.c xfer_.c xfersetup_.c zip_.c
34
35 OBJ = $(OBJDIR)\add$O $(OBJDIR)\allrepo$O $(OBJDIR)\attach$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)\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)\db$O $(OBJDIR)\delta$O $(OBJDIR)\deltacmd$O $(OBJDIR)\descendants$O $(OBJDIR)\diff$O $(OBJDIR)\diffcmd$O $(OBJDIR)\doc$O $(OBJDIR)\encode$O $(OBJDIR)\event$O $(OBJDIR)\export$O $(OBJDIR)\file$O $(OBJDIR)\finfo$O $(OBJDIR)\foci$O $(OBJDIR)\fusefs$O $(OBJDIR)\glob$O $(OBJDIR)\graph$O $(OBJDIR)\gzip$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)\pivot$O $(OBJDIR)\popen$O $(OBJDIR)\pqueue$O $(OBJDIR)\printf$O $(OBJDIR)\publish$O $(OBJDIR)\purge$O $(OBJDIR)\rebuild$O $(OBJDIR)\regexp$O $(OBJDIR)\report$O $(OBJDIR)\rss$O $(OBJDIR)\schema$O $(OBJDIR)\search$O $(OBJDIR)\setup$O $(OBJDIR)\sha1$O $(OBJDIR)\shun$O $(OBJDIR)\sitemap$O $(OBJDIR)\skins$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)\th_main$O $(OBJDIR)\timeline$O $(OBJDIR)\tkt$O $(OBJDIR)\tktsetup$O $(OBJDIR)\undo$O $(OBJDIR)\unicode$O $(OBJDIR)\update$O $(OBJDIR)\url$O $(OBJDIR)\user$O $(OBJDIR)\utf8$O $(OBJDIR)\util$O $(OBJDIR)\verify$O $(OBJDIR)\vfile$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 allrepo attach bag bisect blob branch browse builtin bundle cache captcha cgi checkin checkout clearsign clone comformat configure content db delta deltacmd descendants diff diffcmd doc encode event export file finfo foci fusefs glob graph gzip 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 pivot popen pqueue printf publish purge rebuild regexp report rss schema search setup sha1 shun sitemap skins sqlcmd stash stat statrep style sync tag tar th_main timeline tkt tktsetup undo unicode update url user utf8 util verify vfile 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 >> $@
@@ -674,10 +674,16 @@
674 $(OBJDIR)\stat$O : stat_.c stat.h
675 $(TCC) -o$@ -c stat_.c
676
677 stat_.c : $(SRCDIR)\stat.c
678 +translate$E $** > $@
679
680 $(OBJDIR)\statrep$O : statrep_.c statrep.h
681 $(TCC) -o$@ -c statrep_.c
682
683 statrep_.c : $(SRCDIR)\statrep.c
684 +translate$E $** > $@
685
686 $(OBJDIR)\style$O : style_.c style.h
687 $(TCC) -o$@ -c style_.c
688
689 style_.c : $(SRCDIR)\style.c
@@ -826,7 +832,7 @@
832
833 zip_.c : $(SRCDIR)\zip.c
834 +translate$E $** > $@
835
836 headers: makeheaders$E page_index.h builtin_data.h VERSION.h
837 +makeheaders$E add_.c:add.h allrepo_.c:allrepo.h attach_.c:attach.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 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 db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h doc_.c:doc.h encode_.c:encode.h event_.c:event.h export_.c:export.h file_.c:file.h finfo_.c:finfo.h foci_.c:foci.h fusefs_.c:fusefs.h glob_.c:glob.h graph_.c:graph.h gzip_.c:gzip.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 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 report_.c:report.h rss_.c:rss.h schema_.c:schema.h search_.c:search.h setup_.c:setup.h sha1_.c:sha1.h shun_.c:shun.h sitemap_.c:sitemap.h skins_.c:skins.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 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 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 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
838 @copy /Y nul: headers
839
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -457,10 +457,11 @@
457457
$(SRCDIR)/sitemap.c \
458458
$(SRCDIR)/skins.c \
459459
$(SRCDIR)/sqlcmd.c \
460460
$(SRCDIR)/stash.c \
461461
$(SRCDIR)/stat.c \
462
+ $(SRCDIR)/statrep.c \
462463
$(SRCDIR)/style.c \
463464
$(SRCDIR)/sync.c \
464465
$(SRCDIR)/tag.c \
465466
$(SRCDIR)/tar.c \
466467
$(SRCDIR)/th_main.c \
@@ -604,10 +605,11 @@
604605
$(OBJDIR)/sitemap_.c \
605606
$(OBJDIR)/skins_.c \
606607
$(OBJDIR)/sqlcmd_.c \
607608
$(OBJDIR)/stash_.c \
608609
$(OBJDIR)/stat_.c \
610
+ $(OBJDIR)/statrep_.c \
609611
$(OBJDIR)/style_.c \
610612
$(OBJDIR)/sync_.c \
611613
$(OBJDIR)/tag_.c \
612614
$(OBJDIR)/tar_.c \
613615
$(OBJDIR)/th_main_.c \
@@ -723,10 +725,11 @@
723725
$(OBJDIR)/sitemap.o \
724726
$(OBJDIR)/skins.o \
725727
$(OBJDIR)/sqlcmd.o \
726728
$(OBJDIR)/stash.o \
727729
$(OBJDIR)/stat.o \
730
+ $(OBJDIR)/statrep.o \
728731
$(OBJDIR)/style.o \
729732
$(OBJDIR)/sync.o \
730733
$(OBJDIR)/tag.o \
731734
$(OBJDIR)/tar.o \
732735
$(OBJDIR)/th_main.o \
@@ -1035,10 +1038,11 @@
10351038
$(OBJDIR)/sitemap_.c:$(OBJDIR)/sitemap.h \
10361039
$(OBJDIR)/skins_.c:$(OBJDIR)/skins.h \
10371040
$(OBJDIR)/sqlcmd_.c:$(OBJDIR)/sqlcmd.h \
10381041
$(OBJDIR)/stash_.c:$(OBJDIR)/stash.h \
10391042
$(OBJDIR)/stat_.c:$(OBJDIR)/stat.h \
1043
+ $(OBJDIR)/statrep_.c:$(OBJDIR)/statrep.h \
10401044
$(OBJDIR)/style_.c:$(OBJDIR)/style.h \
10411045
$(OBJDIR)/sync_.c:$(OBJDIR)/sync.h \
10421046
$(OBJDIR)/tag_.c:$(OBJDIR)/tag.h \
10431047
$(OBJDIR)/tar_.c:$(OBJDIR)/tar.h \
10441048
$(OBJDIR)/th_main_.c:$(OBJDIR)/th_main.h \
@@ -1804,10 +1808,18 @@
18041808
18051809
$(OBJDIR)/stat.o: $(OBJDIR)/stat_.c $(OBJDIR)/stat.h $(SRCDIR)/config.h
18061810
$(XTCC) -o $(OBJDIR)/stat.o -c $(OBJDIR)/stat_.c
18071811
18081812
$(OBJDIR)/stat.h: $(OBJDIR)/headers
1813
+
1814
+$(OBJDIR)/statrep_.c: $(SRCDIR)/statrep.c $(TRANSLATE)
1815
+ $(TRANSLATE) $(SRCDIR)/statrep.c >$@
1816
+
1817
+$(OBJDIR)/statrep.o: $(OBJDIR)/statrep_.c $(OBJDIR)/statrep.h $(SRCDIR)/config.h
1818
+ $(XTCC) -o $(OBJDIR)/statrep.o -c $(OBJDIR)/statrep_.c
1819
+
1820
+$(OBJDIR)/statrep.h: $(OBJDIR)/headers
18091821
18101822
$(OBJDIR)/style_.c: $(SRCDIR)/style.c $(TRANSLATE)
18111823
$(TRANSLATE) $(SRCDIR)/style.c >$@
18121824
18131825
$(OBJDIR)/style.o: $(OBJDIR)/style_.c $(OBJDIR)/style.h $(SRCDIR)/config.h
18141826
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -457,10 +457,11 @@
457 $(SRCDIR)/sitemap.c \
458 $(SRCDIR)/skins.c \
459 $(SRCDIR)/sqlcmd.c \
460 $(SRCDIR)/stash.c \
461 $(SRCDIR)/stat.c \
 
462 $(SRCDIR)/style.c \
463 $(SRCDIR)/sync.c \
464 $(SRCDIR)/tag.c \
465 $(SRCDIR)/tar.c \
466 $(SRCDIR)/th_main.c \
@@ -604,10 +605,11 @@
604 $(OBJDIR)/sitemap_.c \
605 $(OBJDIR)/skins_.c \
606 $(OBJDIR)/sqlcmd_.c \
607 $(OBJDIR)/stash_.c \
608 $(OBJDIR)/stat_.c \
 
609 $(OBJDIR)/style_.c \
610 $(OBJDIR)/sync_.c \
611 $(OBJDIR)/tag_.c \
612 $(OBJDIR)/tar_.c \
613 $(OBJDIR)/th_main_.c \
@@ -723,10 +725,11 @@
723 $(OBJDIR)/sitemap.o \
724 $(OBJDIR)/skins.o \
725 $(OBJDIR)/sqlcmd.o \
726 $(OBJDIR)/stash.o \
727 $(OBJDIR)/stat.o \
 
728 $(OBJDIR)/style.o \
729 $(OBJDIR)/sync.o \
730 $(OBJDIR)/tag.o \
731 $(OBJDIR)/tar.o \
732 $(OBJDIR)/th_main.o \
@@ -1035,10 +1038,11 @@
1035 $(OBJDIR)/sitemap_.c:$(OBJDIR)/sitemap.h \
1036 $(OBJDIR)/skins_.c:$(OBJDIR)/skins.h \
1037 $(OBJDIR)/sqlcmd_.c:$(OBJDIR)/sqlcmd.h \
1038 $(OBJDIR)/stash_.c:$(OBJDIR)/stash.h \
1039 $(OBJDIR)/stat_.c:$(OBJDIR)/stat.h \
 
1040 $(OBJDIR)/style_.c:$(OBJDIR)/style.h \
1041 $(OBJDIR)/sync_.c:$(OBJDIR)/sync.h \
1042 $(OBJDIR)/tag_.c:$(OBJDIR)/tag.h \
1043 $(OBJDIR)/tar_.c:$(OBJDIR)/tar.h \
1044 $(OBJDIR)/th_main_.c:$(OBJDIR)/th_main.h \
@@ -1804,10 +1808,18 @@
1804
1805 $(OBJDIR)/stat.o: $(OBJDIR)/stat_.c $(OBJDIR)/stat.h $(SRCDIR)/config.h
1806 $(XTCC) -o $(OBJDIR)/stat.o -c $(OBJDIR)/stat_.c
1807
1808 $(OBJDIR)/stat.h: $(OBJDIR)/headers
 
 
 
 
 
 
 
 
1809
1810 $(OBJDIR)/style_.c: $(SRCDIR)/style.c $(TRANSLATE)
1811 $(TRANSLATE) $(SRCDIR)/style.c >$@
1812
1813 $(OBJDIR)/style.o: $(OBJDIR)/style_.c $(OBJDIR)/style.h $(SRCDIR)/config.h
1814
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -457,10 +457,11 @@
457 $(SRCDIR)/sitemap.c \
458 $(SRCDIR)/skins.c \
459 $(SRCDIR)/sqlcmd.c \
460 $(SRCDIR)/stash.c \
461 $(SRCDIR)/stat.c \
462 $(SRCDIR)/statrep.c \
463 $(SRCDIR)/style.c \
464 $(SRCDIR)/sync.c \
465 $(SRCDIR)/tag.c \
466 $(SRCDIR)/tar.c \
467 $(SRCDIR)/th_main.c \
@@ -604,10 +605,11 @@
605 $(OBJDIR)/sitemap_.c \
606 $(OBJDIR)/skins_.c \
607 $(OBJDIR)/sqlcmd_.c \
608 $(OBJDIR)/stash_.c \
609 $(OBJDIR)/stat_.c \
610 $(OBJDIR)/statrep_.c \
611 $(OBJDIR)/style_.c \
612 $(OBJDIR)/sync_.c \
613 $(OBJDIR)/tag_.c \
614 $(OBJDIR)/tar_.c \
615 $(OBJDIR)/th_main_.c \
@@ -723,10 +725,11 @@
725 $(OBJDIR)/sitemap.o \
726 $(OBJDIR)/skins.o \
727 $(OBJDIR)/sqlcmd.o \
728 $(OBJDIR)/stash.o \
729 $(OBJDIR)/stat.o \
730 $(OBJDIR)/statrep.o \
731 $(OBJDIR)/style.o \
732 $(OBJDIR)/sync.o \
733 $(OBJDIR)/tag.o \
734 $(OBJDIR)/tar.o \
735 $(OBJDIR)/th_main.o \
@@ -1035,10 +1038,11 @@
1038 $(OBJDIR)/sitemap_.c:$(OBJDIR)/sitemap.h \
1039 $(OBJDIR)/skins_.c:$(OBJDIR)/skins.h \
1040 $(OBJDIR)/sqlcmd_.c:$(OBJDIR)/sqlcmd.h \
1041 $(OBJDIR)/stash_.c:$(OBJDIR)/stash.h \
1042 $(OBJDIR)/stat_.c:$(OBJDIR)/stat.h \
1043 $(OBJDIR)/statrep_.c:$(OBJDIR)/statrep.h \
1044 $(OBJDIR)/style_.c:$(OBJDIR)/style.h \
1045 $(OBJDIR)/sync_.c:$(OBJDIR)/sync.h \
1046 $(OBJDIR)/tag_.c:$(OBJDIR)/tag.h \
1047 $(OBJDIR)/tar_.c:$(OBJDIR)/tar.h \
1048 $(OBJDIR)/th_main_.c:$(OBJDIR)/th_main.h \
@@ -1804,10 +1808,18 @@
1808
1809 $(OBJDIR)/stat.o: $(OBJDIR)/stat_.c $(OBJDIR)/stat.h $(SRCDIR)/config.h
1810 $(XTCC) -o $(OBJDIR)/stat.o -c $(OBJDIR)/stat_.c
1811
1812 $(OBJDIR)/stat.h: $(OBJDIR)/headers
1813
1814 $(OBJDIR)/statrep_.c: $(SRCDIR)/statrep.c $(TRANSLATE)
1815 $(TRANSLATE) $(SRCDIR)/statrep.c >$@
1816
1817 $(OBJDIR)/statrep.o: $(OBJDIR)/statrep_.c $(OBJDIR)/statrep.h $(SRCDIR)/config.h
1818 $(XTCC) -o $(OBJDIR)/statrep.o -c $(OBJDIR)/statrep_.c
1819
1820 $(OBJDIR)/statrep.h: $(OBJDIR)/headers
1821
1822 $(OBJDIR)/style_.c: $(SRCDIR)/style.c $(TRANSLATE)
1823 $(TRANSLATE) $(SRCDIR)/style.c >$@
1824
1825 $(OBJDIR)/style.o: $(OBJDIR)/style_.c $(OBJDIR)/style.h $(SRCDIR)/config.h
1826
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -296,10 +296,11 @@
296296
sitemap_.c \
297297
skins_.c \
298298
sqlcmd_.c \
299299
stash_.c \
300300
stat_.c \
301
+ statrep_.c \
301302
style_.c \
302303
sync_.c \
303304
tag_.c \
304305
tar_.c \
305306
th_main_.c \
@@ -444,10 +445,11 @@
444445
$(OX)\skins$O \
445446
$(OX)\sqlcmd$O \
446447
$(OX)\sqlite3$O \
447448
$(OX)\stash$O \
448449
$(OX)\stat$O \
450
+ $(OX)\statrep$O \
449451
$(OX)\style$O \
450452
$(OX)\sync$O \
451453
$(OX)\tag$O \
452454
$(OX)\tar$O \
453455
$(OX)\th$O \
@@ -618,10 +620,11 @@
618620
echo $(OX)\skins.obj >> $@
619621
echo $(OX)\sqlcmd.obj >> $@
620622
echo $(OX)\sqlite3.obj >> $@
621623
echo $(OX)\stash.obj >> $@
622624
echo $(OX)\stat.obj >> $@
625
+ echo $(OX)\statrep.obj >> $@
623626
echo $(OX)\style.obj >> $@
624627
echo $(OX)\sync.obj >> $@
625628
echo $(OX)\tag.obj >> $@
626629
echo $(OX)\tar.obj >> $@
627630
echo $(OX)\th.obj >> $@
@@ -1296,10 +1299,16 @@
12961299
$(OX)\stat$O : stat_.c stat.h
12971300
$(TCC) /Fo$@ -c stat_.c
12981301
12991302
stat_.c : $(SRCDIR)\stat.c
13001303
translate$E $** > $@
1304
+
1305
+$(OX)\statrep$O : statrep_.c statrep.h
1306
+ $(TCC) /Fo$@ -c statrep_.c
1307
+
1308
+statrep_.c : $(SRCDIR)\statrep.c
1309
+ translate$E $** > $@
13011310
13021311
$(OX)\style$O : style_.c style.h
13031312
$(TCC) /Fo$@ -c style_.c
13041313
13051314
style_.c : $(SRCDIR)\style.c
@@ -1543,10 +1552,11 @@
15431552
sitemap_.c:sitemap.h \
15441553
skins_.c:skins.h \
15451554
sqlcmd_.c:sqlcmd.h \
15461555
stash_.c:stash.h \
15471556
stat_.c:stat.h \
1557
+ statrep_.c:statrep.h \
15481558
style_.c:style.h \
15491559
sync_.c:sync.h \
15501560
tag_.c:tag.h \
15511561
tar_.c:tar.h \
15521562
th_main_.c:th_main.h \
15531563
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -296,10 +296,11 @@
296 sitemap_.c \
297 skins_.c \
298 sqlcmd_.c \
299 stash_.c \
300 stat_.c \
 
301 style_.c \
302 sync_.c \
303 tag_.c \
304 tar_.c \
305 th_main_.c \
@@ -444,10 +445,11 @@
444 $(OX)\skins$O \
445 $(OX)\sqlcmd$O \
446 $(OX)\sqlite3$O \
447 $(OX)\stash$O \
448 $(OX)\stat$O \
 
449 $(OX)\style$O \
450 $(OX)\sync$O \
451 $(OX)\tag$O \
452 $(OX)\tar$O \
453 $(OX)\th$O \
@@ -618,10 +620,11 @@
618 echo $(OX)\skins.obj >> $@
619 echo $(OX)\sqlcmd.obj >> $@
620 echo $(OX)\sqlite3.obj >> $@
621 echo $(OX)\stash.obj >> $@
622 echo $(OX)\stat.obj >> $@
 
623 echo $(OX)\style.obj >> $@
624 echo $(OX)\sync.obj >> $@
625 echo $(OX)\tag.obj >> $@
626 echo $(OX)\tar.obj >> $@
627 echo $(OX)\th.obj >> $@
@@ -1296,10 +1299,16 @@
1296 $(OX)\stat$O : stat_.c stat.h
1297 $(TCC) /Fo$@ -c stat_.c
1298
1299 stat_.c : $(SRCDIR)\stat.c
1300 translate$E $** > $@
 
 
 
 
 
 
1301
1302 $(OX)\style$O : style_.c style.h
1303 $(TCC) /Fo$@ -c style_.c
1304
1305 style_.c : $(SRCDIR)\style.c
@@ -1543,10 +1552,11 @@
1543 sitemap_.c:sitemap.h \
1544 skins_.c:skins.h \
1545 sqlcmd_.c:sqlcmd.h \
1546 stash_.c:stash.h \
1547 stat_.c:stat.h \
 
1548 style_.c:style.h \
1549 sync_.c:sync.h \
1550 tag_.c:tag.h \
1551 tar_.c:tar.h \
1552 th_main_.c:th_main.h \
1553
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -296,10 +296,11 @@
296 sitemap_.c \
297 skins_.c \
298 sqlcmd_.c \
299 stash_.c \
300 stat_.c \
301 statrep_.c \
302 style_.c \
303 sync_.c \
304 tag_.c \
305 tar_.c \
306 th_main_.c \
@@ -444,10 +445,11 @@
445 $(OX)\skins$O \
446 $(OX)\sqlcmd$O \
447 $(OX)\sqlite3$O \
448 $(OX)\stash$O \
449 $(OX)\stat$O \
450 $(OX)\statrep$O \
451 $(OX)\style$O \
452 $(OX)\sync$O \
453 $(OX)\tag$O \
454 $(OX)\tar$O \
455 $(OX)\th$O \
@@ -618,10 +620,11 @@
620 echo $(OX)\skins.obj >> $@
621 echo $(OX)\sqlcmd.obj >> $@
622 echo $(OX)\sqlite3.obj >> $@
623 echo $(OX)\stash.obj >> $@
624 echo $(OX)\stat.obj >> $@
625 echo $(OX)\statrep.obj >> $@
626 echo $(OX)\style.obj >> $@
627 echo $(OX)\sync.obj >> $@
628 echo $(OX)\tag.obj >> $@
629 echo $(OX)\tar.obj >> $@
630 echo $(OX)\th.obj >> $@
@@ -1296,10 +1299,16 @@
1299 $(OX)\stat$O : stat_.c stat.h
1300 $(TCC) /Fo$@ -c stat_.c
1301
1302 stat_.c : $(SRCDIR)\stat.c
1303 translate$E $** > $@
1304
1305 $(OX)\statrep$O : statrep_.c statrep.h
1306 $(TCC) /Fo$@ -c statrep_.c
1307
1308 statrep_.c : $(SRCDIR)\statrep.c
1309 translate$E $** > $@
1310
1311 $(OX)\style$O : style_.c style.h
1312 $(TCC) /Fo$@ -c style_.c
1313
1314 style_.c : $(SRCDIR)\style.c
@@ -1543,10 +1552,11 @@
1552 sitemap_.c:sitemap.h \
1553 skins_.c:skins.h \
1554 sqlcmd_.c:sqlcmd.h \
1555 stash_.c:stash.h \
1556 stat_.c:stat.h \
1557 statrep_.c:statrep.h \
1558 style_.c:style.h \
1559 sync_.c:sync.h \
1560 tag_.c:tag.h \
1561 tar_.c:tar.h \
1562 th_main_.c:th_main.h \
1563

Keyboard Shortcuts

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