diff options
author | Dmitry Sivachenko <demon@FreeBSD.org> | 2003-04-07 07:29:21 +0000 |
---|---|---|
committer | Dmitry Sivachenko <demon@FreeBSD.org> | 2003-04-07 07:29:21 +0000 |
commit | 73c6e70ef914cdebe56236f6c4c74f8659675492 (patch) | |
tree | 221272414328b4950b16e5aae2100eb5776cb4a2 /net/clusterit | |
parent | b434d3b119ab95a76b528b59750922799aef6520 (diff) | |
download | ports-73c6e70ef914cdebe56236f6c4c74f8659675492.tar.gz ports-73c6e70ef914cdebe56236f6c4c74f8659675492.zip |
Notes
Diffstat (limited to 'net/clusterit')
-rw-r--r-- | net/clusterit/Makefile | 1 | ||||
-rw-r--r-- | net/clusterit/files/patch-alignstring | 121 | ||||
-rw-r--r-- | net/clusterit/files/patch-common::common.c | 34 | ||||
-rw-r--r-- | net/clusterit/files/patch-tools::dshbak.src | 24 |
4 files changed, 180 insertions, 0 deletions
diff --git a/net/clusterit/Makefile b/net/clusterit/Makefile index 1709c7d8e563..4450f9f608c3 100644 --- a/net/clusterit/Makefile +++ b/net/clusterit/Makefile @@ -7,6 +7,7 @@ PORTNAME= clusterit PORTVERSION= 2.0 +PORTREVISION= 1 CATEGORIES= net devel parallel MASTER_SITES= http://www.garbled.net/download/ \ ftp://ftp.chg.ru/pub/prog/parallel/tools/clusterit/ diff --git a/net/clusterit/files/patch-alignstring b/net/clusterit/files/patch-alignstring new file mode 100644 index 000000000000..4c4d9b125229 --- /dev/null +++ b/net/clusterit/files/patch-alignstring @@ -0,0 +1,121 @@ +diff -ru clusterit-2.0/common/common.c clusterit-2.0-new/common/common.c +--- common/common.c Sat Apr 5 17:01:50 2003 ++++ common/common.c Sat Apr 5 16:56:15 2003 +@@ -316,24 +316,6 @@ + + #endif /* CLUSTERS */ + +-/* return a string, followed by n - strlen spaces */ +- +-char * +-alignstring(string, n) +- char *string; +- size_t n; +-{ +- size_t i; +- char *newstring; +- +- newstring = strdup(string); +- for (i=1; i <= n - strlen(string); i++) +- newstring = strcat(newstring, " "); +- +- return(newstring); +-} +- +- + /* + * Simple error handling routine, needs severe work. + * Its almost totally useless. +diff -ru clusterit-2.0/common/common.h clusterit-2.0-new/common/common.h +--- common/common.h Tue Aug 14 04:21:39 2001 ++++ common/common.h Sat Apr 5 16:56:32 2003 +@@ -78,7 +78,6 @@ + typedef struct group_data group_t; + + void bailout __P((int)); +-char *alignstring __P((char *, size_t)); + #ifndef __NetBSD__ + char * strsep(char **stringp, const char *delim); + #endif +diff -ru clusterit-2.0/dsh/dsh.c clusterit-2.0-new/dsh/dsh.c +--- dsh/dsh.c Tue Aug 14 04:21:38 2001 ++++ dsh/dsh.c Sat Apr 5 16:58:38 2003 +@@ -399,8 +399,8 @@ + bailout(__LINE__); + while ((cd = fgets(pipebuf, sizeof(pipebuf), fd))) { + if (cd != NULL) +- (void)printf("%s: %s", +- alignstring(nodeptr->name, maxnodelen), cd); ++ (void)printf("%*s: %s", ++ -maxnodelen, nodeptr->name, cd); + } + fclose(fd); + fd = fdopen(nodeptr->err.fds[0], "r"); /* stderr */ +@@ -408,8 +408,8 @@ + bailout(__LINE__); + while ((cd = fgets(pipebuf, sizeof(pipebuf), fd))) { + if (errorflag && cd != NULL) +- (void)printf("%s: %s", +- alignstring(nodeptr->name, maxnodelen), cd); ++ (void)printf("%*s: %s", ++ -maxnodelen, nodeptr->name, cd); + } + fclose(fd); + (void)wait(&status); +diff -ru clusterit-2.0/dsh/run.c clusterit-2.0-new/dsh/run.c +--- dsh/run.c Tue Aug 14 04:21:38 2001 ++++ dsh/run.c Sat Apr 5 16:59:35 2003 +@@ -326,13 +326,12 @@ + bailout(__LINE__); + fd = fdopen(nodeptr->out.fds[0], "r"); /* stdout */ + while ((p = fgets(buf, sizeof(buf), fd))) +- (void)printf("%s: %s", alignstring(nodeptr->name, maxnodelen), p); ++ (void)printf("%*s: %s", -maxnodelen, nodeptr->name, p); + fclose(fd); + fd = fdopen(nodeptr->err.fds[0], "r"); /* stderr */ + while ((p = fgets(buf, sizeof(buf), fd))) + if (errorflag) +- (void)printf("%s: %s", +- alignstring(nodeptr->name, maxnodelen), p); ++ (void)printf("%*s: %s", -maxnodelen, nodeptr->name, p); + fclose(fd); + (void)wait(&status); + if (piping) { +diff -ru clusterit-2.0/dvt/dvt.c clusterit-2.0-new/dvt/dvt.c +--- dvt/dvt.c Tue Aug 14 04:21:37 2001 ++++ dvt/dvt.c Sat Apr 5 17:00:07 2003 +@@ -610,8 +610,8 @@ + bailout(__LINE__); + while ((cd = fgets(pipebuf, sizeof(pipebuf), fd))) { + if (errorflag && cd != NULL) +- (void)printf("ERROR %s: %s", +- alignstring(nodeptr->name, maxnodelen), cd); ++ (void)printf("ERROR %*s: %s", ++ -maxnodelen, nodeptr->name, cd); + } + fclose(fd); + (void)waitpid(nodeptr->childpid, &status, 0); +diff -ru clusterit-2.0/pcp/pcp.c clusterit-2.0-new/pcp/pcp.c +--- pcp/pcp.c Tue Aug 14 04:21:34 2001 ++++ pcp/pcp.c Sat Apr 5 16:58:00 2003 +@@ -383,16 +383,16 @@ + bailout(__LINE__); + while ((cd = fgets(pipebuf, sizeof(pipebuf), fd))) + if (cd != NULL && !quiet) +- (void)printf("%s: %s", +- alignstring(nodeptr->name, maxnodelen), cd); ++ (void)printf("%*s: %s", ++ -maxnodelen, nodeptr->name, cd); + fclose(fd); + fd = fdopen(nodeptr->err.fds[0], "r"); /* stderr */ + if (fd == NULL) + bailout(__LINE__); + while ((cd = fgets(pipebuf, sizeof(pipebuf), fd))) + if (cd != NULL && !quiet) +- (void)printf("%s: %s", +- alignstring(nodeptr->name, maxnodelen), cd); ++ (void)printf("%*s: %s", ++ -maxnodelen, nodeptr->name, cd); + fclose(fd); + (void)wait(&status); + nodeptr = nodeptr->next; diff --git a/net/clusterit/files/patch-common::common.c b/net/clusterit/files/patch-common::common.c new file mode 100644 index 000000000000..dc05639cbec2 --- /dev/null +++ b/net/clusterit/files/patch-common::common.c @@ -0,0 +1,34 @@ +Index: common/common.c +=================================================================== +RCS file: /cvsroot/src/common/common.c,v +retrieving revision 1.5 +retrieving revision 1.6 +diff -u -r1.5 -r1.6 +--- common/common.c 2001/08/13 21:04:22 1.5 ++++ common/common.c 2001/08/16 19:08:17 1.6 +@@ -1,4 +1,4 @@ +-/* $Id: common.c,v 1.5 2001/08/13 21:04:22 garbled Exp $ */ ++/* $Id: common.c,v 1.6 2001/08/16 19:08:17 garbled Exp $ */ + /* + * Copyright (c) 1998, 1999, 2000 + * Tim Rightnour. All rights reserved. +@@ -42,7 +42,7 @@ + __COPYRIGHT( + "@(#) Copyright (c) 1998, 1999, 2000\n\ + Tim Rightnour. All rights reserved\n"); +-__RCSID("$Id: common.c,v 1.5 2001/08/13 21:04:22 garbled Exp $"); ++__RCSID("$Id: common.c,v 1.6 2001/08/16 19:08:17 garbled Exp $"); + #endif + + +@@ -91,8 +91,8 @@ + for (i=0; (i < fanout && nodeptr != NULL); i++) { + l++; + group = NULL; +- if (nodeptr->group >= 0) +- group = strdup(grouplist[nodeptr->group].name); ++ if (nodeptr->group >= 0 && grouplist[nodeptr->group].name) ++ group = strdup(grouplist[nodeptr->group].name); + if (group == NULL) + (void)printf("Node: %3d Fangroup: %3d Rungroup: None" + " Host: %-15s\n", l, n + 1, nodeptr->name); diff --git a/net/clusterit/files/patch-tools::dshbak.src b/net/clusterit/files/patch-tools::dshbak.src new file mode 100644 index 000000000000..cc84ce44bf47 --- /dev/null +++ b/net/clusterit/files/patch-tools::dshbak.src @@ -0,0 +1,24 @@ +--- tools/dshbak.src Sat Apr 5 15:54:14 2003 ++++ tools/dshbak.src Sat Apr 5 15:52:53 2003 +@@ -1,7 +1,10 @@ + #!@@@AWK@@@ -f + # $Id: dshbak.src,v 1.2 1999/05/05 09:20:45 garbled Exp $ + # dshbak *must have nawk or compatible* +-BEGIN { LASTNODE="null" } ++BEGIN { ++ LASTNODE="null" ++ FS=":" ++} + { + if ($1 != LASTNODE) { + LASTNODE = $1 +@@ -9,8 +12,7 @@ + gsub(/./,"-",FOO) + printf("-----%s\nNode %s\n-----%s\n", FOO, $1, FOO) + } +- sub(/:/,"!@#$!") +- sub(/^.*!@#$! /,"") ++ sub(/^[^:]*: /,"") + print $0 + } + |