printf: vararg functions use 'const' for format string
This commit is contained in:
parent
94ec5cf98f
commit
bf96348502
|
|
@ -459,7 +459,7 @@ calmaParseUnits(void)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void
|
void
|
||||||
CalmaReadError(char *format, ...)
|
CalmaReadError(const char *format, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
OFFTYPE filepos;
|
OFFTYPE filepos;
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ extern bool CalmaWrite(CellDef *rootDef, FILE *f);
|
||||||
extern void CalmaReadFile(FILETYPE file, char *filename);
|
extern void CalmaReadFile(FILETYPE file, char *filename);
|
||||||
extern void CalmaTechInit(void);
|
extern void CalmaTechInit(void);
|
||||||
extern bool CalmaGenerateArray(FILE *f, TileType type, int llx, int lly, int pitch, int cols, int rows);
|
extern bool CalmaGenerateArray(FILE *f, TileType type, int llx, int lly, int pitch, int cols, int rows);
|
||||||
extern void CalmaReadError(char *format, ...) ATTR_FORMAT_PRINTF_1;
|
extern void CalmaReadError(const char *format, ...) ATTR_FORMAT_PRINTF_1;
|
||||||
|
|
||||||
/* C99 compat */
|
/* C99 compat */
|
||||||
extern void calmaDelContacts(void);
|
extern void calmaDelContacts(void);
|
||||||
|
|
|
||||||
|
|
@ -129,7 +129,7 @@ Plane *cifReadPlane; /* Plane into which to paint material
|
||||||
|
|
||||||
/* VARARGS1 */
|
/* VARARGS1 */
|
||||||
void
|
void
|
||||||
CIFReadError(char *format, ...)
|
CIFReadError(const char *format, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
|
|
||||||
|
|
@ -153,7 +153,7 @@ CIFReadError(char *format, ...)
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
CIFReadWarning(char *format, ...)
|
CIFReadWarning(const char *format, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -188,8 +188,8 @@ extern int CIFEdgeDirection(CIFPath *first, CIFPath *last);
|
||||||
|
|
||||||
/* Variable argument procedures require complete prototype */
|
/* Variable argument procedures require complete prototype */
|
||||||
|
|
||||||
extern void CIFReadError(char *format, ...) ATTR_FORMAT_PRINTF_1;
|
extern void CIFReadError(const char *format, ...) ATTR_FORMAT_PRINTF_1;
|
||||||
extern void CIFReadWarning(char *format, ...) ATTR_FORMAT_PRINTF_1;
|
extern void CIFReadWarning(const char *format, ...) ATTR_FORMAT_PRINTF_1;
|
||||||
|
|
||||||
/* Variables shared by the CIF-reading modules, see CIFreadutils.c
|
/* Variables shared by the CIF-reading modules, see CIFreadutils.c
|
||||||
* for more details:
|
* for more details:
|
||||||
|
|
|
||||||
|
|
@ -163,7 +163,7 @@ void LefReadLayerSection();
|
||||||
LefMapping *defMakeInverseLayerMap();
|
LefMapping *defMakeInverseLayerMap();
|
||||||
|
|
||||||
/* Variable argument procedure requires parameter list. */
|
/* Variable argument procedure requires parameter list. */
|
||||||
void LefError(int, char *, ...) ATTR_FORMAT_PRINTF_2;
|
void LefError(int, const char *, ...) ATTR_FORMAT_PRINTF_2;
|
||||||
|
|
||||||
/* C99 compat */
|
/* C99 compat */
|
||||||
extern void LefRead();
|
extern void LefRead();
|
||||||
|
|
|
||||||
|
|
@ -306,7 +306,7 @@ LefNextToken(f, ignore_eol)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void
|
void
|
||||||
LefError(int type, char *fmt, ...)
|
LefError(int type, const char *fmt, ...)
|
||||||
{
|
{
|
||||||
static int errors = 0, warnings = 0, messages = 0;
|
static int errors = 0, warnings = 0, messages = 0;
|
||||||
va_list args;
|
va_list args;
|
||||||
|
|
|
||||||
|
|
@ -68,10 +68,10 @@ extern void TxUseMore();
|
||||||
extern void TxStopMore();
|
extern void TxStopMore();
|
||||||
|
|
||||||
/* printing procedures with variable arguments lists */
|
/* printing procedures with variable arguments lists */
|
||||||
extern void TxError(char *, ...) ATTR_FORMAT_PRINTF_1;
|
extern void TxError(const char *, ...) ATTR_FORMAT_PRINTF_1;
|
||||||
extern void TxErrorV(char *, va_list args);
|
extern void TxErrorV(const char *, va_list args);
|
||||||
extern void TxPrintf(char *, ...) ATTR_FORMAT_PRINTF_1;
|
extern void TxPrintf(const char *, ...) ATTR_FORMAT_PRINTF_1;
|
||||||
extern char *TxPrintString(char *, ...) ATTR_FORMAT_PRINTF_1;
|
extern char *TxPrintString(const char *, ...) ATTR_FORMAT_PRINTF_1;
|
||||||
|
|
||||||
/* input procedures */
|
/* input procedures */
|
||||||
extern char *TxGetLinePrompt();
|
extern char *TxGetLinePrompt();
|
||||||
|
|
|
||||||
|
|
@ -108,7 +108,7 @@ txFprintfBasic(FILE *f, const char *fmt, ...)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void
|
void
|
||||||
TxPrintf(char *fmt, ...)
|
TxPrintf(const char *fmt, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
FILE *f;
|
FILE *f;
|
||||||
|
|
@ -159,7 +159,7 @@ TxPrintf(char *fmt, ...)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
char *
|
char *
|
||||||
TxPrintString(char *fmt, ...)
|
TxPrintString(const char *fmt, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
static char *outstr = NULL;
|
static char *outstr = NULL;
|
||||||
|
|
@ -300,7 +300,7 @@ TxFlush()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void
|
void
|
||||||
TxError(char *fmt, ...) {
|
TxError(const char *fmt, ...) {
|
||||||
va_list args;
|
va_list args;
|
||||||
va_start(args, fmt);
|
va_start(args, fmt);
|
||||||
TxErrorV(fmt, args);
|
TxErrorV(fmt, args);
|
||||||
|
|
@ -308,7 +308,7 @@ TxError(char *fmt, ...) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
TxErrorV(char *fmt, va_list args)
|
TxErrorV(const char *fmt, va_list args)
|
||||||
{
|
{
|
||||||
FILE *f;
|
FILE *f;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -856,7 +856,7 @@ TechPrintLine()
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
TechError(char *fmt, ...)
|
TechError(const char *fmt, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ extern bool TechOverridesDefault; /* Set TRUE if technology was specified on
|
||||||
|
|
||||||
/* ----------------- Exported procedures ---------------- */
|
/* ----------------- Exported procedures ---------------- */
|
||||||
|
|
||||||
extern void TechError(char *, ...) ATTR_FORMAT_PRINTF_1;
|
extern void TechError(const char *, ...) ATTR_FORMAT_PRINTF_1;
|
||||||
extern void TechAddClient();
|
extern void TechAddClient();
|
||||||
extern void TechAddAlias();
|
extern void TechAddAlias();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue