Code

Renamed foobar to fb.
authorSebastian Harl <sh@tokkee.org>
Tue, 19 Aug 2008 11:44:48 +0000 (13:44 +0200)
committerSebastian Harl <sh@tokkee.org>
Tue, 19 Aug 2008 11:44:48 +0000 (13:44 +0200)
.gitignore
src/Makefile.am
src/fb.c [new file with mode: 0644]
src/foobar.c [deleted file]

index 860a4a0af1ec53694a48c1a380f52394a1b7a4d8..430fd465d5490259ef39882aaf3fb43194301275 100644 (file)
@@ -22,5 +22,5 @@ ltmain.sh
 *.la
 *.lo
 *.o
-foobar
+fb
 
index 5005281d95ec80a295d60d8e5513a292c495f37f..2dd0218a6806e5290769e770a661c4c5a27441c7 100644 (file)
@@ -6,8 +6,8 @@ lib_LTLIBRARIES = libfoobar.la
 libfoobar_la_SOURCES = libfoobar.c foobar.h
 libfoobar_la_LDFLAGS = -version-info 0:0:0
 
-bin_PROGRAMS = foobar
+bin_PROGRAMS = fb
 
-foobar_SOURCES = foobar.c foobar.h
-foobar_LDADD = libfoobar.la
+fb_SOURCES = fb.c foobar.h
+fb_LDADD = libfoobar.la
 
diff --git a/src/fb.c b/src/fb.c
new file mode 100644 (file)
index 0000000..a60fa9e
--- /dev/null
+++ b/src/fb.c
@@ -0,0 +1,90 @@
+/*
+ * foobar - src/fb.c
+ * Copyright (C) 2008 Sebastian Harl <sh@tokkee.org>
+ *
+ * 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; only version 2 of the License is applicable.
+ *
+ * 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 St, Fifth Floor, Boston, MA  02110-1301 USA
+ */
+
+/*
+ * A short description of this module...
+ */
+
+#if HAVE_CONFIG_H
+#      include "config.h"
+#endif /* HAVE_CONFIG_H */
+
+#include "foobar.h"
+
+#if HAVE_LIBGEN_H
+#      include <libgen.h>
+#else /* HAVE_LIBGEN_H */
+#      define basename(path) (path)
+#endif /* ! HAVE_LIBGEN_H */
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <unistd.h>
+
+static void exit_usage(char *name, int status)
+{
+       printf("Usage: %s <options>\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));
+       exit(status);
+} /* exit_usage */
+
+static void exit_version(void)
+{
+       printf("fb version "VERSION", built "BUILD_DATE"\n"
+                       "Copyright (C) 2008 Sebastian Harl <sh@tokkee.org>\n"
+
+                       "\nThis is free software under the terms of the GNU GPLv2; 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)
+{
+       while (42) {
+               int opt = getopt(argc, argv, "hV");
+
+               if (-1 == opt)
+                       break;
+
+               switch (opt) {
+                       case 'h':
+                               exit_usage(argv[0], 0);
+                               break;
+                       case 'V':
+                               exit_version();
+                               break;
+                       default:
+                               exit_usage(argv[0], 1);
+               }
+       }
+
+       if (optind < argc)
+               exit_usage(argv[0], 1);
+       return 0;
+} /* main */
+
+/* vim: set tw=78 sw=4 ts=4 noexpandtab : */
+
diff --git a/src/foobar.c b/src/foobar.c
deleted file mode 100644 (file)
index 927c868..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * foobar - src/foobar.c
- * Copyright (C) 2008 Sebastian Harl <sh@tokkee.org>
- *
- * 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; only version 2 of the License is applicable.
- *
- * 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 St, Fifth Floor, Boston, MA  02110-1301 USA
- */
-
-/*
- * A short description of this module...
- */
-
-#if HAVE_CONFIG_H
-#      include "config.h"
-#endif /* HAVE_CONFIG_H */
-
-#include "foobar.h"
-
-#if HAVE_LIBGEN_H
-#      include <libgen.h>
-#else /* HAVE_LIBGEN_H */
-#      define basename(path) (path)
-#endif /* ! HAVE_LIBGEN_H */
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#include <unistd.h>
-
-static void exit_usage(char *name, int status)
-{
-       printf("Usage: %s <options>\n"
-
-                       "\nOptions:\n"
-                       "  -h    display this help and exit\n"
-                       "  -V    display the version number and copyright\n"
-
-                       "\nfoobar "VERSION", http://tokkee.org\n", basename(name));
-       exit(status);
-} /* exit_usage */
-
-static void exit_version(void)
-{
-       printf("foobar version "VERSION", built "BUILD_DATE"\n"
-                       "Copyright (C) 2008 Sebastian Harl <sh@tokkee.org>\n"
-
-                       "\nThis is free software under the terms of the GNU GPLv2; 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)
-{
-       while (42) {
-               int opt = getopt(argc, argv, "hV");
-
-               if (-1 == opt)
-                       break;
-
-               switch (opt) {
-                       case 'h':
-                               exit_usage(argv[0], 0);
-                               break;
-                       case 'V':
-                               exit_version();
-                               break;
-                       default:
-                               exit_usage(argv[0], 1);
-               }
-       }
-
-       if (optind < argc)
-               exit_usage(argv[0], 1);
-       return 0;
-} /* main */
-
-/* vim: set tw=78 sw=4 ts=4 noexpandtab : */
-