aboutsummaryrefslogtreecommitdiff
path: root/src/progman.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2009-11-09 02:33:47 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2009-11-09 02:33:47 +0200
commit07b7c58b5faeb5973b003af94c67540202964bb5 (patch)
treefcc094b9e9cd9a14bfdf132e0e40322c253a7274 /src/progman.c
parente3405029a2ae73a7d7e9c93624f8206dbd2f2d1c (diff)
downloadpies-07b7c58b5faeb5973b003af94c67540202964bb5.tar.gz
pies-07b7c58b5faeb5973b003af94c67540202964bb5.tar.bz2
Minor change.
* src/depmap.c (struct pies_depmap.nrows,rowlen): Change type to size_t. (depmap_alloc, depmap_rowptr) (depmap_set, depmap_isset) (depmap_next, depmap_first): Use size_t to index map elements. * src/pies.h: Update prototypes accordingly. * src/progman.c: Update depmap function usage.
Diffstat (limited to 'src/progman.c')
-rw-r--r--src/progman.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/progman.c b/src/progman.c
index 456b5ff..f241915 100644
--- a/src/progman.c
+++ b/src/progman.c
@@ -47,7 +47,7 @@ struct prog
struct
{
struct component *comp;
- unsigned idx; /* Numeric identifier */
+ size_t idx; /* Numeric identifier */
int socket;
struct prog *redir[2]; /* Pointers to redirectors */
time_t timestamp; /* Time of last startup */
@@ -69,7 +69,7 @@ struct prog
#define IS_COMPONENT(p) ((p)->type == TYPE_COMPONENT)
-static unsigned numcomp;
+static size_t numcomp;
static struct prog *proghead, *progtail;
static pies_depmap_t depmap;
static int recompute_alarm;
@@ -944,11 +944,11 @@ void
print_dep (struct prog *prog)
{
pies_depmap_pos_t pos;
- unsigned n;
+ size_t n;
logmsg_printf (LOG_NOTICE, "%s -> ", prog->tag);
for (n = depmap_first (depmap, depmap_col, prog->v.p.idx, &pos);
- n != (unsigned)-1;
+ n != (size_t)-1;
n = depmap_next (depmap, pos))
{
struct prog *dp = prog_lookup_by_idx (n);
@@ -976,16 +976,16 @@ void
progman_dump_depmap ()
{
struct prog *prog;
- unsigned i, j;
+ size_t i, j;
printf ("%s:\n", _("Dependency map"));
printf (" ");
for (i = 0; i < numcomp; i++)
- printf (" %2d", i);
+ printf (" %2lu", (unsigned long)i);
printf ("\n");
for (i = 0; i < numcomp; i++)
{
- printf ("%2d ", i);
+ printf ("%2lu ", (unsigned long)i);
for (j = 0; j < numcomp; j++)
printf (" %c ", depmap_isset (depmap, i, j) ? 'X' : ' ');
printf ("\n");
@@ -995,7 +995,7 @@ progman_dump_depmap ()
{
prog = prog_lookup_by_idx (i);
if (prog)
- printf ("%2d: %s\n", i, prog->tag);
+ printf ("%2d: %s\n", (unsigned long)i, prog->tag);
}
}
@@ -1003,7 +1003,7 @@ int
progman_build_depmap ()
{
int rc = 0;
- unsigned i;
+ size_t i;
struct prog *prog;
pies_depmap_t dp;
@@ -1244,12 +1244,12 @@ void
prog_stop_dependents (struct prog *prog)
{
pies_depmap_pos_t pos;
- unsigned n;
+ size_t n;
int warned = 0;
prog_stop_redirectors (prog);
for (n = depmap_first (depmap, depmap_row, prog->v.p.idx, &pos);
- n != (unsigned)-1;
+ n != (size_t)-1;
n = depmap_next (depmap, pos))
{
struct prog *dp = prog_lookup_by_idx (n);

Return to:

Send suggestions and report system problems to the System administrator.