xterm.c was absurd, no need to put trivial functions like this in a
authorPierre Habouzit <madcoder@debian.org>
Sun, 29 Oct 2006 14:07:39 +0000 (15:07 +0100)
committerPierre Habouzit <madcoder@debian.org>
Sun, 29 Oct 2006 14:07:39 +0000 (15:07 +0100)
separate C module.

Makefile.am
xterm.c [deleted file]
xterm.h

index 6823557..4d95024 100644 (file)
@@ -46,8 +46,7 @@ muttng_SOURCES = $(BUILT_SOURCES) \
        score.c send.c sendlib.c sidebar.c signal.c sort.c state.c status.c system.c \
        thread.c \
        url.c utf8.c \
-       wcwidth.c \
-       xterm.c
+       wcwidth.c
 
 muttng_LDADD = @MUTT_LIB_OBJECTS@ @LIBOBJS@ $(LIBIMAP) $(LIBPOP) $(LIBNNTP) \
        -Llib-lib -llib -Llib -lsane $(MUTTLIBS) $(INTLLIBS) $(LIBICONV)
diff --git a/xterm.c b/xterm.c
deleted file mode 100644 (file)
index b3f506c..0000000
--- a/xterm.c
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * This file is part of mutt-ng, see http://www.muttng.org/.
- * It's licensed under the GNU General Public License,
- * please see the file GPL in the top level source directory.
- */
-#include <stdio.h>
-#include <lib-lib/str.h>
-#include "xterm.h"
-
-void mutt_xterm_set_title (const char *title) {
-  fputs ("\033]2;", stdout);
-  fputs (NONULL (title), stdout);
-  fputs ("\007", stdout);
-  fflush (stdout);
-}
-
-void mutt_xterm_set_icon (const char *name) {
-  fputs ("\033]1;", stdout);
-  fputs (NONULL (name), stdout);
-  fputs ("\007", stdout);
-  fflush (stdout);
-}
diff --git a/xterm.h b/xterm.h
index 0e8f970..31b153e 100644 (file)
--- a/xterm.h
+++ b/xterm.h
@@ -6,10 +6,19 @@
 #ifndef MUTT_XTERM_H
 #define MUTT_XTERM_H
 
+#include <lib-lib/str.h>
+#include <stdio.h>
+
 /* sets the current xterm's title */
-void mutt_xterm_set_title(const char *title);
+static inline void mutt_xterm_set_title(const char *title) {
+    printf("\033]2;%s\007", NONULL(title));
+    fflush(stdout);
+}
 
 /* sets the current xterm's icon */
-void mutt_xterm_set_icon(const char *name);
+static inline void mutt_xterm_set_icon(const char *name) {
+    printf("\033]1;%s\007", NONULL(name));
+    fflush(stdout);
+}
 
 #endif /* !MUTT_XTERM_H */