src/pspg.c
static void
trim_footer_rows(DataDesc *desc)
{
	if (desc->headline_transl != NULL && desc->footer_row != -1)
	{
		LineBufferIter lbi;
		char   *line;

		desc->footer_char_size = 0;

		init_lbi_ddesc(&lbi, desc, desc->footer_row);

		while(lbi_get_line_next(&lbi, &line, NULL, NULL))
		{
			char   *ptr = line;
			char   *last_nspc = NULL;
			int		len;

			/* search last non space char */
			while (*ptr)
			{
				if (*ptr != ' ')
					last_nspc = ptr;

				ptr += 1;
			}

			if (last_nspc)
				*(last_nspc + 1) = '\0';
			else
				*line = '\0';

			len = use_utf8 ? utf8len(line) : (int) strlen(line);
			if (len > desc->footer_char_size)
				desc->footer_char_size = len;
		}
	}
	else
		desc->footer_char_size = desc->maxx;
}
/*
 * Trim footer rows - We should to trim footer rows and calculate footer_char_size
 */
Trim footer rows - We should to trim footer rows and calculate footer_char_size
Trim footer rows - We should to trim footer rows and calculate footer_char_size
static void
trim_footer_rows(DataDesc *desc)
{
	if (desc->headline_transl != NULL && desc->footer_row != -1)
	{
		LineBufferIter lbi;
		char   *line;
		desc->footer_char_size = 0;
		init_lbi_ddesc(&lbi, desc, desc->footer_row);
		while(lbi_get_line_next(&lbi, &line, NULL, NULL))
		{
			char   *ptr = line;
			char   *last_nspc = NULL;
			int		len;
			while (*ptr)
			{
				if (*ptr != ' ')
					last_nspc = ptr;
				ptr += 1;
			}
			if (last_nspc)
				*(last_nspc + 1) = '\0';
			else
				*line = '\0';
			len = use_utf8 ? utf8len(line) : (int) strlen(line);
			if (len > desc->footer_char_size)
				desc->footer_char_size = len;
		}
	}
	else
		desc->footer_char_size = desc->maxx;
}
static void trim_footer_rows ( DataDesc * desc ) { if ( desc -> headline_transl != NULL && desc -> footer_row != -1 ) { LineBufferIter lbi ; char * line ; desc -> footer_char_size = 0 ; init_lbi_ddesc ( & lbi , desc , desc -> footer_row ) ; while ( lbi_get_line_next ( & lbi , & line , NULL , NULL ) ) { char * ptr = line ; char * last_nspc = NULL ; int len ; while ( * ptr ) { if ( * ptr != ' ' ) last_nspc = ptr ; ptr += 1 ; } if ( last_nspc ) * ( last_nspc + 1 ) = ' \0 ' ; else * line = ' \0 ' ; len = use_utf8 ? utf8len ( line ) : ( int ) strlen ( line ) ; if ( len > desc -> footer_char_size ) desc -> footer_char_size = len ; } } else desc -> footer_char_size = desc -> maxx ; }
Trim footer rows - We should to trim footer rows and calculate footer_char_size
Trim footer rows - We should to trim footer rows and calculate footer_char_size
/* search last non space char */