From 5808a4001fd279a6b7b7622ba52c9736298fe563 Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Sat, 10 Jan 2015 21:22:39 -0300 Subject: [PATCH] poly2d/ (p2d_write_gnuplot, p2d_write_gnuplot_all): use "bool" instead of "int" --- poly2d/p2d_gnuplot.c | 9 +++++---- poly2d/poly2d.h | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/poly2d/p2d_gnuplot.c b/poly2d/p2d_gnuplot.c index d426621..274f65f 100644 --- a/poly2d/p2d_gnuplot.c +++ b/poly2d/p2d_gnuplot.c @@ -1,8 +1,8 @@ /* * p2d_gnuplot.c - File I/O in gnuplot format * - * Written 2012 by Werner Almesberger - * Copyright 2012 Werner Almesberger + * Written 2012, 2015 by Werner Almesberger + * Copyright 2012, 2015 Werner Almesberger * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -11,6 +11,7 @@ */ +#include #include #include #include @@ -67,7 +68,7 @@ struct p2d *p2d_read_gnuplot(FILE *file) } -int p2d_write_gnuplot(FILE *file, const struct p2d *p) +bool p2d_write_gnuplot(FILE *file, const struct p2d *p) { const struct v2d *v; @@ -86,7 +87,7 @@ int p2d_write_gnuplot(FILE *file, const struct p2d *p) } -int p2d_write_gnuplot_all(FILE *file, const struct p2d *p) +bool p2d_write_gnuplot_all(FILE *file, const struct p2d *p) { while (p) { if (!p2d_write_gnuplot(file, p)) diff --git a/poly2d/poly2d.h b/poly2d/poly2d.h index 9cc8e9e..3fcda48 100644 --- a/poly2d/poly2d.h +++ b/poly2d/poly2d.h @@ -176,7 +176,7 @@ struct f2d *f2d_tri(const struct p2d *p); void f2d_free_all(struct f2d *f); struct p2d *p2d_read_gnuplot(FILE *file); -int p2d_write_gnuplot(FILE *file, const struct p2d *p); -int p2d_write_gnuplot_all(FILE *file, const struct p2d *p); +bool p2d_write_gnuplot(FILE *file, const struct p2d *p); +bool p2d_write_gnuplot_all(FILE *file, const struct p2d *p); #endif /* !POLY2D_H */