login

<     >

2015-07-21 00:13:56 (UTC-03:00)

Marcel Rodrigues <marcelgmr@gmail.com>

Remove unused code and unnecessary comments.

diff --git a/gif.c b/gif.c
index 1cb52a9..c974d4b 100644
--- a/gif.c
+++ b/gif.c
@@ -1,19 +1,6 @@
-/*
-gcc -Wall -Wextra -std=c99 -O0 -g -fsanitize=address -fno-omit-frame-pointer -c gif.c
-gcc -Wall -Wextra -std=c99 -O2 -c gif.c
-gcc -shared -o libgif.so gif.o
-*/
-
 /* NOTES
    - The encoder dumps uint16_t numbers as is into GIF files, which means it
      only works on little-endian machines, since this is what GIF requires.
-   - The encoder is very limited:
-     * the global palette size is fixed in 16 colors;
-     * there's no way to add local palettes;
-     * the only GIF89a extension implemented is GCE (to set delay times).
-   - The compressor only sends the clear code once per image, as the first
-     code (no adaptive compression technique is employed). This is suboptimal
-     for large and complex images.
 */
 
 #include <stdio.h>

diff --git a/main.c b/main.c
index fed8703..dc4002d 100644
--- a/main.c
+++ b/main.c
@@ -10,7 +10,6 @@
 #include <fcntl.h>
 
 #include "term.h"
-//#include "dump.h"
 #include "mbf.h"
 #include "gif.h"
 

diff --git a/mbf.c b/mbf.c
index b9fa782..56d0687 100644
--- a/mbf.c
+++ b/mbf.c
@@ -64,41 +64,3 @@ search_glyph(Font *font, uint16_t code)
     }
     return -1;
 }
-
-void
-print_glyph(Font *font, uint16_t code)
-{
-    int index, pixel, i, j;
-    uint8_t *row;
-
-    index = search_glyph(font, code);
-    if (index == -1)
-        return;
-    row = &font->data[font->stride * font->header.h * index];
-    for (i = 0; i < font->header.h; i++) {
-        for (j = 0; j < font->header.w; j++) {
-            pixel = row[j >> 3] & (1 << (7 - (j & 7)));
-            putchar(pixel ? 'X' : ' ');
-        }
-        putchar('\n');
-        row += font->stride;
-    }
-}
-
-#if 0
-int
-main(int argc, char *argv[])
-{
-    Font *font;
-
-    if (argc != 2)
-        return 1;
-    font = load_font(argv[1]);
-    if (!font)
-        return 1;
-    //printf("%d\n", search_glyph(font, 200));
-    print_glyph(font, 0xFFFD);
-    free(font);
-    return 0;
-}
-#endif

diff --git a/term.c b/term.c
index 9efe062..0256c89 100644
--- a/term.c
+++ b/term.c
@@ -8,7 +8,6 @@
 #include "cs_vtg.h"
 #include "cs_437.h"
 
-#define MIN(A, B)   ((A) < (B) ? (A) : (B))
 #define MAX(A, B)   ((A) > (B) ? (A) : (B))
 
 void