first commit

This commit is contained in:
Jack Halford 2017-04-02 21:41:57 +02:00
parent 0aef582882
commit 12b098f9d8
6 changed files with 32 additions and 4 deletions

View file

@ -57,6 +57,7 @@ dlst/ft_dlstnew.c\
dlst/ft_dlstrtostr.c\ dlst/ft_dlstrtostr.c\
dlst/ft_dlstsize.c\ dlst/ft_dlstsize.c\
error/error.c\ error/error.c\
error/ft_usage.c\
ft_printf/ft_conversion.c\ ft_printf/ft_conversion.c\
ft_printf/ft_fmt_simplify.c\ ft_printf/ft_fmt_simplify.c\
ft_printf/ft_fmt_validate_conv.c\ ft_printf/ft_fmt_validate_conv.c\

View file

@ -6,7 +6,7 @@
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */ /* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2017/03/14 15:34:21 by jhalford #+# #+# */ /* Created: 2017/03/14 15:34:21 by jhalford #+# #+# */
/* Updated: 2017/03/25 01:53:21 by jhalford ### ########.fr */ /* Updated: 2017/04/02 20:45:00 by jhalford ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -46,5 +46,6 @@ extern char **g_argv;
int error_set(int n, ...); int error_set(int n, ...);
int ft_perror(char *utility); int ft_perror(char *utility);
void ft_usage(char *format, ...);
#endif #endif

View file

@ -6,7 +6,7 @@
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */ /* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2017/03/14 20:04:04 by jhalford #+# #+# */ /* Created: 2017/03/14 20:04:04 by jhalford #+# #+# */
/* Updated: 2017/03/25 15:00:35 by jhalford ### ########.fr */ /* Updated: 2017/04/02 20:45:11 by jhalford ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */

View file

@ -0,0 +1,26 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_usage.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/04/02 15:08:56 by jhalford #+# #+# */
/* Updated: 2017/04/02 20:05:28 by jhalford ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void ft_usage(char *format, ...)
{
va_list ap;
char *usage;
va_start(ap, format);
usage = NULL;
ft_vasprintf(&usage, format, ap);
ft_dprintf(2, "usage: %s\n", usage);
ft_strdel(&usage);
exit(-1);
}

View file

@ -6,7 +6,7 @@
/* By: jhalford <marvin@42.fr> +#+ +:+ +#+ */ /* By: jhalford <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2016/11/07 13:33:27 by jhalford #+# #+# */ /* Created: 2016/11/07 13:33:27 by jhalford #+# #+# */
/* Updated: 2017/03/21 15:28:56 by jhalford ### ########.fr */ /* Updated: 2017/04/02 15:22:13 by jhalford ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */

View file

@ -6,7 +6,7 @@
/* By: jhalford <jhalford@student.42.fr> +#+ +:+ +#+ */ /* By: jhalford <jhalford@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2017/03/20 15:52:57 by jhalford #+# #+# */ /* Created: 2017/03/20 15:52:57 by jhalford #+# #+# */
/* Updated: 2017/03/22 17:22:30 by gwojda ### ########.fr */ /* Updated: 2017/04/02 15:22:20 by jhalford ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */