From: Richard Russon Date: Fri, 5 May 2017 00:12:45 +0000 (+0100) Subject: build: add separate hcache dir X-Git-Tag: neomutt-20170526~33 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c527723f0ee5cb80ca26aac9545412d998df8304;p=neomutt build: add separate hcache dir --- diff --git a/.gitignore b/.gitignore index 9bb348f52..c5538cb69 100644 --- a/.gitignore +++ b/.gitignore @@ -45,8 +45,7 @@ conftest.c conftest.err conststrings.c depcomp -hcachever.sh -hcversion.h +hcache/hcversion.h install-sh keymap_alldefs.h keymap_defs.h diff --git a/Makefile.am b/Makefile.am index 4e23fbfbf..a71ed7194 100644 --- a/Makefile.am +++ b/Makefile.am @@ -12,7 +12,7 @@ AM_DISTCHECK_CONFIGURE_FLAGS = --enable-compressed --enable-debug \ --with-gnutls --with-gss --with-kyotocabinet --with-lmdb --with-qdbm \ --with-sasl --with-tokyocabinet -SUBDIRS = m4 contrib +SUBDIRS = m4 contrib hcache if BUILD_DOC SUBDIRS += doc @@ -28,16 +28,12 @@ endif bin_SCRIPTS = $(SMIMEAUX_TARGET) -if BUILD_HCACHE -HCVERSION = hcversion.h -endif - DOTLOCK_GROUP='mail' DOTLOCK_PERMISSION='2755' distdir = neo$(PACKAGE)-$(VERSION) -BUILT_SOURCES = keymap_defs.h keymap_alldefs.h patchlist.c git_ver.h conststrings.c hcachever.sh $(HCVERSION) +BUILT_SOURCES = keymap_defs.h keymap_alldefs.h patchlist.c git_ver.h conststrings.c bin_PROGRAMS = mutt $(DOTLOCK_TARGET) $(PGPAUX_TARGET) mutt_SOURCES = addrbook.c alias.c ascii.c attach.c base64.c browser.c buffer.c \ @@ -54,7 +50,7 @@ mutt_SOURCES = addrbook.c alias.c ascii.c attach.c base64.c browser.c buffer.c \ nodist_mutt_SOURCES = $(BUILT_SOURCES) mutt_LDADD = $(MUTT_LIB_OBJECTS) $(LIBOBJS) $(LIBIMAP) $(MUTTLIBS) \ - $(INTLLIBS) $(LIBICONV) $(GPGME_LIBS) + $(INTLLIBS) $(LIBICONV) $(GPGME_LIBS) $(HCACHE_LIBS) mutt_DEPENDENCIES = $(MUTT_LIB_OBJECTS) $(LIBOBJS) $(LIBIMAPDEPS) \ $(INTLDEPS) @@ -67,7 +63,7 @@ AM_CPPFLAGS=-I. -I$(top_srcdir) $(GPGME_CFLAGS) EXTRA_mutt_SOURCES = account.c bcache.c bcache.h browser.h compress.c \ crypt_gpgme.c crypt_mod_pgp_classic.c crypt_mod_pgp_gpgme.c \ crypt_mod_smime_classic.c crypt_mod_smime_gpgme.c dotlock.c \ - gnupgparse.c hcache.c hcache.h mbyte.h md5.c mutt_idna.c mutt_idna.h \ + gnupgparse.c mbyte.h md5.c mutt_idna.c mutt_idna.h \ mutt_lua.c mutt_sasl.c mutt_notmuch.c mutt_socket.c mutt_ssl.c mutt_ssl_gnutls.c \ mutt_tunnel.c newsrc.c nntp.c pgp.c pgpinvoke.c pgpkey.c pgplib.c \ pgpmicalg.c pgppacket.c pop.c pop_auth.c pop_lib.c remailer.c \ @@ -77,8 +73,7 @@ EXTRA_DIST = account.h ascii.h attach.h browser.h buffer.h buffy.h ChangeLog \ ChangeLog.neomutt ChangeLog.nntp charset.h compress.h config.rpath \ copy.h COPYRIGHT crypt_gpgme.h crypthash.h depcomp dotlock.h extlib.c \ filter.h functions.h gen_defs globals.h group.h hash.h \ - hcache_backend.h hcache_bdb.c hcache_gdbm.c hcache_kc.c hcache_lmdb.c \ - hcache_qdbm.c hcache_tc.c hcachever.sh.in history.h init.h keymap.h \ + history.h init.h keymap.h \ lib.h LICENSE.md mailbox.h mapping.h mbyte.h md5.h mime.h mime.types \ mutt.h mutt_commands.h mutt_crypt.h mutt_curses.h mutt_idna.h \ mutt_lua.h mutt_menu.h mutt_notmuch.h mutt_options.h mutt_regex.h mutt_sasl.h \ @@ -155,10 +150,6 @@ git_ver.h: cmp -s git_ver.h.tmp git_ver.h || mv git_ver.h.tmp git_ver.h; \ rm -f git_ver.h.tmp -hcversion.h: $(srcdir)/mutt.h $(srcdir)/rfc822.h hcachever.sh $(MUTT_MD5) - ( echo '#include "config.h"'; echo '#include "mutt.h"'; ) \ - | $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) - | sh ./hcachever.sh hcversion.h - patchlist.c: $(srcdir)/PATCHES $(srcdir)/patchlist.sh $(srcdir)/patchlist.sh < $(srcdir)/PATCHES > patchlist.c diff --git a/configure.ac b/configure.ac index 08caad5cf..6043afc65 100644 --- a/configure.ac +++ b/configure.ac @@ -812,13 +812,11 @@ if test -n "$hcache_tokyocabinet" && test "$hcache_tokyocabinet" != "no"; then AC_CHECK_HEADER(tcbdb.h, AC_CHECK_LIB(tokyocabinet, tcbdbopen, [ - MUTTLIBS="$MUTTLIBS -ltokyocabinet" + HCACHE_LIBS="$HCACHE_LIBS -ltokyocabinet" AC_DEFINE(HAVE_TC, 1, [Tokyo Cabinet Support]) - MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS hcache_tc.o" hcache_db_used="tokyocabinet $hcache_db_used" + build_hc_tc="yes" ],[ - CPPFLAGS="$OLDCPPFLAGS" - LDFLAGS="$OLDLDFLAGS" AC_MSG_ERROR(Unable to find TokyoCabinet) ]), AC_MSG_ERROR(Unable to find TokyoCabinet)) fi @@ -835,13 +833,11 @@ if test -n "$hcache_kyotocabinet" && test "$hcache_kyotocabinet" != "no"; then AC_CHECK_HEADER(kclangc.h, AC_CHECK_LIB(kyotocabinet, kcdbopen, [ - MUTTLIBS="$MUTTLIBS -lkyotocabinet" + HCACHE_LIBS="$HCACHE_LIBS -lkyotocabinet" AC_DEFINE(HAVE_KC, 1, [Kyoto Cabinet Support]) - MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS hcache_kc.o" hcache_db_used="kyotocabinet $hcache_db_used" + build_hc_kc="yes" ],[ - CPPFLAGS="$OLDCPPFLAGS" - LDFLAGS="$OLDLDFLAGS" AC_MSG_ERROR(Unable to find KyotoCabinet) ]), AC_MSG_ERROR(Unable to find KyotoCabinet)) fi @@ -862,13 +858,11 @@ if test -n "$hcache_gdbm" && test "$hcache_gdbm" != "no"; then AC_CHECK_HEADERS(gdbm.h, AC_CHECK_LIB(gdbm, gdbm_open, [ - MUTTLIBS="$MUTTLIBS -lgdbm" - MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS hcache_gdbm.o" + HCACHE_LIBS="$HCACHE_LIBS -lgdbm" AC_DEFINE(HAVE_GDBM, 1, [GDBM Support]) hcache_db_used="gdbm $hcache_db_used" + build_hc_gdbm="yes" ],[ - CPPFLAGS="$OLDCPPFLAGS" - LDFLAGS="$OLDLDFLAGS" AC_MSG_ERROR(Unable to find GDBM) ]), AC_MSG_ERROR(Unable to find GDBM)) fi @@ -893,13 +887,11 @@ if test -n "$hcache_qdbm" && test "$hcache_qdbm" != "no"; then AC_CHECK_HEADERS(villa.h, AC_CHECK_LIB(qdbm, vlopen, [ - MUTTLIBS="$MUTTLIBS -lqdbm" - MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS hcache_qdbm.o" + HCACHE_LIBS="$HCACHE_LIBS -lqdbm" AC_DEFINE(HAVE_QDBM, 1, [QDBM Support]) hcache_db_used="qdbm $hcache_db_used" + build_hc_qdbm="yes" ],[ - CPPFLAGS="$OLDCPPFLAGS" - LDFLAGS="$OLDLDFLAGS" AC_MSG_ERROR(Unable to find QDBM) ]), AC_MSG_ERROR(Unable to find QDBM)) fi @@ -935,10 +927,10 @@ if test -n "$hcache_bdb" && test "$hcache_bdb" != "no"; then LDFLAGS="$OLDLDFLAGS -L$BDB_LIB_DIR" AC_CHECK_LIB($BDB_LIB_NAME, db_env_create, [ - MUTTLIBS="$MUTTLIBS -l$BDB_LIB_NAME" - MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS hcache_bdb.o" + HCACHE_LIBS="$HCACHE_LIBS -l$BDB_LIB_NAME" AC_DEFINE(HAVE_BDB, 1, [Berkeley DB Support]) hcache_db_used="bdb $hcache_db_used" + build_hc_bdb="yes" BDB_FOUND=yes break ],[ @@ -968,12 +960,10 @@ if test -n "$hcache_lmdb" && test "$hcache_lmdb" != "no"; then AC_CHECK_LIB(lmdb, mdb_env_create, [ AC_DEFINE(HAVE_LMDB, 1, [LMDB Support]) - MUTTLIBS="$MUTTLIBS -llmdb" - MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS hcache_lmdb.o" + HCACHE_LIBS="$HCACHE_LIBS -llmdb" hcache_db_used="lmdb $hcache_db_used" + build_hc_lmdb="yes" ],[ - CPPFLAGS="$OLDCPPFLAGS" - LDFLAGS="$OLDLDFLAGS" AC_MSG_ERROR(Unable to find LMDB) ]), AC_MSG_ERROR(Unable to find LMDB)) fi @@ -981,12 +971,19 @@ fi AM_CONDITIONAL(BUILD_HCACHE, test -n "$hcache_db_used") if test -n "$hcache_db_used"; then AC_DEFINE(USE_HCACHE, 1, [Enable header caching]) - MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS hcache.o" + HCACHE_LIBS="-Lhcache -lhcache $HCACHE_LIBS" need_md5="yes" else # For outputting in the summary hcache_db_used="no" fi + +AM_CONDITIONAL(BUILD_HC_BDB, test "x$build_hc_bdb" = "xyes") +AM_CONDITIONAL(BUILD_HC_GDBM, test "x$build_hc_gdbm" = "xyes") +AM_CONDITIONAL(BUILD_HC_KC, test "x$build_hc_kc" = "xyes") +AM_CONDITIONAL(BUILD_HC_LMDB, test "x$build_hc_lmdb" = "xyes") +AM_CONDITIONAL(BUILD_HC_QDBM, test "x$build_hc_qdbm" = "xyes") +AM_CONDITIONAL(BUILD_HC_TC, test "x$build_hc_tc" = "xyes") dnl -- end cache -- if test "$need_md5" = "yes"; then @@ -999,6 +996,7 @@ AC_SUBST(MUTTLIBS) AC_SUBST(MUTT_LIB_OBJECTS) AC_SUBST(LIBIMAP) AC_SUBST(LIBIMAPDEPS) +AC_SUBST(HCACHE_LIBS) dnl -- iconv/gettext -- @@ -1119,8 +1117,7 @@ if test x$full_doc != xno; then fi AC_CONFIG_FILES(Makefile contrib/Makefile doc/Makefile imap/Makefile - m4/Makefile po/Makefile.in - hcachever.sh doc/instdoc.sh) + m4/Makefile po/Makefile.in hcache/Makefile doc/instdoc.sh) AC_OUTPUT AC_MSG_NOTICE([Summary of build options: @@ -1132,7 +1129,7 @@ AC_MSG_NOTICE([Summary of build options: CFlags: ${CFLAGS} ${CPPFLAGS} LDFlags: ${LDFLAGS} Libs: ${LIBS} - Mutt libs: ${MUTTLIBS} + Mutt libs: ${MUTTLIBS} ${HCACHE_LIBS} GPGME: $use_gpgme PGP: $use_pgp diff --git a/hcache/Makefile.am b/hcache/Makefile.am new file mode 100644 index 000000000..8d0c95840 --- /dev/null +++ b/hcache/Makefile.am @@ -0,0 +1,50 @@ +## Process this file with automake to produce Makefile.in +include $(top_srcdir)/flymake.am + +AUTOMAKE_OPTIONS = 1.6 foreign + +EXTRA_DIST = bdb.c gdbm.c hcache.c kc.c lmdb.c qdbm.c tc.c hcachever.sh + +AM_CPPFLAGS = -I$(top_srcdir) + +noinst_LIBRARIES = libhcache.a +noinst_HEADERS = backend.h hcache.h + +libhcache_a_SOURCES = + +if BUILD_HCACHE +HCVERSION = hcversion.h +CLEANFILES = $(HCVERSION) +libhcache_a_SOURCES += hcache.c +endif +if BUILD_HC_BDB +libhcache_a_SOURCES += bdb.c +endif +if BUILD_HC_GDBM +libhcache_a_SOURCES += gdbm.c +endif +if BUILD_HC_KC +libhcache_a_SOURCES += kc.c +endif +if BUILD_HC_LMDB +libhcache_a_SOURCES += lmdb.c +endif +if BUILD_HC_QDBM +libhcache_a_SOURCES += qdbm.c +endif +if BUILD_HC_TC +libhcache_a_SOURCES += tc.c +endif + +BUILT_SOURCES = $(HCVERSION) + +../$(MUTT_MD5): + +$(MAKE) -C .. $(MUTT_MD5) + +$(top_srcdir)/keymap_defs.h: + +$(MAKE) -C $(top_srcdir) keymap_defs.h + +hcversion.h: $(top_srcdir)/mutt.h $(top_srcdir)/rfc822.h $(srcdir)/hcachever.sh ../$(MUTT_MD5) + ( echo '#include "config.h"'; echo '#include "mutt.h"'; ) \ + | $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) - | sh $(srcdir)/hcachever.sh hcversion.h + diff --git a/hcache/README.md b/hcache/README.md new file mode 100644 index 000000000..668592edd --- /dev/null +++ b/hcache/README.md @@ -0,0 +1,13 @@ +# Header Cache + +These files make up NeoMutt's header cache. +There are six different databases to choose from: +- BerkeleyDB +- GDBM +- KyotoCabinet +- LMDB +- QDBM +- TokyoCabinet + +Each backend implements the interface which is defined in `hcache.h` + diff --git a/hcache_backend.h b/hcache/backend.h similarity index 100% rename from hcache_backend.h rename to hcache/backend.h diff --git a/hcache_bdb.c b/hcache/bdb.c similarity index 99% rename from hcache_bdb.c rename to hcache/bdb.c index 2072e791e..aff5991b5 100644 --- a/hcache_bdb.c +++ b/hcache/bdb.c @@ -23,7 +23,7 @@ #include #include #include "mutt.h" -#include "hcache_backend.h" +#include "backend.h" #include "mx.h" typedef struct diff --git a/hcache_gdbm.c b/hcache/gdbm.c similarity index 98% rename from hcache_gdbm.c rename to hcache/gdbm.c index dc200caf7..305991da5 100644 --- a/hcache_gdbm.c +++ b/hcache/gdbm.c @@ -21,7 +21,7 @@ #include "config.h" #include #include "mutt.h" -#include "hcache_backend.h" +#include "backend.h" static void *hcache_gdbm_open(const char *path) { diff --git a/hcache.c b/hcache/hcache.c similarity index 99% rename from hcache.c rename to hcache/hcache.c index 508331178..3936a9ef3 100644 --- a/hcache.c +++ b/hcache/hcache.c @@ -28,7 +28,7 @@ #include #include #include "hcache.h" -#include "hcache_backend.h" +#include "backend.h" #include "hcversion.h" #include "md5.h" diff --git a/hcache.h b/hcache/hcache.h similarity index 100% rename from hcache.h rename to hcache/hcache.h diff --git a/hcachever.sh.in b/hcache/hcachever.sh similarity index 97% rename from hcachever.sh.in rename to hcache/hcachever.sh index 730ca76b8..2eb88d082 100755 --- a/hcachever.sh.in +++ b/hcache/hcachever.sh @@ -81,7 +81,7 @@ do done echo " */" >> $TMPD -MD5TEXT=`echo "$TEXT" | ./mutt_md5` +MD5TEXT=`echo "$TEXT" | ../mutt_md5` echo "#define HCACHEVER 0x"`echo $MD5TEXT | cut -c-8` >> $TMPD # TODO: validate we have all structs diff --git a/hcache_kc.c b/hcache/kc.c similarity index 99% rename from hcache_kc.c rename to hcache/kc.c index bc55dfc55..0f70762e5 100644 --- a/hcache_kc.c +++ b/hcache/kc.c @@ -21,7 +21,7 @@ #include "config.h" #include #include "mutt.h" -#include "hcache_backend.h" +#include "backend.h" static void *hcache_kyotocabinet_open(const char *path) { diff --git a/hcache_lmdb.c b/hcache/lmdb.c similarity index 99% rename from hcache_lmdb.c rename to hcache/lmdb.c index 6bc31ab66..017da2d93 100644 --- a/hcache_lmdb.c +++ b/hcache/lmdb.c @@ -20,7 +20,7 @@ #include "config.h" #include -#include "hcache_backend.h" +#include "backend.h" #include "lib.h" /* The maximum size of the database file (2GiB). diff --git a/hcache_qdbm.c b/hcache/qdbm.c similarity index 98% rename from hcache_qdbm.c rename to hcache/qdbm.c index ec976fb3f..d4918b2c4 100644 --- a/hcache_qdbm.c +++ b/hcache/qdbm.c @@ -23,7 +23,7 @@ #include #include #include "mutt.h" -#include "hcache_backend.h" +#include "backend.h" static void *hcache_qdbm_open(const char *path) { diff --git a/hcache_tc.c b/hcache/tc.c similarity index 98% rename from hcache_tc.c rename to hcache/tc.c index 30ab1bd12..c360b86f2 100644 --- a/hcache_tc.c +++ b/hcache/tc.c @@ -21,7 +21,7 @@ #include "config.h" #include #include "mutt.h" -#include "hcache_backend.h" +#include "backend.h" static void *hcache_tokyocabinet_open(const char *path) { diff --git a/imap/imap.c b/imap/imap.c index 8c8194ab2..cdc4f7a7d 100644 --- a/imap/imap.c +++ b/imap/imap.c @@ -35,7 +35,7 @@ #include "mx.h" #include "sort.h" #ifdef USE_HCACHE -#include "hcache.h" +#include "hcache/hcache.h" #endif #ifdef USE_SSL #include "mutt_ssl.h" diff --git a/imap/imap_private.h b/imap/imap_private.h index 4a8630375..a1844353b 100644 --- a/imap/imap_private.h +++ b/imap/imap_private.h @@ -26,7 +26,7 @@ #include "mutt_curses.h" #include "mutt_socket.h" #ifdef USE_HCACHE -#include "hcache.h" +#include "hcache/hcache.h" #endif /* -- symbols -- */ diff --git a/imap/message.c b/imap/message.c index 854fd761a..8f607c9bf 100644 --- a/imap/message.c +++ b/imap/message.c @@ -27,7 +27,7 @@ #include "bcache.h" #include "mx.h" #ifdef USE_HCACHE -#include "hcache.h" +#include "hcache/hcache.h" #endif static void imap_update_context(IMAP_DATA *idata, int oldmsgcount) diff --git a/imap/util.c b/imap/util.c index bcd8f7049..62572d146 100644 --- a/imap/util.c +++ b/imap/util.c @@ -33,7 +33,7 @@ #include "mx.h" #include "url.h" #ifdef USE_HCACHE -#include "hcache.h" +#include "hcache/hcache.h" #endif /* -- public functions -- */ diff --git a/main.c b/main.c index 761ef2ee3..a57fc37f0 100644 --- a/main.c +++ b/main.c @@ -45,13 +45,12 @@ #include "imap/imap.h" #endif #ifdef USE_HCACHE -#include "hcache.h" +#include "hcache/hcache.h" #endif #ifdef USE_NNTP #include "nntp.h" #endif - #ifdef HAVE_STRINGPREP_H #include #elif defined(HAVE_IDN_STRINGPREP_H) diff --git a/mh.c b/mh.c index f26e16857..e98148e13 100644 --- a/mh.c +++ b/mh.c @@ -50,7 +50,7 @@ #include "mutt_notmuch.h" #endif #ifdef USE_HCACHE -#include "hcache.h" +#include "hcache/hcache.h" #endif #define INS_SORT_THRESHOLD 6 diff --git a/mx.h b/mx.h index 68215fba9..2a7d061e8 100644 --- a/mx.h +++ b/mx.h @@ -60,7 +60,7 @@ void maildir_update_flags(CONTEXT *ctx, HEADER *o, HEADER *n); void maildir_flags(char *dest, size_t destlen, HEADER *hdr); #ifdef USE_HCACHE -#include "hcache.h" +#include "hcache/hcache.h" int mh_sync_mailbox_message(CONTEXT *ctx, int msgno, header_cache_t *hc); #else int mh_sync_mailbox_message(CONTEXT *ctx, int msgno); diff --git a/newsrc.c b/newsrc.c index 97339ccb2..a8e635ceb 100644 --- a/newsrc.c +++ b/newsrc.c @@ -38,7 +38,7 @@ #include "rfc822.h" #include "sort.h" #ifdef USE_HCACHE -#include "hcache.h" +#include "hcache/hcache.h" #endif /* Find NNTP_DATA for given newsgroup or add it */ diff --git a/nntp.c b/nntp.c index e2884f001..f663595ea 100644 --- a/nntp.c +++ b/nntp.c @@ -36,7 +36,7 @@ #include "mutt_ssl.h" #endif #ifdef USE_HCACHE -#include "hcache.h" +#include "hcache/hcache.h" #endif #ifdef USE_SASL #include diff --git a/nntp.h b/nntp.h index 1e764bb79..cc25cdfe8 100644 --- a/nntp.h +++ b/nntp.h @@ -27,7 +27,7 @@ #include "mailbox.h" #include "mutt_socket.h" #ifdef USE_HCACHE -#include "hcache.h" +#include "hcache/hcache.h" #endif #define NNTP_PORT 119 diff --git a/po/POTFILES.in b/po/POTFILES.in index 4723637b1..588670201 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -40,13 +40,13 @@ gnupgparse.c group.c handler.c hash.c -hcache.c -hcache_bdb.c -hcache_gdbm.c -hcache_kc.c -hcache_lmdb.c -hcache_qdbm.c -hcache_tc.c +hcache/hcache.c +hcache/bdb.c +hcache/gdbm.c +hcache/kc.c +hcache/lmdb.c +hcache/qdbm.c +hcache/tc.c hdrline.c headers.c help.c diff --git a/pop.c b/pop.c index 48f29abde..29a282173 100644 --- a/pop.c +++ b/pop.c @@ -27,7 +27,7 @@ #include "mutt_curses.h" #include "mx.h" #ifdef USE_HCACHE -#include "hcache.h" +#include "hcache/hcache.h" #endif #ifdef USE_HCACHE diff --git a/version.c b/version.c index 2967bdc3f..58870853d 100644 --- a/version.c +++ b/version.c @@ -34,7 +34,7 @@ /* #include "protos.h" */ const char *mutt_make_version(void); void mutt_print_patchlist(void); -/* #include "hcache.h" */ +/* #include "hcache/hcache.h" */ const char *mutt_hcache_backend_list(void); const int SCREEN_WIDTH = 80;