Skip to content

Commit

Permalink
chore: clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
horpeazy committed Oct 7, 2022
1 parent 4373b14 commit 33f48b2
Show file tree
Hide file tree
Showing 17 changed files with 18 additions and 60 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
monty
6 changes: 1 addition & 5 deletions bytecodes/00.m
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
push 1
push 2
nop
push 3
push 8
pall
push 98
push -12
pallat
2 changes: 0 additions & 2 deletions bytecodes/04.m → bytecodes/000.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,3 @@
push 5
push 6
pall
push 99
pint
3 changes: 2 additions & 1 deletion bytecodes/03.m → bytecodes/001.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
push 0 Push 0 onto the stack
push 1 Push 1 onto the stack

push 2
push 3
Expand All @@ -9,4 +11,3 @@

push 5
push 6
pall
File renamed without changes.
2 changes: 2 additions & 0 deletions bytecodes/09.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
push 1
push 2
push 3
pall
swap
pall
6 changes: 3 additions & 3 deletions bytecodes/19.m → bytecodes/11.m
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
push 1
push 20
push 2
push 10
push 3
sub
pall
swap
pall
3 changes: 3 additions & 0 deletions bytecodes/111.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
nop
push 3
pall
3 changes: 3 additions & 0 deletions bytecodes/2.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
push -2147483648
push 2147483647
pall
6 changes: 1 addition & 5 deletions bytecodes/20.m
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
push 0
push 10
push 2
mul
pall
test
3 changes: 0 additions & 3 deletions bytecodes/21.m

This file was deleted.

14 changes: 0 additions & 14 deletions bytecodes/31.m

This file was deleted.

16 changes: 0 additions & 16 deletions bytecodes/47.m

This file was deleted.

5 changes: 0 additions & 5 deletions bytecodes/35.m → bytecodes/rotr.m
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@
push 3
push 4
push 5
push 6
push 7
push 8
push 9
push 0
pall
rotr
pall
4 changes: 0 additions & 4 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,12 @@ void run_code(char *buf)
line = 1;
delim = "\n\t\v\r\a ;:";
token = strtok(buf, delim);

while (token)
{
if (is_push)
{
push(&stack, line, token);
line++;
is_push = 0;
token = strtok(NULL, delim);
continue;
}
else if (strcmp(token, "push") == 0)
{
Expand Down
Binary file modified monty
Binary file not shown.
4 changes: 2 additions & 2 deletions more_operations.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ void _add(stack_t **stack, unsigned int line_number)
* @stack: stack
* @line_number: line number
*/
void nop(stack_t **stack __attribute__((unused)), unsigned int line_number __attribute__((unused)))
void nop(stack_t **stack __attribute__((unused)), unsigned int line_number)
{
return;
(void)line_number;
}

/**
Expand Down

0 comments on commit 33f48b2

Please sign in to comment.