Fossil SCM
Merging from trunk.
Commit
e3292ef8c34b24d90b3328b3103c0f420e7b7372
Parent
1516a26dc85d475…
12 files changed
+3
-3
+10
+46
-27
+1
-1
-2
+18
-2
+1
-1
+55
+4
-3
+4
-2
+3
-1
+1
-4
+3
-3
| --- src/allrepo.c | ||
| +++ src/allrepo.c | ||
| @@ -53,14 +53,14 @@ | ||
| 53 | 53 | ** |
| 54 | 54 | ** Usage: %fossil all (list|ls|pull|push|rebuild|sync) |
| 55 | 55 | ** |
| 56 | 56 | ** The ~/.fossil file records the location of all repositories for a |
| 57 | 57 | ** user. This command performs certain operations on all repositories |
| 58 | -** that can be useful before or after a period of disconnection operation. | |
| 58 | +** that can be useful before or after a period of disconnected operation. | |
| 59 | 59 | ** |
| 60 | -** On Win32 systems, this file is located in %LOCALAPPDATA%, %APDDATA% | |
| 61 | -** or %HOMEPATH% and is named _fossil. | |
| 60 | +** On Win32 systems, the file is named "_fossil" and is located in | |
| 61 | +** %LOCALAPPDATA%, %APPDATA% or %HOMEPATH%. | |
| 62 | 62 | ** |
| 63 | 63 | ** Available operations are: |
| 64 | 64 | ** |
| 65 | 65 | ** list | ls Display the location of all repositories |
| 66 | 66 | ** |
| 67 | 67 |
| --- src/allrepo.c | |
| +++ src/allrepo.c | |
| @@ -53,14 +53,14 @@ | |
| 53 | ** |
| 54 | ** Usage: %fossil all (list|ls|pull|push|rebuild|sync) |
| 55 | ** |
| 56 | ** The ~/.fossil file records the location of all repositories for a |
| 57 | ** user. This command performs certain operations on all repositories |
| 58 | ** that can be useful before or after a period of disconnection operation. |
| 59 | ** |
| 60 | ** On Win32 systems, this file is located in %LOCALAPPDATA%, %APDDATA% |
| 61 | ** or %HOMEPATH% and is named _fossil. |
| 62 | ** |
| 63 | ** Available operations are: |
| 64 | ** |
| 65 | ** list | ls Display the location of all repositories |
| 66 | ** |
| 67 |
| --- src/allrepo.c | |
| +++ src/allrepo.c | |
| @@ -53,14 +53,14 @@ | |
| 53 | ** |
| 54 | ** Usage: %fossil all (list|ls|pull|push|rebuild|sync) |
| 55 | ** |
| 56 | ** The ~/.fossil file records the location of all repositories for a |
| 57 | ** user. This command performs certain operations on all repositories |
| 58 | ** that can be useful before or after a period of disconnected operation. |
| 59 | ** |
| 60 | ** On Win32 systems, the file is named "_fossil" and is located in |
| 61 | ** %LOCALAPPDATA%, %APPDATA% or %HOMEPATH%. |
| 62 | ** |
| 63 | ** Available operations are: |
| 64 | ** |
| 65 | ** list | ls Display the location of all repositories |
| 66 | ** |
| 67 |
+10
| --- src/config.h | ||
| +++ src/config.h | ||
| @@ -15,10 +15,20 @@ | ||
| 15 | 15 | ** |
| 16 | 16 | ******************************************************************************* |
| 17 | 17 | ** |
| 18 | 18 | ** A common header file used by all modules. |
| 19 | 19 | */ |
| 20 | + | |
| 21 | +/* The following macros are necessary for large-file support under | |
| 22 | +** some linux distributions, and possibly other unixes as well. | |
| 23 | +*/ | |
| 24 | +#define _LARGE_FILE 1 | |
| 25 | +#ifndef _FILE_OFFSET_BITS | |
| 26 | +# define _FILE_OFFSET_BITS 64 | |
| 27 | +#endif | |
| 28 | +#define _LARGEFILE_SOURCE 1 | |
| 29 | + | |
| 20 | 30 | |
| 21 | 31 | /* |
| 22 | 32 | ** System header files used by all modules |
| 23 | 33 | */ |
| 24 | 34 | #include <unistd.h> |
| 25 | 35 |
| --- src/config.h | |
| +++ src/config.h | |
| @@ -15,10 +15,20 @@ | |
| 15 | ** |
| 16 | ******************************************************************************* |
| 17 | ** |
| 18 | ** A common header file used by all modules. |
| 19 | */ |
| 20 | |
| 21 | /* |
| 22 | ** System header files used by all modules |
| 23 | */ |
| 24 | #include <unistd.h> |
| 25 |
| --- src/config.h | |
| +++ src/config.h | |
| @@ -15,10 +15,20 @@ | |
| 15 | ** |
| 16 | ******************************************************************************* |
| 17 | ** |
| 18 | ** A common header file used by all modules. |
| 19 | */ |
| 20 | |
| 21 | /* The following macros are necessary for large-file support under |
| 22 | ** some linux distributions, and possibly other unixes as well. |
| 23 | */ |
| 24 | #define _LARGE_FILE 1 |
| 25 | #ifndef _FILE_OFFSET_BITS |
| 26 | # define _FILE_OFFSET_BITS 64 |
| 27 | #endif |
| 28 | #define _LARGEFILE_SOURCE 1 |
| 29 | |
| 30 | |
| 31 | /* |
| 32 | ** System header files used by all modules |
| 33 | */ |
| 34 | #include <unistd.h> |
| 35 |
M
src/db.c
+46
-27
| --- src/db.c | ||
| +++ src/db.c | ||
| @@ -1492,10 +1492,48 @@ | ||
| 1492 | 1492 | } |
| 1493 | 1493 | db_finalize(&q); |
| 1494 | 1494 | } |
| 1495 | 1495 | |
| 1496 | 1496 | |
| 1497 | +/* | |
| 1498 | +** define all settings, which can be controlled via the set/unset | |
| 1499 | +** command. var is the name of the internal configuration name for db_(un)set. | |
| 1500 | +** If var is 0, the settings name is used. | |
| 1501 | +** width is the length for the edit field on the behavior page, 0 | |
| 1502 | +** is used for on/off checkboxes. | |
| 1503 | +** The behaviour page doesn't use a special layout. It lists all | |
| 1504 | +** set-commands and displays the 'set'-help as info. | |
| 1505 | +*/ | |
| 1506 | +#if INTERFACE | |
| 1507 | +struct stControlSettings { | |
| 1508 | + char const *name; /* Name of the setting */ | |
| 1509 | + char const *var; /* Internal variable name used by db_set() */ | |
| 1510 | + int width; /* Width of display. 0 for boolean values */ | |
| 1511 | + char const *def; /* Default value */ | |
| 1512 | +}; | |
| 1513 | +#endif /* INTERFACE */ | |
| 1514 | +struct stControlSettings const ctrlSettings[] = { | |
| 1515 | + { "auto-captcha", "autocaptcha", 0, "0" }, | |
| 1516 | + { "auto-shun", 0, 0, "1" }, | |
| 1517 | + { "autosync", 0, 0, "0" }, | |
| 1518 | + { "binary-glob", 0, 0, "1" }, | |
| 1519 | + { "clearsign", 0, 0, "0" }, | |
| 1520 | + { "diff-command", 0, 16, "diff" }, | |
| 1521 | + { "dont-push", 0, 0, "0" }, | |
| 1522 | + { "editor", 0, 16, "" }, | |
| 1523 | + { "gdiff-command", 0, 16, "gdiff" }, | |
| 1524 | + { "ignore-glob", 0, 40, "" }, | |
| 1525 | + { "http-port", 0, 16, "8080" }, | |
| 1526 | + { "localauth", 0, 0, "0" }, | |
| 1527 | + { "mtime-changes", 0, 0, "0" }, | |
| 1528 | + { "pgp-command", 0, 32, "gpg --clearsign -o " }, | |
| 1529 | + { "proxy", 0, 32, "off" }, | |
| 1530 | + { "ssh-command", 0, 32, "" }, | |
| 1531 | + { "web-browser", 0, 32, "" }, | |
| 1532 | + { 0,0,0,0 } | |
| 1533 | +}; | |
| 1534 | + | |
| 1497 | 1535 | /* |
| 1498 | 1536 | ** COMMAND: settings |
| 1499 | 1537 | ** COMMAND: unset |
| 1500 | 1538 | ** %fossil settings ?PROPERTY? ?VALUE? ?-global? |
| 1501 | 1539 | ** %fossil unset PROPERTY ?-global? |
| @@ -1567,29 +1605,10 @@ | ||
| 1567 | 1605 | ** web browser when given a URL as an argument. |
| 1568 | 1606 | ** Defaults to "start" on windows, "open" on Mac, |
| 1569 | 1607 | ** and "firefox" on Unix. |
| 1570 | 1608 | */ |
| 1571 | 1609 | void setting_cmd(void){ |
| 1572 | - static const char *azName[] = { | |
| 1573 | - "auto-captcha", | |
| 1574 | - "auto-shun", | |
| 1575 | - "autosync", | |
| 1576 | - "binary-glob", | |
| 1577 | - "clearsign", | |
| 1578 | - "diff-command", | |
| 1579 | - "dont-push", | |
| 1580 | - "editor", | |
| 1581 | - "gdiff-command", | |
| 1582 | - "ignore-glob", | |
| 1583 | - "http-port", | |
| 1584 | - "localauth", | |
| 1585 | - "mtime-changes", | |
| 1586 | - "pgp-command", | |
| 1587 | - "proxy", | |
| 1588 | - "ssh-command", | |
| 1589 | - "web-browser", | |
| 1590 | - }; | |
| 1591 | 1610 | int i; |
| 1592 | 1611 | int globalFlag = find_option("global","g",0)!=0; |
| 1593 | 1612 | int unsetFlag = g.argv[1][0]=='u'; |
| 1594 | 1613 | db_open_config(1); |
| 1595 | 1614 | db_find_and_open_repository(0); |
| @@ -1598,28 +1617,28 @@ | ||
| 1598 | 1617 | } |
| 1599 | 1618 | if( unsetFlag && g.argc!=3 ){ |
| 1600 | 1619 | usage("PROPERTY ?-global?"); |
| 1601 | 1620 | } |
| 1602 | 1621 | if( g.argc==2 ){ |
| 1603 | - for(i=0; i<sizeof(azName)/sizeof(azName[0]); i++){ | |
| 1604 | - print_setting(azName[i]); | |
| 1622 | + for(i=0; ctrlSettings[i].name; i++){ | |
| 1623 | + print_setting(ctrlSettings[i].name); | |
| 1605 | 1624 | } |
| 1606 | 1625 | }else if( g.argc==3 || g.argc==4 ){ |
| 1607 | 1626 | const char *zName = g.argv[2]; |
| 1608 | 1627 | int n = strlen(zName); |
| 1609 | - for(i=0; i<sizeof(azName)/sizeof(azName[0]); i++){ | |
| 1610 | - if( strncmp(azName[i], zName, n)==0 ) break; | |
| 1628 | + for(i=0; ctrlSettings[i].name; i++){ | |
| 1629 | + if( strncmp(ctrlSettings[i].name, zName, n)==0 ) break; | |
| 1611 | 1630 | } |
| 1612 | - if( i>=sizeof(azName)/sizeof(azName[0]) ){ | |
| 1631 | + if( !ctrlSettings[i].name ){ | |
| 1613 | 1632 | fossil_fatal("no such setting: %s", zName); |
| 1614 | 1633 | } |
| 1615 | 1634 | if( unsetFlag ){ |
| 1616 | - db_unset(azName[i], globalFlag); | |
| 1635 | + db_unset(ctrlSettings[i].name, globalFlag); | |
| 1617 | 1636 | }else if( g.argc==4 ){ |
| 1618 | - db_set(azName[i], g.argv[3], globalFlag); | |
| 1637 | + db_set(ctrlSettings[i].name, g.argv[3], globalFlag); | |
| 1619 | 1638 | }else{ |
| 1620 | - print_setting(azName[i]); | |
| 1639 | + print_setting(ctrlSettings[i].name); | |
| 1621 | 1640 | } |
| 1622 | 1641 | }else{ |
| 1623 | 1642 | usage("?PROPERTY? ?VALUE?"); |
| 1624 | 1643 | } |
| 1625 | 1644 | } |
| 1626 | 1645 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -1492,10 +1492,48 @@ | |
| 1492 | } |
| 1493 | db_finalize(&q); |
| 1494 | } |
| 1495 | |
| 1496 | |
| 1497 | /* |
| 1498 | ** COMMAND: settings |
| 1499 | ** COMMAND: unset |
| 1500 | ** %fossil settings ?PROPERTY? ?VALUE? ?-global? |
| 1501 | ** %fossil unset PROPERTY ?-global? |
| @@ -1567,29 +1605,10 @@ | |
| 1567 | ** web browser when given a URL as an argument. |
| 1568 | ** Defaults to "start" on windows, "open" on Mac, |
| 1569 | ** and "firefox" on Unix. |
| 1570 | */ |
| 1571 | void setting_cmd(void){ |
| 1572 | static const char *azName[] = { |
| 1573 | "auto-captcha", |
| 1574 | "auto-shun", |
| 1575 | "autosync", |
| 1576 | "binary-glob", |
| 1577 | "clearsign", |
| 1578 | "diff-command", |
| 1579 | "dont-push", |
| 1580 | "editor", |
| 1581 | "gdiff-command", |
| 1582 | "ignore-glob", |
| 1583 | "http-port", |
| 1584 | "localauth", |
| 1585 | "mtime-changes", |
| 1586 | "pgp-command", |
| 1587 | "proxy", |
| 1588 | "ssh-command", |
| 1589 | "web-browser", |
| 1590 | }; |
| 1591 | int i; |
| 1592 | int globalFlag = find_option("global","g",0)!=0; |
| 1593 | int unsetFlag = g.argv[1][0]=='u'; |
| 1594 | db_open_config(1); |
| 1595 | db_find_and_open_repository(0); |
| @@ -1598,28 +1617,28 @@ | |
| 1598 | } |
| 1599 | if( unsetFlag && g.argc!=3 ){ |
| 1600 | usage("PROPERTY ?-global?"); |
| 1601 | } |
| 1602 | if( g.argc==2 ){ |
| 1603 | for(i=0; i<sizeof(azName)/sizeof(azName[0]); i++){ |
| 1604 | print_setting(azName[i]); |
| 1605 | } |
| 1606 | }else if( g.argc==3 || g.argc==4 ){ |
| 1607 | const char *zName = g.argv[2]; |
| 1608 | int n = strlen(zName); |
| 1609 | for(i=0; i<sizeof(azName)/sizeof(azName[0]); i++){ |
| 1610 | if( strncmp(azName[i], zName, n)==0 ) break; |
| 1611 | } |
| 1612 | if( i>=sizeof(azName)/sizeof(azName[0]) ){ |
| 1613 | fossil_fatal("no such setting: %s", zName); |
| 1614 | } |
| 1615 | if( unsetFlag ){ |
| 1616 | db_unset(azName[i], globalFlag); |
| 1617 | }else if( g.argc==4 ){ |
| 1618 | db_set(azName[i], g.argv[3], globalFlag); |
| 1619 | }else{ |
| 1620 | print_setting(azName[i]); |
| 1621 | } |
| 1622 | }else{ |
| 1623 | usage("?PROPERTY? ?VALUE?"); |
| 1624 | } |
| 1625 | } |
| 1626 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -1492,10 +1492,48 @@ | |
| 1492 | } |
| 1493 | db_finalize(&q); |
| 1494 | } |
| 1495 | |
| 1496 | |
| 1497 | /* |
| 1498 | ** define all settings, which can be controlled via the set/unset |
| 1499 | ** command. var is the name of the internal configuration name for db_(un)set. |
| 1500 | ** If var is 0, the settings name is used. |
| 1501 | ** width is the length for the edit field on the behavior page, 0 |
| 1502 | ** is used for on/off checkboxes. |
| 1503 | ** The behaviour page doesn't use a special layout. It lists all |
| 1504 | ** set-commands and displays the 'set'-help as info. |
| 1505 | */ |
| 1506 | #if INTERFACE |
| 1507 | struct stControlSettings { |
| 1508 | char const *name; /* Name of the setting */ |
| 1509 | char const *var; /* Internal variable name used by db_set() */ |
| 1510 | int width; /* Width of display. 0 for boolean values */ |
| 1511 | char const *def; /* Default value */ |
| 1512 | }; |
| 1513 | #endif /* INTERFACE */ |
| 1514 | struct stControlSettings const ctrlSettings[] = { |
| 1515 | { "auto-captcha", "autocaptcha", 0, "0" }, |
| 1516 | { "auto-shun", 0, 0, "1" }, |
| 1517 | { "autosync", 0, 0, "0" }, |
| 1518 | { "binary-glob", 0, 0, "1" }, |
| 1519 | { "clearsign", 0, 0, "0" }, |
| 1520 | { "diff-command", 0, 16, "diff" }, |
| 1521 | { "dont-push", 0, 0, "0" }, |
| 1522 | { "editor", 0, 16, "" }, |
| 1523 | { "gdiff-command", 0, 16, "gdiff" }, |
| 1524 | { "ignore-glob", 0, 40, "" }, |
| 1525 | { "http-port", 0, 16, "8080" }, |
| 1526 | { "localauth", 0, 0, "0" }, |
| 1527 | { "mtime-changes", 0, 0, "0" }, |
| 1528 | { "pgp-command", 0, 32, "gpg --clearsign -o " }, |
| 1529 | { "proxy", 0, 32, "off" }, |
| 1530 | { "ssh-command", 0, 32, "" }, |
| 1531 | { "web-browser", 0, 32, "" }, |
| 1532 | { 0,0,0,0 } |
| 1533 | }; |
| 1534 | |
| 1535 | /* |
| 1536 | ** COMMAND: settings |
| 1537 | ** COMMAND: unset |
| 1538 | ** %fossil settings ?PROPERTY? ?VALUE? ?-global? |
| 1539 | ** %fossil unset PROPERTY ?-global? |
| @@ -1567,29 +1605,10 @@ | |
| 1605 | ** web browser when given a URL as an argument. |
| 1606 | ** Defaults to "start" on windows, "open" on Mac, |
| 1607 | ** and "firefox" on Unix. |
| 1608 | */ |
| 1609 | void setting_cmd(void){ |
| 1610 | int i; |
| 1611 | int globalFlag = find_option("global","g",0)!=0; |
| 1612 | int unsetFlag = g.argv[1][0]=='u'; |
| 1613 | db_open_config(1); |
| 1614 | db_find_and_open_repository(0); |
| @@ -1598,28 +1617,28 @@ | |
| 1617 | } |
| 1618 | if( unsetFlag && g.argc!=3 ){ |
| 1619 | usage("PROPERTY ?-global?"); |
| 1620 | } |
| 1621 | if( g.argc==2 ){ |
| 1622 | for(i=0; ctrlSettings[i].name; i++){ |
| 1623 | print_setting(ctrlSettings[i].name); |
| 1624 | } |
| 1625 | }else if( g.argc==3 || g.argc==4 ){ |
| 1626 | const char *zName = g.argv[2]; |
| 1627 | int n = strlen(zName); |
| 1628 | for(i=0; ctrlSettings[i].name; i++){ |
| 1629 | if( strncmp(ctrlSettings[i].name, zName, n)==0 ) break; |
| 1630 | } |
| 1631 | if( !ctrlSettings[i].name ){ |
| 1632 | fossil_fatal("no such setting: %s", zName); |
| 1633 | } |
| 1634 | if( unsetFlag ){ |
| 1635 | db_unset(ctrlSettings[i].name, globalFlag); |
| 1636 | }else if( g.argc==4 ){ |
| 1637 | db_set(ctrlSettings[i].name, g.argv[3], globalFlag); |
| 1638 | }else{ |
| 1639 | print_setting(ctrlSettings[i].name); |
| 1640 | } |
| 1641 | }else{ |
| 1642 | usage("?PROPERTY? ?VALUE?"); |
| 1643 | } |
| 1644 | } |
| 1645 |
+1
-1
| --- src/diff.c | ||
| +++ src/diff.c | ||
| @@ -824,11 +824,11 @@ | ||
| 824 | 824 | ** COMMAND: annotate |
| 825 | 825 | ** |
| 826 | 826 | ** %fossil annotate FILENAME |
| 827 | 827 | ** |
| 828 | 828 | ** Output the text of a file with markings to show when each line of |
| 829 | -** the file was introduced. | |
| 829 | +** the file was last modified. | |
| 830 | 830 | */ |
| 831 | 831 | void annotate_cmd(void){ |
| 832 | 832 | int fnid; /* Filename ID */ |
| 833 | 833 | int fid; /* File instance ID */ |
| 834 | 834 | int mid; /* Manifest where file was checked in */ |
| 835 | 835 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -824,11 +824,11 @@ | |
| 824 | ** COMMAND: annotate |
| 825 | ** |
| 826 | ** %fossil annotate FILENAME |
| 827 | ** |
| 828 | ** Output the text of a file with markings to show when each line of |
| 829 | ** the file was introduced. |
| 830 | */ |
| 831 | void annotate_cmd(void){ |
| 832 | int fnid; /* Filename ID */ |
| 833 | int fid; /* File instance ID */ |
| 834 | int mid; /* Manifest where file was checked in */ |
| 835 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -824,11 +824,11 @@ | |
| 824 | ** COMMAND: annotate |
| 825 | ** |
| 826 | ** %fossil annotate FILENAME |
| 827 | ** |
| 828 | ** Output the text of a file with markings to show when each line of |
| 829 | ** the file was last modified. |
| 830 | */ |
| 831 | void annotate_cmd(void){ |
| 832 | int fnid; /* Filename ID */ |
| 833 | int fid; /* File instance ID */ |
| 834 | int mid; /* Manifest where file was checked in */ |
| 835 |
-2
| --- src/diffcmd.c | ||
| +++ src/diffcmd.c | ||
| @@ -242,12 +242,10 @@ | ||
| 242 | 242 | printf("DELETED %s\n", zPathname); |
| 243 | 243 | }else if( access(zFullName, 0) ){ |
| 244 | 244 | printf("MISSING %s\n", zPathname); |
| 245 | 245 | }else if( isNew ){ |
| 246 | 246 | printf("ADDED %s\n", zPathname); |
| 247 | - }else if( isDeleted ){ | |
| 248 | - printf("DELETED %s\n", zPathname); | |
| 249 | 247 | }else if( isChnged==3 ){ |
| 250 | 248 | printf("ADDED_BY_MERGE %s\n", zPathname); |
| 251 | 249 | }else{ |
| 252 | 250 | int srcid = db_column_int(&q, 4); |
| 253 | 251 | Blob content; |
| 254 | 252 |
| --- src/diffcmd.c | |
| +++ src/diffcmd.c | |
| @@ -242,12 +242,10 @@ | |
| 242 | printf("DELETED %s\n", zPathname); |
| 243 | }else if( access(zFullName, 0) ){ |
| 244 | printf("MISSING %s\n", zPathname); |
| 245 | }else if( isNew ){ |
| 246 | printf("ADDED %s\n", zPathname); |
| 247 | }else if( isDeleted ){ |
| 248 | printf("DELETED %s\n", zPathname); |
| 249 | }else if( isChnged==3 ){ |
| 250 | printf("ADDED_BY_MERGE %s\n", zPathname); |
| 251 | }else{ |
| 252 | int srcid = db_column_int(&q, 4); |
| 253 | Blob content; |
| 254 |
| --- src/diffcmd.c | |
| +++ src/diffcmd.c | |
| @@ -242,12 +242,10 @@ | |
| 242 | printf("DELETED %s\n", zPathname); |
| 243 | }else if( access(zFullName, 0) ){ |
| 244 | printf("MISSING %s\n", zPathname); |
| 245 | }else if( isNew ){ |
| 246 | printf("ADDED %s\n", zPathname); |
| 247 | }else if( isChnged==3 ){ |
| 248 | printf("ADDED_BY_MERGE %s\n", zPathname); |
| 249 | }else{ |
| 250 | int srcid = db_column_int(&q, 4); |
| 251 | Blob content; |
| 252 |
+18
-2
| --- src/file.c | ||
| +++ src/file.c | ||
| @@ -23,12 +23,20 @@ | ||
| 23 | 23 | #include <unistd.h> |
| 24 | 24 | #include "file.h" |
| 25 | 25 | |
| 26 | 26 | /* |
| 27 | 27 | ** The file status information from the most recent stat() call. |
| 28 | +** | |
| 29 | +** Use _stati64 rather than stat on windows, in order to handle files | |
| 30 | +** larger than 2GB. | |
| 28 | 31 | */ |
| 29 | -static struct stat fileStat; | |
| 32 | +#if defined(_WIN32) && defined(__MSVCRT__) | |
| 33 | + static struct _stati64 fileStat; | |
| 34 | +# define stat _stati64 | |
| 35 | +#else | |
| 36 | + static struct stat fileStat; | |
| 37 | +#endif | |
| 30 | 38 | static int fileStatValid = 0; |
| 31 | 39 | |
| 32 | 40 | /* |
| 33 | 41 | ** Fill in the fileStat variable for the file named zFilename. |
| 34 | 42 | ** If zFilename==0, then use the previous value of fileStat if |
| @@ -291,21 +299,29 @@ | ||
| 291 | 299 | blob_resize(pOut, file_simplify_name(blob_buffer(pOut), blob_size(pOut))); |
| 292 | 300 | } |
| 293 | 301 | |
| 294 | 302 | /* |
| 295 | 303 | ** COMMAND: test-canonical-name |
| 304 | +** Usage: %fossil test-canonical-name FILENAME... | |
| 296 | 305 | ** |
| 297 | 306 | ** Test the operation of the canonical name generator. |
| 307 | +** Also test Fossil's ability to measure attributes of a file. | |
| 298 | 308 | */ |
| 299 | 309 | void cmd_test_canonical_name(void){ |
| 300 | 310 | int i; |
| 301 | 311 | Blob x; |
| 302 | 312 | blob_zero(&x); |
| 303 | 313 | for(i=2; i<g.argc; i++){ |
| 304 | - file_canonical_name(g.argv[i], &x); | |
| 314 | + const char *zName = g.argv[i]; | |
| 315 | + file_canonical_name(zName, &x); | |
| 305 | 316 | printf("%s\n", blob_buffer(&x)); |
| 306 | 317 | blob_reset(&x); |
| 318 | + printf(" file_size = %lld\n", file_size(zName)); | |
| 319 | + printf(" file_mtime = %lld\n", file_mtime(zName)); | |
| 320 | + printf(" file_isfile = %d\n", file_isfile(zName)); | |
| 321 | + printf(" file_isexe = %d\n", file_isexe(zName)); | |
| 322 | + printf(" file_isdir = %d\n", file_isdir(zName)); | |
| 307 | 323 | } |
| 308 | 324 | } |
| 309 | 325 | |
| 310 | 326 | /* |
| 311 | 327 | ** Return TRUE if the given filename is canonical. |
| 312 | 328 |
| --- src/file.c | |
| +++ src/file.c | |
| @@ -23,12 +23,20 @@ | |
| 23 | #include <unistd.h> |
| 24 | #include "file.h" |
| 25 | |
| 26 | /* |
| 27 | ** The file status information from the most recent stat() call. |
| 28 | */ |
| 29 | static struct stat fileStat; |
| 30 | static int fileStatValid = 0; |
| 31 | |
| 32 | /* |
| 33 | ** Fill in the fileStat variable for the file named zFilename. |
| 34 | ** If zFilename==0, then use the previous value of fileStat if |
| @@ -291,21 +299,29 @@ | |
| 291 | blob_resize(pOut, file_simplify_name(blob_buffer(pOut), blob_size(pOut))); |
| 292 | } |
| 293 | |
| 294 | /* |
| 295 | ** COMMAND: test-canonical-name |
| 296 | ** |
| 297 | ** Test the operation of the canonical name generator. |
| 298 | */ |
| 299 | void cmd_test_canonical_name(void){ |
| 300 | int i; |
| 301 | Blob x; |
| 302 | blob_zero(&x); |
| 303 | for(i=2; i<g.argc; i++){ |
| 304 | file_canonical_name(g.argv[i], &x); |
| 305 | printf("%s\n", blob_buffer(&x)); |
| 306 | blob_reset(&x); |
| 307 | } |
| 308 | } |
| 309 | |
| 310 | /* |
| 311 | ** Return TRUE if the given filename is canonical. |
| 312 |
| --- src/file.c | |
| +++ src/file.c | |
| @@ -23,12 +23,20 @@ | |
| 23 | #include <unistd.h> |
| 24 | #include "file.h" |
| 25 | |
| 26 | /* |
| 27 | ** The file status information from the most recent stat() call. |
| 28 | ** |
| 29 | ** Use _stati64 rather than stat on windows, in order to handle files |
| 30 | ** larger than 2GB. |
| 31 | */ |
| 32 | #if defined(_WIN32) && defined(__MSVCRT__) |
| 33 | static struct _stati64 fileStat; |
| 34 | # define stat _stati64 |
| 35 | #else |
| 36 | static struct stat fileStat; |
| 37 | #endif |
| 38 | static int fileStatValid = 0; |
| 39 | |
| 40 | /* |
| 41 | ** Fill in the fileStat variable for the file named zFilename. |
| 42 | ** If zFilename==0, then use the previous value of fileStat if |
| @@ -291,21 +299,29 @@ | |
| 299 | blob_resize(pOut, file_simplify_name(blob_buffer(pOut), blob_size(pOut))); |
| 300 | } |
| 301 | |
| 302 | /* |
| 303 | ** COMMAND: test-canonical-name |
| 304 | ** Usage: %fossil test-canonical-name FILENAME... |
| 305 | ** |
| 306 | ** Test the operation of the canonical name generator. |
| 307 | ** Also test Fossil's ability to measure attributes of a file. |
| 308 | */ |
| 309 | void cmd_test_canonical_name(void){ |
| 310 | int i; |
| 311 | Blob x; |
| 312 | blob_zero(&x); |
| 313 | for(i=2; i<g.argc; i++){ |
| 314 | const char *zName = g.argv[i]; |
| 315 | file_canonical_name(zName, &x); |
| 316 | printf("%s\n", blob_buffer(&x)); |
| 317 | blob_reset(&x); |
| 318 | printf(" file_size = %lld\n", file_size(zName)); |
| 319 | printf(" file_mtime = %lld\n", file_mtime(zName)); |
| 320 | printf(" file_isfile = %d\n", file_isfile(zName)); |
| 321 | printf(" file_isexe = %d\n", file_isexe(zName)); |
| 322 | printf(" file_isdir = %d\n", file_isdir(zName)); |
| 323 | } |
| 324 | } |
| 325 | |
| 326 | /* |
| 327 | ** Return TRUE if the given filename is canonical. |
| 328 |
+1
-1
| --- src/report.c | ||
| +++ src/report.c | ||
| @@ -907,11 +907,11 @@ | ||
| 907 | 907 | if( !tabs ){ |
| 908 | 908 | struct GenerateHTML sState; |
| 909 | 909 | |
| 910 | 910 | db_multi_exec("PRAGMA empty_result_callbacks=ON"); |
| 911 | 911 | style_submenu_element("Raw", "Raw", |
| 912 | - "rptview?tablist=1&%s", PD("QUERY_STRING","")); | |
| 912 | + "rptview?tablist=1&%h", PD("QUERY_STRING","")); | |
| 913 | 913 | if( g.okAdmin |
| 914 | 914 | || (g.okTktFmt && g.zLogin && zOwner && strcmp(g.zLogin,zOwner)==0) ){ |
| 915 | 915 | style_submenu_element("Edit", "Edit", "rptedit?rn=%d", rn); |
| 916 | 916 | } |
| 917 | 917 | if( g.okTktFmt ){ |
| 918 | 918 |
| --- src/report.c | |
| +++ src/report.c | |
| @@ -907,11 +907,11 @@ | |
| 907 | if( !tabs ){ |
| 908 | struct GenerateHTML sState; |
| 909 | |
| 910 | db_multi_exec("PRAGMA empty_result_callbacks=ON"); |
| 911 | style_submenu_element("Raw", "Raw", |
| 912 | "rptview?tablist=1&%s", PD("QUERY_STRING","")); |
| 913 | if( g.okAdmin |
| 914 | || (g.okTktFmt && g.zLogin && zOwner && strcmp(g.zLogin,zOwner)==0) ){ |
| 915 | style_submenu_element("Edit", "Edit", "rptedit?rn=%d", rn); |
| 916 | } |
| 917 | if( g.okTktFmt ){ |
| 918 |
| --- src/report.c | |
| +++ src/report.c | |
| @@ -907,11 +907,11 @@ | |
| 907 | if( !tabs ){ |
| 908 | struct GenerateHTML sState; |
| 909 | |
| 910 | db_multi_exec("PRAGMA empty_result_callbacks=ON"); |
| 911 | style_submenu_element("Raw", "Raw", |
| 912 | "rptview?tablist=1&%h", PD("QUERY_STRING","")); |
| 913 | if( g.okAdmin |
| 914 | || (g.okTktFmt && g.zLogin && zOwner && strcmp(g.zLogin,zOwner)==0) ){ |
| 915 | style_submenu_element("Edit", "Edit", "rptedit?rn=%d", rn); |
| 916 | } |
| 917 | if( g.okTktFmt ){ |
| 918 |
+55
| --- src/setup.c | ||
| +++ src/setup.c | ||
| @@ -19,10 +19,17 @@ | ||
| 19 | 19 | */ |
| 20 | 20 | #include <assert.h> |
| 21 | 21 | #include "config.h" |
| 22 | 22 | #include "setup.h" |
| 23 | 23 | |
| 24 | +/* | |
| 25 | +** The table of web pages supported by this application is generated | |
| 26 | +** automatically by the "mkindex" program and written into a file | |
| 27 | +** named "page_index.h". We include that file here to get access | |
| 28 | +** to the table. | |
| 29 | +*/ | |
| 30 | +#include "page_index.h" | |
| 24 | 31 | |
| 25 | 32 | /* |
| 26 | 33 | ** Output a single entry for a menu generated using an HTML table. |
| 27 | 34 | ** If zLink is not NULL or an empty string, then it is the page that |
| 28 | 35 | ** the menu entry will hyperlink to. If zLink is NULL or "", then |
| @@ -57,10 +64,12 @@ | ||
| 57 | 64 | "Grant privileges to individual users."); |
| 58 | 65 | setup_menu_entry("Access", "setup_access", |
| 59 | 66 | "Control access settings."); |
| 60 | 67 | setup_menu_entry("Configuration", "setup_config", |
| 61 | 68 | "Configure the WWW components of the repository"); |
| 69 | + setup_menu_entry("Settings", "setup_settings", | |
| 70 | + "Web interface to the \"fossil settings\" command"); | |
| 62 | 71 | setup_menu_entry("Timeline", "setup_timeline", |
| 63 | 72 | "Timeline display preferences"); |
| 64 | 73 | setup_menu_entry("Tickets", "tktsetup", |
| 65 | 74 | "Configure the trouble-ticketing system for this repository"); |
| 66 | 75 | setup_menu_entry("Skins", "setup_skin", |
| @@ -844,10 +853,56 @@ | ||
| 844 | 853 | @ <p><input type="submit" name="submit" value="Apply Changes" /></p> |
| 845 | 854 | @ </div></form> |
| 846 | 855 | db_end_transaction(0); |
| 847 | 856 | style_footer(); |
| 848 | 857 | } |
| 858 | + | |
| 859 | +/* | |
| 860 | +** WEBPAGE: setup_settings | |
| 861 | +*/ | |
| 862 | +void setup_settings(void){ | |
| 863 | + struct stControlSettings const *pSet; | |
| 864 | + | |
| 865 | + login_check_credentials(); | |
| 866 | + if( !g.okSetup ){ | |
| 867 | + login_needed(); | |
| 868 | + } | |
| 869 | + | |
| 870 | + style_header("Settings"); | |
| 871 | + db_begin_transaction(); | |
| 872 | + @ <p>This page provides a simple interface to the "fossil setting" command. | |
| 873 | + @ See the "fossil help setting" output below for further information on | |
| 874 | + @ the meaning of each setting.</p><hr /> | |
| 875 | + @ <form action="%s(g.zBaseURL)/setup_settings" method="post"><div> | |
| 876 | + @ <table border="0"><tr><td valign="top"> | |
| 877 | + login_insert_csrf_secret(); | |
| 878 | + for(pSet=ctrlSettings; pSet->name!=0; pSet++){ | |
| 879 | + if( pSet->width==0 ){ | |
| 880 | + onoff_attribute(pSet->name, pSet->name, | |
| 881 | + pSet->var!=0 ? pSet->var : pSet->name, | |
| 882 | + pSet->def[0]=='1'); | |
| 883 | + @ <br /> | |
| 884 | + } | |
| 885 | + } | |
| 886 | + @ </td><td width="30"></td><td valign="top"> | |
| 887 | + for(pSet=ctrlSettings; pSet->name!=0; pSet++){ | |
| 888 | + if( pSet->width!=0 ){ | |
| 889 | + entry_attribute(pSet->name, /*pSet->width*/ 40, pSet->name, | |
| 890 | + pSet->var!=0 ? pSet->var : pSet->name, | |
| 891 | + (char*)pSet->def); | |
| 892 | + @ <br /> | |
| 893 | + } | |
| 894 | + } | |
| 895 | + @ </tr></table> | |
| 896 | + @ <p><input type="submit" name="submit" value="Apply Changes" /></p> | |
| 897 | + @ </div></form> | |
| 898 | + @ <hr /><p> | |
| 899 | + @ These settings work in the same way, as the <kbd>set</kbd> commandline:<br> | |
| 900 | + @ <pre>%s(zHelp_setting_cmd)</pre></p> | |
| 901 | + db_end_transaction(0); | |
| 902 | + style_footer(); | |
| 903 | +} | |
| 849 | 904 | |
| 850 | 905 | /* |
| 851 | 906 | ** WEBPAGE: setup_config |
| 852 | 907 | */ |
| 853 | 908 | void setup_config(void){ |
| 854 | 909 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -19,10 +19,17 @@ | |
| 19 | */ |
| 20 | #include <assert.h> |
| 21 | #include "config.h" |
| 22 | #include "setup.h" |
| 23 | |
| 24 | |
| 25 | /* |
| 26 | ** Output a single entry for a menu generated using an HTML table. |
| 27 | ** If zLink is not NULL or an empty string, then it is the page that |
| 28 | ** the menu entry will hyperlink to. If zLink is NULL or "", then |
| @@ -57,10 +64,12 @@ | |
| 57 | "Grant privileges to individual users."); |
| 58 | setup_menu_entry("Access", "setup_access", |
| 59 | "Control access settings."); |
| 60 | setup_menu_entry("Configuration", "setup_config", |
| 61 | "Configure the WWW components of the repository"); |
| 62 | setup_menu_entry("Timeline", "setup_timeline", |
| 63 | "Timeline display preferences"); |
| 64 | setup_menu_entry("Tickets", "tktsetup", |
| 65 | "Configure the trouble-ticketing system for this repository"); |
| 66 | setup_menu_entry("Skins", "setup_skin", |
| @@ -844,10 +853,56 @@ | |
| 844 | @ <p><input type="submit" name="submit" value="Apply Changes" /></p> |
| 845 | @ </div></form> |
| 846 | db_end_transaction(0); |
| 847 | style_footer(); |
| 848 | } |
| 849 | |
| 850 | /* |
| 851 | ** WEBPAGE: setup_config |
| 852 | */ |
| 853 | void setup_config(void){ |
| 854 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -19,10 +19,17 @@ | |
| 19 | */ |
| 20 | #include <assert.h> |
| 21 | #include "config.h" |
| 22 | #include "setup.h" |
| 23 | |
| 24 | /* |
| 25 | ** The table of web pages supported by this application is generated |
| 26 | ** automatically by the "mkindex" program and written into a file |
| 27 | ** named "page_index.h". We include that file here to get access |
| 28 | ** to the table. |
| 29 | */ |
| 30 | #include "page_index.h" |
| 31 | |
| 32 | /* |
| 33 | ** Output a single entry for a menu generated using an HTML table. |
| 34 | ** If zLink is not NULL or an empty string, then it is the page that |
| 35 | ** the menu entry will hyperlink to. If zLink is NULL or "", then |
| @@ -57,10 +64,12 @@ | |
| 64 | "Grant privileges to individual users."); |
| 65 | setup_menu_entry("Access", "setup_access", |
| 66 | "Control access settings."); |
| 67 | setup_menu_entry("Configuration", "setup_config", |
| 68 | "Configure the WWW components of the repository"); |
| 69 | setup_menu_entry("Settings", "setup_settings", |
| 70 | "Web interface to the \"fossil settings\" command"); |
| 71 | setup_menu_entry("Timeline", "setup_timeline", |
| 72 | "Timeline display preferences"); |
| 73 | setup_menu_entry("Tickets", "tktsetup", |
| 74 | "Configure the trouble-ticketing system for this repository"); |
| 75 | setup_menu_entry("Skins", "setup_skin", |
| @@ -844,10 +853,56 @@ | |
| 853 | @ <p><input type="submit" name="submit" value="Apply Changes" /></p> |
| 854 | @ </div></form> |
| 855 | db_end_transaction(0); |
| 856 | style_footer(); |
| 857 | } |
| 858 | |
| 859 | /* |
| 860 | ** WEBPAGE: setup_settings |
| 861 | */ |
| 862 | void setup_settings(void){ |
| 863 | struct stControlSettings const *pSet; |
| 864 | |
| 865 | login_check_credentials(); |
| 866 | if( !g.okSetup ){ |
| 867 | login_needed(); |
| 868 | } |
| 869 | |
| 870 | style_header("Settings"); |
| 871 | db_begin_transaction(); |
| 872 | @ <p>This page provides a simple interface to the "fossil setting" command. |
| 873 | @ See the "fossil help setting" output below for further information on |
| 874 | @ the meaning of each setting.</p><hr /> |
| 875 | @ <form action="%s(g.zBaseURL)/setup_settings" method="post"><div> |
| 876 | @ <table border="0"><tr><td valign="top"> |
| 877 | login_insert_csrf_secret(); |
| 878 | for(pSet=ctrlSettings; pSet->name!=0; pSet++){ |
| 879 | if( pSet->width==0 ){ |
| 880 | onoff_attribute(pSet->name, pSet->name, |
| 881 | pSet->var!=0 ? pSet->var : pSet->name, |
| 882 | pSet->def[0]=='1'); |
| 883 | @ <br /> |
| 884 | } |
| 885 | } |
| 886 | @ </td><td width="30"></td><td valign="top"> |
| 887 | for(pSet=ctrlSettings; pSet->name!=0; pSet++){ |
| 888 | if( pSet->width!=0 ){ |
| 889 | entry_attribute(pSet->name, /*pSet->width*/ 40, pSet->name, |
| 890 | pSet->var!=0 ? pSet->var : pSet->name, |
| 891 | (char*)pSet->def); |
| 892 | @ <br /> |
| 893 | } |
| 894 | } |
| 895 | @ </tr></table> |
| 896 | @ <p><input type="submit" name="submit" value="Apply Changes" /></p> |
| 897 | @ </div></form> |
| 898 | @ <hr /><p> |
| 899 | @ These settings work in the same way, as the <kbd>set</kbd> commandline:<br> |
| 900 | @ <pre>%s(zHelp_setting_cmd)</pre></p> |
| 901 | db_end_transaction(0); |
| 902 | style_footer(); |
| 903 | } |
| 904 | |
| 905 | /* |
| 906 | ** WEBPAGE: setup_config |
| 907 | */ |
| 908 | void setup_config(void){ |
| 909 |
+4
-3
| --- src/stat.c | ||
| +++ src/stat.c | ||
| @@ -26,22 +26,23 @@ | ||
| 26 | 26 | ** WEBPAGE: stat |
| 27 | 27 | ** |
| 28 | 28 | ** Show statistics and global information about the repository. |
| 29 | 29 | */ |
| 30 | 30 | void stat_page(void){ |
| 31 | - i64 t; | |
| 32 | - int n, m, fsize; | |
| 31 | + i64 t, fsize; | |
| 32 | + int n, m; | |
| 33 | 33 | int szMax, szAvg; |
| 34 | 34 | char zBuf[100]; |
| 35 | 35 | |
| 36 | 36 | login_check_credentials(); |
| 37 | 37 | if( !g.okRead ){ login_needed(); return; } |
| 38 | 38 | style_header("Repository Statistics"); |
| 39 | 39 | @ <table class="label-value"> |
| 40 | 40 | @ <tr><th>Repository Size:</th><td> |
| 41 | 41 | fsize = file_size(g.zRepositoryName); |
| 42 | - @ %d(fsize) bytes | |
| 42 | + sqlite3_snprintf(sizeof(zBuf), zBuf, "%lld", fsize); | |
| 43 | + @ %s(zBuf) bytes | |
| 43 | 44 | @ </td></tr> |
| 44 | 45 | @ <tr><th>Number Of Artifacts:</th><td> |
| 45 | 46 | n = db_int(0, "SELECT count(*) FROM blob"); |
| 46 | 47 | m = db_int(0, "SELECT count(*) FROM delta"); |
| 47 | 48 | @ %d(n) (stored as %d(n-m) full text and %d(m) delta blobs) |
| 48 | 49 |
| --- src/stat.c | |
| +++ src/stat.c | |
| @@ -26,22 +26,23 @@ | |
| 26 | ** WEBPAGE: stat |
| 27 | ** |
| 28 | ** Show statistics and global information about the repository. |
| 29 | */ |
| 30 | void stat_page(void){ |
| 31 | i64 t; |
| 32 | int n, m, fsize; |
| 33 | int szMax, szAvg; |
| 34 | char zBuf[100]; |
| 35 | |
| 36 | login_check_credentials(); |
| 37 | if( !g.okRead ){ login_needed(); return; } |
| 38 | style_header("Repository Statistics"); |
| 39 | @ <table class="label-value"> |
| 40 | @ <tr><th>Repository Size:</th><td> |
| 41 | fsize = file_size(g.zRepositoryName); |
| 42 | @ %d(fsize) bytes |
| 43 | @ </td></tr> |
| 44 | @ <tr><th>Number Of Artifacts:</th><td> |
| 45 | n = db_int(0, "SELECT count(*) FROM blob"); |
| 46 | m = db_int(0, "SELECT count(*) FROM delta"); |
| 47 | @ %d(n) (stored as %d(n-m) full text and %d(m) delta blobs) |
| 48 |
| --- src/stat.c | |
| +++ src/stat.c | |
| @@ -26,22 +26,23 @@ | |
| 26 | ** WEBPAGE: stat |
| 27 | ** |
| 28 | ** Show statistics and global information about the repository. |
| 29 | */ |
| 30 | void stat_page(void){ |
| 31 | i64 t, fsize; |
| 32 | int n, m; |
| 33 | int szMax, szAvg; |
| 34 | char zBuf[100]; |
| 35 | |
| 36 | login_check_credentials(); |
| 37 | if( !g.okRead ){ login_needed(); return; } |
| 38 | style_header("Repository Statistics"); |
| 39 | @ <table class="label-value"> |
| 40 | @ <tr><th>Repository Size:</th><td> |
| 41 | fsize = file_size(g.zRepositoryName); |
| 42 | sqlite3_snprintf(sizeof(zBuf), zBuf, "%lld", fsize); |
| 43 | @ %s(zBuf) bytes |
| 44 | @ </td></tr> |
| 45 | @ <tr><th>Number Of Artifacts:</th><td> |
| 46 | n = db_int(0, "SELECT count(*) FROM blob"); |
| 47 | m = db_int(0, "SELECT count(*) FROM delta"); |
| 48 | @ %d(n) (stored as %d(n-m) full text and %d(m) delta blobs) |
| 49 |
+4
-2
| --- src/style.c | ||
| +++ src/style.c | ||
| @@ -355,10 +355,11 @@ | ||
| 355 | 355 | @ font-size: 1em; font-weight: normal; |
| 356 | 356 | @ padding: .25em; |
| 357 | 357 | @ margin: .2em 0 .2em 0; |
| 358 | 358 | @ float: left; |
| 359 | 359 | @ clear: left; |
| 360 | +@ white-space: nowrap; | |
| 360 | 361 | @ } |
| 361 | 362 | @ |
| 362 | 363 | @ /* The footer at the very bottom of the page */ |
| 363 | 364 | @ div.footer { |
| 364 | 365 | @ font-size: 0.8em; |
| @@ -520,12 +521,13 @@ | ||
| 520 | 521 | }, |
| 521 | 522 | { "table.captcha", |
| 522 | 523 | "format for the layout table, used for the captcha display", |
| 523 | 524 | @ margin: auto; |
| 524 | 525 | @ padding: 10px; |
| 525 | - @ outline-width: 1; | |
| 526 | - @ outline-style: double; | |
| 526 | + @ border-width: 1; | |
| 527 | + @ border-style: double; | |
| 528 | + @ bordor-color: black; | |
| 527 | 529 | }, |
| 528 | 530 | { "td.login_out_label", |
| 529 | 531 | "format for the label cells in the login/out table", |
| 530 | 532 | @ text-align: center; |
| 531 | 533 | }, |
| 532 | 534 |
| --- src/style.c | |
| +++ src/style.c | |
| @@ -355,10 +355,11 @@ | |
| 355 | @ font-size: 1em; font-weight: normal; |
| 356 | @ padding: .25em; |
| 357 | @ margin: .2em 0 .2em 0; |
| 358 | @ float: left; |
| 359 | @ clear: left; |
| 360 | @ } |
| 361 | @ |
| 362 | @ /* The footer at the very bottom of the page */ |
| 363 | @ div.footer { |
| 364 | @ font-size: 0.8em; |
| @@ -520,12 +521,13 @@ | |
| 520 | }, |
| 521 | { "table.captcha", |
| 522 | "format for the layout table, used for the captcha display", |
| 523 | @ margin: auto; |
| 524 | @ padding: 10px; |
| 525 | @ outline-width: 1; |
| 526 | @ outline-style: double; |
| 527 | }, |
| 528 | { "td.login_out_label", |
| 529 | "format for the label cells in the login/out table", |
| 530 | @ text-align: center; |
| 531 | }, |
| 532 |
| --- src/style.c | |
| +++ src/style.c | |
| @@ -355,10 +355,11 @@ | |
| 355 | @ font-size: 1em; font-weight: normal; |
| 356 | @ padding: .25em; |
| 357 | @ margin: .2em 0 .2em 0; |
| 358 | @ float: left; |
| 359 | @ clear: left; |
| 360 | @ white-space: nowrap; |
| 361 | @ } |
| 362 | @ |
| 363 | @ /* The footer at the very bottom of the page */ |
| 364 | @ div.footer { |
| 365 | @ font-size: 0.8em; |
| @@ -520,12 +521,13 @@ | |
| 521 | }, |
| 522 | { "table.captcha", |
| 523 | "format for the layout table, used for the captcha display", |
| 524 | @ margin: auto; |
| 525 | @ padding: 10px; |
| 526 | @ border-width: 1; |
| 527 | @ border-style: double; |
| 528 | @ bordor-color: black; |
| 529 | }, |
| 530 | { "td.login_out_label", |
| 531 | "format for the label cells in the login/out table", |
| 532 | @ text-align: center; |
| 533 | }, |
| 534 |
+3
-1
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -347,10 +347,11 @@ | ||
| 347 | 347 | if( pGraph && pGraph->nErr==0 ){ |
| 348 | 348 | GraphRow *pRow; |
| 349 | 349 | int i; |
| 350 | 350 | char cSep; |
| 351 | 351 | @ <script type="text/JavaScript"> |
| 352 | + @ /* <![CDATA[ */ | |
| 352 | 353 | cgi_printf("var rowinfo = [\n"); |
| 353 | 354 | for(pRow=pGraph->pFirst; pRow; pRow=pRow->pNext){ |
| 354 | 355 | cgi_printf("{id:\"m%d\",bg:\"%s\",r:%d,d:%d,mo:%d,mu:%d,u:%d,au:", |
| 355 | 356 | pRow->idx, |
| 356 | 357 | pRow->zBgClr, |
| @@ -496,11 +497,11 @@ | ||
| 496 | 497 | @ } |
| 497 | 498 | @ var btm = absoluteY("grbtm") + 10 - canvasY; |
| 498 | 499 | @ if( btm<32768 ){ |
| 499 | 500 | @ canvasDiv.innerHTML = '<canvas id="timeline-canvas" '+ |
| 500 | 501 | @ 'style="position:absolute;left:'+(left-5)+'px;"' + |
| 501 | - @ ' width="'+width+'" height="'+btm+'"></canvas>'; | |
| 502 | + @ ' width="'+width+'" height="'+btm+'"><'+'/canvas>'; | |
| 502 | 503 | @ realCanvas = document.getElementById('timeline-canvas'); |
| 503 | 504 | @ }else{ |
| 504 | 505 | @ realCanvas = 0; |
| 505 | 506 | @ } |
| 506 | 507 | @ var context; |
| @@ -528,10 +529,11 @@ | ||
| 528 | 529 | @ lastY = h; |
| 529 | 530 | @ } |
| 530 | 531 | @ setTimeout("checkHeight();", 1000); |
| 531 | 532 | @ } |
| 532 | 533 | @ checkHeight(); |
| 534 | + @ /* ]]> */ | |
| 533 | 535 | @ </script> |
| 534 | 536 | } |
| 535 | 537 | } |
| 536 | 538 | |
| 537 | 539 | /* |
| 538 | 540 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -347,10 +347,11 @@ | |
| 347 | if( pGraph && pGraph->nErr==0 ){ |
| 348 | GraphRow *pRow; |
| 349 | int i; |
| 350 | char cSep; |
| 351 | @ <script type="text/JavaScript"> |
| 352 | cgi_printf("var rowinfo = [\n"); |
| 353 | for(pRow=pGraph->pFirst; pRow; pRow=pRow->pNext){ |
| 354 | cgi_printf("{id:\"m%d\",bg:\"%s\",r:%d,d:%d,mo:%d,mu:%d,u:%d,au:", |
| 355 | pRow->idx, |
| 356 | pRow->zBgClr, |
| @@ -496,11 +497,11 @@ | |
| 496 | @ } |
| 497 | @ var btm = absoluteY("grbtm") + 10 - canvasY; |
| 498 | @ if( btm<32768 ){ |
| 499 | @ canvasDiv.innerHTML = '<canvas id="timeline-canvas" '+ |
| 500 | @ 'style="position:absolute;left:'+(left-5)+'px;"' + |
| 501 | @ ' width="'+width+'" height="'+btm+'"></canvas>'; |
| 502 | @ realCanvas = document.getElementById('timeline-canvas'); |
| 503 | @ }else{ |
| 504 | @ realCanvas = 0; |
| 505 | @ } |
| 506 | @ var context; |
| @@ -528,10 +529,11 @@ | |
| 528 | @ lastY = h; |
| 529 | @ } |
| 530 | @ setTimeout("checkHeight();", 1000); |
| 531 | @ } |
| 532 | @ checkHeight(); |
| 533 | @ </script> |
| 534 | } |
| 535 | } |
| 536 | |
| 537 | /* |
| 538 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -347,10 +347,11 @@ | |
| 347 | if( pGraph && pGraph->nErr==0 ){ |
| 348 | GraphRow *pRow; |
| 349 | int i; |
| 350 | char cSep; |
| 351 | @ <script type="text/JavaScript"> |
| 352 | @ /* <![CDATA[ */ |
| 353 | cgi_printf("var rowinfo = [\n"); |
| 354 | for(pRow=pGraph->pFirst; pRow; pRow=pRow->pNext){ |
| 355 | cgi_printf("{id:\"m%d\",bg:\"%s\",r:%d,d:%d,mo:%d,mu:%d,u:%d,au:", |
| 356 | pRow->idx, |
| 357 | pRow->zBgClr, |
| @@ -496,11 +497,11 @@ | |
| 497 | @ } |
| 498 | @ var btm = absoluteY("grbtm") + 10 - canvasY; |
| 499 | @ if( btm<32768 ){ |
| 500 | @ canvasDiv.innerHTML = '<canvas id="timeline-canvas" '+ |
| 501 | @ 'style="position:absolute;left:'+(left-5)+'px;"' + |
| 502 | @ ' width="'+width+'" height="'+btm+'"><'+'/canvas>'; |
| 503 | @ realCanvas = document.getElementById('timeline-canvas'); |
| 504 | @ }else{ |
| 505 | @ realCanvas = 0; |
| 506 | @ } |
| 507 | @ var context; |
| @@ -528,10 +529,11 @@ | |
| 529 | @ lastY = h; |
| 530 | @ } |
| 531 | @ setTimeout("checkHeight();", 1000); |
| 532 | @ } |
| 533 | @ checkHeight(); |
| 534 | @ /* ]]> */ |
| 535 | @ </script> |
| 536 | } |
| 537 | } |
| 538 | |
| 539 | /* |
| 540 |
+1
-4
| --- src/wikiformat.c | ||
| +++ src/wikiformat.c | ||
| @@ -745,13 +745,10 @@ | ||
| 745 | 745 | static void renderMarkup(Blob *pOut, ParsedMarkup *p){ |
| 746 | 746 | int i; |
| 747 | 747 | if( p->endTag ){ |
| 748 | 748 | blob_appendf(pOut, "</%s>", aMarkup[p->iCode].zName); |
| 749 | 749 | }else{ |
| 750 | - /* Close active paragraph for several elements, which are not allowed | |
| 751 | - ** in paragraphs in XHTML. | |
| 752 | - */ | |
| 753 | 750 | blob_appendf(pOut, "<%s", aMarkup[p->iCode].zName); |
| 754 | 751 | for(i=0; i<p->nAttr; i++){ |
| 755 | 752 | blob_appendf(pOut, " %s", aAttribute[p->aAttr[i].iACode].zName); |
| 756 | 753 | if( p->aAttr[i].zValue ){ |
| 757 | 754 | const char *zVal = p->aAttr[i].zValue; |
| @@ -893,11 +890,11 @@ | ||
| 893 | 890 | ** Begin a new paragraph if that something that is needed. |
| 894 | 891 | */ |
| 895 | 892 | static void startAutoParagraph(Renderer *p){ |
| 896 | 893 | if( p->wantAutoParagraph==0 ) return; |
| 897 | 894 | if( p->wikiList==MARKUP_OL || p->wikiList==MARKUP_UL ) return; |
| 898 | - blob_appendf(p->pOut, "<p type=\"auto\">", -1); | |
| 895 | + blob_appendf(p->pOut, "<p>", -1); | |
| 899 | 896 | pushStack(p, MARKUP_P); |
| 900 | 897 | p->wantAutoParagraph = 0; |
| 901 | 898 | p->inAutoParagraph = 1; |
| 902 | 899 | } |
| 903 | 900 | |
| 904 | 901 |
| --- src/wikiformat.c | |
| +++ src/wikiformat.c | |
| @@ -745,13 +745,10 @@ | |
| 745 | static void renderMarkup(Blob *pOut, ParsedMarkup *p){ |
| 746 | int i; |
| 747 | if( p->endTag ){ |
| 748 | blob_appendf(pOut, "</%s>", aMarkup[p->iCode].zName); |
| 749 | }else{ |
| 750 | /* Close active paragraph for several elements, which are not allowed |
| 751 | ** in paragraphs in XHTML. |
| 752 | */ |
| 753 | blob_appendf(pOut, "<%s", aMarkup[p->iCode].zName); |
| 754 | for(i=0; i<p->nAttr; i++){ |
| 755 | blob_appendf(pOut, " %s", aAttribute[p->aAttr[i].iACode].zName); |
| 756 | if( p->aAttr[i].zValue ){ |
| 757 | const char *zVal = p->aAttr[i].zValue; |
| @@ -893,11 +890,11 @@ | |
| 893 | ** Begin a new paragraph if that something that is needed. |
| 894 | */ |
| 895 | static void startAutoParagraph(Renderer *p){ |
| 896 | if( p->wantAutoParagraph==0 ) return; |
| 897 | if( p->wikiList==MARKUP_OL || p->wikiList==MARKUP_UL ) return; |
| 898 | blob_appendf(p->pOut, "<p type=\"auto\">", -1); |
| 899 | pushStack(p, MARKUP_P); |
| 900 | p->wantAutoParagraph = 0; |
| 901 | p->inAutoParagraph = 1; |
| 902 | } |
| 903 | |
| 904 |
| --- src/wikiformat.c | |
| +++ src/wikiformat.c | |
| @@ -745,13 +745,10 @@ | |
| 745 | static void renderMarkup(Blob *pOut, ParsedMarkup *p){ |
| 746 | int i; |
| 747 | if( p->endTag ){ |
| 748 | blob_appendf(pOut, "</%s>", aMarkup[p->iCode].zName); |
| 749 | }else{ |
| 750 | blob_appendf(pOut, "<%s", aMarkup[p->iCode].zName); |
| 751 | for(i=0; i<p->nAttr; i++){ |
| 752 | blob_appendf(pOut, " %s", aAttribute[p->aAttr[i].iACode].zName); |
| 753 | if( p->aAttr[i].zValue ){ |
| 754 | const char *zVal = p->aAttr[i].zValue; |
| @@ -893,11 +890,11 @@ | |
| 890 | ** Begin a new paragraph if that something that is needed. |
| 891 | */ |
| 892 | static void startAutoParagraph(Renderer *p){ |
| 893 | if( p->wantAutoParagraph==0 ) return; |
| 894 | if( p->wikiList==MARKUP_OL || p->wikiList==MARKUP_UL ) return; |
| 895 | blob_appendf(p->pOut, "<p>", -1); |
| 896 | pushStack(p, MARKUP_P); |
| 897 | p->wantAutoParagraph = 0; |
| 898 | p->inAutoParagraph = 1; |
| 899 | } |
| 900 | |
| 901 |