From 45ae0644d98c15489f99bab44a936d615dad5be2 Mon Sep 17 00:00:00 2001 From: hackbard Date: Thu, 4 Nov 2004 16:43:50 +0000 Subject: [PATCH] last fixes --- display/display.c | 7 ++++--- display/display.h | 1 + input/input.h | 2 ++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/display/display.c b/display/display.c index bb9d707..b7612d6 100644 --- a/display/display.c +++ b/display/display.c @@ -124,9 +124,10 @@ int display_line(t_display *display,int X,int Y,int X_,int Y_,char sym) { m=(Y_-Y)/(X_-X); - for(y=0;ymax_y;y++) - for(x=0;xmax_x;x++) - if((int)((x-X)*m+Y)==y) *(display->screen+y*display->max_x+x)=sym; + for(x=X;x<=X_;x++) { + y=(x-X)*m+Y; + *(display->screen+y*display->max_x+x)=sym; + } return D_SUCCESS; } diff --git a/display/display.h b/display/display.h index dfc8195..d8bd546 100644 --- a/display/display.h +++ b/display/display.h @@ -1,6 +1,7 @@ /* display.h -- display headers */ /* includes */ +#define _GNU_SOURCE #include #include #include diff --git a/input/input.h b/input/input.h index d7ceb4a..c464354 100644 --- a/input/input.h +++ b/input/input.h @@ -4,6 +4,7 @@ #define INPUT_H /* includes */ +#define _GNU_SOURCE #include #include #include @@ -26,6 +27,7 @@ /* input specific variables */ typedef struct s_input { + int outfd; char *content; int c_count; unsigned char mode; -- 2.39.2