Add git ignore file to avoid accidentially including build products in repository
[binmatch.git] / binmatch.c
index ee5a99d..a93c405 100644 (file)
@@ -1,17 +1,19 @@
 /*
- * Find occurances of one binary file within another
- * Copyright (C) 2010 TJ
- * Author: TJ <linux@tjworld.net>
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * 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.
- *
+   Find occurances of one binary file within another
+   Copyright (C) 2010 TJ
+   Author: TJ <linux@tjworld.net>
+
+   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, version 3 of the License.
+
+   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, see <http://www.gnu.org/licenses/>.
 */
 
 #include <sys/mman.h>
 void
 usage(const char *name) {
  printf("Usage: %s:  [-d] -n <needle> -h <haystack>\n", name);
- printf("\t-d\tprint matching addresses in decimal not hexadecimal\n"
+ printf("Copyright 2010 TJ <linux@tjworld.net>\n"
+        "Licensed under the terms of the GNU GPL v3\n\n"
+        "\t-d\tprint matching addresses in decimal not hexadecimal\n"
         "\t-n\tpath to the file containing the needle\n"
-        "\t-h\tpath to the file containing the haystack\n"
-      "\n\tInformation messages are written to stderr and only matches are written to stdout.\n"
+        "\t-h\tpath to the file containing the haystack\n\n"
+
+        "\tInformation messages are written to stderr and only matches are written to stdout.\n"
         "\tThis allows the output to be piped through other filters.\n"
  );
 }
@@ -87,7 +92,7 @@ main(int argc, char *argv[], char *env[]) {
     exit(4);
    }
    if(MAP_FAILED == (haystack_mmap = mmap(haystack_mmap, haystack_stat.st_size, PROT_READ, MAP_SHARED, haystack_fd, 0))) {
-    perror("Unable to memory-map needle");
+    perror("Unable to memory-map haystack");
     exit(8);
    }
    {