X-Git-Url: https://git.wpitchoune.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fcolor.c;h=89a01a9f418e272fa1cd83f26fc6a4a369ce3e9e;hb=f3b05dae619a7909bd7422b3a82422c9442aa114;hp=e7477013ac6814311ec9325d2bb8d719e4101b74;hpb=609664bb77874990e10f8073e54bb7f1645c8d72;p=psensor.git diff --git a/src/lib/color.c b/src/lib/color.c index e747701..89a01a9 100644 --- a/src/lib/color.c +++ b/src/lib/color.c @@ -1,22 +1,21 @@ /* - Copyright (C) 2010-2011 wpitchoune@gmail.com - - 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 - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301 USA -*/ - + * Copyright (C) 2010-2014 jeanfi@gmail.com + * + * 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 the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA + */ #include #include #include @@ -24,9 +23,10 @@ #include "color.h" -void -color_set(struct color *color, - unsigned int red, unsigned int green, unsigned int blue) +void color_set(struct color *color, + unsigned int red, + unsigned int green, + unsigned int blue) { color->red = red; color->green = green; @@ -66,7 +66,7 @@ int is_color(const char *str) return 1; } -struct color *string_to_color(const char *str) +struct color *str_to_color(const char *str) { char tmp[5]; unsigned int red, green, blue; @@ -89,7 +89,7 @@ struct color *string_to_color(const char *str) return color_new(red, green, blue); } -char *color_to_string(struct color *color) +char *color_to_str(const struct color *color) { char *str = malloc(1 + 12 + 1);