|
|
|
|
@ -1,5 +1,41 @@
|
|
|
|
|
--- db.c.orig Mon Dec 9 16:16:03 2002
|
|
|
|
|
+++ db.c Sun Jul 6 08:09:25 2003
|
|
|
|
|
Index: attach.c
|
|
|
|
|
--- attach.c.orig 2002-12-16 15:24:22.000000000 +0100
|
|
|
|
|
+++ attach.c 2003-12-04 16:45:41.000000000 +0100
|
|
|
|
|
@@ -173,6 +173,7 @@
|
|
|
|
|
blob_decode(az[3], az[3]);
|
|
|
|
|
cgi_set_content_type(az[1]);
|
|
|
|
|
cgi_append_content(az[3], atoi(az[0]));
|
|
|
|
|
+ g.isConst = 1;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Index: cgi.c
|
|
|
|
|
--- cgi.c.orig 2002-11-30 21:00:33.000000000 +0100
|
|
|
|
|
+++ cgi.c 2003-12-04 16:45:41.000000000 +0100
|
|
|
|
|
@@ -149,9 +149,9 @@
|
|
|
|
|
){
|
|
|
|
|
char *zCookie;
|
|
|
|
|
if( zPath==0 ) zPath = "/";
|
|
|
|
|
- if( lifetime>=0 ){
|
|
|
|
|
+ if( lifetime>0 ){
|
|
|
|
|
zCookie = mprintf("SET-COOKIE: %s=%t; PATH=%s; MAX-AGE=%d;\r\n",
|
|
|
|
|
- zName, zValue, zPath);
|
|
|
|
|
+ zName, zValue, zPath, lifetime);
|
|
|
|
|
}else{
|
|
|
|
|
zCookie = mprintf("SET-COOKIE: %s=%t; PATH=%s;\r\n",
|
|
|
|
|
zName, zValue, zPath);
|
|
|
|
|
@@ -1110,7 +1110,7 @@
|
|
|
|
|
precision = va_arg(ap,int);
|
|
|
|
|
#ifndef etCOMPATIBILITY
|
|
|
|
|
/* This is sensible, but SUN OS 4.1 doesn't do it. */
|
|
|
|
|
- if( precision<0 ) precision = -precision;
|
|
|
|
|
+ if( precision<0 ) precision = 0x7fffffff & -precision;
|
|
|
|
|
#endif
|
|
|
|
|
c = *++fmt;
|
|
|
|
|
}else{
|
|
|
|
|
Index: db.c
|
|
|
|
|
--- db.c.orig 2002-12-09 16:16:03.000000000 +0100
|
|
|
|
|
+++ db.c 2003-12-04 16:45:41.000000000 +0100
|
|
|
|
|
@@ -32,12 +32,6 @@
|
|
|
|
|
#include "db.h"
|
|
|
|
|
|
|
|
|
|
@ -13,3 +49,123 @@
|
|
|
|
|
** The following is the handle to the open database.
|
|
|
|
|
*/
|
|
|
|
|
static sqlite *pDb = 0;
|
|
|
|
|
Index: format.c
|
|
|
|
|
--- format.c.orig 2002-12-16 15:27:04.000000000 +0100
|
|
|
|
|
+++ format.c 2003-12-04 16:45:41.000000000 +0100
|
|
|
|
|
@@ -454,7 +454,7 @@
|
|
|
|
|
int lineStart = 1; /* At the start of a line */
|
|
|
|
|
int paraStart = 1; /* At the start of a paragraph */
|
|
|
|
|
const char *zEndB; /* Text used to end a run of bold */
|
|
|
|
|
- const char **azAttach; /* Attachments to zPageId */
|
|
|
|
|
+ char **azAttach; /* Attachments to zPageId */
|
|
|
|
|
static int once = 1;
|
|
|
|
|
static int nTicket, nCommit;
|
|
|
|
|
if( once ){
|
|
|
|
|
Index: history.c
|
|
|
|
|
--- history.c.orig 2002-12-16 15:24:23.000000000 +0100
|
|
|
|
|
+++ history.c 2003-12-04 16:45:41.000000000 +0100
|
|
|
|
|
@@ -155,10 +155,11 @@
|
|
|
|
|
p->tm_year += p->tm_mon/12;
|
|
|
|
|
p->tm_mon %= 12;
|
|
|
|
|
}
|
|
|
|
|
- isLeapYr = p->tm_year/4==0 && (p->tm_year/100!=0 || (p->tm_year+300)/400==0);
|
|
|
|
|
+ isLeapYr = p->tm_year%4==0 && (p->tm_year%100!=0 || (p->tm_year+300)%400==0);
|
|
|
|
|
p->tm_yday = priorDays[p->tm_mon] + p->tm_mday - 1;
|
|
|
|
|
if( isLeapYr && p->tm_mon>1 ) p->tm_yday++;
|
|
|
|
|
- nDay = (p->tm_year-70)*365 + (p->tm_year-69)/4 + p->tm_yday;
|
|
|
|
|
+ nDay = (p->tm_year-70)*365 + (p->tm_year-69)/4 -p->tm_year/100 +
|
|
|
|
|
+ (p->tm_year+300)/400 + p->tm_yday;
|
|
|
|
|
t = ((nDay*24 + p->tm_hour)*60 + p->tm_min)*60 + p->tm_sec;
|
|
|
|
|
return t;
|
|
|
|
|
}
|
|
|
|
|
@@ -325,8 +326,8 @@
|
|
|
|
|
);
|
|
|
|
|
#else
|
|
|
|
|
db_execute(
|
|
|
|
|
- "CREATE TEMP TABLE fc(time,user,file,vers);"
|
|
|
|
|
- "CREATE TEMP TABLE rev(time,ins,del,user,branch,vers,file,comment);"
|
|
|
|
|
+ "CREATE TEMP TABLE fc(time,user,file,vers text);"
|
|
|
|
|
+ "CREATE TEMP TABLE rev(time,ins,del,user,branch,vers text,file,comment);"
|
|
|
|
|
);
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
@@ -431,13 +432,13 @@
|
|
|
|
|
** Extract delta comments from all files that have changed.
|
|
|
|
|
*/
|
|
|
|
|
azFileList = db_query("SELECT DISTINCT file FROM fc");
|
|
|
|
|
- minTime--;
|
|
|
|
|
+ minTime -= 3600;
|
|
|
|
|
pTm = gmtime(&minTime);
|
|
|
|
|
strftime(zLine, sizeof(zLine)-1, "%Y-%m-%d %H:%M:%S", pTm);
|
|
|
|
|
i = strlen(zLine);
|
|
|
|
|
strcpy(&zLine[i],"<=");
|
|
|
|
|
i += 2;
|
|
|
|
|
- maxTime++;
|
|
|
|
|
+ maxTime += 3600;
|
|
|
|
|
pTm = gmtime(&maxTime);
|
|
|
|
|
strftime(&zLine[i], sizeof(zLine)-i-1, "%Y-%m-%d %H:%M:%S", pTm);
|
|
|
|
|
zTRange = mprintf("%s",zLine);
|
|
|
|
|
Index: main.c
|
|
|
|
|
--- main.c.orig 2002-12-09 16:17:48.000000000 +0100
|
|
|
|
|
+++ main.c 2003-12-04 16:45:41.000000000 +0100
|
|
|
|
|
@@ -85,7 +85,7 @@
|
|
|
|
|
){
|
|
|
|
|
int upr, lwr;
|
|
|
|
|
lwr = 0;
|
|
|
|
|
- upr = sizeof(aSearch)/sizeof(aSearch[0]);
|
|
|
|
|
+ upr = sizeof(aSearch)/sizeof(aSearch[0])-1;
|
|
|
|
|
while( lwr<=upr ){
|
|
|
|
|
int mid, c;
|
|
|
|
|
mid = (upr+lwr)/2;
|
|
|
|
|
Index: setup.c
|
|
|
|
|
--- setup.c.orig 2002-12-16 16:57:33.000000000 +0100
|
|
|
|
|
+++ setup.c 2003-12-04 16:45:41.000000000 +0100
|
|
|
|
|
@@ -663,7 +663,7 @@
|
|
|
|
|
);
|
|
|
|
|
}else{
|
|
|
|
|
db_execute("DELETE FROM config WHERE name='%s_name'", zEnum);
|
|
|
|
|
- db_execute("DELETE FORM enums WHERE type='%s'", zEnum);
|
|
|
|
|
+ db_execute("DELETE FROM enums WHERE type='%s'", zEnum);
|
|
|
|
|
}
|
|
|
|
|
db_execute("COMMIT");
|
|
|
|
|
db_config(0,0);
|
|
|
|
|
Index: timeline.c
|
|
|
|
|
--- timeline.c.orig 2002-12-16 17:36:11.000000000 +0100
|
|
|
|
|
+++ timeline.c 2003-12-04 16:45:41.000000000 +0100
|
|
|
|
|
@@ -220,10 +220,10 @@
|
|
|
|
|
len += strlen(&zSQL[len]);
|
|
|
|
|
}
|
|
|
|
|
if( showC==0 || zCkinPrfx ){
|
|
|
|
|
- sprintf(&zSQL[len]," AND milestone");
|
|
|
|
|
+ sprintf(&zSQL[len]," AND milestone%s", showM ? "" : "==1");
|
|
|
|
|
len += strlen(&zSQL[len]);
|
|
|
|
|
}else if( showC==1 ){
|
|
|
|
|
- sprintf(&zSQL[len]," AND (milestone OR branch!='')");
|
|
|
|
|
+ sprintf(&zSQL[len]," AND (milestone%s OR branch!='')", showM ? "":"==1");
|
|
|
|
|
len += strlen(&zSQL[len]);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
Index: wiki.c
|
|
|
|
|
--- wiki.c.orig 2002-12-16 15:14:59.000000000 +0100
|
|
|
|
|
+++ wiki.c 2003-12-04 16:45:41.000000000 +0100
|
|
|
|
|
@@ -249,7 +249,7 @@
|
|
|
|
|
if( P("preview") ){
|
|
|
|
|
@ <input type="hidden" name="x" value="%h(text)">
|
|
|
|
|
@ <p>The following is what the page will look like:</p>
|
|
|
|
|
- @ <p><table border=2 cellpadding=5 width="100%%_"><tr><td>
|
|
|
|
|
+ @ <p><table border=2 cellpadding=5 width="100%%"><tr><td>
|
|
|
|
|
output_wiki(text,"",pg);
|
|
|
|
|
@ </td></tr></table></p><br>
|
|
|
|
|
}else{
|
|
|
|
|
@@ -477,9 +477,9 @@
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if( P("one") ){
|
|
|
|
|
- db_execute("DELETE FROM wiki WHERE name='%s' AND invtime=-%s", pg, t2);
|
|
|
|
|
+ db_execute("DELETE FROM wiki WHERE name='%s' AND invtime=%d", pg,-atoi(t2));
|
|
|
|
|
}else if( P("after") ){
|
|
|
|
|
- db_execute("DELETE FROM wiki WHERE name='%s' AND invtime>=-%s", pg, t2);
|
|
|
|
|
+ db_execute("DELETE FROM wiki WHERE name='%s' AND invtime>=%d",pg,-atoi(t2));
|
|
|
|
|
}
|
|
|
|
|
zLast = db_short_query("SELECT min(-invtime) FROM wiki WHERE name='%s'",pg);
|
|
|
|
|
if( zLast ){
|
|
|
|
|
|