Fossil SCM
Code cleaning after the previous check-in. No functional changes.
Commit
b705d756cf645ecd3d8ae2197179cbf7bac6d2f7c507ff2816fc977620477f57
Parent
635fa090d10a204…
1 file changed
+8
-28
+8
-28
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -592,28 +592,10 @@ | ||
| 592 | 592 | /* The status command ends with warnings about ambiguous leaves (forks). */ |
| 593 | 593 | if( command==STATUS ){ |
| 594 | 594 | leaf_ambiguity_warning(vid, vid); |
| 595 | 595 | } |
| 596 | 596 | } |
| 597 | - | |
| 598 | -/* | |
| 599 | -** Characters used for drawing a file hierarchy graph. | |
| 600 | -*/ | |
| 601 | -#if _WIN32 | |
| 602 | -/* ASCII only available on Windows */ | |
| 603 | -#define ENTRY "|-- " | |
| 604 | -#define LASTE "`-- " | |
| 605 | -#define CONTU "| " | |
| 606 | -#define BLANK " " | |
| 607 | -#else | |
| 608 | -/* All other platforms support Unicode box-drawing chracters */ | |
| 609 | -#define ENTRY "\342\224\234\342\224\200\342\224\200 " | |
| 610 | -#define LASTE "\342\224\224\342\224\200\342\224\200 " | |
| 611 | -#define CONTU "\342\224\202 " | |
| 612 | -#define BLANK " " | |
| 613 | -#endif | |
| 614 | - | |
| 615 | 597 | |
| 616 | 598 | /* zIn is a string that is guaranteed to be followed by \n. Return |
| 617 | 599 | ** a pointer to the next line after the \n. The returned value might |
| 618 | 600 | ** point to the \000 string terminator. |
| 619 | 601 | */ |
| @@ -649,25 +631,23 @@ | ||
| 649 | 631 | const char *zLast, /* Last filename in the list to print */ |
| 650 | 632 | const char *zPrefix, /* Prefix so put before each output line */ |
| 651 | 633 | int nDir, /* Ignore this many characters of directory name */ |
| 652 | 634 | int treeFmt /* 1 = use Unicode symbols, 2 = use ASCII chars */ |
| 653 | 635 | ){ |
| 636 | + /* ASCII characters used for drawing a file hierarchy graph */ | |
| 654 | 637 | const char *treeEntry = "|-- "; |
| 655 | 638 | const char *treeLastE = "`-- "; |
| 656 | 639 | const char *treeContu = "| "; |
| 657 | 640 | const char *treeBlank = " "; |
| 658 | 641 | if( treeFmt == 1 ){ |
| 642 | + /* Unicode box-drawing characters: U+251C, U+2514, U+2502 */ | |
| 659 | 643 | treeEntry = "\342\224\234\342\224\200\342\224\200 "; |
| 660 | 644 | treeLastE = "\342\224\224\342\224\200\342\224\200 "; |
| 661 | 645 | treeContu = "\342\224\202 "; |
| 662 | 646 | } |
| 663 | 647 | while( zIn<=zLast ){ |
| 664 | 648 | int i; |
| 665 | - // const char *treeContu = (treeFmt == 1) ? "\342\224\202 " : "| "; | |
| 666 | - // const char *treeEntry = (treeFmt == 1) ? "\342\224\234\342\224\200\342\224\200 " : "|-- "; | |
| 667 | - // const char *treeLastE = (treeFmt == 1) ? "\342\224\224\342\224\200\342\224\200 " : "`-- "; | |
| 668 | - // const char *treeBlank = " "; | |
| 669 | 649 | for(i=nDir; zIn[i]!='\n' && zIn[i]!='/'; i++){} |
| 670 | 650 | if( zIn[i]=='/' ){ |
| 671 | 651 | char *zSubPrefix; |
| 672 | 652 | const char *zSubLast = last_line(zIn, i+1); |
| 673 | 653 | zSubPrefix = mprintf("%s%s", zPrefix, |
| @@ -814,11 +794,11 @@ | ||
| 814 | 794 | ** rather than relying on file sizes and mtimes |
| 815 | 795 | ** -r VERSION The specific check-in to list |
| 816 | 796 | ** -R|--repository REPO Extract info from repository REPO |
| 817 | 797 | ** -t Sort output in time order |
| 818 | 798 | ** --tree Tree format |
| 819 | -** -u|--unicode-tree Use Unicode symbols when drawing the tree | |
| 799 | +** -u|--unicode-tree Use Unicode characters when drawing the tree | |
| 820 | 800 | ** -v|--verbose Provide extra information about each file |
| 821 | 801 | ** |
| 822 | 802 | ** See also: [[changes]], [[extras]], [[status]], [[tree]] |
| 823 | 803 | */ |
| 824 | 804 | void ls_cmd(void){ |
| @@ -852,11 +832,11 @@ | ||
| 852 | 832 | unicodeTree = find_option("unicode-tree","u",0)!=0; |
| 853 | 833 | if( treeFmt ){ |
| 854 | 834 | if( zRev==0 ) zRev = "current"; |
| 855 | 835 | #ifdef _WIN32 |
| 856 | 836 | treeFmt = 2; |
| 857 | -#endif | |
| 837 | +#endif | |
| 858 | 838 | if( unicodeTree ) treeFmt = 1; |
| 859 | 839 | if( asciiTree ) treeFmt = 2; |
| 860 | 840 | } |
| 861 | 841 | |
| 862 | 842 | if( zRev!=0 ){ |
| @@ -974,11 +954,11 @@ | ||
| 974 | 954 | ** |
| 975 | 955 | ** Options: |
| 976 | 956 | ** -a|--ascii-tree Use ASCII characters when drawing the tree |
| 977 | 957 | ** -r VERSION The specific check-in to list |
| 978 | 958 | ** -R|--repository REPO Extract info from repository REPO |
| 979 | -** -u|--unicode-tree Use Unicode symbols when drawing the tree | |
| 959 | +** -u|--unicode-tree Use Unicode characters when drawing the tree | |
| 980 | 960 | ** |
| 981 | 961 | ** See also: [[ls]] |
| 982 | 962 | */ |
| 983 | 963 | void tree_cmd(void){ |
| 984 | 964 | const char *zRev; |
| @@ -985,11 +965,11 @@ | ||
| 985 | 965 | int treeFmt = 1; |
| 986 | 966 | int asciiTree = find_option("ascii-tree","a",0)!=0; |
| 987 | 967 | int unicodeTree = find_option("unicode-tree","u",0)!=0; |
| 988 | 968 | #ifdef _WIN32 |
| 989 | 969 | treeFmt = 2; |
| 990 | -#endif | |
| 970 | +#endif | |
| 991 | 971 | if( unicodeTree ) treeFmt = 1; |
| 992 | 972 | if( asciiTree ) treeFmt = 2; |
| 993 | 973 | zRev = find_option("r","r",1); |
| 994 | 974 | if( zRev==0 ) zRev = "current"; |
| 995 | 975 | db_find_and_open_repository(0, 0); |
| @@ -1024,11 +1004,11 @@ | ||
| 1024 | 1004 | ** --header Identify the repository if there are extras |
| 1025 | 1005 | ** --ignore CSG Ignore files matching patterns from the argument |
| 1026 | 1006 | ** --rel-paths Display pathnames relative to the current working |
| 1027 | 1007 | ** directory |
| 1028 | 1008 | ** --tree Show output in the tree format |
| 1029 | -** -u|--unicode-tree Use Unicode symbols when drawing the tree | |
| 1009 | +** -u|--unicode-tree Use Unicode characters when drawing the tree | |
| 1030 | 1010 | ** |
| 1031 | 1011 | ** See also: [[changes]], [[clean]], [[status]] |
| 1032 | 1012 | */ |
| 1033 | 1013 | void extras_cmd(void){ |
| 1034 | 1014 | Blob report = BLOB_INITIALIZER; |
| @@ -1052,11 +1032,11 @@ | ||
| 1052 | 1032 | |
| 1053 | 1033 | if( treeFmt ){ |
| 1054 | 1034 | flags &= ~C_RELPATH; |
| 1055 | 1035 | #ifdef _WIN32 |
| 1056 | 1036 | treeFmt = 2; |
| 1057 | -#endif | |
| 1037 | +#endif | |
| 1058 | 1038 | if( unicodeTree ) treeFmt = 1; |
| 1059 | 1039 | if( asciiTree ) treeFmt = 2; |
| 1060 | 1040 | } |
| 1061 | 1041 | |
| 1062 | 1042 | /* We should be done with options.. */ |
| 1063 | 1043 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -592,28 +592,10 @@ | |
| 592 | /* The status command ends with warnings about ambiguous leaves (forks). */ |
| 593 | if( command==STATUS ){ |
| 594 | leaf_ambiguity_warning(vid, vid); |
| 595 | } |
| 596 | } |
| 597 | |
| 598 | /* |
| 599 | ** Characters used for drawing a file hierarchy graph. |
| 600 | */ |
| 601 | #if _WIN32 |
| 602 | /* ASCII only available on Windows */ |
| 603 | #define ENTRY "|-- " |
| 604 | #define LASTE "`-- " |
| 605 | #define CONTU "| " |
| 606 | #define BLANK " " |
| 607 | #else |
| 608 | /* All other platforms support Unicode box-drawing chracters */ |
| 609 | #define ENTRY "\342\224\234\342\224\200\342\224\200 " |
| 610 | #define LASTE "\342\224\224\342\224\200\342\224\200 " |
| 611 | #define CONTU "\342\224\202 " |
| 612 | #define BLANK " " |
| 613 | #endif |
| 614 | |
| 615 | |
| 616 | /* zIn is a string that is guaranteed to be followed by \n. Return |
| 617 | ** a pointer to the next line after the \n. The returned value might |
| 618 | ** point to the \000 string terminator. |
| 619 | */ |
| @@ -649,25 +631,23 @@ | |
| 649 | const char *zLast, /* Last filename in the list to print */ |
| 650 | const char *zPrefix, /* Prefix so put before each output line */ |
| 651 | int nDir, /* Ignore this many characters of directory name */ |
| 652 | int treeFmt /* 1 = use Unicode symbols, 2 = use ASCII chars */ |
| 653 | ){ |
| 654 | const char *treeEntry = "|-- "; |
| 655 | const char *treeLastE = "`-- "; |
| 656 | const char *treeContu = "| "; |
| 657 | const char *treeBlank = " "; |
| 658 | if( treeFmt == 1 ){ |
| 659 | treeEntry = "\342\224\234\342\224\200\342\224\200 "; |
| 660 | treeLastE = "\342\224\224\342\224\200\342\224\200 "; |
| 661 | treeContu = "\342\224\202 "; |
| 662 | } |
| 663 | while( zIn<=zLast ){ |
| 664 | int i; |
| 665 | // const char *treeContu = (treeFmt == 1) ? "\342\224\202 " : "| "; |
| 666 | // const char *treeEntry = (treeFmt == 1) ? "\342\224\234\342\224\200\342\224\200 " : "|-- "; |
| 667 | // const char *treeLastE = (treeFmt == 1) ? "\342\224\224\342\224\200\342\224\200 " : "`-- "; |
| 668 | // const char *treeBlank = " "; |
| 669 | for(i=nDir; zIn[i]!='\n' && zIn[i]!='/'; i++){} |
| 670 | if( zIn[i]=='/' ){ |
| 671 | char *zSubPrefix; |
| 672 | const char *zSubLast = last_line(zIn, i+1); |
| 673 | zSubPrefix = mprintf("%s%s", zPrefix, |
| @@ -814,11 +794,11 @@ | |
| 814 | ** rather than relying on file sizes and mtimes |
| 815 | ** -r VERSION The specific check-in to list |
| 816 | ** -R|--repository REPO Extract info from repository REPO |
| 817 | ** -t Sort output in time order |
| 818 | ** --tree Tree format |
| 819 | ** -u|--unicode-tree Use Unicode symbols when drawing the tree |
| 820 | ** -v|--verbose Provide extra information about each file |
| 821 | ** |
| 822 | ** See also: [[changes]], [[extras]], [[status]], [[tree]] |
| 823 | */ |
| 824 | void ls_cmd(void){ |
| @@ -852,11 +832,11 @@ | |
| 852 | unicodeTree = find_option("unicode-tree","u",0)!=0; |
| 853 | if( treeFmt ){ |
| 854 | if( zRev==0 ) zRev = "current"; |
| 855 | #ifdef _WIN32 |
| 856 | treeFmt = 2; |
| 857 | #endif |
| 858 | if( unicodeTree ) treeFmt = 1; |
| 859 | if( asciiTree ) treeFmt = 2; |
| 860 | } |
| 861 | |
| 862 | if( zRev!=0 ){ |
| @@ -974,11 +954,11 @@ | |
| 974 | ** |
| 975 | ** Options: |
| 976 | ** -a|--ascii-tree Use ASCII characters when drawing the tree |
| 977 | ** -r VERSION The specific check-in to list |
| 978 | ** -R|--repository REPO Extract info from repository REPO |
| 979 | ** -u|--unicode-tree Use Unicode symbols when drawing the tree |
| 980 | ** |
| 981 | ** See also: [[ls]] |
| 982 | */ |
| 983 | void tree_cmd(void){ |
| 984 | const char *zRev; |
| @@ -985,11 +965,11 @@ | |
| 985 | int treeFmt = 1; |
| 986 | int asciiTree = find_option("ascii-tree","a",0)!=0; |
| 987 | int unicodeTree = find_option("unicode-tree","u",0)!=0; |
| 988 | #ifdef _WIN32 |
| 989 | treeFmt = 2; |
| 990 | #endif |
| 991 | if( unicodeTree ) treeFmt = 1; |
| 992 | if( asciiTree ) treeFmt = 2; |
| 993 | zRev = find_option("r","r",1); |
| 994 | if( zRev==0 ) zRev = "current"; |
| 995 | db_find_and_open_repository(0, 0); |
| @@ -1024,11 +1004,11 @@ | |
| 1024 | ** --header Identify the repository if there are extras |
| 1025 | ** --ignore CSG Ignore files matching patterns from the argument |
| 1026 | ** --rel-paths Display pathnames relative to the current working |
| 1027 | ** directory |
| 1028 | ** --tree Show output in the tree format |
| 1029 | ** -u|--unicode-tree Use Unicode symbols when drawing the tree |
| 1030 | ** |
| 1031 | ** See also: [[changes]], [[clean]], [[status]] |
| 1032 | */ |
| 1033 | void extras_cmd(void){ |
| 1034 | Blob report = BLOB_INITIALIZER; |
| @@ -1052,11 +1032,11 @@ | |
| 1052 | |
| 1053 | if( treeFmt ){ |
| 1054 | flags &= ~C_RELPATH; |
| 1055 | #ifdef _WIN32 |
| 1056 | treeFmt = 2; |
| 1057 | #endif |
| 1058 | if( unicodeTree ) treeFmt = 1; |
| 1059 | if( asciiTree ) treeFmt = 2; |
| 1060 | } |
| 1061 | |
| 1062 | /* We should be done with options.. */ |
| 1063 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -592,28 +592,10 @@ | |
| 592 | /* The status command ends with warnings about ambiguous leaves (forks). */ |
| 593 | if( command==STATUS ){ |
| 594 | leaf_ambiguity_warning(vid, vid); |
| 595 | } |
| 596 | } |
| 597 | |
| 598 | /* zIn is a string that is guaranteed to be followed by \n. Return |
| 599 | ** a pointer to the next line after the \n. The returned value might |
| 600 | ** point to the \000 string terminator. |
| 601 | */ |
| @@ -649,25 +631,23 @@ | |
| 631 | const char *zLast, /* Last filename in the list to print */ |
| 632 | const char *zPrefix, /* Prefix so put before each output line */ |
| 633 | int nDir, /* Ignore this many characters of directory name */ |
| 634 | int treeFmt /* 1 = use Unicode symbols, 2 = use ASCII chars */ |
| 635 | ){ |
| 636 | /* ASCII characters used for drawing a file hierarchy graph */ |
| 637 | const char *treeEntry = "|-- "; |
| 638 | const char *treeLastE = "`-- "; |
| 639 | const char *treeContu = "| "; |
| 640 | const char *treeBlank = " "; |
| 641 | if( treeFmt == 1 ){ |
| 642 | /* Unicode box-drawing characters: U+251C, U+2514, U+2502 */ |
| 643 | treeEntry = "\342\224\234\342\224\200\342\224\200 "; |
| 644 | treeLastE = "\342\224\224\342\224\200\342\224\200 "; |
| 645 | treeContu = "\342\224\202 "; |
| 646 | } |
| 647 | while( zIn<=zLast ){ |
| 648 | int i; |
| 649 | for(i=nDir; zIn[i]!='\n' && zIn[i]!='/'; i++){} |
| 650 | if( zIn[i]=='/' ){ |
| 651 | char *zSubPrefix; |
| 652 | const char *zSubLast = last_line(zIn, i+1); |
| 653 | zSubPrefix = mprintf("%s%s", zPrefix, |
| @@ -814,11 +794,11 @@ | |
| 794 | ** rather than relying on file sizes and mtimes |
| 795 | ** -r VERSION The specific check-in to list |
| 796 | ** -R|--repository REPO Extract info from repository REPO |
| 797 | ** -t Sort output in time order |
| 798 | ** --tree Tree format |
| 799 | ** -u|--unicode-tree Use Unicode characters when drawing the tree |
| 800 | ** -v|--verbose Provide extra information about each file |
| 801 | ** |
| 802 | ** See also: [[changes]], [[extras]], [[status]], [[tree]] |
| 803 | */ |
| 804 | void ls_cmd(void){ |
| @@ -852,11 +832,11 @@ | |
| 832 | unicodeTree = find_option("unicode-tree","u",0)!=0; |
| 833 | if( treeFmt ){ |
| 834 | if( zRev==0 ) zRev = "current"; |
| 835 | #ifdef _WIN32 |
| 836 | treeFmt = 2; |
| 837 | #endif |
| 838 | if( unicodeTree ) treeFmt = 1; |
| 839 | if( asciiTree ) treeFmt = 2; |
| 840 | } |
| 841 | |
| 842 | if( zRev!=0 ){ |
| @@ -974,11 +954,11 @@ | |
| 954 | ** |
| 955 | ** Options: |
| 956 | ** -a|--ascii-tree Use ASCII characters when drawing the tree |
| 957 | ** -r VERSION The specific check-in to list |
| 958 | ** -R|--repository REPO Extract info from repository REPO |
| 959 | ** -u|--unicode-tree Use Unicode characters when drawing the tree |
| 960 | ** |
| 961 | ** See also: [[ls]] |
| 962 | */ |
| 963 | void tree_cmd(void){ |
| 964 | const char *zRev; |
| @@ -985,11 +965,11 @@ | |
| 965 | int treeFmt = 1; |
| 966 | int asciiTree = find_option("ascii-tree","a",0)!=0; |
| 967 | int unicodeTree = find_option("unicode-tree","u",0)!=0; |
| 968 | #ifdef _WIN32 |
| 969 | treeFmt = 2; |
| 970 | #endif |
| 971 | if( unicodeTree ) treeFmt = 1; |
| 972 | if( asciiTree ) treeFmt = 2; |
| 973 | zRev = find_option("r","r",1); |
| 974 | if( zRev==0 ) zRev = "current"; |
| 975 | db_find_and_open_repository(0, 0); |
| @@ -1024,11 +1004,11 @@ | |
| 1004 | ** --header Identify the repository if there are extras |
| 1005 | ** --ignore CSG Ignore files matching patterns from the argument |
| 1006 | ** --rel-paths Display pathnames relative to the current working |
| 1007 | ** directory |
| 1008 | ** --tree Show output in the tree format |
| 1009 | ** -u|--unicode-tree Use Unicode characters when drawing the tree |
| 1010 | ** |
| 1011 | ** See also: [[changes]], [[clean]], [[status]] |
| 1012 | */ |
| 1013 | void extras_cmd(void){ |
| 1014 | Blob report = BLOB_INITIALIZER; |
| @@ -1052,11 +1032,11 @@ | |
| 1032 | |
| 1033 | if( treeFmt ){ |
| 1034 | flags &= ~C_RELPATH; |
| 1035 | #ifdef _WIN32 |
| 1036 | treeFmt = 2; |
| 1037 | #endif |
| 1038 | if( unicodeTree ) treeFmt = 1; |
| 1039 | if( asciiTree ) treeFmt = 2; |
| 1040 | } |
| 1041 | |
| 1042 | /* We should be done with options.. */ |
| 1043 |