openbsd-ports/devel/gputils/patches/patch-gpasm_gperror_c
naddy cfb6182a3f Import gputils 0.11.7.
Submitted by Andrew Dalgleish <openbsd@ajd.net.au>.

GPUTILS is a collection of tools for the Microchip (TM) PIC
microcontrollers. It includes gpasm, gplink, and gplib.
2003-11-03 01:02:34 +00:00

82 lines
2.4 KiB
Plaintext

$OpenBSD: patch-gpasm_gperror_c,v 1.1.1.1 2003/11/03 01:02:35 naddy Exp $
--- gpasm/gperror.c.orig 2003-10-14 21:03:30.000000000 +1000
+++ gpasm/gperror.c 2003-10-14 21:04:57.000000000 +1000
@@ -172,14 +172,14 @@ void gperror(unsigned int code,
/* standard output */
if (!state.quiet) {
if (state.src)
- sprintf(full_message,
+ snprintf(full_message, sizeof(full_message),
"%s:%d:Error [%03d] %s",
state.src->name,
state.src->line_number,
code,
message);
else
- sprintf(full_message,
+ snprintf(full_message, sizeof(full_message),
"Error [%03d] %s",
code,
message);
@@ -191,7 +191,7 @@ void gperror(unsigned int code,
#endif
/* list file output */
- sprintf(full_message,
+ snprintf(full_message, sizeof(full_message),
"Error [%03d] : %s",
code,
message);
@@ -260,14 +260,14 @@ void gpwarning(unsigned int code,
/* standard output */
if (!state.quiet) {
if (state.src)
- sprintf(full_message,
+ snprintf(full_message, sizeof(full_message),
"%s:%d:Warning [%03d] %s",
state.src->name,
state.src->line_number,
code,
message);
else
- sprintf(full_message,
+ snprintf(full_message, sizeof(full_message),
"Warning [%03d] %s",
code,
message);
@@ -279,7 +279,7 @@ void gpwarning(unsigned int code,
#endif
/* list file output */
- sprintf(full_message,
+ snprintf(full_message, sizeof(full_message),
"Warning [%03d] : %s",
code,
message);
@@ -345,14 +345,14 @@ void gpmessage(unsigned int code,
/* standard output */
if (!state.quiet) {
if (state.src)
- sprintf(full_message,
+ snprintf(full_message, sizeof(full_message),
"%s:%d:Message [%03d] %s",
state.src->name,
state.src->line_number,
code,
message);
else
- sprintf(full_message,
+ snprintf(full_message, sizeof(full_message),
"Message [%03d] %s",
code,
message);
@@ -364,7 +364,7 @@ void gpmessage(unsigned int code,
#endif
/* list file output */
- sprintf(full_message,
+ snprintf(full_message, sizeof(full_message),
"Message [%03d] : %s",
code,
message);