Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
i.group: fit long names to fancy file listing (#1818)
Addresses failure to list files with long names and -Wformat-overflow= warnings. There are two ways to list files in a group with i.group, a fancy one with -l and a raw one with -lg. The fancy one is limited to a 80 character column, with angle bracket format: <mapname@mapset>. Before this commit, if this "fancy" formatted string would exceed 80 char, then buffer overflow occurs. With this commit, in the rare (theoretical) occasion with very long mapname and/or mapset, they may be truncated if needed (to fit in 80 chars). Example of truncation in case of long map name: ifonlythisisalandsatfilewithaveryverylongnameandagainifonlythisisalandsatfilewithaveryverylongnamePERMANENT becomes: <ifonlythisisalandsatfilewithaveryverylongnameandagainifonly...@permanent>
- Loading branch information
Showing
3 changed files
with
93 additions
and
56 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