summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuentin Carbonneaux2014-09-03 17:39:36 -0400
committerQuentin Carbonneaux2014-09-03 17:39:36 -0400
commitbc5d8f20c0e5cbbafb7d1ae81af0c47c2217a103 (patch)
tree94b4fff9cd76eff8334a71b2be1e9a2d68da3f69
parent14fe70a8c45a5c751f74834f4a90c2477a72f1aa (diff)
remove ugly include guards
-rw-r--r--buf.c2
-rw-r--r--buf.h6
-rw-r--r--cmd.h7
-rw-r--r--edit.h10
-rw-r--r--evnt.h7
-rw-r--r--exec.c2
-rw-r--r--exec.h8
-rw-r--r--gui.h8
-rw-r--r--main.c6
-rw-r--r--unicode.h6
-rw-r--r--vicmd.w4
-rw-r--r--win.c1
-rw-r--r--win.h10
-rw-r--r--x11.c1
14 files changed, 13 insertions, 65 deletions
diff --git a/buf.c b/buf.c
index 76afee1..ef2aa55 100644
--- a/buf.c
+++ b/buf.c
@@ -3,8 +3,8 @@
#include <stdlib.h>
#include <string.h>
-#include "buf.h"
#include "unicode.h"
+#include "buf.h"
static void del(Buf *, unsigned);
static Rune *hend(Page *);
diff --git a/buf.h b/buf.h
index 41faeed..615ea08 100644
--- a/buf.h
+++ b/buf.h
@@ -1,9 +1,5 @@
-#ifndef BUF_H
-#define BUF_H
/* Buffer management functions */
-#include "unicode.h"
-
typedef struct page Page;
typedef struct buf Buf;
@@ -37,5 +33,3 @@ void buf_getlc(Buf *, unsigned, int *, int *);
unsigned buf_bol(Buf *, unsigned);
unsigned buf_eol(Buf *, unsigned);
unsigned buf_setlc(Buf *, int, int);
-
-#endif /* ndef BUF_H */
diff --git a/cmd.h b/cmd.h
index 4ae3fb1..2da6acd 100644
--- a/cmd.h
+++ b/cmd.h
@@ -1,8 +1 @@
-#ifndef CMD_H
-#define CMD_H
-
-#include "unicode.h"
-
void cmd_parse(Rune r);
-
-#endif /* ndef CMD_H */
diff --git a/edit.h b/edit.h
index fb128e3..8325ee4 100644
--- a/edit.h
+++ b/edit.h
@@ -1,10 +1,4 @@
-#ifndef EDIT_H
-#define EDIT_H
-
-#include <time.h>
-
-#include "unicode.h"
-#include "buf.h"
+#include <sys/time.h>
/* special marks */
#define SelBeg ((Rune) 'i') /* selection start */
@@ -45,5 +39,3 @@ void eb_setmark(EBuf *, Rune, unsigned);
unsigned eb_getmark(EBuf *, Rune);
unsigned eb_look(EBuf *, unsigned, Rune *, unsigned);
void eb_write(EBuf *, int);
-
-#endif /* ndef EDIT_H */
diff --git a/evnt.h b/evnt.h
index e6897e7..b89c974 100644
--- a/evnt.h
+++ b/evnt.h
@@ -1,8 +1,3 @@
-#ifndef EVNT_H
-#define EVNT_H
-
-#include <sys/time.h>
-
typedef struct evnt Evnt;
enum {
@@ -24,5 +19,3 @@ struct evnt {
int ev_alarm(int, void (*)(void));
void ev_register(Evnt);
void ev_loop(void);
-
-#endif /* ndef EVNT_H */
diff --git a/exec.c b/exec.c
index e7a3959..978cf65 100644
--- a/exec.c
+++ b/exec.c
@@ -13,7 +13,9 @@
#include <unistd.h>
#include "unicode.h"
+#include "buf.h"
#include "edit.h"
+#include "gui.h"
#include "win.h"
#include "exec.h"
#include "evnt.h"
diff --git a/exec.h b/exec.h
index e6d051d..fafac79 100644
--- a/exec.h
+++ b/exec.h
@@ -1,12 +1,4 @@
-#ifndef EXEC_H
-#define EXEC_H
-
-#include "unicode.h"
-#include "win.h"
-
int ex_run(unsigned);
int ex_look(W *, Rune *, unsigned);
int ex_put(EBuf *, char *);
int ex_get(EBuf *, char *);
-
-#endif /* ndef EXEC_H */
diff --git a/gui.h b/gui.h
index c4d01bf..ae8564c 100644
--- a/gui.h
+++ b/gui.h
@@ -1,9 +1,3 @@
-#ifndef GUI_H
-#define GUI_H
-/* GUI module definition */
-
-#include "unicode.h"
-
typedef struct gcolor GColor;
typedef struct gfont GFont;
typedef struct grect GRect;
@@ -117,5 +111,3 @@ struct gui {
/* Available gui modules */
extern struct gui gui_x11;
-
-#endif /* ndef GUI_H */
diff --git a/main.c b/main.c
index d148360..9a7c670 100644
--- a/main.c
+++ b/main.c
@@ -5,12 +5,14 @@
#include <string.h>
#include <unistd.h>
+#include "unicode.h"
#include "cmd.h"
+#include "buf.h"
#include "edit.h"
-#include "evnt.h"
-#include "exec.h"
#include "gui.h"
#include "win.h"
+#include "exec.h"
+#include "evnt.h"
W *curwin;
int scrolling;
diff --git a/unicode.h b/unicode.h
index 06350a5..aa4d06a 100644
--- a/unicode.h
+++ b/unicode.h
@@ -1,7 +1,3 @@
-#ifndef UNICODE_H
-#define UNICODE_H
-/* Unicode functions */
-
/* Rune are simple integers */
typedef unsigned int Rune;
@@ -16,5 +12,3 @@ int utf8_rune_nlen(const Rune *, int);
int utf8_encode_rune(Rune, unsigned char *, int);
int utf8_decode_rune(Rune *, const unsigned char *, int);
int unicode_rune_width(Rune);
-
-#endif /* ndef UNICODE_H */
diff --git a/vicmd.w b/vicmd.w
index a48789f..423cdf3 100644
--- a/vicmd.w
+++ b/vicmd.w
@@ -36,9 +36,11 @@ purposes we also include \.{stdio.h}.
#include <stdio.h>
#include <stdlib.h>
#include "unicode.h"
+#include "buf.h"
#include "edit.h"
-#include "exec.h"
+#include "gui.h"
#include "win.h"
+#include "exec.h"
#include "cmd.h"
@ The \.{vi} editor is modal so we must keep track of the current
diff --git a/win.c b/win.c
index 780731b..f5af3ac 100644
--- a/win.c
+++ b/win.c
@@ -6,6 +6,7 @@
#include "unicode.h"
#include "buf.h"
+#include "edit.h"
#include "gui.h"
#include "win.h"
diff --git a/win.h b/win.h
index b6ff637..47800b2 100644
--- a/win.h
+++ b/win.h
@@ -1,11 +1,3 @@
-#ifndef WIN_H
-#define WIN_H
-
-#include "unicode.h"
-#include "buf.h"
-#include "edit.h"
-#include "gui.h"
-
#define rectx rect.x
#define recty rect.y
#define rectw rect.w
@@ -52,5 +44,3 @@ void win_show_cursor(W *, enum CursorLoc);
W *win_tag_toggle(W *);
W *win_text(W *);
void win_update(W *);
-
-#endif /* ndef WIN_H */
diff --git a/x11.c b/x11.c
index 0ac120d..14e8afb 100644
--- a/x11.c
+++ b/x11.c
@@ -7,6 +7,7 @@
#include <X11/Xft/Xft.h>
#include <X11/cursorfont.h>
+#include "unicode.h"
#include "gui.h"
void die(char *);