Skip to content

Commit

Permalink
Updated mpc_input_new_string to reflect changes in mpc
Browse files Browse the repository at this point in the history
  • Loading branch information
Forty-Bot committed Jun 29, 2016
1 parent f87ce67 commit 570ba89
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions mpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,14 +142,19 @@ static mpc_input_t *mpc_input_new_nstring(const char *filename, const char *stri
i->buffer = NULL;
i->file = NULL;

i->suppress = 0;
i->backtrack = 1;
i->marks_num = 0;
i->marks = NULL;
i->lasts = NULL;

i->marks_slots = MPC_INPUT_MARKS_MIN;
i->marks = malloc(sizeof(mpc_state_t) * i->marks_slots);
i->lasts = malloc(sizeof(char) * i->marks_slots);
i->last = '\0';

i->mem_index = 0;
memset(i->mem_full, 0, sizeof(char) * MPC_INPUT_MEM_NUM);

return i;

}

static mpc_input_t *mpc_input_new_pipe(const char *filename, FILE *pipe) {
Expand Down

0 comments on commit 570ba89

Please sign in to comment.