merged things

This commit is contained in:
Jack Halford 2017-03-03 18:05:17 +01:00
commit 783cd963e4
3 changed files with 9 additions and 5 deletions

View file

@ -6,7 +6,7 @@
# By: wescande <wescande@student.42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2016/08/29 21:32:58 by wescande #+# #+# #
# Updated: 2017/03/03 17:56:12 by jhalford ### ########.fr #
# Updated: 2017/03/03 18:03:59 by jhalford ### ########.fr #
# #
# **************************************************************************** #

View file

@ -6,7 +6,7 @@
/* By: jhalford <jhalford@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2016/12/06 18:40:58 by jhalford #+# #+# */
/* Updated: 2017/03/03 17:55:01 by jhalford ### ########.fr */
/* Updated: 2017/03/03 18:03:53 by jhalford ### ########.fr */
/* */
/* ************************************************************************** */
@ -108,7 +108,11 @@ int main(int ac, char **av)
shell_init(ac, av);
DG("{inv}{bol}{gre}start of shell{eoc} JOBC is %s",
SH_HAS_JOBC(data_singleton()->opts)?"ON":"OFF");
fd = get_input_fd();
if ((fd = get_input_fd() < 0))
{
ft_printf("{red}%s: No such file or directory\n{eoc}", SHELL_NAME);
return (1);
}
while (handle_instruction(fd) == 0)
{
// lexer_clean;

View file

@ -6,7 +6,7 @@
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/01/11 17:14:52 by jhalford #+# #+# */
/* Updated: 2017/01/19 20:56:05 by ariard ### ########.fr */
/* Updated: 2017/03/03 17:33:33 by wescande ### ########.fr */
/* */
/* ************************************************************************** */
@ -21,7 +21,7 @@ char *shell_get_avdata()
data = data_singleton();
av = data->argv;
i = 1;
while (av[i][0] == '-')
while (av[i] && av[i][0] == '-')
{
if (ft_strcmp(av[i], "--") == 0)
{