The following commit has been merged in the master branch:
commit ef091557f01d8f5751531b5fc4ab68b55d657109
Author: Guillem Jover <[email protected]>
Date: Sun Jan 4 16:31:13 2009 +0200
dselect: Define several private functions as static
diff --git a/ChangeLog b/ChangeLog
index 63ed1e4..382eef7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-01-04 Guillem Jover <[email protected]>
+
+ * dselect/main.cc (findintable, dme, refreshmenu): Make static.
+ * dselect/method.cc (sthfailed): Likewise.
+ * dselect/pkgtop.cc (pkgprioritystring): Likewise.
+
2008-12-30 Guillem Jover <[email protected]>
* lib/ehandle.c (badusage): Move function to ...
diff --git a/dselect/main.cc b/dselect/main.cc
index 34500ce..82ff324 100644
--- a/dselect/main.cc
+++ b/dselect/main.cc
@@ -226,7 +226,9 @@ extern "C" {
expertmode= 1;
}
- int findintable(const struct table_t *table, const char *item, const char
*tablename) {
+ static int
+ findintable(const struct table_t *table, const char *item, const char
*tablename)
+ {
int i;
for (i= 0; item && (table[i].name!=NULL); i++)
@@ -359,7 +361,9 @@ urqresult urq_list(void) {
return urqr_normal;
}
-void dme(int i, int so) {
+static void
+dme(int i, int so)
+{
char buf[120];
const menuentry *me= &menuentries[i];
sprintf(buf," %c %d. %-11.11s %-80.80s ",
@@ -375,7 +379,9 @@ void dme(int i, int so) {
attrset(A_NORMAL);
}
-int refreshmenu(void) {
+static int
+refreshmenu(void)
+{
char buf[2048];
static int l,lockfd;
static char *lockfile;
diff --git a/dselect/method.cc b/dselect/method.cc
index 1ab2cca..3ec9e40 100644
--- a/dselect/method.cc
+++ b/dselect/method.cc
@@ -58,7 +58,9 @@ static const char *const methoddirectories[]= {
static char *methodlockfile= 0;
static int methlockfd= -1;
-void sthfailed(const char * reasoning) {
+static void
+sthfailed(const char * reasoning)
+{
char buf[2048];
curseson();
diff --git a/dselect/pkgtop.cc b/dselect/pkgtop.cc
index 21a2cb4..da11941 100644
--- a/dselect/pkgtop.cc
+++ b/dselect/pkgtop.cc
@@ -35,7 +35,9 @@
#include "dselect.h"
#include "pkglist.h"
-const char *pkgprioritystring(const struct pkginfo *pkg) {
+static const char *
+pkgprioritystring(const struct pkginfo *pkg)
+{
if (pkg->priority == pkginfo::pri_unset) {
return 0;
} else if (pkg->priority == pkginfo::pri_other) {
--
dpkg's main repository
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]