aboutsummaryrefslogtreecommitdiff
path: root/engines/glk/alan3/syserr.cpp
diff options
context:
space:
mode:
authordreammaster2019-06-27 04:02:48 +0100
committerPaul Gilbert2019-07-06 15:27:08 -0700
commitdc40211ec5e54d01f7cb822940714ed6e6da36d5 (patch)
treededda7f6ce1ab7f581941d9f002ad1926fa3e367 /engines/glk/alan3/syserr.cpp
parentaebf25661076eaa382b3025f0123f6ceb7cf920b (diff)
downloadscummvm-rg350-dc40211ec5e54d01f7cb822940714ed6e6da36d5.tar.gz
scummvm-rg350-dc40211ec5e54d01f7cb822940714ed6e6da36d5.tar.bz2
scummvm-rg350-dc40211ec5e54d01f7cb822940714ed6e6da36d5.zip
GLK: ALAN3: Proper indentation & formatting
Diffstat (limited to 'engines/glk/alan3/syserr.cpp')
-rw-r--r--engines/glk/alan3/syserr.cpp64
1 files changed, 30 insertions, 34 deletions
diff --git a/engines/glk/alan3/syserr.cpp b/engines/glk/alan3/syserr.cpp
index 9ebd397380..31aa981e7e 100644
--- a/engines/glk/alan3/syserr.cpp
+++ b/engines/glk/alan3/syserr.cpp
@@ -34,69 +34,65 @@ static void (*handler)(const char *);
/*----------------------------------------------------------------------*/
static void runtimeError(const char *errorClassification, const char *errorDescription, const char *blurb) {
- output("$n$nAs you enter the twilight zone of Adventures, you stumble \
+ output("$n$nAs you enter the twilight zone of Adventures, you stumble \
and fall to your knees. In front of you, you can vaguely see the outlines \
of an Adventure that never was.$n$n");
- output(errorClassification);
- output(errorDescription);
- newline();
+ output(errorClassification);
+ output(errorDescription);
+ newline();
- if (current.sourceLine != 0) {
- printf("At source line %d in '%s':\n", current.sourceLine, sourceFileName(current.sourceFile));
- printf("%s", readSourceLine(current.sourceFile, current.sourceLine));
- }
+ if (current.sourceLine != 0) {
+ printf("At source line %d in '%s':\n", current.sourceLine, sourceFileName(current.sourceFile));
+ printf("%s", readSourceLine(current.sourceFile, current.sourceLine));
+ }
- newline();
- output(blurb);
+ newline();
+ output(blurb);
- terminate(2);
+ terminate(2);
}
/*======================================================================*/
-void setSyserrHandler(void (*f)(const char *))
-{
- handler = f;
+void setSyserrHandler(void (*f)(const char *)) {
+ handler = f;
}
/*======================================================================*/
// TODO Make syserr() use ... as printf()
-void syserr(const char *description)
-{
- lin = 0;
- if (handler == NULL) {
+void syserr(const char *description) {
+ lin = 0;
+ if (handler == NULL) {
const char *blurb = "<If you are the creator of this piece of Interactive Fiction, \
please help debug this Alan system error. Collect *all* the sources, and, if possible, an \
exact transcript of the commands that led to this error, in a zip-file and send \
it to support@alanif.se. Thank you!>";
- runtimeError("SYSTEM ERROR: ", description, blurb);
- } else
- handler(description);
+ runtimeError("SYSTEM ERROR: ", description, blurb);
+ } else
+ handler(description);
}
/*======================================================================*/
-void apperr(const char *description)
-{
- if (handler == NULL) {
+void apperr(const char *description) {
+ if (handler == NULL) {
const char *blurb = "<If you are playing this piece of Interactive Fiction, \
please help the author to debug this programming error. Send an exact \
transcript of the commands that led to this error to the author. Thank you! \
If you *are* the author, then you have to figure this out before releasing the game.>";
- runtimeError("APPLICATION ERROR: ", description, blurb);
- } else
- handler(description);
+ runtimeError("APPLICATION ERROR: ", description, blurb);
+ } else
+ handler(description);
}
/*======================================================================*/
-void playererr(const char *description)
-{
- if (handler == NULL) {
- const char *blurb = "<You have probably done something that is not exactly right.>";
- runtimeError("PLAYER ERROR: ", description, blurb);
- } else
- handler(description);
+void playererr(const char *description) {
+ if (handler == NULL) {
+ const char *blurb = "<You have probably done something that is not exactly right.>";
+ runtimeError("PLAYER ERROR: ", description, blurb);
+ } else
+ handler(description);
}
} // End of namespace Alan3