Merge ast_str_opaque branch (discontinue usage of ast_str internals)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@163991 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Tilghman Lesher
2008-12-13 08:36:35 +00:00
parent 3b96ae826e
commit c8223fc957
53 changed files with 1264 additions and 917 deletions

View File

@@ -2034,7 +2034,7 @@ static char *cli_prompt(EditLine *editline)
if (prompt == NULL) {
prompt = ast_str_create(100);
} else if (!cli_prompt_changes) {
return prompt->str;
return ast_str_buffer(prompt);
} else {
ast_str_reset(prompt);
}
@@ -2132,11 +2132,7 @@ static char *cli_prompt(EditLine *editline)
}
t++;
} else {
if (prompt->used + 5 > prompt->len) {
ast_str_make_space(&prompt, prompt->len + 5);
}
prompt->str[prompt->used++] = *t++;
prompt->str[prompt->used] = '\0';
ast_str_append(&prompt, 0, "%c", *t);
}
}
if (color_used) {
@@ -2149,7 +2145,7 @@ static char *cli_prompt(EditLine *editline)
ast_str_set(&prompt, 0, "%s", ASTERISK_PROMPT);
}
return(prompt->str);
return ast_str_buffer(prompt);
}
static char **ast_el_strtoarr(char *buf)