forgot to commit

This commit is contained in:
Jack Halford 2017-03-14 23:00:42 +01:00
parent c6a23fb2ac
commit 9cabd2fb2e
7 changed files with 15 additions and 11 deletions

View file

@ -3,9 +3,10 @@
/* ::: :::::::: */
/* builtin.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: jhalford <jhalford@student.42.fr> +#+ +:+ +#+ */
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2016/12/13 17:21:56 by jhalford #+# #+# */
/* Created: 2017/03/14 22:59:57 by jhalford #+# #+# */
/* Updated: 2017/03/14 22:59:57 by jhalford ### ########.fr */
/* */
/* ************************************************************************** */

View file

@ -6,7 +6,7 @@
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/03/07 15:48:24 by jhalford #+# #+# */
/* Updated: 2017/03/13 23:35:37 by jhalford ### ########.fr */
/* Updated: 2017/03/14 22:34:53 by jhalford ### ########.fr */
/* */
/* ************************************************************************** */

View file

@ -6,7 +6,7 @@
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/03/07 14:53:31 by jhalford #+# #+# */
/* Updated: 2017/03/14 21:48:36 by jhalford ### ########.fr */
/* Updated: 2017/03/14 22:34:06 by jhalford ### ########.fr */
/* */
/* ************************************************************************** */

View file

@ -6,7 +6,7 @@
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/03/13 22:21:19 by jhalford #+# #+# */
/* Updated: 2017/03/13 23:10:42 by jhalford ### ########.fr */
/* Updated: 2017/03/14 22:34:22 by jhalford ### ########.fr */
/* */
/* ************************************************************************** */

View file

@ -6,7 +6,7 @@
/* By: gwojda <gwojda@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2016/12/15 14:19:48 by gwojda #+# #+# */
/* Updated: 2017/03/14 21:34:46 by jhalford ### ########.fr */
/* Updated: 2017/03/14 22:19:43 by jhalford ### ########.fr */
/* */
/* ************************************************************************** */
@ -15,7 +15,10 @@
int readline(int fd, int prompt, char **input)
{
if (!SH_IS_INTERACTIVE(data_singleton()->opts))
{
DG("GNL on fd=%i", fd);
return (get_next_line(fd, input) == 0);
}
readline_init(prompt);
*input = ft_read_stdin();
if (STR)

View file

@ -6,7 +6,7 @@
/* By: jhalford <jhalford@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2016/12/06 18:40:58 by jhalford #+# #+# */
/* Updated: 2017/03/14 21:50:56 by jhalford ### ########.fr */
/* Updated: 2017/03/14 22:37:07 by jhalford ### ########.fr */
/* */
/* ************************************************************************** */

View file

@ -6,13 +6,13 @@
/* By: jhalford <jhalford@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2016/12/12 17:23:59 by jhalford #+# #+# */
/* Updated: 2017/03/14 21:50:11 by jhalford ### ########.fr */
/* Updated: 2017/03/14 22:21:28 by jhalford ### ########.fr */
/* */
/* ************************************************************************** */
#include "minishell.h"
static t_cliopts shell_opts[] =
static t_cliopts g_opts[] =
{
{'c', NULL, SH_OPTS_LC, SH_OPTS_JOBC | SH_INTERACTIVE, NULL},
{-1, "no-jobcontrol", 0, SH_OPTS_JOBC, NULL},
@ -61,7 +61,7 @@ int shell_init(int ac, char **av)
}
else
DG("non interactive");
if (cliopts_get(av, shell_opts, data))
if (cliopts_get(av, g_opts, data))
return (ft_perror());
if (SH_IS_INTERACTIVE(data->opts))
interactive_settings();