]> granicus.if.org Git - neomutt/commitdiff
rename the library to libmutt
authorRichard Russon <rich@flatcap.org>
Thu, 3 Aug 2017 13:32:54 +0000 (14:32 +0100)
committerRichard Russon <rich@flatcap.org>
Thu, 3 Aug 2017 14:35:47 +0000 (15:35 +0100)
- strip lib_ prefix from files
- rename liblib to libmutt

The only renaming complication was `lib_string.h`.
It's been renamed to `string2.h` so that `#include <string.h>` still works.

30 files changed:
Makefile.am
hcache/Makefile.am
lib/Makefile.am
lib/ascii.c [moved from lib/lib_ascii.c with 99% similarity]
lib/ascii.h [moved from lib/lib_ascii.h with 100% similarity]
lib/base64.c [moved from lib/lib_base64.c with 99% similarity]
lib/base64.h [moved from lib/lib_base64.h with 100% similarity]
lib/buffer.c [moved from lib/lib_buffer.c with 98% similarity]
lib/buffer.h [moved from lib/lib_buffer.h with 100% similarity]
lib/date.c [moved from lib/lib_date.c with 100% similarity]
lib/date.h [moved from lib/lib_date.h with 100% similarity]
lib/debug.c [moved from lib/lib_debug.c with 100% similarity]
lib/debug.h [moved from lib/lib_debug.h with 100% similarity]
lib/exit.c [moved from lib/lib_exit.c with 100% similarity]
lib/exit.h [moved from lib/lib_exit.h with 100% similarity]
lib/file.c [moved from lib/lib_file.c with 99% similarity]
lib/file.h [moved from lib/lib_file.h with 100% similarity]
lib/hash.c [moved from lib/lib_hash.c with 99% similarity]
lib/hash.h [moved from lib/lib_hash.h with 100% similarity]
lib/lib.h
lib/md5.c [moved from lib/lib_md5.c with 99% similarity]
lib/md5.h [moved from lib/lib_md5.h with 100% similarity]
lib/memory.c [moved from lib/lib_memory.c with 97% similarity]
lib/memory.h [moved from lib/lib_memory.h with 100% similarity]
lib/message.c [moved from lib/lib_message.c with 99% similarity]
lib/message.h [moved from lib/lib_message.h with 100% similarity]
lib/sha1.c [moved from lib/lib_sha1.c with 99% similarity]
lib/sha1.h [moved from lib/lib_sha1.h with 100% similarity]
lib/string.c [moved from lib/lib_string.c with 99% similarity]
lib/string2.h [moved from lib/lib_string.h with 96% similarity]

index 168d374849b6f371f9490cc8921502dbbd351f21..d6cf7f7dc5a6263185820be14156b1d698b7eaa3 100644 (file)
@@ -64,14 +64,14 @@ nodist_mutt_SOURCES = $(BUILT_SOURCES)
 LIBIMAP = -Limap -limap
 LIBIMAPDEPS = $(top_srcdir)/imap/imap.h imap/libimap.a
 
-LIBLIB = -Llib -llib
-LIBLIBDEPS = $(top_srcdir)/lib/lib.h lib/liblib.a
+LIBMUTT = -Llib -lmutt
+LIBMUTTDEPS = $(top_srcdir)/lib/lib.h lib/libmutt.a
 
 mutt_LDADD = $(MUTT_LIB_OBJECTS) $(LIBOBJS) $(HCACHE_LIBS) $(NCRYPT_LIBS) \
-       $(LIBIMAP) $(LIBLIB) $(LIBICONV) $(GPGME_LIBS) $(INTLLIBS)
+       $(LIBIMAP) $(LIBMUTT) $(LIBICONV) $(GPGME_LIBS) $(INTLLIBS)
 
 mutt_DEPENDENCIES = $(MUTT_LIB_OBJECTS) $(LIBOBJS) $(LIBIMAPDEPS) \
