[A] Added non printable horisontal separators

This commit is contained in:
seleznevae
2018-01-15 21:49:44 +03:00
parent 0f16476574
commit b2ad87eb82
2 changed files with 64 additions and 15 deletions

View File

@@ -31,6 +31,7 @@ SOFTWARE.
#include "assert.h"
#include "string.h"
#include "wchar.h"
#include <ctype.h>
#define FORT_COL_SEPARATOR '|'
@@ -587,6 +588,10 @@ static int print_row_separator(char *buffer, size_t buffer_sz,
break;
}
/* If all chars are not printable, skip line separator */
if (!isprint(*L) && !isprint(*I) && !isprint(*IV) && !isprint(*R))
return 0;
for (size_t i = 0; i < cols; ++i) {
if (i == 0) {
CHECK_RESULT_AND_MOVE_DEV(snprint_n_chars(buffer + dev, buffer_sz - dev, 1, *L));