aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gif.c9
-rw-r--r--src/gif.h5
-rw-r--r--src/jpeg.c1
-rw-r--r--src/main.c5
4 files changed, 16 insertions, 4 deletions
diff --git a/src/gif.c b/src/gif.c
new file mode 100644
index 0000000..0c1ebb3
--- /dev/null
+++ b/src/gif.c
@@ -0,0 +1,9 @@
+
+#include <stdio.h>
+
+#include "gif.h"
+
+unsigned char *loadgif(FILE *infile, int *bufwidth, int *bufheight){
+ return NULL;
+}
+
diff --git a/src/gif.h b/src/gif.h
new file mode 100644
index 0000000..17a86dc
--- /dev/null
+++ b/src/gif.h
@@ -0,0 +1,5 @@
+
+#include <stdio.h>
+
+unsigned char *loadgif(FILE *, int *, int *);
+
diff --git a/src/jpeg.c b/src/jpeg.c
index f0ea699..bf90f2d 100644
--- a/src/jpeg.c
+++ b/src/jpeg.c
@@ -66,7 +66,6 @@ unsigned char *loadjpeg(FILE *infile, int *width, int *height){
}
jpeg_finish_decompress(&cinfo);
jpeg_destroy_decompress(&cinfo);
- fclose(infile);
return retbuf;
}
diff --git a/src/main.c b/src/main.c
index 75f106f..e9c0517 100644
--- a/src/main.c
+++ b/src/main.c
@@ -10,7 +10,7 @@
#include <sys/time.h>
#include "jpeg.h"
-#include "util.h"
+#include "gif.h"
Display *display;
int screen;
@@ -130,8 +130,7 @@ unsigned char *loadbuf(const char *filename, int *bufwidth, int *bufheight){
printf("IT'S A PNG!!!\n");
buf = NULL;
}else if(!memcmp("GIF", head, 3)){
- printf("IT'S A GIF!!!\n");
- buf = NULL;
+ buf = loadgif(f, bufwidth, bufheight);
}else{
fprintf(stderr, "Unknown file type: '%s'\n", filename);
buf = NULL;