From 782c5c3f290555fa9368208efdb3b428f45468eb Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Thu, 8 Mar 2018 20:56:21 -0500 Subject: [PATCH] SPDXify the code. --- actions.c | 8 ++++++++ adventure.yaml | 3 +++ cheat.c | 4 ++++ init.c | 12 ++++++++---- main.c | 4 ++++ make_dungeon.py | 3 +++ misc.c | 8 ++++++++ saveresume.c | 16 +++++++++++----- score.c | 11 +++++++---- 9 files changed, 56 insertions(+), 13 deletions(-) diff --git a/actions.c b/actions.c index 059d92b..0d8bf7f 100644 --- a/actions.c +++ b/actions.c @@ -1,3 +1,11 @@ +/* + * Actions for the duneon-running code. + * + * Copyright (c) 1977, 2005 by Will Crowther and Don Woods + * Copyright (c) 2017 by Eric S. Raymond + * SPDX-License-Identifier: BSD-2-clause + */ + #include #include #include diff --git a/adventure.yaml b/adventure.yaml index 175635a..ff32163 100644 --- a/adventure.yaml +++ b/adventure.yaml @@ -112,6 +112,9 @@ # %s = an ASCII string # %S = The letter 's' or nothing (if a previous %d value is exactly 1) # %V = substitute program version string +# +# Copyright (c) 2017 by Eric S. Raymond +# SPDX-License-Identifier: BSD-2-clause motions: !!omap - MOT_0: diff --git a/cheat.c b/cheat.c index b75fccf..008fb9c 100644 --- a/cheat.c +++ b/cheat.c @@ -3,6 +3,10 @@ * not happen. It leverages chunks of advent, mostly initialize() and * savefile(), so we know we're always outputing save files that advent * can import. + * + * Copyright (c) 1977, 2005 by Will Crowther and Don Woods + * Copyright (c) 2017 by Eric S. Raymond + * SPDX-License-Identifier: BSD-2-clause */ #include #include diff --git a/init.c b/init.c index fbe4410..4ff52a8 100644 --- a/init.c +++ b/init.c @@ -1,3 +1,11 @@ +/* + * Initialisation + * + * Copyright (c) 1977, 2005 by Will Crowther and Don Woods + * Copyright (c) 2017 by Eric S. Raymond + * SPDX-License-Identifier: BSD-2-clause + */ + #include #include #include @@ -6,10 +14,6 @@ #include "advent.h" -/* - * Initialisation - */ - struct settings_t settings = { .logfp = NULL, .oldstyle = false, diff --git a/main.c b/main.c index f0dbb3a..5cdbcc4 100644 --- a/main.c +++ b/main.c @@ -11,6 +11,10 @@ * ESR apologizes for the remaing gotos (now confined to one function * in this file - there used to be over 350 of them, *everywhere*). * Applying the Structured Program Theorem can be hard. + * + * Copyright (c) 1977, 2005 by Will Crowther and Don Woods + * Copyright (c) 2017 by Eric S. Raymond + * SPDX-License-Identifier: BSD-2-clause */ #include diff --git a/make_dungeon.py b/make_dungeon.py index b3e08fd..106714a 100755 --- a/make_dungeon.py +++ b/make_dungeon.py @@ -6,6 +6,9 @@ # The nontrivial part of this is the compilation of the YAML for # movement rules to the travel array that's actually used by # playermove(). +# +# Copyright (c) 2017 by Eric S. Raymond +# SPDX-License-Identifier: BSD-2-clause import sys, yaml diff --git a/misc.c b/misc.c index 80e4352..aa16472 100644 --- a/misc.c +++ b/misc.c @@ -1,3 +1,11 @@ +/* + * I/O and support riutines. + * + * Copyright (c) 1977, 2005 by Will Crowther and Don Woods + * Copyright (c) 2017 by Eric S. Raymond + * SPDX-License-Identifier: BSD-2-clause + */ + #include #include #include diff --git a/saveresume.c b/saveresume.c index d494015..b03a621 100644 --- a/saveresume.c +++ b/saveresume.c @@ -1,3 +1,14 @@ +/* + * Saving and resuming. + * + * (ESR) This replaces a bunch of particularly nasty FORTRAN-derived code; + * see the history.adoc file in the source distribution for discussion. + * + * Copyright (c) 1977, 2005 by Will Crowther and Don Woods + * Copyright (c) 2017 by Eric S. Raymond + * SPDX-License-Identifier: BSD-2-clause + */ + #include #include #include @@ -7,11 +18,6 @@ #include "advent.h" #include "dungeon.h" -/* - * (ESR) This replaces a bunch of particularly nasty FORTRAN-derived code; - * see the history.adoc file in the source distribution for discussion. - */ - #define VRSION 28 /* bump on save format change */ /* diff --git a/score.c b/score.c index 9b3f8f3..368b1df 100644 --- a/score.c +++ b/score.c @@ -1,11 +1,14 @@ +/* + * Scoring and wrap-up. + * + * Copyright (c) 1977, 2005 by Will Crowther and Don Woods + * Copyright (c) 2017 by Eric S. Raymond + * SPDX-License-Identifier: BSD-2-clause + */ #include #include "advent.h" #include "dungeon.h" -/* - * scoring and wrap-up - */ - static int mxscor; /* ugh..the price for having score() not exit. */ long score(enum termination mode) -- 2.31.1