File: stack.h

package info (click to toggle)
bitwise 0.50-1
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 628 kB
  • sloc: sh: 4,449; ansic: 2,234; makefile: 31
file content (20 lines) | stat: -rw-r--r-- 588 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Copyright 2011 - 2014 Brian Marshall. All rights reserved.
//
// Use of this source code is governed by the BSD 2-Clause License that can be
// found in the LICENSE file.

#ifndef SHUNTING_YARD_STACK_H
#define SHUNTING_YARD_STACK_H

typedef struct Stack Stack;

// Inserts an item at the top of the stack.
void stack_push(Stack **stack, const void *value);

// Removes an item from the top of the stack.
const void *stack_pop(Stack **stack);

// Returns the item at the top of the stack without removing it.
const void *stack_top(const Stack *stack);

#endif  // SHUNTING_YARD_STACK_H