-       $(LIBLIBDEPS) $(HCACHE_DEPS) $(NCRYPT_DEPS) $(INTLDEPS)
+       $(LIBMUTTDEPS) $(HCACHE_DEPS) $(NCRYPT_DEPS) $(INTLDEPS)
 
 DEFS=-DPKGDATADIR=\"$(pkgdatadir)\" -DSYSCONFDIR=\"$(sysconfdir)\" \
        -DBINDIR=\"$(bindir)\" -DMUTTLOCALEDIR=\"$(datadir)/locale\"
@@ -99,12 +99,12 @@ EXTRA_DIST = account.h attach.h bcache.h browser.h buffy.h \
 EXTRA_SCRIPTS =
 
 pgpring_SOURCES = pgppubring.c
-pgpring_LDADD = $(LIBOBJS) $(NCRYPT_LIBS) $(INTLLIBS) $(LIBLIB)
-pgpring_DEPENDENCIES = $(LIBOBJS) $(NCRYPT_DEPS) $(INTLDEPS) $(LIBLIBDEPS)
+pgpring_LDADD = $(LIBOBJS) $(NCRYPT_LIBS) $(INTLLIBS) $(LIBMUTT)
+pgpring_DEPENDENCIES = $(LIBOBJS) $(NCRYPT_DEPS) $(INTLDEPS) $(LIBMUTTDEPS)
 
 mutt_md5_SOURCES = md5.c
-mutt_md5_LDADD = $(LIBLIB)
-mutt_md5_DEPENDENCIES = $(LIBLIBDEPS)
+mutt_md5_LDADD = $(LIBMUTT)
+mutt_md5_DEPENDENCIES = $(LIBMUTTDEPS)
 
 txt2c_SOURCES = txt2c.c
 txt2c_LDADD =
index 034c5cc3a6ea0d69d6b8798889412579b91709ed..1db24b9becd7ec7de162368eaca393756de41e8f 100644 (file)
@@ -45,12 +45,12 @@ $(top_srcdir)/keymap_defs.h:
        +$(MAKE) -C $(top_srcdir) keymap_defs.h
 
 hcversion.h: $(top_srcdir)/mutt.h $(top_srcdir)/address.h $(top_srcdir)/list.h \
-               $(top_srcdir)/lib/lib_buffer.h $(top_srcdir)/parameter.h \
+               $(top_srcdir)/lib/buffer.h $(top_srcdir)/parameter.h \
                $(top_srcdir)/body.h $(top_srcdir)/envelope.h \
                $(top_srcdir)/header.h $(srcdir)/hcachever.sh ../$(MUTT_MD5)
        ( echo '#include "config.h"'; echo '#include "mutt.h"'; \
        echo '#include "address.h"'; echo '#include "list.h"'; \
-       echo '#include "lib/lib_buffer.h"'; echo '#include "parameter.h"'; \
+       echo '#include "lib/buffer.h"'; echo '#include "parameter.h"'; \
        echo '#include "body.h"'; echo '#include "envelope.h"'; \
        echo '#include "header.h"'; \
        ) | $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) - | sh $(srcdir)/hcachever.sh hcversion.h
index cc07a1add9e90c1016524758314c91bffb4a5d4d..6cb05204b9ca6bf31848f075503efc2d32272816 100644 (file)
@@ -3,12 +3,11 @@ include $(top_srcdir)/flymake.am
 
 AUTOMAKE_OPTIONS = 1.6 foreign
 
-EXTRA_DIST = lib.h lib_ascii.h lib_base64.h lib_buffer.h lib_date.h lib_debug.h lib_exit.h lib_file.h lib_hash.h lib_md5.h lib_memory.h lib_message.h lib_sha1.h lib_string.h
+EXTRA_DIST = lib.h ascii.h base64.h buffer.h date.h debug.h exit.h file.h hash.h md5.h memory.h message.h sha1.h string2.h
 
 AM_CPPFLAGS = -I$(top_srcdir)
 
-noinst_LIBRARIES = liblib.a
-noinst_HEADERS =
+noinst_LIBRARIES = libmutt.a
 
-liblib_a_SOURCES = lib_ascii.c lib_base64.c lib_buffer.c lib_date.c lib_debug.c lib_exit.c lib_file.c lib_hash.c lib_md5.c lib_memory.c lib_message.c lib_sha1.c lib_string.c
+libmutt_a_SOURCES = ascii.c base64.c buffer.c date.c debug.c exit.c file.c hash.c md5.c memory.c message.c sha1.c string.c
 
