Lines Matching refs:newformat
101 PetscErrorCode PetscFormatConvert(const char format[], char newformat[]) in PetscFormatConvert() argument
108 newformat[j++] = format[i++]; in PetscFormatConvert()
109 newformat[j++] = format[i++]; in PetscFormatConvert()
112 newformat[j++] = '['; in PetscFormatConvert()
113 newformat[j++] = '|'; in PetscFormatConvert()
116 for (; format[i] && format[i] <= '9'; i++) newformat[j++] = format[i]; in PetscFormatConvert()
120 newformat[j++] = 'd'; in PetscFormatConvert()
122 newformat[j++] = 'l'; in PetscFormatConvert()
123 newformat[j++] = 'l'; in PetscFormatConvert()
124 newformat[j++] = 'd'; in PetscFormatConvert()
128 newformat[j++] = format[i]; in PetscFormatConvert()
130 newformat[j++] = '|'; in PetscFormatConvert()
131 newformat[j++] = ']'; in PetscFormatConvert()
139 newformat[j++] = format[i]; in PetscFormatConvert()
143 } else newformat[j++] = format[i++]; in PetscFormatConvert()
145 newformat[j] = 0; in PetscFormatConvert()
177 char *newformat = NULL; in PetscVSNPrintf() local
185 newformat = formatbuf; in PetscVSNPrintf()
188 PetscCall(PetscMalloc1(newLength, &newformat)); in PetscVSNPrintf()
190 PetscCall(PetscFormatConvert(format, newformat)); in PetscVSNPrintf()
192 flen = vsnprintf(str, len, newformat, Argp); in PetscVSNPrintf()
196 if (newLength > sizeof(formatbuf) - 1) PetscCall(PetscFree(newformat)); in PetscVSNPrintf()