Index: src/config.h
==================================================================
--- src/config.h
+++ src/config.h
@@ -25,10 +25,11 @@
 #ifndef _FILE_OFFSET_BITS
 #  define _FILE_OFFSET_BITS 64
 #endif
 #define _LARGEFILE_SOURCE 1
 
+#ifndef _RC_COMPILE_
 
 /*
 ** System header files used by all modules
 */
 #include <unistd.h>
@@ -36,10 +37,13 @@
 #include <stdlib.h>
 #include <ctype.h>
 #include <string.h>
 #include <stdarg.h>
 #include <assert.h>
+
+#endif
+
 #if defined( __MINGW32__) ||  defined(__DMC__) || defined(_MSC_VER) || defined(__POCC__)
 #  if defined(__DMC__)  || defined(_MSC_VER) || defined(__POCC__)
      typedef int socklen_t;
 #  endif
 #  ifndef _WIN32
@@ -49,10 +53,37 @@
 # include <sys/types.h>
 # include <signal.h>
 # include <pwd.h>
 #endif
 
+/*
+** Define the compiler variant, used to compile the project
+*/
+#if !defined(COMPILER_NAME)
+#  if defined(__DMC__)
+#    define COMPILER_NAME "dmc"
+#  elif defined(__POCC__)
+#    if defined(_M_X64)
+#      define COMPILER_NAME "pellesc64"
+#    else
+#      define COMPILER_NAME "pellesc32"
+#    endif
+#  elif defined(_MSC_VER)
+#    define COMPILER_NAME "msc"
+#  elif defined(__MINGW32__)
+#    define COMPILER_NAME "mingw32"
+#  elif defined(_WIN32)
+#    define COMPILER_NAME "win32"
+#  elif defined(__GNUC__)
+#    define COMPILER_NAME "gcc-" __VERSION__
+#  else
+#    define COMPILER_NAME "unknown"
+#  endif
+#endif
+
+#ifndef _RC_COMPILE_
+
 #include "sqlite3.h"
 
 /*
 ** Typedef for a 64-bit integer
 */
@@ -123,6 +154,8 @@
 # include <langinfo.h>
 #endif
 #ifndef CODESET
 # undef FOSSIL_I18N
 # define FOSSIL_I18N 0
+#endif
+
 #endif

Index: src/main.c
==================================================================
--- src/main.c
+++ src/main.c
@@ -591,10 +591,60 @@
       z++;
     }
   }
   putchar('\n');
 }
+
+/*
+** WEBPAGE: help
+** URL: /help?cmd=CMD
+*/
+void help_page(void){
+    const char * zCmd = P("cmd");
+    
+    style_header("Command line help %s%s",zCmd?" - ":"",zCmd?zCmd:"");
+    if( zCmd ){
+      int rc, idx;
+      char *z, *s, *d;
+
+      @ <h1>%s(zCmd)</h1>
+      rc = name_search(zCmd, aCommand, count(aCommand), &idx);
+      if( rc==1 ){
+        @ unknown command: %s(zCmd)
+      }else if( rc==2 ){
+        @ ambiguous command prefix: %s(zCmd)
+      }else{
+        z = (char*)aCmdHelp[idx];
+        if( s==0 ){
+          @ no help available for the %s(aCommand[idx].zName) command
+        }else{
+          z=s=d=mprintf("%s",z);
+	  while( *s ){
+	    if( *s=='%' && strncmp(s, "%fossil", 7)==0 ){
+	      s++;
+	    }else{
+	      *d++ = *s++;
+	    }
+	  }
+	  *d = 0;
+	  @ <pre>%s(z)</pre>
+	  free(z);
+	}
+      }
+      @ <hr/><a href="help">available commands</a> in fossil version %s(MANIFEST_VERSION" "MANIFEST_DATE) UTC
+    }else{
+      int i;
+      
+      @ <h1>Available commands</h1>
+      for(i=0; i<count(aCommand); i++){
+        if( strncmp(aCommand[i].zName,"test",4)==0 ) continue;
+        @ <kbd><a href="help?cmd=%s(aCommand[i].zName)">%s(aCommand[i].zName)</a></kbd>
+      }
+      @ <hr/>fossil version %s(MANIFEST_VERSION" "MANIFEST_DATE) UTC
+    }
+    style_footer();
+}
 
 /*
 ** Set the g.zBaseURL value to the full URL for the toplevel of
 ** the fossil tree.  Set g.zTop to g.zBaseURL without the
 ** leading "http://" and the host and port.

Index: src/makeheaders.c
==================================================================
--- src/makeheaders.c
+++ src/makeheaders.c
@@ -13,11 +13,11 @@
 #include <stdlib.h>
 #include <ctype.h>
 #include <memory.h>
 #include <sys/stat.h>
 #include <assert.h>
-#if defined( __MINGW32__) ||  defined(__DMC__) || defined(_MSC_VER)
+#if defined( __MINGW32__) ||  defined(__DMC__) || defined(_MSC_VER) || defined(__POCC__)
 #  ifndef WIN32
 #    define WIN32
 #  endif
 # include <string.h>
 #else

Index: src/report.c
==================================================================
--- src/report.c
+++ src/report.c
@@ -723,11 +723,11 @@
 
   /* Output the data for this entry from the database
   */
   zBg = pState->iBg>=0 ? azArg[pState->iBg] : 0;
   if( zBg==0 ) zBg = "white";
-  @ <tr bgcolor="%h(zBg)">
+  @ <tr style="background-color:%h(zBg)">
   zTid = 0;
   zPage[0] = 0;
   for(i=0; i<nArg; i++){
     char *zData;
     if( i==pState->iBg ) continue;
@@ -738,11 +738,11 @@
         @ <td valign="top"><a href="tktedit/%h(zTid)">edit</a></td>
         zTid = 0;
       }
       if( zData[0] ){
         Blob content;
-        @ </tr><tr bgcolor="%h(zBg)"><td colspan=%d(pState->nCol)>
+        @ </tr><tr style="background-color:%h(zBg)"><td colspan=%d(pState->nCol)>
         blob_init(&content, zData, -1);
         wiki_convert(&content, 0, 0);
         blob_reset(&content);
       }
     }else if( azName[i][0]=='#' ){

Index: src/stat.c
==================================================================
--- src/stat.c
+++ src/stat.c
@@ -103,11 +103,11 @@
   @ <tr><th>Server&nbsp;ID:</th><td>
   @ %h(db_get("server-code",""))
   @ </td></tr>
 
   @ <tr><th>Fossil&nbsp;Version:</th><td>
-  @ %h(MANIFEST_DATE) %h(MANIFEST_VERSION)
+  @ %h(MANIFEST_DATE) %h(MANIFEST_VERSION) (%h(COMPILER_NAME))
   @ </td></tr>
   @ <tr><th>SQLite&nbsp;Version:</th><td>
   sqlite3_snprintf(sizeof(zBuf), zBuf, "%.19s [%.10s] (%s)",
                    SQLITE_SOURCE_ID, &SQLITE_SOURCE_ID[20], SQLITE_VERSION);
   @ %s(zBuf)

Index: src/style.c
==================================================================
--- src/style.c
+++ src/style.c
@@ -101,10 +101,11 @@
   Th_Store("baseurl", g.zBaseURL);
   Th_Store("index_page", db_get("index-page","/home"));
   Th_Store("current_page", g.zPath);
   Th_Store("manifest_version", MANIFEST_VERSION);
   Th_Store("manifest_date", MANIFEST_DATE);
+  Th_Store("compiler_name", COMPILER_NAME);
   if( g.zLogin ){
     Th_Store("login", g.zLogin);
   }
   if( g.thTrace ) Th_Trace("BEGIN_HEADER_SCRIPT<br />\n", -1);
   Th_Render(zHeader);

Index: win/Makefile.PellesCGMake
==================================================================
--- win/Makefile.PellesCGMake
+++ win/Makefile.PellesCGMake
@@ -44,73 +44,111 @@
 TARGETMACHINE_CC=x86
 TARGETMACHINE_LN=ix86
 TARGETEXTEND=
 endif
 
+# define the project directories
 B=..
 SRCDIR=$(B)/src/
 WINDIR=$(B)/win/
-ZLIBSRCDIR=E:/fossil-w32/zlib/
+ZLIBSRCDIR=../../zlib/
 
+# define linker command and options
 LINK=$(PellesCDir)/bin/polink.exe
 LINKFLAGS=-subsystem:console -machine:$(TARGETMACHINE_LN) /LIBPATH:$(PellesCDir)\lib\win$(TARGETEXTEND) /LIBPATH:$(PellesCDir)\lib kernel32.lib advapi32.lib delayimp$(TARGETEXTEND).lib Wsock32.lib Crtmt$(TARGETEXTEND).lib
 
+# define standard C-compiler and flags, used to compile
+# the fossil binary. Some special definitions follow for
+# special files follow
 CC=$(PellesCDir)\bin\pocc.exe
 DEFINES=-DFOSSIL_I18N=0 -Dstrncasecmp=memicmp -Dstrcasecmp=stricmp 
 CCFLAGS=-T$(TARGETMACHINE_CC)-coff -Ot -W2 -Gd -Go -Ze -MT $(DEFINES)
 INCLUDE=/I $(PellesCDir)\Include\Win /I $(PellesCDir)\Include /I $(ZLIBSRCDIR) /I $(SRCDIR)
 
+# define commands for building the windows resource files
+RESOURCE=fossil.res
+RC=$(PellesCDir)\bin\porc.exe
+RCFLAGS=$(INCLUDE) -D__POCC__=1 -D_M_X$(TARGETVERSION)
+
+# define the special utilities files, needed to generate
+# the automatically generated source files
 UTILS=translate.exe mkindex.exe makeheaders.exe
 UTILS_OBJ=$(UTILS:.exe=.obj)
+UTILS_SRC=$(foreach uf,$(UTILS),$(SRCDIR)$(uf:.exe=.c))
 
-SRC=add.c allrepo.c attach.c bag.c blob.c branch.c browse.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 file.c finfo.c graph.c http.c http_socket.c http_ssl.c http_transport.c info.c login.c main.c manifest.c md5.c merge.c merge3.c name.c pivot.c popen.c pqueue.c printf.c rebuild.c report.c rss.c schema.c search.c setup.c sha1.c shun.c skins.c stat.c style.c sync.c tag.c th_main.c timeline.c tkt.c tktsetup.c undo.c update.c url.c user.c verify.c vfile.c wiki.c wikiformat.c winhttp.c xfer.c zip.c
-ORIGSRC=$(foreach sf,$(SRC),$(SRCDIR)$(sf))
-TRANSLATEDSRC=$(SRC:.c=_.c)
-TRANSLATEDOBJ=$(TRANSLATEDSRC:.c=.obj)
-
+# define the sqlite files, which need special flags on compile
 SQLITESRC=sqlite3.c
 ORIGSQLITESRC=$(foreach sf,$(SQLITESRC),$(SRCDIR)$(sf))
 SQLITEOBJ=$(foreach sf,$(SQLITESRC),$(sf:.c=.obj))
 SQLITEDEFINES=-DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0
 
+# define the th scripting files, which need special flags on compile
 THSRC=th.c th_lang.c
 ORIGTHSRC=$(foreach sf,$(THSRC),$(SRCDIR)$(sf))
 THOBJ=$(foreach sf,$(THSRC),$(sf:.c=.obj))
 
+# define the zlib files, needed by this compile
 ZLIBSRC=adler32.c compress.c crc32.c deflate.c gzclose.c gzlib.c gzread.c gzwrite.c infback.c inffast.c inflate.c inftrees.c trees.c uncompr.c zutil.c
 ORIGZLIBSRC=$(foreach sf,$(ZLIBSRC),$(ZLIBSRCDIR)$(sf))
 ZLIBOBJ=$(foreach sf,$(ZLIBSRC),$(sf:.c=.obj))
 
+# define all fossil sources, using the standard compile and
+# source generation. These are all files in SRCDIR, which are not
+# mentioned as special files above:
+ORIGSRC=$(filter-out $(UTILS_SRC) $(ORIGTHSRC) $(ORIGSQLITESRC),$(wildcard $(SRCDIR)*.c))
+SRC=$(subst $(SRCDIR),,$(ORIGSRC))
+TRANSLATEDSRC=$(SRC:.c=_.c)
+TRANSLATEDOBJ=$(TRANSLATEDSRC:.c=.obj)
+
+# main target file is the application
 APPLICATION=fossil.exe
 
+# ###########################################################################
+# define the standard make target
 .PHONY:	default
 default:	page_index.h headers $(APPLICATION)
 
-$(UTILS):	%.exe:	%.obj
+# ###########################################################################
+# symbolic target to generate the source generate utils
+.PHONY:	utils
+utils:	$(UTILS)
+
+# link utils
+$(UTILS) version.exe:	%.exe:	%.obj
 	$(LINK) $(LINKFLAGS) -out:"$@" $<
 
+# compiling standard fossil utils
 $(UTILS_OBJ):	%.obj:	$(SRCDIR)%.c
 	$(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@"
 
-$(TRANSLATEDSRC):	%_.c:	$(SRCDIR)%.c translate.exe
-	translate.exe $< >$@
-
-page_index.h:	$(TRANSLATEDSRC) mkindex.exe
-	mkindex.exe $(TRANSLATEDSRC) >$@
-
-version.exe:	version.obj
-	$(LINK) $(LINKFLAGS) -out:"$@" $<
-
+# compile special windows utils
 version.obj:	$(WINDIR)version.c
 	$(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@"
 
+# ###########################################################################
+# generate the translated c-source files
+$(TRANSLATEDSRC):	%_.c:	$(SRCDIR)%.c translate.exe
+	translate.exe $< >$@
+
+# ###########################################################################
+# generate the index source, containing all web references,..
+page_index.h:	$(TRANSLATEDSRC) mkindex.exe
+	mkindex.exe $(TRANSLATEDSRC) >$@
+
+# ###########################################################################
+# extracting version info from manifest
 VERSION.h:	version.exe ..\manifest.uuid ..\manifest
 	version.exe ..\manifest.uuid ..\manifest  > $@
 
+# ###########################################################################
+# generate the simplified headers
 headers: makeheaders.exe page_index.h VERSION.h ../src/sqlite3.h ../src/th.h VERSION.h
 	makeheaders.exe $(foreach ts,$(TRANSLATEDSRC),$(ts):$(ts:_.c=.h)) ../src/sqlite3.h ../src/th.h VERSION.h
 	echo Done >$@
+
+# ###########################################################################
+# compile C sources with relevant options
 
 $(TRANSLATEDOBJ):	%_.obj:	%_.c %.h
 	$(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@"
 
 $(SQLITEOBJ):	%.obj:	$(SRCDIR)%.c $(SRCDIR)%.h
@@ -120,18 +158,29 @@
 	$(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@"
 
 $(ZLIBOBJ):	%.obj:	$(ZLIBSRCDIR)%.c
 	$(CC) $(CCFLAGS) $(INCLUDE) "$<" -Fo"$@"
 
-$(APPLICATION):	$(TRANSLATEDOBJ) $(SQLITEOBJ) $(THOBJ) $(ZLIBOBJ) headers
-	$(LINK) $(LINKFLAGS) -out:"$@" $(TRANSLATEDOBJ) $(SQLITEOBJ) $(THOBJ) $(ZLIBOBJ)
+# ###########################################################################
+# create the windows resource with icon and version info
+$(RESOURCE):	%.res:	../win/%.rc ../win/*.ico
+	$(RC) $(RCFLAGS) $< -Fo"$@"
+
+# ###########################################################################
+# link the application
+$(APPLICATION):	$(TRANSLATEDOBJ) $(SQLITEOBJ) $(THOBJ) $(ZLIBOBJ) headers $(RESOURCE)
+	$(LINK) $(LINKFLAGS) -out:"$@" $(TRANSLATEDOBJ) $(SQLITEOBJ) $(THOBJ) $(ZLIBOBJ) $(RESOURCE)
+
+# ###########################################################################
+# cleanup
 
 .PHONY: clean
 clean:
-	del /F *.obj
-	del /F *.c
+	del /F $(TRANSLATEDOBJ) $(SQLITEOBJ) $(THOBJ) $(ZLIBOBJ) $(UTILS_OBJ) version.obj
+	del /F $(TRANSLATEDSRC)
 	del /F *.h headers
+	del /F $(RESOURCE)
 
 .PHONY: clobber
 clobber: clean
 	del /F *.exe
 

Index: win/Makefile.dmc
==================================================================
--- win/Makefile.dmc
+++ win/Makefile.dmc
@@ -24,28 +24,35 @@
 CFLAGS = -o 
 BCC    = $(DMDIR)\bin\dmc $(CFLAGS)
 TCC    = $(DMDIR)\bin\dmc $(CFLAGS) $(DMCDEF) $(I18N) $(SSL) $(INCL)
 LIBS   = $(DMDIR)\extra\lib\ zlib wsock32
 
-SRC   = add_.c allrepo_.c attach_.c bag_.c blob_.c branch_.c browse_.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 file_.c finfo_.c graph_.c http_.c http_socket_.c http_ssl_.c http_transport_.c info_.c login_.c main_.c manifest_.c md5_.c merge_.c merge3_.c name_.c pivot_.c popen_.c pqueue_.c printf_.c rebuild_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c skins_.c stat_.c style_.c sync_.c tag_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c update_.c url_.c user_.c verify_.c vfile_.c wiki_.c wikiformat_.c winhttp_.c xfer_.c zip_.c 
+SRC   = add_.c allrepo_.c attach_.c bag_.c blob_.c branch_.c browse_.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 file_.c finfo_.c graph_.c http_.c http_socket_.c http_ssl_.c http_transport_.c info_.c login_.c main_.c manifest_.c md5_.c merge_.c merge3_.c name_.c pivot_.c popen_.c pqueue_.c printf_.c rebuild_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c skins_.c stat_.c style_.c sync_.c tag_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c update_.c url_.c user_.c verify_.c vfile_.c wiki_.c wikiformat_.c winhttp_.c xfer_.c zip_.c 
 
-OBJ   = $(OBJDIR)\add$O $(OBJDIR)\allrepo$O $(OBJDIR)\attach$O $(OBJDIR)\bag$O $(OBJDIR)\blob$O $(OBJDIR)\branch$O $(OBJDIR)\browse$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)\file$O $(OBJDIR)\finfo$O $(OBJDIR)\graph$O $(OBJDIR)\http$O $(OBJDIR)\http_socket$O $(OBJDIR)\http_ssl$O $(OBJDIR)\http_transport$O $(OBJDIR)\info$O $(OBJDIR)\login$O $(OBJDIR)\main$O $(OBJDIR)\manifest$O $(OBJDIR)\md5$O $(OBJDIR)\merge$O $(OBJDIR)\merge3$O $(OBJDIR)\name$O $(OBJDIR)\pivot$O $(OBJDIR)\popen$O $(OBJDIR)\pqueue$O $(OBJDIR)\printf$O $(OBJDIR)\rebuild$O $(OBJDIR)\report$O $(OBJDIR)\rss$O $(OBJDIR)\schema$O $(OBJDIR)\search$O $(OBJDIR)\setup$O $(OBJDIR)\sha1$O $(OBJDIR)\shun$O $(OBJDIR)\skins$O $(OBJDIR)\stat$O $(OBJDIR)\style$O $(OBJDIR)\sync$O $(OBJDIR)\tag$O $(OBJDIR)\th_main$O $(OBJDIR)\timeline$O $(OBJDIR)\tkt$O $(OBJDIR)\tktsetup$O $(OBJDIR)\undo$O $(OBJDIR)\update$O $(OBJDIR)\url$O $(OBJDIR)\user$O $(OBJDIR)\verify$O $(OBJDIR)\vfile$O $(OBJDIR)\wiki$O $(OBJDIR)\wikiformat$O $(OBJDIR)\winhttp$O $(OBJDIR)\xfer$O $(OBJDIR)\zip$O $(OBJDIR)\sqlite3$O $(OBJDIR)\th$O $(OBJDIR)\th_lang$O 
+OBJ   = $(OBJDIR)\add$O $(OBJDIR)\allrepo$O $(OBJDIR)\attach$O $(OBJDIR)\bag$O $(OBJDIR)\blob$O $(OBJDIR)\branch$O $(OBJDIR)\browse$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)\file$O $(OBJDIR)\finfo$O $(OBJDIR)\graph$O $(OBJDIR)\http$O $(OBJDIR)\http_socket$O $(OBJDIR)\http_ssl$O $(OBJDIR)\http_transport$O $(OBJDIR)\info$O $(OBJDIR)\login$O $(OBJDIR)\main$O $(OBJDIR)\manifest$O $(OBJDIR)\md5$O $(OBJDIR)\merge$O $(OBJDIR)\merge3$O $(OBJDIR)\name$O $(OBJDIR)\pivot$O $(OBJDIR)\popen$O $(OBJDIR)\pqueue$O $(OBJDIR)\printf$O $(OBJDIR)\rebuild$O $(OBJDIR)\report$O $(OBJDIR)\rss$O $(OBJDIR)\schema$O $(OBJDIR)\search$O $(OBJDIR)\setup$O $(OBJDIR)\sha1$O $(OBJDIR)\shun$O $(OBJDIR)\skins$O $(OBJDIR)\stat$O $(OBJDIR)\style$O $(OBJDIR)\sync$O $(OBJDIR)\tag$O $(OBJDIR)\th_main$O $(OBJDIR)\timeline$O $(OBJDIR)\tkt$O $(OBJDIR)\tktsetup$O $(OBJDIR)\undo$O $(OBJDIR)\update$O $(OBJDIR)\url$O $(OBJDIR)\user$O $(OBJDIR)\verify$O $(OBJDIR)\vfile$O $(OBJDIR)\wiki$O $(OBJDIR)\wikiformat$O $(OBJDIR)\winhttp$O $(OBJDIR)\xfer$O $(OBJDIR)\zip$O $(OBJDIR)\sqlite3$O $(OBJDIR)\th$O $(OBJDIR)\th_lang$O 
 
+RC=$(DMDIR)\bin\rcc
+RCFLAGS=-32 -w1 -I$(SRCDIR) /D__DMC__
 
 APPNAME = $(OBJDIR)\fossil$(E)
 
 all: $(APPNAME)
 
-$(APPNAME) : translate$E mkindex$E headers  $(OBJ) $(OBJDIR)\link
+$(APPNAME) : translate$E mkindex$E headers fossil.res $(OBJ) $(OBJDIR)\link
 	cd $(OBJDIR) 
 	$(DMDIR)\bin\link @link
+
+fossil.res:	$B\win\fossil.rc
+	$(RC) $(RCFLAGS) -o$@ $**
 
 $(OBJDIR)\link: $B\win\Makefile.dmc
-	+echo add allrepo attach bag blob branch browse captcha cgi checkin checkout clearsign clone comformat configure content db delta deltacmd descendants diff diffcmd doc encode file finfo graph http http_socket http_ssl http_transport info login main manifest md5 merge merge3 name pivot popen pqueue printf rebuild report rss schema search setup sha1 shun skins stat style sync tag th_main timeline tkt tktsetup undo update url user verify vfile wiki wikiformat winhttp xfer zip sqlite3 th th_lang > $@
+	+echo add allrepo attach bag blob branch browse captcha cgi checkin checkout clearsign clone comformat configure content db delta deltacmd descendants diff diffcmd doc encode event file finfo graph http http_socket http_ssl http_transport info login main manifest md5 merge merge3 name pivot popen pqueue printf rebuild report rss schema search setup sha1 shun skins stat style sync tag th_main timeline tkt tktsetup undo update url user verify vfile wiki wikiformat winhttp xfer zip sqlite3 th th_lang > $@
 	+echo fossil >> $@
 	+echo fossil >> $@
 	+echo $(LIBS) >> $@
+	+echo. >> $@
+	+echo fossil >> $@
 
 
 
 translate$E: $(SRCDIR)\translate.c
 	$(BCC) -o$@ $**
@@ -223,10 +230,16 @@
 $(OBJDIR)\encode$O : encode_.c encode.h
 	$(TCC) -o$@ -c encode_.c
 
 encode_.c : $(SRCDIR)\encode.c
 	+translate$E $** > $@
+
+$(OBJDIR)\event$O : event_.c event.h
+	$(TCC) -o$@ -c event_.c
+
+event_.c : $(SRCDIR)\event.c
+	+translate$E $** > $@
 
 $(OBJDIR)\file$O : file_.c file.h
 	$(TCC) -o$@ -c file_.c
 
 file_.c : $(SRCDIR)\file.c
@@ -507,7 +520,7 @@
 
 zip_.c : $(SRCDIR)\zip.c
 	+translate$E $** > $@
 
 headers: makeheaders$E page_index.h VERSION.h
-	 +makeheaders$E add_.c:add.h allrepo_.c:allrepo.h attach_.c:attach.h bag_.c:bag.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.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 file_.c:file.h finfo_.c:finfo.h graph_.c:graph.h http_.c:http.h http_socket_.c:http_socket.h http_ssl_.c:http_ssl.h http_transport_.c:http_transport.h info_.c:info.h login_.c:login.h main_.c:main.h manifest_.c:manifest.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h name_.c:name.h pivot_.c:pivot.h popen_.c:popen.h pqueue_.c:pqueue.h printf_.c:printf.h rebuild_.c:rebuild.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 skins_.c:skins.h stat_.c:stat.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h update_.c:update.h url_.c:url.h user_.c:user.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winhttp_.c:winhttp.h xfer_.c:xfer.h zip_.c:zip.h $(SRCDIR)\sqlite3.h $(SRCDIR)\th.h VERSION.h
+	 +makeheaders$E add_.c:add.h allrepo_.c:allrepo.h attach_.c:attach.h bag_.c:bag.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.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 file_.c:file.h finfo_.c:finfo.h graph_.c:graph.h http_.c:http.h http_socket_.c:http_socket.h http_ssl_.c:http_ssl.h http_transport_.c:http_transport.h info_.c:info.h login_.c:login.h main_.c:main.h manifest_.c:manifest.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h name_.c:name.h pivot_.c:pivot.h popen_.c:popen.h pqueue_.c:pqueue.h printf_.c:printf.h rebuild_.c:rebuild.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 skins_.c:skins.h stat_.c:stat.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h update_.c:update.h url_.c:url.h user_.c:user.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winhttp_.c:winhttp.h xfer_.c:xfer.h zip_.c:zip.h $(SRCDIR)\sqlite3.h $(SRCDIR)\th.h VERSION.h
 	@copy /Y nul: headers

ADDED   win/fossil.ico
Index: win/fossil.ico
==================================================================
--- win/fossil.ico
+++ win/fossil.ico
cannot compute difference between binary files

ADDED   win/fossil.rc
Index: win/fossil.rc
==================================================================
--- win/fossil.rc
+++ win/fossil.rc
@@ -0,0 +1,38 @@
+#include <windows.h>
+#include "VERSION.h"
+#define _RC_COMPILE_
+#include "config.h"
+
+LANGUAGE LANG_ENGLISH,SUBLANG_ENGLISH_US
+
+VS_VERSION_INFO VERSIONINFO
+FILEVERSION 1,0,0,0
+PRODUCTVERSION 1,0,0,0
+FILEFLAGSMASK 0x3F
+FILEFLAGS 0x0
+FILEOS VOS__WINDOWS32
+FILETYPE VFT_APP
+FILESUBTYPE VFT2_UNKNOWN
+BEGIN
+  BLOCK "StringFileInfo"
+  BEGIN
+    BLOCK "040904B0"
+    BEGIN
+      VALUE "FileDescription", "distributed source code control system with integrated wiki and ticket-system\0"
+      VALUE "Comments", "compiler: "COMPILER_NAME"\0"
+      VALUE "FileVersion", MANIFEST_UUID"("COMPILER_NAME"\0"
+      VALUE "InternalName", "fossil\0"
+      VALUE "LegalCopyright", "Copyright (c) "MANIFEST_YEAR" D. Richard Hipp\0"
+      VALUE "OriginalFilename", "fossil.exe\0"
+      VALUE "ProductName", "fossil\0"
+      VALUE "ProductVersion", MANIFEST_VERSION" "MANIFEST_DATE" UTC\0"
+    END
+  END
+  BLOCK "VarFileInfo"
+  BEGIN
+    VALUE "Translation", 0x409, 0x4B0
+  END
+END
+
+8001 ICON "fossil.ico"
+

Index: win/version.c
==================================================================
--- win/version.c
+++ win/version.c
@@ -10,10 +10,11 @@
     printf("#define MANIFEST_VERSION \"[%10.10s]\"\n",b);
     m = fopen(argv[2],"r");
     while(b ==  fgets(b, sizeof(b)-1,m)){
         if(0 == strncmp("D ",b,2)){
             printf("#define MANIFEST_DATE \"%.10s %.8s\"\n",b+2,b+13);
+            printf("#define MANIFEST_YEAR \"%.4s\"\n",b+2);
             return 0;
         }
     }
     return 1;
 }