From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id BD4E3138828 for ; Sun, 3 Feb 2013 14:32:36 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4482221C06F; Sun, 3 Feb 2013 14:32:31 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id ADE2821C065 for ; Sun, 3 Feb 2013 14:32:30 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 8AF4733DD78 for ; Sun, 3 Feb 2013 14:32:29 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 328ADE4073 for ; Sun, 3 Feb 2013 14:32:28 +0000 (UTC) From: "Sven Eden" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sven Eden" Message-ID: <1359901716.103ecb8a278b4dfc32af443f5004ee940a0bf762.yamakuzure@gentoo> Subject: [gentoo-commits] proj/ufed:master commit in: / X-VCS-Repository: proj/ufed X-VCS-Files: Makefile.am ufed-curses-globals.c ufed-curses-globals.h X-VCS-Directories: / X-VCS-Committer: yamakuzure X-VCS-Committer-Name: Sven Eden X-VCS-Revision: 103ecb8a278b4dfc32af443f5004ee940a0bf762 X-VCS-Branch: master Date: Sun, 3 Feb 2013 14:32:28 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: b9a9ee2f-b2e2-458b-8518-b7f9692d7ea5 X-Archives-Hash: 318c05c8c66557fd504c97ab819a40fe commit: 103ecb8a278b4dfc32af443f5004ee940a0bf762 Author: Sven Eden gmx de> AuthorDate: Sun Feb 3 14:28:36 2013 +0000 Commit: Sven Eden gmx de> CommitDate: Sun Feb 3 14:28:36 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/ufed.git;a=commit;h=103ecb8a Moved global variables to the new files ufed-curses-globals.c and ufed-curses-globals.h to clean up both ufed-curses.c and ufed-curses-checklist.c. Further this move should reduce confusion about what is desclared and/or defined where. --- Makefile.am | 16 ++++++++++++++-- ufed-curses-globals.c | 26 ++++++++++++++++++++++++++ ufed-curses-globals.h | 23 +++++++++++++++++++++++ 3 files changed, 63 insertions(+), 2 deletions(-) diff --git a/Makefile.am b/Makefile.am index 8cd390c..3bbcd4c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -7,8 +7,20 @@ sbin_SCRIPTS = ufed libexec_PROGRAMS = ufed-curses dist_perl_DATA = Portage.pm -ufed_curses_SOURCES = ufed-curses-types.c ufed-curses.c ufed-curses-checklist.c ufed-curses-help.c -noinst_HEADERS = ufed-curses-types.h ufed-curses.h ufed-curses-help.h ufed-curses-debug.h +ufed_curses_SOURCES = \ + ufed-curses.c \ + ufed-curses-checklist.c \ + ufed-curses-help.c \ + ufed-curses-globals.c \ + ufed-curses-types.c + +noinst_HEADERS = \ + ufed-curses.h \ + ufed-curses-debug.h \ + ufed-curses-globals.h \ + ufed-curses-help.h \ + ufed-curses-types.h + dist_man_MANS = ufed.8 EXTRA_DIST = ufed.pl.in diff --git a/ufed-curses-globals.c b/ufed-curses-globals.c new file mode 100644 index 0000000..d43c4f1 --- /dev/null +++ b/ufed-curses-globals.c @@ -0,0 +1,26 @@ +/* + * ufed-curses-globals.c + * + * Created on: 03.02.2013 + * Author: Sven Eden + */ + +#include "ufed-curses-types.h" + +int bottomline = 0; +int minwidth = 0; +int topline = 0; +eMask e_mask = eMask_unmasked; +eOrder e_order = eOrder_left; +eScope e_scope = eScope_all; +eState e_state = eState_all; +sListStats listStats = { 0, 0, 0, 0, 0, 0 }; +sWindow window[wCount] = { + { NULL, 0, 0, 5, 0 }, /* Top --- Top ---- */ + { NULL, 5, 0, -8, 3 }, /* Left L+------+S|R */ + { NULL, 5, 3, -9, -6 }, /* List E| |c|i */ + { NULL, -4, 3, 1, -6 }, /* Input F| List |r|g */ + { NULL, 5, -3, -8, 1 }, /* Scrollbar T|______|B|h */ + { NULL, 5, -2, -8, 2 }, /* Right |+Input-+r|t */ + { NULL, -3, 0, 3, 0 }, /* Bottom ---Bottom--- */ +}; diff --git a/ufed-curses-globals.h b/ufed-curses-globals.h new file mode 100644 index 0000000..263590b --- /dev/null +++ b/ufed-curses-globals.h @@ -0,0 +1,23 @@ +/* + * ufed-curses-globals.h + * + * Created on: 03.02.2013 + * Author: Sven Eden + */ +#pragma once +#ifndef UFED_CURSES_GLOBALS_H_ +#define UFED_CURSES_GLOBALS_H_ + +#include "ufed-curses-types.h" + +extern int bottomline; +extern eMask e_mask; +extern eOrder e_order; +extern eScope e_scope; +extern eState e_state; +extern sListStats listStats; +extern int minwidth; +extern int topline; +extern sWindow window[wCount]; + +#endif /* UFED_CURSES_GLOBALS_H_ */