Skip to content
Snippets Groups Projects
Commit 4d714ac9 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

*** empty log message ***

parent e61d9b24
No related branches found
No related tags found
No related merge requests found
......@@ -257,10 +257,7 @@ void Msg::Direct(const char *fmt, ...)
vsnprintf(str, sizeof(str), fmt, args);
va_end(args);
if(strlen(str))
Direct(3, str);
else
Direct(3, " ");
}
void Msg::Direct(int level, const char *fmt, ...)
......@@ -360,13 +357,15 @@ void Msg::ProgressMeter(int n, int N, const char *fmt, ...)
double percent = 100. * (double)n/(double)N;
if(percent >= _progressMeterCurrent){
char str[1024], str2[1024];
char str[1024];
va_list args;
va_start(args, fmt);
vsnprintf(str, sizeof(str), fmt, args);
va_end(args);
if(strlen(fmt)) strcat(str, " ");
char str2[1024];
sprintf(str2, "(%d %%)", _progressMeterCurrent);
strcat(str, str2);
......
......@@ -93,17 +93,17 @@ static void Print_StringOptions(int num, int level, int diff, int help,
StringXString s[], const char *prefix, FILE *file)
{
int i = 0;
char tmp[1024];
while(s[i].str) {
if(s[i].level & level) {
if(!diff || strcmp(s[i].function(num, GMSH_GET, NULL), s[i].def)){
char tmp[1024];
sprintf(tmp, "%s%s = \"%s\";%s%s", prefix,
s[i].str, s[i].function(num, GMSH_GET, NULL),
help ? " // " : "", help ? s[i].help : "");
if(file)
fprintf(file, "%s\n", tmp);
else
Msg::Direct(tmp);
Msg::Direct(3, "%s", tmp);
}
}
i++;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment