OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [uclinux/] [uC-libc/] [error/] [__assert.c] - Blame information for rev 1778

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 199 simons
/* Copyright (C) 1996 Robert de Bath <rdebath@cix.compulink.co.uk>
2
 * This file is part of the Linux-8086 C library and is distributed
3
 * under the GNU Library General Public License.
4
 */
5
 
6
#include <unistd.h>
7
 
8
static void errput(str)
9
const char * str;
10
{
11
   write(2, str, strlen(str));
12
}
13
 
14
void
15
__assert(assertion, filename, linenumber)
16
const char * assertion;
17
const char * filename;
18
int linenumber;
19
{
20
   errput("Failed assertion '");
21
   errput(assertion);
22
   errput("' in file ");
23
   errput(filename);
24
   errput(" at line ");
25
   errput(itoa(linenumber));
26
   errput(".\n");
27
   abort();
28
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.