winegcc: Modify error() to behave like all the other Wine tracing methods, that is to not append a '\n' to the message.
diff --git a/tools/winegcc/utils.c b/tools/winegcc/utils.c
index c5b46a4..225062d 100644
--- a/tools/winegcc/utils.c
+++ b/tools/winegcc/utils.c
@@ -43,7 +43,6 @@
va_start(ap, s);
fprintf(stderr, "winegcc: ");
vfprintf(stderr, s, ap);
- fprintf(stderr, "\n");
va_end(ap);
exit(2);
}
@@ -53,7 +52,7 @@
void* p;
if ((p = malloc (size)) == NULL)
- error("Could not malloc %d bytes.", size);
+ error("Could not malloc %d bytes\n", size);
return p;
}
@@ -62,7 +61,7 @@
{
void* p2 = realloc (p, size);
if (size && !p2)
- error("Could not realloc %d bytes.", size);
+ error("Could not realloc %d bytes\n", size);
return p2;
}
@@ -120,7 +119,7 @@
void strarray_del(strarray* arr, unsigned int i)
{
- if (i >= arr->size) error("Invalid index i=%d", i);
+ if (i >= arr->size) error("Invalid index i=%d\n", i);
memmove(&arr->base[i], &arr->base[i + 1], (arr->size - i - 1) * sizeof(arr->base[0]));
arr->size--;
}
@@ -195,7 +194,7 @@
if (verbose) printf("Creating file %s\n", name);
va_start(ap, fmt);
if ( !(file = fopen(name, "w")) )
- error("Unable to open %s for writing.", name);
+ error("Unable to open %s for writing\n", name);
vfprintf(file, fmt, ap);
va_end(ap);
fclose(file);
@@ -327,7 +326,7 @@
if ((status = spawnvp( _P_WAIT, argv[0], argv)) && !ignore_errors)
{
- if (status > 0) error("%s failed.", argv[0]);
+ if (status > 0) error("%s failed\n", argv[0]);
else perror("winegcc");
exit(3);
}