Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=grape.git;a=commitdiff;h=8f4798ed66834dfaa9133ce6e5accb81aab527a3

commit 8f4798ed66834dfaa9133ce6e5accb81aab527a3
Author: James Buren <r...@frugalware.org>
Date:   Wed Apr 7 10:26:16 2010 -0500

Makefile/exports.h/grape.c/exports.h
* remove io.c/exports.h, turn into single file source

diff --git a/src/Makefile b/src/Makefile
new file mode 100644
index 0000000..f94e8a4
--- /dev/null
+++ b/src/Makefile
@@ -0,0 +1,10 @@
+CFLAGS ?= -Os
+
+CFLAGS += -Wall -Wextra
+
+CFLAGS += -g
+
+CFLAGS += $(strip $(shell pkg-config --cflags --libs gtk+-2.0))
+
+grape: grape.c
+       $(CC) $(CFLAGS) $< -o $@
diff --git a/src/exports.h b/src/exports.h
deleted file mode 100644
index e507fab..0000000
--- a/src/exports.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright (c) 2010 James Buren
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to 
deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 
FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-
-#ifndef _exports_header_
-#define _exports_header_
-#include <gtk/gtk.h>
-
-gchar *prompt_for_filename(GtkWidget *parent,gboolean open);
-gchar *get_absolute_path(const gchar *filename);
-#endif
diff --git a/src/io.c b/src/grape.c
similarity index 93%
rename from src/io.c
rename to src/grape.c
index 74f8545..4f463a0 100644
--- a/src/io.c
+++ b/src/grape.c
@@ -20,7 +20,7 @@
* THE SOFTWARE.
*/

-#include "exports.h"
+#include <gtk/gtk.h>

/* Display a dialog for the user to select a file for
opening or saving. Returns NULL if user cancels. The
@@ -55,6 +55,8 @@ gchar *prompt_for_filename(GtkWidget *parent,gboolean open) {
gchar *get_absolute_path(const gchar *filename) {
gchar *dir, *path;

+  g_assert(filename != NULL);
+
if(g_path_is_absolute(filename))
return g_strdup(filename);

@@ -66,3 +68,11 @@ gchar *get_absolute_path(const gchar *filename) {

return path;
}
+
+/* Lets get this show on the road */
+gint main(gint argc,gchar **argv) {
+
+  gtk_init(&argc,&argv);
+
+  return 0;
+}
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to