X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Ffb.c;h=9fcd0f5d9e2b8af8bc6ed618face1fc250a0cf72;hb=7b3fc6d027021b6a10998e53237ac7b4978f8fb5;hp=a60fa9e4f6c4dbb9c75a0150d6a1bea8d51551a2;hpb=738869d95ebd3a553985b0002dade5d9f651ffe7;p=template.git diff --git a/src/fb.c b/src/fb.c index a60fa9e..9fcd0f5 100644 --- a/src/fb.c +++ b/src/fb.c @@ -1,6 +1,6 @@ /* * foobar - src/fb.c - * Copyright (C) 2008 Sebastian Harl + * Copyright (C) 2010 Sebastian Harl * * 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 @@ -14,6 +14,29 @@ * 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 St, Fifth Floor, Boston, MA 02110-1301 USA + *OR: + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* @@ -25,6 +48,7 @@ #endif /* HAVE_CONFIG_H */ #include "foobar.h" +#include "fb_features.h" #if HAVE_LIBGEN_H # include @@ -37,31 +61,39 @@ #include -static void exit_usage(char *name, int status) +static void +exit_usage(char *name, int status) { - printf("Usage: %s \n" + printf( +"Usage: %s \n" - "\nOptions:\n" - " -h display this help and exit\n" - " -V display the version number and copyright\n" +"\nOptions:\n" +" -h display this help and exit\n" +" -V display the version number and copyright\n" - "\nfb "VERSION", http://tokkee.org\n", basename(name)); +"\nfb "FB_VERSION_STRING FB_VERSION_EXTRA", "PACKAGE_URL"\n", +basename(name)); exit(status); } /* exit_usage */ -static void exit_version(void) +static void +exit_version(void) { - printf("fb version "VERSION", built "BUILD_DATE"\n" - "Copyright (C) 2008 Sebastian Harl \n" + printf("fb version "FB_VERSION_STRING FB_VERSION_EXTRA", " + "built "BUILD_DATE"\n" + "Copyright (C) 2010 "PACKAGE_BUGREPORT"\n" "\nThis is free software under the terms of the GNU GPLv2; see " +/* OR: */ + "\nThis is free software under the terms of the BSD license, see " "the source for\ncopying conditions. There is NO WARRANTY; not " "even for MERCHANTABILITY or\nFITNESS FOR A PARTICULAR " "PURPOSE.\n"); exit(0); } /* exit_version */ -int main(int argc, char **argv) +int +main(int argc, char **argv) { while (42) { int opt = getopt(argc, argv, "hV");