From b453ec3d922eebd60288de974f54492ab02bd920 Mon Sep 17 00:00:00 2001 From: torque Date: Sat, 2 Sep 2023 15:04:46 -0700 Subject: [PATCH] all: add missing copyright headers Tests are CC0/public domain because there's no reason for them not to be. Examples are also CC0/public domain, but this may be a little bit weird because they are largely straightforward ports of examples from nats.c which carry the Apache license. However, I personally wrote them against the zig bindings and I doubt anyone will end up in a court of law due to their software containing uselessly trivial example code. --- examples/headers.zig | 3 +++ examples/pub_bytes.zig | 3 +++ examples/request_reply.zig | 3 +++ src/connection.zig | 14 ++++++++++++++ src/error.zig | 14 ++++++++++++++ src/message.zig | 14 ++++++++++++++ src/statistics.zig | 14 ++++++++++++++ src/subscription.zig | 14 ++++++++++++++ src/thunk.zig | 14 ++++++++++++++ tests/connection.zig | 3 +++ tests/main.zig | 3 +++ tests/message.zig | 3 +++ tests/nats.zig | 3 +++ tests/util.zig | 3 +++ 14 files changed, 108 insertions(+) diff --git a/examples/headers.zig b/examples/headers.zig index f30972c..c86f5a9 100644 --- a/examples/headers.zig +++ b/examples/headers.zig @@ -1,3 +1,6 @@ +// This file is licensed under the CC0 1.0 license. +// See: https://creativecommons.org/publicdomain/zero/1.0/legalcode + const std = @import("std"); const nats = @import("nats"); diff --git a/examples/pub_bytes.zig b/examples/pub_bytes.zig index c176d35..19b6345 100644 --- a/examples/pub_bytes.zig +++ b/examples/pub_bytes.zig @@ -1,3 +1,6 @@ +// This file is licensed under the CC0 1.0 license. +// See: https://creativecommons.org/publicdomain/zero/1.0/legalcode + const std = @import("std"); const nats = @import("nats"); diff --git a/examples/request_reply.zig b/examples/request_reply.zig index 7a1086b..1f167cf 100644 --- a/examples/request_reply.zig +++ b/examples/request_reply.zig @@ -1,3 +1,6 @@ +// This file is licensed under the CC0 1.0 license. +// See: https://creativecommons.org/publicdomain/zero/1.0/legalcode + const std = @import("std"); const nats = @import("nats"); diff --git a/src/connection.zig b/src/connection.zig index e881a09..b77655e 100644 --- a/src/connection.zig +++ b/src/connection.zig @@ -1,3 +1,17 @@ +// Copyright 2023 torque@epicyclic.dev +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + const std = @import("std"); pub const nats_c = @cImport({ diff --git a/src/error.zig b/src/error.zig index 2ad8c58..cd508c9 100644 --- a/src/error.zig +++ b/src/error.zig @@ -1,3 +1,17 @@ +// Copyright 2023 torque@epicyclic.dev +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + const std = @import("std"); pub const nats_c = @cImport({ diff --git a/src/message.zig b/src/message.zig index c604745..c7a3f79 100644 --- a/src/message.zig +++ b/src/message.zig @@ -1,3 +1,17 @@ +// Copyright 2023 torque@epicyclic.dev +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + const std = @import("std"); pub const nats_c = @cImport({ diff --git a/src/statistics.zig b/src/statistics.zig index 136c951..262b652 100644 --- a/src/statistics.zig +++ b/src/statistics.zig @@ -1,3 +1,17 @@ +// Copyright 2023 torque@epicyclic.dev +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + const std = @import("std"); const nats_c = @cImport({ diff --git a/src/subscription.zig b/src/subscription.zig index 2d9b415..15c165e 100644 --- a/src/subscription.zig +++ b/src/subscription.zig @@ -1,3 +1,17 @@ +// Copyright 2023 torque@epicyclic.dev +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + const std = @import("std"); pub const nats_c = @cImport({ diff --git a/src/thunk.zig b/src/thunk.zig index 2ceb0ad..d430077 100644 --- a/src/thunk.zig +++ b/src/thunk.zig @@ -1,3 +1,17 @@ +// Copyright 2023 torque@epicyclic.dev +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + const std = @import("std"); pub const nats_c = @cImport({ diff --git a/tests/connection.zig b/tests/connection.zig index 107a72f..629bad2 100644 --- a/tests/connection.zig +++ b/tests/connection.zig @@ -1,3 +1,6 @@ +// This file is licensed under the CC0 1.0 license. +// See: https://creativecommons.org/publicdomain/zero/1.0/legalcode + const std = @import("std"); const nats = @import("nats"); diff --git a/tests/main.zig b/tests/main.zig index a219ae8..34f0ed4 100644 --- a/tests/main.zig +++ b/tests/main.zig @@ -1,3 +1,6 @@ +// This file is licensed under the CC0 1.0 license. +// See: https://creativecommons.org/publicdomain/zero/1.0/legalcode + test { _ = @import("./nats.zig"); _ = @import("./connection.zig"); diff --git a/tests/message.zig b/tests/message.zig index 284764e..c76cc87 100644 --- a/tests/message.zig +++ b/tests/message.zig @@ -1,3 +1,6 @@ +// This file is licensed under the CC0 1.0 license. +// See: https://creativecommons.org/publicdomain/zero/1.0/legalcode + const std = @import("std"); const nats = @import("nats"); diff --git a/tests/nats.zig b/tests/nats.zig index 2455116..7407c60 100644 --- a/tests/nats.zig +++ b/tests/nats.zig @@ -1,3 +1,6 @@ +// This file is licensed under the CC0 1.0 license. +// See: https://creativecommons.org/publicdomain/zero/1.0/legalcode + const std = @import("std"); const nats = @import("nats"); diff --git a/tests/util.zig b/tests/util.zig index 11ff15f..68e9306 100644 --- a/tests/util.zig +++ b/tests/util.zig @@ -1,3 +1,6 @@ +// This file is licensed under the CC0 1.0 license. +// See: https://creativecommons.org/publicdomain/zero/1.0/legalcode + const std = @import("std"); const TestLaunchError = error{