summaryrefslogtreecommitdiff
path: root/kicad/sexpr.c
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-08-22 05:04:23 -0300
committerWerner Almesberger <werner@almesberger.net>2016-08-22 05:04:23 -0300
commitf4c830911621fca111a28ffc735a11b330975adf (patch)
treeafa7e743ddf393c0a1e2318a2710418e7b92e406 /kicad/sexpr.c
parent4f05f33f81bcd58863e941514c291baabd89f2a9 (diff)
downloadeeshow-f4c830911621fca111a28ffc735a11b330975adf.tar.gz
eeshow-f4c830911621fca111a28ffc735a11b330975adf.tar.bz2
eeshow-f4c830911621fca111a28ffc735a11b330975adf.zip
eeshow/diag.c (error): don't require user to supply newline
Diffstat (limited to 'kicad/sexpr.c')
-rw-r--r--kicad/sexpr.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/kicad/sexpr.c b/kicad/sexpr.c
index baf08ed..0727891 100644
--- a/kicad/sexpr.c
+++ b/kicad/sexpr.c
@@ -138,7 +138,7 @@ bool sexpr_parse(struct sexpr_ctx *ctx, const char *s)
case ')':
if (!ctx->sp->prev) {
ctx->state = failed;
- error("too many\n )");
+ error("too many )");
break;
}
ctx->sp = ctx->sp->prev;
@@ -177,7 +177,7 @@ bool sexpr_parse(struct sexpr_ctx *ctx, const char *s)
case '\r':
case '\n':
ctx->state = failed;
- error("newline in string\n");
+ error("newline in string");
break;
case '"':
ctx->state = idle;
@@ -195,7 +195,7 @@ bool sexpr_parse(struct sexpr_ctx *ctx, const char *s)
case '\r':
case '\n':
ctx->state = failed;
- error("newline in string\n");
+ error("newline in string");
break;
default:
ctx->state = string;
@@ -323,11 +323,11 @@ void sexpr_abort(struct sexpr_ctx *ctx)
bool sexpr_finish(struct sexpr_ctx *ctx, struct expr **res)
{
if (ctx->sp != &ctx->stack) {
- error("not enough )\n");
+ error("not enough )");
ctx->state = failed;
}
if (ctx->state != idle && ctx->state != failed)
- error("invalid end state %d\n", ctx->state);
+ error("invalid end state %d", ctx->state);
if (ctx->state != idle) {
sexpr_abort(ctx);
return 0;