- warn about overlong lines in help-texts

I initially bailed out with an error, but then that's a bit rough. Just warn to trick somebody into fixing them..
This commit is contained in:
Bernhard Reutner-Fischer 2008-07-17 08:02:28 +00:00
parent c185e290ee
commit 627052e75d
2 changed files with 9 additions and 0 deletions

View File

@ -784,6 +784,11 @@ void new_string(void)
void append_string(const char *str, int size)
{
int new_size = text_size + size + 1;
if (size > 70) {
fprintf (stderr, "%s:%d error: Overlong line\n",
current_file->name, current_file->lineno);
}
if (new_size > text_asize) {
new_size += START_STRSIZE - 1;
new_size &= -START_STRSIZE;

View File

@ -49,6 +49,10 @@ void new_string(void)
void append_string(const char *str, int size)
{
int new_size = text_size + size + 1;
if (size > 70) {
fprintf (stderr, "%s:%d error: Overlong line\n",
current_file->name, current_file->lineno);
}
if (new_size > text_asize) {
new_size += START_STRSIZE - 1;
new_size &= -START_STRSIZE;