X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Flibcore%2Flc_appendable.c;h=55c4fc6edd9a31f42802436c80ff0c99966476c1;hb=e64d870786b1564302c650e90eb9d3e5599b139e;hp=7656375b7aad0668a41311a9477f7acffd7f3ab1;hpb=de1b0c8d4f653f534a38740ad7f6803d82f2762e;p=libfirm diff --git a/ir/libcore/lc_appendable.c b/ir/libcore/lc_appendable.c index 7656375b7..55c4fc6ed 100644 --- a/ir/libcore/lc_appendable.c +++ b/ir/libcore/lc_appendable.c @@ -16,6 +16,7 @@ License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "config.h" #include #include @@ -35,14 +36,14 @@ int lc_appendable_snwadd(lc_appendable_t *app, const char *str, size_t len, int to_pad = width - len; /* If not left justified, pad left */ - for(i = 0; !left_just && i < to_pad; ++i) + for (i = 0; !left_just && i < to_pad; ++i) res += lc_appendable_chadd(app, pad); /* Send the visible portion of the string to the output. */ res += lc_appendable_snadd(app, str, len); /* If left justified, pad right. */ - for(i = 0; left_just && i < to_pad; ++i) + for (i = 0; left_just && i < to_pad; ++i) res += lc_appendable_chadd(app, pad); return res; @@ -116,7 +117,7 @@ static int str_snadd(lc_appendable_t *obj, const char *str, size_t n) static int str_chadd(lc_appendable_t *obj, int ch) { - if(obj->limit - obj->written > 1) { + if (obj->limit - obj->written > 1) { char *tgt = obj->obj; tgt[obj->written++] = (char) ch; return 1;