From f25fa7b132ef08431455075dadcf1823a5796dba Mon Sep 17 00:00:00 2001 From: Nathanael Sensfelder Date: Mon, 13 Feb 2017 18:02:32 +0100 Subject: Seems to work reasonably well. --- src/sequence/sequence_append.c | 4 ++-- src/sequence/sequence_creation.c | 19 +++++++++++++++---- src/sequence/sequence_to_string.c | 8 ++++---- 3 files changed, 21 insertions(+), 10 deletions(-) (limited to 'src/sequence') diff --git a/src/sequence/sequence_append.c b/src/sequence/sequence_append.c index 81dfa99..d69db51 100644 --- a/src/sequence/sequence_append.c +++ b/src/sequence/sequence_append.c @@ -75,8 +75,8 @@ static int increment_required_capacity ZoO_S_ERROR ( io, - "Sequence capacity increment aborted, as the new size would not fit" - " in a size_t variable." + "Sequence capacity increment aborted, as the new size would not fit " + "in a size_t variable." ); #endif diff --git a/src/sequence/sequence_creation.c b/src/sequence/sequence_creation.c index 9556693..06c391f 100644 --- a/src/sequence/sequence_creation.c +++ b/src/sequence/sequence_creation.c @@ -260,7 +260,13 @@ static int extend_right { (void) ZoO_knowledge_unlock_access(k, io); - /* TODO: Err message. */ + ZoO_S_PROG_ERROR + ( + io, + "Knowledge consistency error: generated markov sequence could not be " + "found." + ); + return -1; } @@ -281,7 +287,12 @@ static int extend_right { (void) ZoO_knowledge_unlock_access(k, io); - /* TODO: Err message. */ + ZoO_S_PROG_ERROR + ( + io, + "Knowledge consistency error: generated markov sequence had no known " + "targets." + ); return -1; } @@ -468,6 +479,8 @@ static int initialize_sequence return -1; } + (void) ZoO_knowledge_unlock_access(k, io); + if (ZoO_DEBUG_SEQUENCE_CREATION_INIT) { ZoO_index i; @@ -485,8 +498,6 @@ static int initialize_sequence } } - (void) ZoO_knowledge_unlock_access(k, io); - return 0; } diff --git a/src/sequence/sequence_to_string.c b/src/sequence/sequence_to_string.c index 919ef0b..8666204 100644 --- a/src/sequence/sequence_to_string.c +++ b/src/sequence/sequence_to_string.c @@ -69,8 +69,8 @@ static int increment_required_capacity ZoO_S_ERROR ( io, - "String capacity increment aborted, as the new capacity would not" - " fit in a ZoO_index variable." + "String capacity increment aborted, as the new capacity would not " + "fit in a ZoO_index variable." ); return -1; @@ -85,8 +85,8 @@ static int increment_required_capacity ZoO_S_ERROR ( io, - "String capacity increment aborted, as the new size would not fit" - " in a size_t variable." + "String capacity increment aborted, as the new size would not fit " + "in a size_t variable." ); return -2; -- cgit v1.2.3-70-g09d2