Fossil

File History
Login

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

History of src/comformat.c

2019-01-27
15:38
Add the global --comment-format command-line option as an alias for --comfmtflags. file: [e9fe5da3] check-in: [a0d10b91] user: florian branch: comment-format-setting, size: 22435
15:35
Add the "comment-format" setting to set the default options for printing timeline comments to the console, as discussed here: https://fossil-scm.org/forum/forumpost/d9954370c7. file: [9cf5cabd] check-in: [bc62fa17] user: florian branch: comment-format-setting, size: 22410
2018-11-28
23:43
Minor stylistic changes to the comment formatter. file: [e97f8902] check-in: [cc9c422d] user: drh branch: comment-formatter-utf8, size: 21342
2018-11-24
07:49
Minor optimizations: drop a few redundant comparisons and calculations, and take advantage of the logical AND short-circuit by testing the least expensive and most unlikely condition first. Also fold away the iterative comments into cross references. file: [5d847583] check-in: [490d38ff] user: florian branch: comment-formatter-utf8, size: 21330
07:16
Fix two bugs (introduced with this branch) that become manifest with invalid UTF-8 sequences. file: [cf4a82f3] check-in: [b86a2fc7] user: florian branch: comment-formatter-utf8, size: 22191
2018-11-16
19:39
Fix a bug (already present on trunk) with the (non-legacy) comment printing algorithm, detected while running the regression tests from test/comment.test with UTF-8 text: the function to print the indent (modified to a calculate-only function on this branch) was handed a pointer to the current line index and the current line index, thus performing checks at (current line index * 2), causing random increments of the current line index. file: [8e984136] check-in: [70dd8f74] user: florian branch: comment-formatter-utf8, size: 22151
14:02
More coding style fixes. file: [ec7e42fc] check-in: [2dca9b82] user: florian branch: comment-formatter-utf8, size: 22184
11:26
Coding style fixes. file: [52c3a796] check-in: [aadbbb38] user: florian branch: comment-formatter-utf8, size: 22193
11:14
For better word breaking results with the (non-legacy) comment printing algorithm, make sure the lookahead to the next space character is UTF-8-aware. Also make sure the per-line remaining character count is decremented properly for UTF-8 sequences. The neuralgic points now handle UTF-8 sequences correctly, and they could be enhanced to work with the effective display width, if required (to handle combining characters, and East Asian Wide and Fullwidth characters). file: [d3b5101e] check-in: [c9ec3d18] user: florian branch: comment-formatter-utf8, size: 22199
2018-11-15
15:32
Ensure the line buffer for the legacy comment printing algorithm can hold maximum-length UTF-8 sequences. file: [67acfea2] check-in: [29d3a2ed] user: florian branch: comment-formatter-utf8, size: 20468
15:16
Fix a problem with initial indent introduced by the previous check-in, so that all regression tests from test/comment.test now succeed. Also eliminate three more calls to fossil_print(). Regarding performance, the legacy comment printing algorithm is outnumbered by factor 2-3, with these changes. file: [d99410c0] check-in: [b029ed22] user: florian branch: comment-formatter-utf8, size: 20389
12:43
Add output buffering to the (non-legacy) comment printing algorithm, to reduce calls to fossil_print(). The resulting performance improvement can be up to factor 10, with a perceptible difference even for short comments (measured and tested on Windows with MSVC builds, and on Ubuntu with GCC builds). (For comparison: for the legacy comment printing algorithm, the extra UTF-8 checks added by this branch impair performance by 0.12-1.8%, depending on whether the input contains predominantly multi-byte vs. ASCII-only sequences.) file: [d0f31fe1] check-in: [16fde3ff] user: florian branch: comment-formatter-utf8, size: 19941
2018-10-17
14:16
Modify the comment formatter to avoid output of incomplete UTF-8 sequences, and to avoid line breaks inside UTF-8 sequences. See https://fossil-scm.org/forum/forumpost/1247e4a3c4 for detailed information and tests. file: [d6da53c0] check-in: [1bbca2c3] user: florian branch: comment-formatter-utf8, size: 19408
2017-11-30
17:58
Refactor the symlink processing logic so that most of the file access routines take a new parameter indicating the conditions under which symlinks should and should not be followed. This should fix a few bugs related to symlink processing. Lots of testing required before merging to trunk. file: [4d18073b] check-in: [e7767de2] user: drh branch: symlink-refactor, size: 17161
2017-06-15
03:37
Fix TTY comment line break logic for UTF8 multi-byte characters. file: [ba3c29ae] check-in: [e6216197] user: drh branch: trunk, size: 17143
2015-04-21
07:12
Fix auto-adjust of CLI timeline to terminal width on Linux. Thanks to Warren Young for analysis and patch! file: [f570981a] check-in: [d32ca592] user: jan.nijtmans branch: trunk, size: 17120
2014-10-20
15:01
Add a custom static analysis program that verifies the arguments to printf-style varargs routines used in Fossil. Adjust the source code to be more robust for printf format errors and to fix a few minor problems found by the static checker. file: [24b2de2b] check-in: [0a7e326f] user: drh branch: compile-time-print-checking, size: 17154
2014-07-24
21:27
Add another flag to the new comment printing algorithm capable of stripping superfluous CR/LFs while preserving other spacing. file: [8847b181] check-in: [d7d26550] user: mistachkin branch: trunk, size: 17122
20:54
Fix boundary case in the new comment printing algorithm that sometimes results in extra new lines. file: [13e999b1] check-in: [45327338] user: mistachkin branch: trunk, size: 15831
05:56
Improve clarity of the new comment printing algorithm. file: [b07774f9] check-in: [8e7d2a65] user: mistachkin branch: trunk, size: 15841
05:05
Factor out the common terminal width detection code for comment printing into a new function. file: [339895f0] check-in: [351de029] user: mistachkin branch: trunk, size: 15756
03:52
For the new comment printing algorithm, make sure to indent after forcing a line break due to the original comment text being detected. file: [5cb56208] check-in: [856c6061] user: mistachkin branch: trunk, size: 15829
2014-07-23
21:52
For the test-comment-format command, also treat the original comment text argument as a file name when the --file option is specified. Fix memory leaks when the --file and --decode options are used together. file: [03330004] check-in: [378dad36] user: mistachkin branch: trunk, size: 15199
21:37
When available, pass the original comment text as well as the (possibly prefixed) comment into comment_print(). Add COMMENT_PRINT_ORIG_BREAK flag to the new comment printing algorithm. Change the width argument for the test-comment-format command into an option. Add --origbreak option to the test-comment-format command. file: [c438ef4a] check-in: [0d0b80fd] user: mistachkin branch: trunk, size: 15004
18:26
Add --file option to the test-comment-format test command. file: [4819fffb] check-in: [b1b352e1] user: mistachkin branch: trunk, size: 12789
2014-07-20
05:09
Correct usage syntax error message for the 'test-comment-format' command. file: [f3163ecf] check-in: [68cd1f5b] user: mistachkin branch: experimental, size: 12493
04:24
Enhance comments that describe the new comment printing function. file: [2e2a786b] check-in: [4a5352c2] user: mistachkin branch: experimental, size: 12483
02:35
Add -comfmtflags command line option to set the comment printing flags, defaulting to the legacy comment printing algorithm. file: [2961f129] check-in: [18a97b3a] user: mistachkin branch: experimental, size: 11067
02:10
Merge updates from trunk. file: [8cbf7419] check-in: [5ea6a95a] user: mistachkin branch: experimental, size: 11071
2014-07-10
10:01
./src/comformat.c: In function ‘comment_print’: ./src/comformat.c:70:5: warning: implicit declaration of function ‘ioctl’ [-Werror=implicit-function-declaration] if( ioctl(0, TIOCGWINSZ, &w)!=-1 ){ ^ file: [7c0c3360] check-in: [32205fdc] user: jan.nijtmans branch: trunk, size: 4565
2014-06-21
01:38
Add --trimspace option to the 'test-comment-format' test command. file: [e3a9141f] check-in: [4e3f915c] user: mistachkin branch: experimental, size: 11013
01:32
Re-add the legacy comment printing algorithm. Currently, it is being retained primarily for testing and comparison purposes. file: [48158b11] check-in: [0463c7bf] user: mistachkin branch: experimental, size: 10867
2014-06-20
19:15
Merge updates from trunk. file: [69604bb1] check-in: [fc84a01a] user: mistachkin branch: respectformatting, size: 4285
19:11
Add and adjust comment tests from the experimental branch. file: [8af38bff] check-in: [2920e7df] user: mistachkin branch: trunk, size: 4507
18:56
Reorganize the new code, making internal functions private. Add COMMENT_PRINT_TRIM_SPACE flag, on by default. file: [c8235b73] check-in: [856d10ae] user: mistachkin branch: experimental, size: 7932
18:31
Further refinements and more tests. file: [f67f6c7b] check-in: [70ba07c3] user: mistachkin branch: experimental, size: 7560
03:56
Initial draft of the ability to break a multi-line comment on word boundaries using the new algorithm. file: [71deb666] check-in: [10b47cc3] user: mistachkin branch: experimental, size: 7367
2014-06-19
21:25
Complete re-write of the comment printing algorithm, taking the preservation of any pre-existing formatting within the comment into account. No attempt is made to avoid breaking a line in the middle of a word. file: [c2ce9ab2] check-in: [89aa595f] user: mistachkin branch: experimental, size: 5738
05:43
Merge updates from branch. Gracefully handle the case where the first line contains no spaces. file: [3b4fe0fa] check-in: [d5476292] user: mistachkin branch: experimental, size: 4477
03:04
Merge variable name change. file: [31e911e2] check-in: [05ea665f] user: mistachkin branch: experimental, size: 4283
03:03
Rename the zBuf variable to zLine, to improve clarity. file: [0e8b6f01] check-in: [b68446e2] user: mistachkin branch: respectformatting, size: 4180
02:39
Experimental changes for more precise handling of new lines. file: [12b03962] check-in: [816faa5a] user: mistachkin branch: experimental, size: 4274
02:39
Even more style improvements. file: [131c930f] check-in: [c7c3d99a] user: mistachkin branch: respectformatting, size: 4172
01:32
Further code style improvements. file: [9237f26a] check-in: [504b0ae0] user: mistachkin branch: respectformatting, size: 4188
01:20
Merge updates from trunk. file: [21b1905b] check-in: [4b675fb0] user: mistachkin branch: respectformatting, size: 4174
01:19
Add 'decode' option to the 'test-comment-format' test command. file: [4fdfe494] check-in: [8da0f344] user: mistachkin branch: trunk, size: 4402
00:48
Merge updates from trunk. file: [5f650fc6] check-in: [3221e519] user: mistachkin branch: respectformatting, size: 3731
00:47
Enhance the 'test-comment-format' test command. file: [56c03298] check-in: [6a3b39a0] user: mistachkin branch: trunk, size: 3959
2014-06-18
23:30
Improve clarity of presentation via several stylistic changes. file: [33208642] check-in: [41804ab1] user: mistachkin branch: respectformatting, size: 3508
15:07
make fossil timeline to respect the log formatting aka multiline logs. Suggested by Baptiste Daroussin. file: [9fe836e4] check-in: [10eea3ab] user: jan.nijtmans branch: respectformatting, size: 3542
2014-06-17
22:15
On non-Windows systems that appear to lack the TIOCGWINSZ define, fallback to using the legacy behavior of hard-coding a reasonable default maximum line length. file: [77af14c1] check-in: [54cc57e7] user: mistachkin branch: trunk, size: 3736
20:16
Remove superfluous include and add a missing blank line. file: [d7394281] check-in: [4c194957] user: mistachkin branch: autoadjust, size: 3199
2014-06-16
21:02
Adjust width auto-detection on Windows for more reasonable line breaks when the final character is a '-'. Seen with comment for check-in [4514910a5f] and a console width of 233. file: [6dd42e5c] check-in: [f4cab56c] user: mistachkin branch: autoadjust, size: 3219
20:28
Improvements to error handling and code formatting. file: [7d8e9e5f] check-in: [9270ae24] user: mistachkin branch: autoadjust, size: 3223
09:05
Merge trunk. Make it work on Windows too. Variable width output on more commands. file: [300c75f1] check-in: [40710b7a] user: jan.nijtmans branch: autoadjust, size: 3092
2014-03-14
13:57
Enhance the "whatis" command to report on attachments and to include raw tags so that cluster artifacts are identified. Add the "test-whatis-all" command to run "whatis" on every artifact in the repository. file: [e3d45335] check-in: [5cdc39dc] user: drh branch: trunk, size: 2637
2014-01-28
08:20
More removals of unnecessary end-of-line spaces. No change in code. file: [ef14fd3e] check-in: [45f35169] user: jan.nijtmans branch: trunk, size: 2602
2013-10-29
10:55
Add option -W|--width to the "fossil timeline" and "fossil finfo" commands. Defaults to 79. file: [53bb36cd] check-in: [2eb492e2] user: jan.nijtmans branch: trunk, size: 2603
2013-10-26
09:06
Allow comment_print() to handle lines >400 characters. Add parameter "width" to print_timeline() function. file: [92c6bd10] check-in: [b2455507] user: jan.nijtmans branch: trunk, size: 2646
2013-10-25
12:42
Merge trunk. Add the "-W|--width WIDTH" option to "fossil timeline". Default is 80. file: [6fec4b4b] check-in: [3710f2ac] user: jan.nijtmans branch: timeline_cmd_dash_n_fix, size: 2547
2012-08-29
13:57
Allow UTF-8 characters in sources. translate.exe will translate it to ASCII file: [61d352f1] check-in: [9f6abc59] user: jan.nijtmans branch: msvc-broken, size: 2515
2012-03-29
14:54
Add vim modline everywhere file: [76c82b99] check-in: [a496d8e8] user: mgagnon branch: mgagnon_fix, size: 2558
2011-04-27
18:21
Attempt to get Fossil working on windows systems that do not use UTF8 in the shell. file: [4c6ab377] check-in: [e805fa8d] user: drh branch: windows-i18n, size: 2516
2010-10-14
19:14
Remove all use of ctypes.h in order to avoid compiler warnings and other problems associated with changing locales. file: [8591c01b] check-in: [2fac8091] user: drh branch: trunk, size: 2480
2010-05-16
19:08
Change from GPL to the Simplified BSD License. file: [cb5f71dc] check-in: [c06edd23] user: drh branch: clear-title, size: 2459
2007-07-21
14:10
Initial check-in of m1 sources. file: [26c0414f] check-in: [dbda8d6c] user: drh branch: trunk, size: 2735 Added