summaryrefslogtreecommitdiff
path: root/lib/queue.h
blob: c7acec1b3e24a71d1c2fd69814b692edd2cfb0a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

#pragma once

#include <inttypes.h>
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>

typedef struct ll_tag {
  uint32_t x;
  struct ll_tag *next;
} ll_t;

void stack_push(ll_t **q, uint32_t x);

uint32_t stack_pop(ll_t **q);

bool stack_contains(const ll_t *q, uint32_t x);