OSDN Git Service

display clean up
authorastoria-d <astoria-d@mail.goo.ne.jp>
Fri, 8 Mar 2013 04:34:41 +0000 (13:34 +0900)
committerastoria-d <astoria-d@mail.goo.ne.jp>
Fri, 8 Mar 2013 04:34:41 +0000 (13:34 +0900)
display/Makefile
display/window.c
include/vga.h [moved from display/vga.h with 100% similarity]
libs/Makefile
libs/vgashm.c [moved from display/vgashm.c with 100% similarity]

index 1513685..7c0ea70 100644 (file)
@@ -3,9 +3,9 @@ BIN=vgadisp
 
 DRIVER=dummy-driver
 
-OBJS=display.o window.o vgashm.o
+OBJS=display.o window.o
         
-DRIVER_OBJS=vgashm.o dummy-driver.o
+DRIVER_OBJS=dummy-driver.o
 
 
 LIBS=-L../libs -lmotones -pthread
@@ -22,7 +22,7 @@ $(BIN): $(OBJS) ../libs
        gcc -o $(BIN) $(OBJS) $(LFLAGS)
 
 $(DRIVER): $(DRIVER_OBJS)
-       gcc -o $(DRIVER) $(DRIVER_OBJS)
+       gcc -o $(DRIVER) $(DRIVER_OBJS) $(LIBS)
 
 .c.o: 
        gcc $(CFLAGS) -c $<
index 584969e..f4f9c76 100644 (file)
@@ -12,7 +12,7 @@ static GdkPixmap *pixmap = NULL;
 static GdkGC *gc = NULL;
 static int first_draw;
 
-GdkGC *set_color(gushort r, gushort g, gushort b)
+static GdkGC *set_color(gushort r, gushort g, gushort b)
 {
     GdkColor color;
 
@@ -24,7 +24,7 @@ GdkGC *set_color(gushort r, gushort g, gushort b)
     return gc;
 }
 
-gint repaint(gpointer data){
+static gint repaint(gpointer data){
     GtkWidget *drawing_area = GTK_WIDGET (data);
 
     int x, y;
@@ -58,7 +58,7 @@ gint repaint(gpointer data){
     return TRUE;
 }
 
-void configure_event(GtkWidget *widget, GdkEventConfigure *event, gpointer data){
+static void configure_event(GtkWidget *widget, GdkEventConfigure *event, gpointer data){
     if (pixmap)
         gdk_pixmap_unref(pixmap);
 
@@ -68,7 +68,7 @@ void configure_event(GtkWidget *widget, GdkEventConfigure *event, gpointer data)
             -1);
 }
 
-void expose_event(GtkWidget *widget, GdkEventExpose *event, gpointer data){
+static void expose_event(GtkWidget *widget, GdkEventExpose *event, gpointer data){
     //copy pixmap to the window
     gdk_draw_pixmap(widget->window,
             widget->style->fg_gc[GTK_WIDGET_STATE (widget)],
similarity index 100%
rename from display/vga.h
rename to include/vga.h
index a166f85..2053eb9 100644 (file)
@@ -1,7 +1,7 @@
 
 BIN=libmotones.a
 
-OBJS=tools.o
+OBJS=tools.o vgashm.o
 
 INCLUDE=-I../include
 
similarity index 100%
rename from display/vgashm.c
rename to libs/vgashm.c