/usr/share/nickle/abort.5c is in nickle 2.77-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | /* $Header$ */
/*
* Copyright © 2004 Keith Packard and Bart Massey.
* All Rights Reserved. See the file COPYING in this directory
* for licensing information.
*/
namespace Abort {
public int trace_depth = 20;
public exception aborting(string);
public void abort(string reason, args ...)
/* Print a stack trace and raise aborting exception with message */
{
Debug::trace(Thread::current(), trace_depth);
string reasonmsg = File::sprintf(reason, args ...);
raise aborting(reasonmsg);
}
public void assert(bool ok, string failure, args ...)
/* If 'ok' is false, abort (failure, args ...); */
{
if (!ok)
abort(failure, args ...);
}
public bool do_debug = true;
public void debug(string fmt, args ...)
/* Print to stderr, controlled by 'do_debug' global */
{
if (do_debug)
File::fprintf(stderr, fmt + "\n", args ...);
}
}
|