diff options
author | Benjamin Otte <otte@gnome.org> | 2009-07-05 22:33:36 +0200 |
---|---|---|
committer | Benjamin Otte <otte@gnome.org> | 2009-07-05 22:33:36 +0200 |
commit | 62cb83c59ae65338818f1382ac1aadfc30b8d576 (patch) | |
tree | 7ae634d475ca83eb64d3739fda52afb911097b93 |
add initial stub for new history
-rw-r--r-- | .gitignore | 3 | ||||
-rw-r--r-- | Makefile | 22 | ||||
-rw-r--r-- | ephy-query-history.c | 58 |
3 files changed, 83 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ab513c8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +*.o + +ephy-query-history diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..6120b5c --- /dev/null +++ b/Makefile @@ -0,0 +1,22 @@ +APP = ephy-query-history +CC = gcc +CFLAGS = -g -Wall -Werror -DEPIPHANY_COMPILATION + +PKG = gtk+-2.0 gthread-2.0 +PKG_CFLAGS = `pkg-config --cflags $(PKG)` +PKG_LIBS = `pkg-config --libs $(PKG)` + +SRCS = ephy-query-history.c +OBJS = $(SRCS:.c=.o) + +all: $(APP) + +.c.o: + $(CC) $(CFLAGS) $(PKG_CFLAGS) -c $< -o $@ + +$(APP): $(OBJS) + $(CC) $(OBJS) $(PKG_LIBS) -o$(APP) + +clean: + rm *.o $(APP) + diff --git a/ephy-query-history.c b/ephy-query-history.c new file mode 100644 index 0000000..ab00443 --- /dev/null +++ b/ephy-query-history.c @@ -0,0 +1,58 @@ +/* + * Copyright © 2009 Benjamin Otte <otte@gnome.org> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include <glib.h> + +int +main (int argc, char *argv[]) +{ + + GOptionEntry options[] = { + { NULL } + }; + GOptionContext *ctx; + GError *error = NULL; + + g_thread_init (NULL); + + ctx = g_option_context_new (""); + g_option_context_add_main_entries (ctx, options, "options"); + g_option_context_parse (ctx, &argc, &argv, &error); + g_option_context_free (ctx); + + if (error) { + g_printerr ("Error parsing command line arguments: %s\n", error->message); + g_error_free (error); + return 1; + } + +#if 0 + if (argc < 2) { + g_printerr ("Usage: %s [OPTIONS] filename\n", argv[0]); + return 1; + } +#endif + + return 0; +} + |