Normed stuff
This commit is contained in:
parent
8146ed2176
commit
f925aea552
9 changed files with 23 additions and 25 deletions
|
|
@ -27,7 +27,8 @@ t_fd *dup_fd(t_fd *fd)
|
||||||
return (NULL);
|
return (NULL);
|
||||||
tmp = dup(fd->fd);
|
tmp = dup(fd->fd);
|
||||||
if (tmp == -1)
|
if (tmp == -1)
|
||||||
return (printf("There was an error while duping the fd %d `%s`\n", fd->fd, fd->name), NULL);
|
return (printf("There was an error while duping the "\
|
||||||
|
"fd %d `%s`\n", fd->fd, fd->name), NULL);
|
||||||
slot->ty = SLOT_FD;
|
slot->ty = SLOT_FD;
|
||||||
slot->slot.fd.fd = tmp;
|
slot->slot.fd.fd = tmp;
|
||||||
slot->slot.fd.perms = fd->perms;
|
slot->slot.fd.perms = fd->perms;
|
||||||
|
|
|
||||||
|
|
@ -21,10 +21,6 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
||||||
#ifdef static
|
|
||||||
# undef static
|
|
||||||
#endif
|
|
||||||
|
|
||||||
t_fd_array *get_fd_arrays(void)
|
t_fd_array *get_fd_arrays(void)
|
||||||
{
|
{
|
||||||
static t_fd_array val = {};
|
static t_fd_array val = {};
|
||||||
|
|
|
||||||
|
|
@ -21,10 +21,6 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
||||||
#ifdef static
|
|
||||||
# undef static
|
|
||||||
#endif
|
|
||||||
|
|
||||||
t_fd *get_stdin(void)
|
t_fd *get_stdin(void)
|
||||||
{
|
{
|
||||||
t_fd *out;
|
t_fd *out;
|
||||||
|
|
|
||||||
|
|
@ -20,10 +20,6 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#ifdef static
|
|
||||||
#undef static
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static t_static_buffer *get_next_line_buffer(int fd)
|
static t_static_buffer *get_next_line_buffer(int fd)
|
||||||
{
|
{
|
||||||
t_usize index;
|
t_usize index;
|
||||||
|
|
|
||||||
|
|
@ -17,10 +17,6 @@
|
||||||
#include "me/types.h"
|
#include "me/types.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#ifdef static
|
|
||||||
# undef static
|
|
||||||
#endif
|
|
||||||
|
|
||||||
t_allocator *global_allocator(void)
|
t_allocator *global_allocator(void)
|
||||||
{
|
{
|
||||||
static t_allocator global_alloc = {};
|
static t_allocator global_alloc = {};
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,18 @@
|
||||||
# define BASE_PATH "/no_base_path_defined/"
|
# define BASE_PATH "/no_base_path_defined/"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(PRINT_BACKTRACE) || defined(BACKTRACE_DEEP)
|
#ifdef PRINT_BACKTRACE
|
||||||
// #if true // TO_REMOVE
|
# ifndef _PRINT_BACKTRACE
|
||||||
|
# define _PRINT_BACKTRACE
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
#ifdef BACKTRACE_DEEP
|
||||||
|
# ifndef _PRINT_BACKTRACE
|
||||||
|
# define _PRINT_BACKTRACE
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef _PRINT_BACKTRACE
|
||||||
# ifndef BACKTRACE_DEEP
|
# ifndef BACKTRACE_DEEP
|
||||||
# define BACKTRACE_DEEP 256
|
# define BACKTRACE_DEEP 256
|
||||||
# endif
|
# endif
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,14 @@
|
||||||
|
|
||||||
# define _GNU_SOURCE
|
# define _GNU_SOURCE
|
||||||
|
|
||||||
# if defined(PRINT_BACKTRACE) || defined(BACKTRACE_DEEP)
|
# ifdef PRINT_BACKTRACE
|
||||||
|
# include <dlfcn.h>
|
||||||
|
# include <execinfo.h>
|
||||||
|
# include <link.h>
|
||||||
|
# include <stdio.h>
|
||||||
|
# include <stdlib.h>
|
||||||
|
# endif
|
||||||
|
# ifdef BACKTRACE_DEEP
|
||||||
# include <dlfcn.h>
|
# include <dlfcn.h>
|
||||||
# include <execinfo.h>
|
# include <execinfo.h>
|
||||||
# include <link.h>
|
# include <link.h>
|
||||||
|
|
|
||||||
|
|
@ -17,10 +17,6 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#ifdef static
|
|
||||||
# undef static
|
|
||||||
#endif
|
|
||||||
|
|
||||||
t_matcher_list *get_matchers(void)
|
t_matcher_list *get_matchers(void)
|
||||||
{
|
{
|
||||||
static t_matcher_list printf_matchers = (t_matcher_list){
|
static t_matcher_list printf_matchers = (t_matcher_list){
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue