Index: main/config.c =================================================================== --- main/config.c (revision 156389) +++ main/config.c (working copy) @@ -1520,44 +1520,6 @@ } } -static int count_linefeeds(char *str) -{ - int count = 0; - - while (*str) { - if (*str =='\n') - count++; - str++; - } - return count; -} - -static int count_linefeeds_in_comments(struct ast_comment *x) -{ - int count = 0; - - while (x) { - count += count_linefeeds(x->cmt); - x = x->next; - } - return count; -} - -static void insert_leading_blank_lines(FILE *fp, struct inclfile *fi, struct ast_comment *precomments, int lineno) -{ - int precomment_lines = count_linefeeds_in_comments(precomments); - int i; - - /* I don't have to worry about those ;! comments, they are - stored in the precomments, but not printed back out. - I did have to make sure that comments following - the ;! header comments were not also deleted in the process */ - for (i=fi->lineno;ilineno = lineno+1; /* Advance the file lineno */ -} - int config_text_file_save(const char *configfile, const struct ast_config *cfg, const char *generator) { return ast_config_text_file_save(configfile, cfg, generator); @@ -1642,7 +1604,6 @@ } } - insert_leading_blank_lines(f, fi, cat->precomments, cat->lineno); /* Dump section with any appropriate comment */ for (cmt = cat->precomments; cmt; cmt=cmt->next) { char *cmtp = cmt->cmt; @@ -1734,7 +1695,6 @@ } } - insert_leading_blank_lines(f, fi, var->precomments, var->lineno); for (cmt = var->precomments; cmt; cmt=cmt->next) { if (cmt->cmt[0] != ';' || cmt->cmt[1] != '!') fprintf(f,"%s", cmt->cmt);