summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-08-22 05:02:09 -0300
committerWerner Almesberger <werner@almesberger.net>2016-08-22 05:02:09 -0300
commit4f05f33f81bcd58863e941514c291baabd89f2a9 (patch)
tree97d87a9eb7afcc3f4b313fe4a724ef98d5f6da4c
parent17d37528db11e1cd0cd6a2cfecc11ced3e987fb0 (diff)
downloadeeshow-4f05f33f81bcd58863e941514c291baabd89f2a9.tar.gz
eeshow-4f05f33f81bcd58863e941514c291baabd89f2a9.tar.bz2
eeshow-4f05f33f81bcd58863e941514c291baabd89f2a9.zip
eeshow/diag.c (warning): don't require user to supply newline
-rw-r--r--file/git-file.c2
-rw-r--r--kicad/pl-parse.c22
-rw-r--r--misc/diag.c1
3 files changed, 13 insertions, 12 deletions
diff --git a/file/git-file.c b/file/git-file.c
index cc90141..7c9cf78 100644
--- a/file/git-file.c
+++ b/file/git-file.c
@@ -375,7 +375,7 @@ static bool related_other_repo(struct vcs_git *vcs_git)
/* @@@ find revision <= date of revision in related */
if (!shown)
- warning("related_other_repo is not yet implemented\n");
+ warning("related_other_repo is not yet implemented");
shown = 1;
return 0;
}
diff --git a/kicad/pl-parse.c b/kicad/pl-parse.c
index 6d7b2ce..4931ec2 100644
--- a/kicad/pl-parse.c
+++ b/kicad/pl-parse.c
@@ -141,7 +141,7 @@ static bool process_setup(struct pl_ctx *pl, const struct expr *e)
for (; e; e = e->next) {
if (!e->e) {
- warning("ignoring non-list\n");
+ warning("ignoring non-list");
continue;
}
@@ -171,7 +171,7 @@ static bool process_setup(struct pl_ctx *pl, const struct expr *e)
if (!get_float(next, &pl->b))
return 0;
} else {
- warning("ignoring \"%s\"\n", s);
+ warning("ignoring \"%s\"", s);
}
}
return 1;
@@ -190,12 +190,12 @@ static bool process_font(struct pl_obj *obj, const struct expr *e)
else if (!strcmp(e->s, "italic"))
obj->font |= font_italic;
else
- warning("ignoring \"%s\"\n", e->s);
+ warning("ignoring \"%s\"", e->s);
continue;
}
if (!e->e) {
- warning("ignoring empty list\n");
+ warning("ignoring empty list");
continue;
}
s = e->e->s;
@@ -208,7 +208,7 @@ static bool process_font(struct pl_obj *obj, const struct expr *e)
if (!get_size(next, &obj->ex, &obj->ey))
return 0;
} else {
- warning("ignoring \"%s\"\n", s);
+ warning("ignoring \"%s\"", s);
}
}
return 1;
@@ -219,7 +219,7 @@ static bool process_justify(struct pl_obj *obj, const struct expr *e)
{
for (; e; e = e->next) {
if (e->e) {
- warning("ignoring list\n");
+ warning("ignoring list");
continue;
}
@@ -234,7 +234,7 @@ static bool process_justify(struct pl_obj *obj, const struct expr *e)
else if (!strcmp(e->s, "bottom"))
obj->vert = text_min;
else
- warning("ignoring \"%s\"\n", e->s);
+ warning("ignoring \"%s\"", e->s);
}
return 1;
}
@@ -270,7 +270,7 @@ static bool process_obj(struct pl_ctx *pl, const struct expr *e,
continue;
}
if (!e->e) {
- warning("ignoring empty list\n");
+ warning("ignoring empty list");
continue;
}
@@ -311,7 +311,7 @@ static bool process_obj(struct pl_ctx *pl, const struct expr *e,
if (!process_justify(obj, next))
return 0;
} else
- warning("ignoring \"%s\"\n", s);
+ warning("ignoring \"%s\"", s);
}
obj->next = pl->objs;
@@ -328,7 +328,7 @@ static bool process_layout(struct pl_ctx *pl, const struct expr *e)
for (; e; e = e->next) {
if (!e->e) {
- warning("ignoring non-list\n");
+ warning("ignoring non-list");
continue;
}
@@ -350,7 +350,7 @@ static bool process_layout(struct pl_ctx *pl, const struct expr *e)
if (!process_obj(pl, next, pl_obj_text))
return 0;
} else {
- warning("ignoring \"%s\"\n", s);
+ warning("ignoring \"%s\"", s);
}
}
return 1;
diff --git a/misc/diag.c b/misc/diag.c
index 908deb8..3fc1ad8 100644
--- a/misc/diag.c
+++ b/misc/diag.c
@@ -70,6 +70,7 @@ void warning(const char *fmt, ...)
fprintf(stderr, "warning: ");
vfprintf(stderr, fmt, ap);
va_end(ap);
+ fprintf(stderr, "\n");
}