commit d9b6c99dced7ada09d40ee836919391fd28feb14 from: Martin Pieuchot date: Tue Feb 11 13:33:34 2020 UTC The LICENCE is included in every file, no need for another copy. While here add $OpenBSD$ markers and put the definition after the actual licence header, for coherence. commit - 272fabec495b54b6ee82453c24959bcfb5e15b9e commit + d9b6c99dced7ada09d40ee836919391fd28feb14 blob - d908088b90fc58865c6f9352047c7d52f37c3a48 (mode 644) blob + /dev/null --- LICENCE +++ /dev/null @@ -1,13 +0,0 @@ - Copyright (c) 2020 Neels Hofmeyr - - Permission to use, copy, modify, and distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. blob - 395468a8c29ce7c6d5ca5283a1a1aa247acb3d87 blob + 5ea01d9eae6a3c28570a95c7e40b68db0a8f3760 --- arraylist.h +++ arraylist.h @@ -1,4 +1,5 @@ -/* Auto-reallocating array for arbitrary member types. */ +/* $OpenBSD$ */ + /* * Copyright (c) 2020 Neels Hofmeyr * @@ -15,6 +16,8 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +/* Auto-reallocating array for arbitrary member types. */ + #pragma once #ifdef __linux__ blob - ec47f65416456d6fa54228e53e8ccea1fd888fba blob + 029339c0fdcdc96bc1419c0ccf0c1ccaa507c5ee --- debug.h +++ debug.h @@ -1,3 +1,5 @@ +/* $OpenBSD$ */ + /* * Copyright (c) 2020 Neels Hofmeyr * blob - bbe26f81080d982f5d5a2678f29193e5c70df6fd blob + a220fb92b1c9b36a3e311ae4d928a12e918c67c3 --- diff.c +++ diff.c @@ -1,4 +1,5 @@ -/* Commandline diff utility to test diff implementations. */ +/* $OpenBSD$ */ + /* * Copyright (c) 2018 Martin Pieuchot * Copyright (c) 2020 Neels Hofmeyr @@ -16,6 +17,8 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +/* Commandline diff utility to test diff implementations. */ + #include #include blob - 9aa20ee96f002f8a10c60b035b8e62be1dff769b blob + 55afd5ecfacb851e300d78ee07208d3c74eab483 --- diff_atomize_text.c +++ diff_atomize_text.c @@ -1,4 +1,5 @@ -/* Split source by line breaks, and calculate a simplistic checksum. */ +/* $OpenBSD$ */ + /* * Copyright (c) 2020 Neels Hofmeyr * @@ -15,6 +16,8 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +/* Split source by line breaks, and calculate a simplistic checksum. */ + #include "diff_main.h" static int diff_data_atomize_text_lines(struct diff_data *d) blob - 29fdd78115f0ea2392af08b51e5d57d450d9dd1b blob + a7c97d89d224167214a0a9f44ee7238ed20d205f --- diff_main.c +++ diff_main.c @@ -1,4 +1,5 @@ -/* Generic infrastructure to implement various diff algorithms (implementation). */ +/* $OpenBSD$ */ + /* * Copyright (c) 2020 Neels Hofmeyr * @@ -15,6 +16,7 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +/* Generic infrastructure to implement various diff algorithms (implementation). */ #include #include blob - 933592cf5e6a33c4c1ace4d204f3fb494ab62d34 blob + 3390c1a41b4dd915ef845f47697b12943111ef71 --- diff_main.h +++ diff_main.h @@ -1,4 +1,5 @@ -/* Generic infrastructure to implement various diff algorithms. */ +/* $OpenBSD$ */ + /* * Copyright (c) 2020 Neels Hofmeyr * @@ -15,6 +16,8 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +/* Generic infrastructure to implement various diff algorithms. */ + #pragma once #include blob - 1021b3be22639ea353533646e72153bb03276f0e blob + a0e5f510d94462154ff83dee18b5962775f93c56 --- diff_myers.c +++ diff_myers.c @@ -1,6 +1,5 @@ -/* Myers diff algorithm implementation, invented by Eugene W. Myers [1]. - * Implementations of both the Myers Divide Et Impera (using linear space) - * and the canonical Myers algorithm (using quadratic space). */ +/* $OpenBSD$ */ + /* * Copyright (c) 2020 Neels Hofmeyr * @@ -17,6 +16,12 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +/* + * Myers diff algorithm implementation, invented by Eugene W. Myers [1]. + * Implementations of both the Myers Divide Et Impera (using linear space) + * and the canonical Myers algorithm (using quadratic space). + */ + #include "diff_main.h" #include "debug.h" blob - 8c9e498eb29496228f6ff282f223b721ba1a3d03 blob + a279485ee1967d8b2d8dcde5e295d3fe8be6d0fe --- diff_output.c +++ diff_output.c @@ -1,4 +1,5 @@ -/* Common parts for printing diff output */ +/* $OpenBSD$ */ + /* * Copyright (c) 2020 Neels Hofmeyr * @@ -15,6 +16,8 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +/* Common parts for printing diff output */ + #include "diff_output.h" void diff_output_lines(FILE *dest, const char *prefix, struct diff_atom *start_atom, unsigned int count) blob - cb6854b078da31b5426b493fb1128b98361d923e blob + eaa4a83d44c28957b6893f120eda0ce549d3baad --- diff_output.h +++ diff_output.h @@ -1,4 +1,5 @@ -/* Diff output generators and invocation shims. */ +/* $OpenBSD$ */ + /* * Copyright (c) 2020 Neels Hofmeyr * @@ -15,6 +16,8 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +/* Diff output generators and invocation shims. */ + #pragma once #include blob - fa532a4c439692797a14d9c7e9e0c5c55c161029 blob + 526ec4d854752540c2a72ce93fa2199e90e42261 --- diff_output_plain.c +++ diff_output_plain.c @@ -1,4 +1,5 @@ -/* Output all lines of a diff_result. */ +/* $OpenBSD$ */ + /* * Copyright (c) 2020 Neels Hofmeyr * @@ -15,6 +16,8 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +/* Output all lines of a diff_result. */ + #include "diff_output.h" enum diff_rc diff_output_plain(FILE *dest, const struct diff_input_info *info, blob - 4c95e6050fb2e06f84ee46543b0ebe1f83119115 blob + bf4e81d14a15ffaef589d31182b39d0c5738b8e0 --- diff_output_unidiff.c +++ diff_output_unidiff.c @@ -1,4 +1,5 @@ -/* Produce a unidiff output from a diff_result. */ +/* $OpenBSD$ */ + /* * Copyright (c) 2020 Neels Hofmeyr * @@ -15,6 +16,8 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +/* Produce a unidiff output from a diff_result. */ + #include "diff_output.h" #include "debug.h" blob - 9d24bfe161fabd6c99cfd6b78be90df096a9d5ae blob + 908e47103b700ab6e429185daa412f3c818239eb --- diff_patience.c +++ diff_patience.c @@ -1,5 +1,5 @@ -/* Implementation of the Patience Diff algorithm invented by Bram Cohen: - * Divide a diff problem into smaller chunks by an LCS of common-unique lines. */ +/* $OpenBSD$ */ + /* * Copyright (c) 2020 Neels Hofmeyr * @@ -16,6 +16,11 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +/* + * Implementation of the Patience Diff algorithm invented by Bram Cohen: + * Divide a diff problem into smaller chunks by an LCS of common-unique lines. + */ + #include #include "diff_main.h"