mylsh

my own shell, based on brenns10's
git clone https://github.com/jennydoe/mylsh.git
Log | Files | Refs | Feed | README

commit 9b79ea1e04f86726b3db46fe11f774ade224a864
parent 199843bfa7b7654cd95de863a6baa448432f8901
Author: Jenny Doe <tng@soykaf.me>
Date:   Tue, 19 Mar 2019 20:01:10 +0100

fixed: missing newlines

Diffstat:
Mlsh.c | 10+++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/lsh.c b/lsh.c @@ -86,7 +86,7 @@ lsh_execute(wchar_t * *words) * i clearly don't know what size it should be, any * hint would be appreciated: mailto tng@soykaf.me */ - size_t l = 2 + 2 * sizeof(char) * wcslen(words[1]); + size_t l = 1 + sizeof(char) * wcslen(words[1]); char **v = &words[1]; char *t = malloc(l); if (t == NULL) { @@ -153,7 +153,7 @@ lsh_read_line(void) wchar_t *line = malloc(sizeof(wchar_t) * 1); if (line == NULL) { - fprintf(stderr, "out of memory"); + fprintf(stderr, "out of memory\n"); exit(1); } @@ -168,7 +168,7 @@ lsh_read_line(void) bufsize += 1; line = realloc(line, sizeof(wchar_t) * bufsize); if (line == NULL) { - fprintf(stderr, "out of memory"); + fprintf(stderr, "out of memory\n"); exit(1); } @@ -188,7 +188,7 @@ lsh_split_line(wchar_t * line) { wchar_t **words = malloc(sizeof(wchar_t *) * 10); if (words == NULL) { - fprintf(stderr, "out of memory"); + fprintf(stderr, "out of memory\n"); exit(1); } @@ -209,7 +209,7 @@ lsh_split_line(wchar_t * line) words = realloc(words, sizeof(wchar_t *) * bufsize); if (words == NULL) { - fprintf(stderr, "out of memory"); + fprintf(stderr, "out of memory\n"); exit(1); }