similarity index 99%
rename from lib/lib_ascii.c
rename to lib/ascii.c
index d8998e20ccc37238160a4b924553fa3031a80c48..2fdcb7509002735362ac4513093cb0a00b405cab 100644 (file)
@@ -40,7 +40,7 @@
 #include "config.h"
 #include <ctype.h>
 #include <stdio.h>
-#include "lib_ascii.h"
+#include "ascii.h"
 
 /**
  * ascii_strcasecmp - Compare strings, ignoring the case
similarity index 100%
rename from lib/lib_ascii.h
rename to lib/ascii.h
similarity index 99%
rename from lib/lib_base64.c
rename to lib/base64.c
index efd5ba3bb8f5c8ce8d6929067fa92cf428c00dfb..8fccd7b555b5555e36c7f29359d6c7de49abf115 100644 (file)
@@ -37,7 +37,7 @@
  */
 
 #include "config.h"
-#include "lib_base64.h"
+#include "base64.h"
 
 #define BAD -1
 
similarity index 100%
rename from lib/lib_base64.h
rename to lib/base64.h
similarity index 98%
rename from lib/lib_buffer.c
rename to lib/buffer.c
index e45e2f4b7761fe3adb21463c36ec2dc67e76d26b..fdc1a22c67f1afebc933dc2f2df468e6a63c603c 100644 (file)
@@ -40,9 +40,9 @@
 #include <stdarg.h>
 #include <stdio.h>
 #include <string.h>
-#include "lib_buffer.h"
-#include "lib_memory.h"
-#include "lib_string.h"
+#include "buffer.h"
+#include "memory.h"
+#include "string2.h"
 
 /**
  * mutt_buffer_new - Create and initialise a Buffer
similarity index 100%
rename from lib/lib_buffer.h
rename to lib/buffer.h
similarity index 100%
rename from lib/lib_date.c
rename to lib/date.c
similarity index 100%
rename from lib/lib_date.h
rename to lib/date.h
similarity index 100%
rename from lib/lib_debug.c
rename to lib/debug.c
similarity index 100%
rename from lib/lib_debug.h
rename to lib/debug.h
similarity index 100%
rename from lib/lib_exit.c
rename to lib/exit.c
similarity index 100%
rename from lib/lib_exit.h
rename to lib/exit.h
similarity index 99%
rename from lib/lib_file.c
rename to lib/file.c
index e33592872b6ae0fe234f3e7aa4e18574808bfad1..3d6d2b504de4582bb4f3488464db0ce5d780eccb 100644 (file)
 #include <sys/stat.h>
 #include <sys/types.h>
 #include <unistd.h>
-#include "lib_file.h"
-#include "lib_debug.h"
-#include "lib_memory.h"
-#include "lib_string.h"
+#include "file.h"
+#include "debug.h"
+#include "memory.h"
+#include "string2.h"
 
 /* these characters must be escaped in regular expressions */
 static const char rx_special_chars[] = "^.[$()|*+?{\\";
similarity index 100%
rename from lib/lib_file.h
rename to lib/file.h
similarity index 99%
rename from lib/lib_hash.c
rename to lib/hash.c
index 6bdfbf5d8a5f54b9fb5d3d000b36087a51307346..36db1df71c4c1be18e972efb55df5ced726edad1 100644 (file)
@@ -44,9 +44,9 @@
 #include "config.h"
 #include <ctype.h>
 #include <stdio.h>
-#include "lib_hash.h"
-#include "lib_memory.h"
-#include "lib_string.h"
+#include "hash.h"
+#include "memory.h"
+#include "string2.h"
 
 #define SOMEPRIME 149711
 
similarity index 100%
rename from lib/lib_hash.h
rename to lib/hash.h
index 068bad8bb1797ebc19fe8b41999017448974374f..7a082ec31ea52d86e8246b2709b5ddfc44c2234c 100644 (file)
--- a/lib/lib.h
+++ b/lib/lib.h
 #ifndef _LIB_LIB_H
 #define _LIB_LIB_H
 
