Skip to content

Commit

Permalink
fixing the getline function and text error
Browse files Browse the repository at this point in the history
  • Loading branch information
getdaniel committed Jun 16, 2022
1 parent 56bba3b commit 29b1271
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
6 changes: 3 additions & 3 deletions 3-monty_funcs.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

void monty_stack(stack_t **stack, unsigned int line_number);
void monty_queue(stack_t **stack, unsigned int line_number);
void set_op_toks_error(int error_code);
void set_op_tok_error(int error_code);

/**
* monty_stack - Converts a queue to a stack.
Expand All @@ -29,11 +29,11 @@ void monty_queue(stack_t **stack, unsigned int line_number)
}

/**
* set_op_toks_error - Sets last element of set_op_toks to be an error code.
* set_op_tok_error - Sets last element of set_op_toks to be an error code.
*
* @error_code: Integer to store as a string in op_toks.
*/
void set_op_toks_error(int error_code)
void set_op_tok_error(int error_code)
{
int toks_len = 0, index = 0;
char *exit_str = NULL;
Expand Down
Binary file modified monty
Binary file not shown.
2 changes: 2 additions & 0 deletions monty_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
#include <sys/stat.h>
#include <fcntl.h>

char **op_toks = NULL;

/**
* main - The entry point for monty Interpretor.
*
Expand Down
1 change: 1 addition & 0 deletions run_monty.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#define _GNU_SOURCE
#include "monty.h"

void free_tokens(void);
Expand Down

0 comments on commit 29b1271

Please sign in to comment.