Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Even more style improvements. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | respectformatting |
| Files: | files | file ages | folders |
| SHA1: |
c7c3d99a6081d76bc528b61948a66843 |
| User & Date: | mistachkin 2014-06-19 02:39:13.222 |
Context
|
2014-06-19
| ||
| 03:03 | Rename the zBuf variable to zLine, to improve clarity. ... (check-in: b68446e291 user: mistachkin tags: respectformatting) | |
| 02:39 | Experimental changes for more precise handling of new lines. ... (check-in: 816faa5af9 user: mistachkin tags: experimental) | |
| 02:39 | Even more style improvements. ... (check-in: c7c3d99a60 user: mistachkin tags: respectformatting) | |
| 01:32 | Further code style improvements. ... (check-in: 504b0ae080 user: mistachkin tags: respectformatting) | |
Changes
Changes to src/comformat.c.
| ︙ | ︙ | |||
42 43 44 45 46 47 48 |
** the left margin and that a single line can contain no more than
** lineLength characters. Indent all subsequent lines by indent.
**
** Return the number of newlines that are output.
*/
int comment_print(const char *zText, int indent, int lineLength){
int tlen = lineLength - indent;
| | < < | 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
** the left margin and that a single line can contain no more than
** lineLength characters. Indent all subsequent lines by indent.
**
** Return the number of newlines that are output.
*/
int comment_print(const char *zText, int indent, int lineLength){
int tlen = lineLength - indent;
int len = 0, doIndent = 0, lineCnt = 0;
const char *zBuf;
#if defined(_WIN32)
if( lineLength<0 ){
CONSOLE_SCREEN_BUFFER_INFO csbi;
memset(&csbi, 0, sizeof(CONSOLE_SCREEN_BUFFER_INFO));
if( GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &csbi) ){
tlen = csbi.srWindow.Right - csbi.srWindow.Left - indent;
|
| ︙ | ︙ | |||
79 80 81 82 83 84 85 |
#endif
if( zText==0 ) zText = "(NULL)";
if( tlen<=0 ){
tlen = strlen(zText);
}
while( fossil_isspace(zText[0]) ){ zText++; }
if( zText[0]==0 ){
| | | | 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
#endif
if( zText==0 ) zText = "(NULL)";
if( tlen<=0 ){
tlen = strlen(zText);
}
while( fossil_isspace(zText[0]) ){ zText++; }
if( zText[0]==0 ){
if( !doIndent ){
fossil_print("\n");
lineCnt++;
}
return lineCnt;
}
zBuf = zText;
for(;;){
if( zText[0]==0 ){
if( doIndent ){
|
| ︙ | ︙ |