Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Experimental changes for more precise handling of new lines. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | experimental |
| Files: | files | file ages | folders |
| SHA1: |
816faa5af962ddc252ed80cedcf93953 |
| User & Date: | mistachkin 2014-06-19 02:39:54.820 |
Context
|
2014-06-19
| ||
| 03:04 | Merge variable name change. check-in: 05ea665fef user: mistachkin tags: experimental | |
| 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 | |
Changes
Changes to src/comformat.c.
| ︙ | ︙ | |||
89 90 91 92 93 94 95 |
}
zBuf = zText;
for(;;){
if( zText[0]==0 ){
if( doIndent ){
fossil_print("%*s", indent, "");
}
| | > | > | | > | > | 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 |
}
zBuf = zText;
for(;;){
if( zText[0]==0 ){
if( doIndent ){
fossil_print("%*s", indent, "");
}
fossil_print("%.*s", (int)(zText - zBuf), zBuf);
if( fossil_force_newline() ){
lineCnt++;
}
break;
}
len += ((zText[0]=='\t') ? 8 : 1);
if( zText[0]=='\n' || len>=tlen ){
if( doIndent ){
fossil_print("%*s", indent, "");
}
doIndent = 1;
while( zText>zBuf && !fossil_isspace(zText[0]) ){ zText--; }
fossil_print("%.*s", (int)(zText - zBuf), zBuf);
if( fossil_force_newline() ){
lineCnt++;
}
zBuf = zText;
if( !zBuf++ ) break;
len = 0;
}
zText++;
}
return lineCnt;
|
| ︙ | ︙ |
Changes to src/printf.c.
| ︙ | ︙ | |||
860 861 862 863 864 865 866 | fflush(toStdErr ? stderr : stdout); } /* ** Force the standard output cursor to move to the beginning ** of a line, if it is not there already. */ | | | > > > > | 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 |
fflush(toStdErr ? stderr : stdout);
}
/*
** Force the standard output cursor to move to the beginning
** of a line, if it is not there already.
*/
int fossil_force_newline(void){
if( g.cgiOutput==0 && stdoutAtBOL==0 ){
fossil_puts("\n", 0);
return 1;
}
return 0;
}
/*
** Indicate that the cursor has moved to the start of a line by means
** other than writing to standard output.
*/
void fossil_new_line_started(void){
|
| ︙ | ︙ |