Merge branch 'master' of https://github.com/jzck/libft
This commit is contained in:
commit
d90d8c1b96
7 changed files with 34 additions and 6 deletions
|
|
@ -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\
|
||||||
|
|
|
||||||
|
|
@ -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 */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
@ -52,5 +52,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
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: jhalford <marvin@42.fr> +#+ +:+ +#+ */
|
/* By: jhalford <marvin@42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2016/11/07 13:49:04 by jhalford #+# #+# */
|
/* Created: 2016/11/07 13:49:04 by jhalford #+# #+# */
|
||||||
/* Updated: 2017/03/25 01:56:46 by jhalford ### ########.fr */
|
/* Updated: 2017/04/03 16:51:25 by jhalford ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
@ -44,7 +44,7 @@ struct s_stos
|
||||||
|
|
||||||
struct s_stof
|
struct s_stof
|
||||||
{
|
{
|
||||||
char *name;
|
char *key;
|
||||||
int (*f)();
|
int (*f)();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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 */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
|
||||||
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> +#+ +:+ +#+ */
|
/* 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 */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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 */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue