-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path15_opcodes.c
37 lines (34 loc) · 861 Bytes
/
15_opcodes.c
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
#include "monty.h"
/* global variable <essential> make available in this file */
trackg_t essential;
/**
* stack_opcode - sets the format of the data to a stack (LIFO).
* This is the default behavior of the program
*
* @stack: pointer to the pointer to the top most element/node
* of the stack
* @line_number: line number of the executing opcode
*
* Return: nothing
*/
void stack_opcode(stack_t **stack, unsigned int line_number)
{
(void)stack;
(void)line_number;
essential.mode = true;
}
/**
* queue_opcode - sets the format of the data to a queue (FIFO)
*
* @stack: pointer to the pointer to the top most element/node
* of the stack
* @line_number: line number of the executing opcode
*
* Return: nothing
*/
void queue_opcode(stack_t **stack, unsigned int line_number)
{
(void)stack;
(void)line_number;
essential.mode = false;
}