示例#1
0
struct screen_char *realloc_line( struct document *document, int x, int y )
{
  struct line *line;
  if ( realloc_lines( &document[0], esi ) )
  {
    if ( *(int*)(realloc_lines( &document[0], x ) + 4) < x )
    {
      if ( ( ( edx + 15 ) & -16 ) < ( ( x + 15 ) & -16 ) )
      {
        if ( eax )
        {
          line = &eax[0];
          memset( line[0].chars + ( edx << 3 ), 0, ecx - ( edx << 3 ) );
        }
      }
      if ( line->chars )
      {
        if ( line->length < x )
        {
          while ( line->chars[ line->length ].data = 32, line->length++, line->length + 1 < x )
          {
          }
        }
        if ( document->width < x )
          document->width = x;
      }
    }
    return line->chars;
  }
  return line->chars;
}
示例#2
0
文件: renderer.c 项目: ezc/elinks
static struct screen_char *
realloc_line(struct document *document, int x, int y)
{
	struct line *line = realloc_lines(document, y);

	if (!line) return NULL;

	if (x != line->length) {
		if (!ALIGN_LINE(&line->chars, line->length, x))
			return NULL;

		line->length = x;
	}

	return line->chars;
}