stack.c
1.65 KB
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
37
38
39
40
41
42
43
44
45
46
47
/**
* \file stack.c
* \author Georg Steffers <georg@steffers.org>
* \brief Internal implementations for stack handling.
*
* This implements the internals for the typesafe stack based on
* typesafe linked lists defines in list.h.
* The only thing one has to remember when one only wants to
* use stacks within the own code is to link the code agains
* an object of this and list.c. This is normally done by linking agains
* libscot with an -lscot or similar compiler switch.
*
* Copyright (C)2006 Georg Steffers <georg@steffers.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <stdio.h>
#include <stdlib.h>
#include <scot/stack.h>
#include <scot_common.h>
/**
* \internal
* \brief Error messages given.
*
* This holds all error messages that go either to the exception system
* or will be printed on stderr if an error occurs within a stack function.
* \attention This is not used actually.
*/
const char *stack_err_msg[] =
{
N_("No more elements left in stack."),
NULL
};