From cfb5e8569974df69b050c74088a9b1403b281e9a Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Tue, 19 Oct 2010 13:34:06 +0200 Subject: [PATCH] moving src/common to src/ --- Makefile | 10 +++++----- src/client/mysql.c | 6 +++--- src/{common => }/debug.h | 2 +- src/{common => }/die.c | 2 +- src/event.c | 1 - src/fscrawl.c | 6 +++--- src/inotify.c | 8 ++++---- src/{common => }/path.c | 2 +- src/{common => }/path.h | 2 +- src/{common => }/rbtree.c | 2 +- src/{common => }/rbtree.h | 2 +- src/{common => }/strbuf.c | 2 +- src/{common => }/strbuf.h | 2 +- src/{common => }/util.h | 2 +- src/{common => }/xalloc.c | 2 +- src/{common => }/xalloc.h | 2 +- test/Makefile | 38 +++++++++++++++++++------------------- test/t_path.c | 2 +- test/t_rbtree.c | 4 ++-- test/t_strbuf.c | 2 +- 20 files changed, 49 insertions(+), 50 deletions(-) rename src/{common => }/debug.h (94%) rename src/{common => }/die.c (90%) rename src/{common => }/path.c (98%) rename src/{common => }/path.h (93%) rename src/{common => }/rbtree.c (99%) rename src/{common => }/rbtree.h (98%) rename src/{common => }/strbuf.c (99%) rename src/{common => }/strbuf.h (98%) rename src/{common => }/util.h (96%) rename src/{common => }/xalloc.c (98%) rename src/{common => }/xalloc.h (92%) diff --git a/Makefile b/Makefile index 3d24345..79223cc 100644 --- a/Makefile +++ b/Makefile @@ -38,11 +38,11 @@ else obj += src/client/mysql.o endif -obj += src/common/rbtree.o -obj += src/common/path.o -obj += src/common/strbuf.o -obj += src/common/xalloc.o -obj += src/common/die.o +obj += src/rbtree.o +obj += src/path.o +obj += src/strbuf.o +obj += src/xalloc.o +obj += src/die.o obj += src/inotify.o obj += src/event.o diff --git a/src/client/mysql.c b/src/client/mysql.c index 11f8f74..5b9985e 100644 --- a/src/client/mysql.c +++ b/src/client/mysql.c @@ -18,10 +18,10 @@ #include "../notify.h" #include "../event.h" -#include "../common/xalloc.h" +#include "../xalloc.h" #include "../ini/iniparser.h" -#include "../common/util.h" -#include "../common/debug.h" +#include "../util.h" +#include "../debug.h" typedef struct { char *host; diff --git a/src/common/debug.h b/src/debug.h similarity index 94% rename from src/common/debug.h rename to src/debug.h index a75e097..42442f5 100644 --- a/src/common/debug.h +++ b/src/debug.h @@ -1,4 +1,4 @@ -/* common/debug.h - debugging macros and definitions +/* debug.h - debugging macros and definitions * * Copyright (C) 2010 Henrik Hautakoski * diff --git a/src/common/die.c b/src/die.c similarity index 90% rename from src/common/die.c rename to src/die.c index ef2dcc4..6748073 100644 --- a/src/common/die.c +++ b/src/die.c @@ -1,4 +1,4 @@ -/* common/die.c - functionality for killing things in creative ways. +/* die.c - functionality for killing things in creative ways. * * Copyright (C) 2010 Henrik Hautakoski * diff --git a/src/event.c b/src/event.c index d15523f..cf24a2a 100644 --- a/src/event.c +++ b/src/event.c @@ -13,7 +13,6 @@ #include #include "event.h" -#include "common/path.h" #define dealloc_data(ev) \ if (ev->path) \ diff --git a/src/fscrawl.c b/src/fscrawl.c index ee2e1ef..7e0b1e6 100644 --- a/src/fscrawl.c +++ b/src/fscrawl.c @@ -13,9 +13,9 @@ #include #include -#include "common/strbuf.h" -#include "common/path.h" -#include "common/debug.h" +#include "strbuf.h" +#include "path.h" +#include "debug.h" #include "fscrawl.h" #define MAX_DEPTH 0x20 diff --git a/src/inotify.c b/src/inotify.c index a1711b1..ec9ca8e 100644 --- a/src/inotify.c +++ b/src/inotify.c @@ -16,11 +16,11 @@ #include #include -#include "common/util.h" +#include "util.h" /* red black tree for watch descriptors */ -#include "common/rbtree.h" -#include "common/debug.h" -#include "common/path.h" +#include "rbtree.h" +#include "debug.h" +#include "path.h" #include "queue.h" #include "fscrawl.h" #include "notify.h" diff --git a/src/common/path.c b/src/path.c similarity index 98% rename from src/common/path.c rename to src/path.c index 3f9fdf9..409b114 100644 --- a/src/common/path.c +++ b/src/path.c @@ -1,4 +1,4 @@ -/* common/path.c - path handling routines +/* path.c - path handling routines * * Copyright (C) 2010 Henrik Hautakoski * diff --git a/src/common/path.h b/src/path.h similarity index 93% rename from src/common/path.h rename to src/path.h index c229b2b..fe2224f 100644 --- a/src/common/path.h +++ b/src/path.h @@ -1,4 +1,4 @@ -/* common/path.h - path handling routines +/* path.h - path handling routines * * Copyright (C) 2010 Henrik Hautakoski * diff --git a/src/common/rbtree.c b/src/rbtree.c similarity index 99% rename from src/common/rbtree.c rename to src/rbtree.c index 896a896..a3e2f3c 100644 --- a/src/common/rbtree.c +++ b/src/rbtree.c @@ -1,4 +1,4 @@ -/* common/rbtree.c - red black tree implementation +/* rbtree.c - red black tree implementation * * Copyright (C) 2010 Henrik Hautakoski * diff --git a/src/common/rbtree.h b/src/rbtree.h similarity index 98% rename from src/common/rbtree.h rename to src/rbtree.h index 7771cd4..4b6f820 100644 --- a/src/common/rbtree.h +++ b/src/rbtree.h @@ -1,4 +1,4 @@ -/* common/rbtree.h +/* rbtree.h * * Copyright (C) 2010 Henrik Hautakoski * diff --git a/src/common/strbuf.c b/src/strbuf.c similarity index 99% rename from src/common/strbuf.c rename to src/strbuf.c index 19d8e29..f0ca42f 100644 --- a/src/common/strbuf.c +++ b/src/strbuf.c @@ -1,4 +1,4 @@ -/* common/strbuf.c +/* strbuf.c * * Copyright (C) 2010 Henrik Hautakoski * diff --git a/src/common/strbuf.h b/src/strbuf.h similarity index 98% rename from src/common/strbuf.h rename to src/strbuf.h index d6e191b..6b97a5b 100644 --- a/src/common/strbuf.h +++ b/src/strbuf.h @@ -1,4 +1,4 @@ -/* common/strbuf.h +/* strbuf.h * * Copyright (C) 2010 Henrik Hautakoski * diff --git a/src/common/util.h b/src/util.h similarity index 96% rename from src/common/util.h rename to src/util.h index 876fbdb..79c527a 100644 --- a/src/common/util.h +++ b/src/util.h @@ -1,4 +1,4 @@ -/* common/util.h +/* util.h * * Copyright (C) 2010 Henrik Hautakoski * diff --git a/src/common/xalloc.c b/src/xalloc.c similarity index 98% rename from src/common/xalloc.c rename to src/xalloc.c index c2302b8..a9a45d8 100644 --- a/src/common/xalloc.c +++ b/src/xalloc.c @@ -1,4 +1,4 @@ -/* common/xalloc.c +/* xalloc.c * * Copyright (C) 2010 Henrik Hautakoski * diff --git a/src/common/xalloc.h b/src/xalloc.h similarity index 92% rename from src/common/xalloc.h rename to src/xalloc.h index 8e726a3..9f22a88 100644 --- a/src/common/xalloc.h +++ b/src/xalloc.h @@ -1,4 +1,4 @@ -/* common/xalloc.h - stricter memory allocation. +/* xalloc.h - stricter memory allocation. * * Copyright (C) 2010 Henrik Hautakoski * diff --git a/test/Makefile b/test/Makefile index a7b8d25..7fab1f5 100644 --- a/test/Makefile +++ b/test/Makefile @@ -10,35 +10,35 @@ raw_inotify : strbuf : $(CC) $(CFLAGS) \ - ../src/common/strbuf.c \ - ../src/common/xalloc.c \ - ../src/common/die.c \ + ../src/strbuf.c \ + ../src/xalloc.c \ + ../src/die.c \ t_strbuf.c -o test_strbuf path : $(CC) $(CFLAGS) \ unit.c \ - ../src/common/xalloc.c \ - ../src/common/die.c \ - ../src/common/strbuf.c \ - ../src/common/path.c \ + ../src/xalloc.c \ + ../src/die.c \ + ../src/strbuf.c \ + ../src/path.c \ t_path.c -o test_path rbtree : $(CC) $(CFLAGS) \ unit.c \ - ../src/common/die.c \ - ../src/common/xalloc.c \ - ../src/common/rbtree.c \ + ../src/die.c \ + ../src/xalloc.c \ + ../src/rbtree.c \ t_rbtree.c -o test_rbtree inotify : $(CC) -lpthread -D INOTIFY_DEBUG -D RB_DEBUG $(CFLAGS) \ - ../src/common/rbtree.c \ - ../src/common/xalloc.c \ - ../src/common/die.c \ - ../src/common/strbuf.c \ - ../src/common/path.c \ + ../src/rbtree.c \ + ../src/xalloc.c \ + ../src/die.c \ + ../src/strbuf.c \ + ../src/path.c \ ../src/event.c \ ../src/fscrawl.c \ ../src/queue.c \ @@ -47,11 +47,11 @@ inotify : fscrawl : $(CC) $(CFLAGS) \ - ../src/common/path.c \ + ../src/path.c \ ../src/fscrawl.c \ - ../src/common/xalloc.c \ - ../src/common/die.c \ - ../src/common/strbuf.c \ + ../src/xalloc.c \ + ../src/die.c \ + ../src/strbuf.c \ t_fscrawl.c -o test_fscrawl queue : diff --git a/test/t_path.c b/test/t_path.c index dc46c98..45811ba 100644 --- a/test/t_path.c +++ b/test/t_path.c @@ -3,7 +3,7 @@ #include #include #include "unit.h" -#include "../src/common/path.h" +#include "../src/path.h" void test_normalize() { diff --git a/test/t_rbtree.c b/test/t_rbtree.c index d3ed31e..fca086d 100644 --- a/test/t_rbtree.c +++ b/test/t_rbtree.c @@ -8,8 +8,8 @@ #include #include #include "unit.h" -#include "../src/common/rbtree.h" -#include "../src/common/debug.h" +#include "../src/rbtree.h" +#include "../src/debug.h" #define MAX_VAL 500 #define NODES 20 diff --git a/test/t_strbuf.c b/test/t_strbuf.c index 5fde886..eb344f7 100644 --- a/test/t_strbuf.c +++ b/test/t_strbuf.c @@ -3,7 +3,7 @@ #include #include #include -#include "../src/common/strbuf.h" +#include "../src/strbuf.h" typedef unsigned int uint;