contrib/gdb-7/gdb/utils.c
void
wrap_here (char *indent)
{
  /* This should have been allocated, but be paranoid anyway.  */
  if (!wrap_buffer)
    internal_error (__FILE__, __LINE__,
		    _("failed internal consistency check"));

  if (wrap_buffer[0])
    {
      *wrap_pointer = '\0';
      fputs_unfiltered (wrap_buffer, gdb_stdout);
    }
  wrap_pointer = wrap_buffer;
  wrap_buffer[0] = '\0';
  if (chars_per_line == UINT_MAX)	/* No line overflow checking.  */
    {
      wrap_column = 0;
    }
  else if (chars_printed >= chars_per_line)
    {
      puts_filtered ("\n");
      if (indent != NULL)
	puts_filtered (indent);
      wrap_column = 0;
    }
  else
    {
      wrap_column = chars_printed;
      if (indent == NULL)
	wrap_indent = "";
      else
	wrap_indent = indent;
    }
}
/* Indicate that if the next sequence of characters overflows the line,
   a newline should be inserted here rather than when it hits the end.
   If INDENT is non-null, it is a string to be printed to indent the
   wrapped part on the next line.  INDENT must remain accessible until
   the next call to wrap_here() or until a newline is printed through
   fputs_filtered().

   If the line is already overfull, we immediately print a newline and
   the indentation, and disable further wrapping.

   If we don't know the width of lines, but we know the page height,
   we must not wrap words, but should still keep track of newlines
   that were explicitly printed.

   INDENT should not contain tabs, as that will mess up the char count
   on the next line.  FIXME.

   This routine is guaranteed to force out any output which has been
   squirreled away in the wrap_buffer, so wrap_here ((char *)0) can be
   used to force out output from the wrap_buffer.  */
Indicate that if the next sequence of characters overflows the line,
a newline should be inserted here rather than when it hits the end.
If INDENT is non-null, it is a string to be printed to indent the
wrapped part on the next line.  INDENT must remain accessible until
the next call to wrap_here() or until a newline is printed through
fputs_filtered().

If the line is already overfull, we immediately print a newline and
the indentation, and disable further wrapping.

If we don't know the width of lines, but we know the page height,
we must not wrap words, but should still keep track of newlines
that were explicitly printed.

INDENT should not contain tabs, as that will mess up the char count
on the next line.  FIXME.

This routine is guaranteed to force out any output which has been
squirreled away in the wrap_buffer, so wrap_here ((char *)0) can be
used to force out output from the wrap_buffer.
Indicate that if the next sequence of characters overflows the line a newline should be inserted here rather than when it hits the end . If INDENT is non - null it is a string to be printed to indent the wrapped part on the next line . INDENT must remain accessible until the next call to wrap_here () or until a newline is printed through fputs_filtered () . If the line is already overfull we immediately print a newline and the indentation and disable further wrapping . If we don ' t know the width of lines but we know the page height we must not wrap words but should still keep track of newlines that were explicitly printed . INDENT should not contain tabs as that will mess up the char count on the next line . FIXME . This routine is guaranteed to force out any output which has been squirreled away in the wrap_buffer so wrap_here (( char * ) 0 ) can be used to force out output from the wrap_buffer .
void
wrap_here (char *indent)
{
  if (!wrap_buffer)
    internal_error (__FILE__, __LINE__,
		    _("failed internal consistency check"));
  if (wrap_buffer[0])
    {
      *wrap_pointer = '\0';
      fputs_unfiltered (wrap_buffer, gdb_stdout);
    }
  wrap_pointer = wrap_buffer;
  wrap_buffer[0] = '\0';
  if (chars_per_line == UINT_MAX)	
    {
      wrap_column = 0;
    }
  else if (chars_printed >= chars_per_line)
    {
      puts_filtered ("\n");
      if (indent != NULL)
	puts_filtered (indent);
      wrap_column = 0;
    }
  else
    {
      wrap_column = chars_printed;
      if (indent == NULL)
	wrap_indent = "";
      else
	wrap_indent = indent;
    }
}
void wrap_here ( char * indent ) { if ( ! wrap_buffer ) internal_error ( __FILE__ , __LINE__ , _ ( " " ) ) ; if ( wrap_buffer [ 0 ] ) { * wrap_pointer = ' \0 ' ; fputs_unfiltered ( wrap_buffer , gdb_stdout ) ; } wrap_pointer = wrap_buffer ; wrap_buffer [ 0 ] = ' \0 ' ; if ( chars_per_line == UINT_MAX ) { wrap_column = 0 ; } else if ( chars_printed >= chars_per_line ) { puts_filtered ( " \n " ) ; if ( indent != NULL ) puts_filtered ( indent ) ; wrap_column = 0 ; } else { wrap_column = chars_printed ; if ( indent == NULL ) wrap_indent = " " ; else wrap_indent = indent ; } }
Indicate that if the next sequence of characters overflows the line,
a newline should be inserted here rather than when it hits the end.
Indicate that if the next sequence of characters overflows the line a newline should be inserted here rather than when it hits the end .
/* This should have been allocated, but be paranoid anyway.  */ /* No line overflow checking.  */