diff options
| author | Quentin Carbonneaux | 2014-09-03 17:39:36 -0400 |
|---|---|---|
| committer | Quentin Carbonneaux | 2014-09-03 17:39:36 -0400 |
| commit | bc5d8f20c0e5cbbafb7d1ae81af0c47c2217a103 (patch) | |
| tree | 94b4fff9cd76eff8334a71b2be1e9a2d68da3f69 | |
| parent | 14fe70a8c45a5c751f74834f4a90c2477a72f1aa (diff) | |
remove ugly include guards
| -rw-r--r-- | buf.c | 2 | ||||
| -rw-r--r-- | buf.h | 6 | ||||
| -rw-r--r-- | cmd.h | 7 | ||||
| -rw-r--r-- | edit.h | 10 | ||||
| -rw-r--r-- | evnt.h | 7 | ||||
| -rw-r--r-- | exec.c | 2 | ||||
| -rw-r--r-- | exec.h | 8 | ||||
| -rw-r--r-- | gui.h | 8 | ||||
| -rw-r--r-- | main.c | 6 | ||||
| -rw-r--r-- | unicode.h | 6 | ||||
| -rw-r--r-- | vicmd.w | 4 | ||||
| -rw-r--r-- | win.c | 1 | ||||
| -rw-r--r-- | win.h | 10 | ||||
| -rw-r--r-- | x11.c | 1 |
14 files changed, 13 insertions, 65 deletions
@@ -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 *); @@ -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 */ @@ -1,8 +1 @@ -#ifndef CMD_H -#define CMD_H - -#include "unicode.h" - void cmd_parse(Rune r); - -#endif /* ndef CMD_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 */ @@ -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 */ @@ -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" @@ -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 */ @@ -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 */ @@ -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; @@ -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 */ @@ -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 @@ -6,6 +6,7 @@ #include "unicode.h" #include "buf.h" +#include "edit.h" #include "gui.h" #include "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 */ @@ -7,6 +7,7 @@ #include <X11/Xft/Xft.h> #include <X11/cursorfont.h> +#include "unicode.h" #include "gui.h" void die(char *); |
