Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modify count_spaces() to take a third parameter "end" that will make the function return when the end is reached. This lets the caller pass a pointer to non nul-terminated sequence of characters. Rename count_spaces() to count_spaces_until() and reinstate count_spaces(), this time based on count_spaces_until(). Use count_spaces_until() to recalculate current column when going through a comment just before the fragment which decides if current line of the comment should be wrapped. This move simplifies this code by eliminating the need for keeping the column counter up to date every time e_com is advanced and also reduces spread of code that has to know how many columns a tab will produce.
- Loading branch information
Showing
3 changed files
with
22 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters