Update to xpilot-4.5.5.
getline -> get_line from Gonzalo L. R.
This commit is contained in:
parent
30179d8416
commit
c01d102371
@ -1,12 +1,12 @@
|
||||
# $OpenBSD: Makefile,v 1.25 2011/03/14 09:17:00 sthen Exp $
|
||||
# $OpenBSD: Makefile,v 1.26 2012/03/17 15:09:45 ajacoutot Exp $
|
||||
|
||||
COMMENT= multiplayer 2d space battles game
|
||||
|
||||
DISTNAME= xpilot-4.5.4
|
||||
REVISION = 4
|
||||
DISTNAME= xpilot-4.5.5
|
||||
CATEGORIES= games x11
|
||||
|
||||
HOMEPAGE= http://www.xpilot.org/
|
||||
EXTRACT_SUFX= .tar.bz2
|
||||
|
||||
MAINTAINER= Peter Valchev <pvalchev@openbsd.org>
|
||||
|
||||
@ -15,11 +15,9 @@ PERMIT_PACKAGE_FTP= Yes
|
||||
PERMIT_DISTFILES_CDROM= Yes
|
||||
PERMIT_DISTFILES_FTP= Yes
|
||||
|
||||
WANTLIB= X11 Xau Xdmcp Xext c m pthread-stubs xcb
|
||||
WANTLIB= X11 Xau Xdmcp Xext c m
|
||||
|
||||
MASTER_SITES= ftp://ftp.xpilot.org/pub/xpilot/ \
|
||||
ftp://ftp.xpilot.org/pub/xpilot/old \
|
||||
${MASTER_SITE_XCONTRIB:=games/multiplayer/}
|
||||
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=xpilotgame/}
|
||||
|
||||
USE_GROFF = Yes
|
||||
NO_REGRESS= Yes
|
||||
|
@ -1,5 +1,5 @@
|
||||
MD5 (xpilot-4.5.4.tar.gz) = 8ndP2lk4YpAB7WWjEVVMAQ==
|
||||
RMD160 (xpilot-4.5.4.tar.gz) = 245i+/p6e6GavrQdplGuSwKYu8I=
|
||||
SHA1 (xpilot-4.5.4.tar.gz) = 0pWXe+jCfDua7PjmkGGkUb+Nfks=
|
||||
SHA256 (xpilot-4.5.4.tar.gz) = JUWVNyb17ro9Yolw2xPJ4dHW8UMCQg4OdNTuDqcuMAg=
|
||||
SIZE (xpilot-4.5.4.tar.gz) = 1384615
|
||||
MD5 (xpilot-4.5.5.tar.bz2) = EgKZbaXjW3NycCuSh+ZfxA==
|
||||
RMD160 (xpilot-4.5.5.tar.bz2) = 0RdqvGxsCnO6D45YhwN6XAUEvKI=
|
||||
SHA1 (xpilot-4.5.5.tar.bz2) = enuU7K63Kct8fRY/p/Ub65Dgf/c=
|
||||
SHA256 (xpilot-4.5.5.tar.bz2) = XkBCTQk8i3EhcKXf8zlt9jMCd19C2oKbiDKEDzWc2So=
|
||||
SIZE (xpilot-4.5.5.tar.bz2) = 1115502
|
||||
|
93
games/xpilot/patches/patch-src_client_textinterface_c
Normal file
93
games/xpilot/patches/patch-src_client_textinterface_c
Normal file
@ -0,0 +1,93 @@
|
||||
$OpenBSD: patch-src_client_textinterface_c,v 1.1 2012/03/17 15:09:45 ajacoutot Exp $
|
||||
--- src/client/textinterface.c.orig Sat Mar 17 11:58:08 2012
|
||||
+++ src/client/textinterface.c Sat Mar 17 11:58:50 2012
|
||||
@@ -75,7 +75,7 @@ extern char hostname[]; /* my local hostname */
|
||||
/*
|
||||
* just like fgets() but strips newlines like gets().
|
||||
*/
|
||||
-static char* getline(char* buf, int len, FILE* stream)
|
||||
+static char* get_line(char* buf, int len, FILE* stream)
|
||||
{
|
||||
char *nl;
|
||||
|
||||
@@ -305,7 +305,7 @@ static bool Process_commands(sockbuf_t *ibuf,
|
||||
else if (!auto_connect) {
|
||||
printf("*** Server on %s. Enter command> ", conpar->server_name);
|
||||
|
||||
- getline(linebuf, MAX_LINE-1, stdin);
|
||||
+ get_line(linebuf, MAX_LINE-1, stdin);
|
||||
if (feof(stdin)) {
|
||||
puts("");
|
||||
c = 'Q';
|
||||
@@ -385,7 +385,7 @@ static bool Process_commands(sockbuf_t *ibuf,
|
||||
case 'K':
|
||||
printf("Enter name of victim: ");
|
||||
fflush(stdout);
|
||||
- if (!getline(linebuf, MAX_LINE-1, stdin)) {
|
||||
+ if (!get_line(linebuf, MAX_LINE-1, stdin)) {
|
||||
printf("Nothing changed.\n");
|
||||
continue;
|
||||
}
|
||||
@@ -396,7 +396,7 @@ static bool Process_commands(sockbuf_t *ibuf,
|
||||
case 'R':
|
||||
printf("Enter maximum number of robots: ");
|
||||
fflush(stdout);
|
||||
- if (!getline(linebuf, MAX_LINE-1, stdin)) {
|
||||
+ if (!get_line(linebuf, MAX_LINE-1, stdin)) {
|
||||
printf("Nothing changed.\n");
|
||||
continue;
|
||||
}
|
||||
@@ -410,7 +410,7 @@ static bool Process_commands(sockbuf_t *ibuf,
|
||||
case 'M': /* Send a message to server. */
|
||||
printf("Enter message: ");
|
||||
fflush(stdout);
|
||||
- if (!getline(linebuf, MAX_LINE-1, stdin) || !linebuf[0]) {
|
||||
+ if (!get_line(linebuf, MAX_LINE-1, stdin) || !linebuf[0]) {
|
||||
printf("No message sent.\n");
|
||||
continue;
|
||||
}
|
||||
@@ -425,7 +425,7 @@ static bool Process_commands(sockbuf_t *ibuf,
|
||||
case 'D': /* Shutdown */
|
||||
if (!auto_shutdown) {
|
||||
printf("Enter delay in seconds or return for cancel: ");
|
||||
- getline(linebuf, MAX_LINE-1, stdin);
|
||||
+ get_line(linebuf, MAX_LINE-1, stdin);
|
||||
/*
|
||||
* No argument = cancel shutdown = arg_int=0
|
||||
*/
|
||||
@@ -436,7 +436,7 @@ static bool Process_commands(sockbuf_t *ibuf,
|
||||
delay = 1;
|
||||
|
||||
printf("Enter reason: ");
|
||||
- getline(linebuf, MAX_LINE-1, stdin);
|
||||
+ get_line(linebuf, MAX_LINE-1, stdin);
|
||||
} else {
|
||||
strlcpy(linebuf, shutdown_reason, sizeof(linebuf));
|
||||
delay = 60;
|
||||
@@ -448,7 +448,7 @@ static bool Process_commands(sockbuf_t *ibuf,
|
||||
case 'O': /* Tune an option. */
|
||||
printf("Enter option: ");
|
||||
fflush(stdout);
|
||||
- if (!getline(linebuf, MAX_LINE-1, stdin)
|
||||
+ if (!get_line(linebuf, MAX_LINE-1, stdin)
|
||||
|| (len=strlen(linebuf)) == 0) {
|
||||
printf("Nothing changed.\n");
|
||||
continue;
|
||||
@@ -456,7 +456,7 @@ static bool Process_commands(sockbuf_t *ibuf,
|
||||
printf("Enter new value for %s: ", linebuf);
|
||||
fflush(stdout);
|
||||
strcat(linebuf, ":"); len++;
|
||||
- if (!getline(&linebuf[len], MAX_LINE-1-len, stdin)
|
||||
+ if (!get_line(&linebuf[len], MAX_LINE-1-len, stdin)
|
||||
|| linebuf[len] == '\0') {
|
||||
printf("Nothing changed.\n");
|
||||
continue;
|
||||
@@ -516,7 +516,7 @@ static bool Process_commands(sockbuf_t *ibuf,
|
||||
case 'T': /* Set team. */
|
||||
printf("Enter team: ");
|
||||
fflush(stdout);
|
||||
- if (!getline(linebuf, MAX_LINE-1, stdin)
|
||||
+ if (!get_line(linebuf, MAX_LINE-1, stdin)
|
||||
|| (len = strlen(linebuf)) == 0) {
|
||||
printf("Nothing changed.\n");
|
||||
}
|
@ -1,8 +1,8 @@
|
||||
@comment $OpenBSD: PLIST,v 1.6 2005/09/05 13:56:39 espie Exp $
|
||||
bin/xp-mapedit
|
||||
bin/xp-replay
|
||||
bin/xpilot
|
||||
bin/xpilots
|
||||
@comment $OpenBSD: PLIST,v 1.7 2012/03/17 15:09:45 ajacoutot Exp $
|
||||
@bin bin/xp-mapedit
|
||||
@bin bin/xp-replay
|
||||
@bin bin/xpilot
|
||||
@bin bin/xpilots
|
||||
@man man/cat6/xp-mapedit.0
|
||||
@man man/cat6/xp-replay.0
|
||||
@man man/cat6/xpilot.0
|
||||
|
Loading…
Reference in New Issue
Block a user