Exemple #1
0
static int delete_range (void *dummy, Buffer *buffer, Line *line)

{
  /* Don't even try to delete the [EOB] line */

  if (line == NULL) return (0);

  /* Set current position to beginning of next line after first line deleted */

  if (first) {
    first = 0;
    if (buffer != cur_position.buffer) {
      *buffer_savpos (cur_position.buffer) = cur_position;
      cur_position.buffer = buffer;
    }
    cur_position.line   = line;
    cur_position.offset = 0;
    buffer_dirty (buffer, 1);
  }

  if (cur_position.line == line) cur_position.line = line_next (line);

  /* Delete the line (and your little string, too!) */

  string_delete (line_remove (line));
  count ++;

  /* Keep going */

  return (0);
}
Exemple #2
0
static int ssl_remove(char *str)
{
	return(line_remove(serial_lines, 
			   sizeof(serial_lines)/sizeof(serial_lines[0]), str));
}
Exemple #3
0
static int con_remove(int n, char **error_out)
{
	return line_remove(vts, ARRAY_SIZE(vts), n, error_out);
}
Exemple #4
0
static int ssl_remove(int n, char **error_out)
{
    return line_remove(serial_lines, ARRAY_SIZE(serial_lines), n,
               error_out);
}
Exemple #5
0
static int con_remove(char *str)
{
	return(line_remove(vts, sizeof(vts)/sizeof(vts[0]), str));
}