-#include "lib_ascii.h"
-#include "lib_base64.h"
-#include "lib_buffer.h"
-#include "lib_date.h"
-#include "lib_debug.h"
-#include "lib_exit.h"
-#include "lib_file.h"
-#include "lib_hash.h"
-#include "lib_md5.h"
-#include "lib_memory.h"
-#include "lib_message.h"
-#include "lib_sha1.h"
-#include "lib_string.h"
+#include "ascii.h"
+#include "base64.h"
+#include "buffer.h"
+#include "date.h"
+#include "debug.h"
+#include "exit.h"
+#include "file.h"
+#include "hash.h"
+#include "md5.h"
+#include "memory.h"
+#include "message.h"
+#include "sha1.h"
+#include "string2.h"
 
 #endif /* _LIB_LIB_H */
similarity index 99%
rename from lib/lib_md5.c
rename to lib/md5.c
index 75ae954a45b4a80acbe2942dab84c616d262d868..6d3ed5d5545aee1e1b57549ddd43f9762b3f4914 100644 (file)
+++ b/lib/md5.c
@@ -46,7 +46,7 @@
 #include <stdbool.h>
 #include <stdio.h>
 #include <string.h>
-#include "lib_md5.h"
+#include "md5.h"
 
 #ifdef WORDS_BIGENDIAN
 #define SWAP(n)                                                                \
similarity index 100%
rename from lib/lib_md5.h
rename to lib/md5.h
similarity index 97%
rename from lib/lib_memory.c
rename to lib/memory.c
index 2385bfec28f2d54c78824801da91bfce25477491..49385129f461a794d881e046d2dadcaec4dd9849 100644 (file)
@@ -39,9 +39,9 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
-#include "lib_memory.h"
-#include "lib_exit.h"
-#include "lib_message.h"
+#include "memory.h"
+#include "exit.h"
+#include "message.h"
 
 /**
  * safe_calloc - Allocate zeroed memory on the heap
similarity index 100%
rename from lib/lib_memory.h
rename to lib/memory.h
similarity index 99%
rename from lib/lib_message.c
rename to lib/message.c
index 17051018749a6bb4c68748e84cc894bcf1c15cf7..401c341d83d3679735aeb3b78a47767e7bb2a5d2 100644 (file)
@@ -39,7 +39,7 @@
 #include <stdarg.h>
 #include <stdio.h>
 #include <string.h>
-#include "lib_memory.h"
+#include "memory.h"
 
 /**
  * default_error - Display an error message
similarity index 100%
rename from lib/lib_message.h
rename to lib/message.h
similarity index 99%
rename from lib/lib_sha1.c
rename to lib/sha1.c
index 291cc68c8a002e2635ae499b3c8d9dcea74814f5..56cfe66ec1630d2a7a55e328f632dc53c1c407dc 100644 (file)
@@ -30,7 +30,7 @@
 
 #include "config.h"
 #include <string.h>
-#include "lib_sha1.h"
+#include "sha1.h"
 
 #define rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits))))
 
similarity index 100%
rename from lib/lib_sha1.h
rename to lib/sha1.h
similarity index 99%
rename from lib/lib_string.c
rename to lib/string.c
index 79069245ed6a0ad72ed8bb4b29d3945c7e9b0448..59956954e86efd71924d14de5681859a269ce366 100644 (file)
@@ -58,8 +58,8 @@
 #include <limits.h>
 #include <stdlib.h>
 #include <string.h>
-#include "lib_string.h"
-#include "lib_memory.h"
+#include "string2.h"
+#include "memory.h"
 
 /**
  * mutt_atol - Convert ASCII string to a long
similarity index 96%
rename from lib/lib_string.h
rename to lib/string2.h
index 95c24d60956b278dfc953215f7bca3574940de88..6c027b61d65ce5322fcc80ce56461eb4030e9eac 100644 (file)
  * this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+/* NOTE: This file is called string2.h so that other files can safely
+ * #include <string.h>
+ */
+
 #ifndef _LIB_STRING_H
 #define _LIB_STRING_H