first commit
This commit is contained in:
parent
1bb30cd814
commit
5c06038b5f
6 changed files with 32 additions and 4 deletions
|
|
@ -57,6 +57,7 @@ dlst/ft_dlstnew.c\
|
|||
dlst/ft_dlstrtostr.c\
|
||||
dlst/ft_dlstsize.c\
|
||||
error/error.c\
|
||||
error/ft_usage.c\
|
||||
ft_printf/ft_conversion.c\
|
||||
ft_printf/ft_fmt_simplify.c\
|
||||
ft_printf/ft_fmt_validate_conv.c\
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* 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 ft_perror(char *utility);
|
||||
void ft_usage(char *format, ...);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
|
|||
26
libftasm/srcs/error/ft_usage.c
Normal file
26
libftasm/srcs/error/ft_usage.c
Normal 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);
|
||||
}
|
||||
|
|
@ -6,7 +6,7 @@
|
|||
/* By: jhalford <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
/* By: jhalford <jhalford@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* 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 */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue