Fossil

Check-in [ef108998c4]
Login

Check-in [ef108998c4]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix harmless compiler warnings.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: ef108998c4fb82665f2cacaf1bd03acdbcba3e6c
User & Date: drh 2015-01-29 01:25:30.089
Context
2015-01-29
01:48
Fix the /doc page so that it returns status 200 (not 404) after appending "index.html" to the end of a page name. ... (check-in: 8b4b4247dc user: drh tags: trunk)
01:25
Fix harmless compiler warnings. ... (check-in: ef108998c4 user: drh tags: trunk)
01:23
If a /doc filename ends with "/", then try appending "index.html", "index.wiki", and "index.md" in that order. If none are found, then a 404 error will be generated. Try to find a file named 404.md in the root directory for the text of the 404, or generate a default 404 if no 404.md file is found. ... (check-in: bdfbbddc8f user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/doc.c.
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
** If FILE ends in "/" then names "FILE/index.html", "FILE/index.wiki",
** and "FILE/index.md" are  in that order.  If none of those are found,
** then FILE is completely replaced by "404.md" and tried.  If that is
** not found, then a default 404 screen is generated.
*/
void doc_page(void){
  const char *zName;                /* Argument to the /doc page */
  const char *zOrigName;            /* Original document name */
  const char *zMime;                /* Document MIME type */
  char *zCheckin;                   /* The checkin holding the document */
  int vid = 0;                      /* Artifact of checkin */
  int rid = 0;                      /* Artifact of file */
  int i;                            /* Loop counter */
  Blob filebody;                    /* Content of the documentation file */
  int nMiss = 0;                    /* Failed attempts to find the document */
  static const char *azSuffix[] = {
     "index.html", "index.wiki", "index.md"







|

|







381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
** If FILE ends in "/" then names "FILE/index.html", "FILE/index.wiki",
** and "FILE/index.md" are  in that order.  If none of those are found,
** then FILE is completely replaced by "404.md" and tried.  If that is
** not found, then a default 404 screen is generated.
*/
void doc_page(void){
  const char *zName;                /* Argument to the /doc page */
  const char *zOrigName = "?";      /* Original document name */
  const char *zMime;                /* Document MIME type */
  char *zCheckin = "tip";           /* The checkin holding the document */
  int vid = 0;                      /* Artifact of checkin */
  int rid = 0;                      /* Artifact of file */
  int i;                            /* Loop counter */
  Blob filebody;                    /* Content of the documentation file */
  int nMiss = 0;                    /* Failed attempts to find the document */
  static const char *azSuffix[] = {
     "index.html", "index.wiki", "index.md"