Patch up some problems found by compiling with gcc. PKGREVISION -> 12.diff -r1.46 -r1.47 pkgsrc/x11/aterm/Makefile
(dholland)
@@ -1,18 +1,18 @@ | @@ -1,18 +1,18 @@ | |||
1 | # $NetBSD: Makefile,v 1.46 2014/10/09 14:07:13 wiz Exp $ | 1 | # $NetBSD: Makefile,v 1.47 2016/05/01 19:56:40 dholland Exp $ | |
2 | # | 2 | # | |
3 | 3 | |||
4 | DISTNAME= aterm-1.0.0 | 4 | DISTNAME= aterm-1.0.0 | |
5 | PKGREVISION= 11 | 5 | PKGREVISION= 12 | |
6 | CATEGORIES= x11 | 6 | CATEGORIES= x11 | |
7 | MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=aterm/} | 7 | MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=aterm/} | |
8 | EXTRACT_SUFX= .tar.bz2 | 8 | EXTRACT_SUFX= .tar.bz2 | |
9 | #CVS_ROOT= :pserver:anonymous@cvs.aftercode.net:/home/cvsroot | 9 | #CVS_ROOT= :pserver:anonymous@cvs.aftercode.net:/home/cvsroot | |
10 | #CVS_MODULE= aterm1 | 10 | #CVS_MODULE= aterm1 | |
11 | 11 | |||
12 | MAINTAINER= pkgsrc-users@NetBSD.org | 12 | MAINTAINER= pkgsrc-users@NetBSD.org | |
13 | HOMEPAGE= http://www.afterstep.org/aterm.php | 13 | HOMEPAGE= http://www.afterstep.org/aterm.php | |
14 | COMMENT= Aterm (Afterstep XVT) - a VT102 emulator for the X window system | 14 | COMMENT= Aterm (Afterstep XVT) - a VT102 emulator for the X window system | |
15 | 15 | |||
16 | GNU_CONFIGURE= YES | 16 | GNU_CONFIGURE= YES | |
17 | MAKE_JOBS_SAFE= no | 17 | MAKE_JOBS_SAFE= no | |
18 | 18 |
@@ -1,10 +1,13 @@ | @@ -1,10 +1,13 @@ | |||
1 | $NetBSD: distinfo,v 1.15 2015/11/04 03:28:25 agc Exp $ | 1 | $NetBSD: distinfo,v 1.16 2016/05/01 19:56:40 dholland Exp $ | |
2 | 2 | |||
3 | SHA1 (aterm-1.0.0.tar.bz2) = 806fd20aec2851c5eea26d9e6a707985da3579a3 | 3 | SHA1 (aterm-1.0.0.tar.bz2) = 806fd20aec2851c5eea26d9e6a707985da3579a3 | |
4 | RMD160 (aterm-1.0.0.tar.bz2) = b74f54b6aa6f1d4a094671507c30f627f074eb48 | 4 | RMD160 (aterm-1.0.0.tar.bz2) = b74f54b6aa6f1d4a094671507c30f627f074eb48 | |
5 | SHA512 (aterm-1.0.0.tar.bz2) = 715cbf0416ff8cf23705a5333f0666a1f3afec3e17c6988e196f1798b1b4cf75e43085572b9d2906aee6060771a792545a7aa0aa9d2f4c2f0e7db7ac6e4021d3 | 5 | SHA512 (aterm-1.0.0.tar.bz2) = 715cbf0416ff8cf23705a5333f0666a1f3afec3e17c6988e196f1798b1b4cf75e43085572b9d2906aee6060771a792545a7aa0aa9d2f4c2f0e7db7ac6e4021d3 | |
6 | Size (aterm-1.0.0.tar.bz2) = 248708 bytes | 6 | Size (aterm-1.0.0.tar.bz2) = 248708 bytes | |
7 | SHA1 (patch-aa) = 3db1064f3998d1d901902c4309841e102db32fa4 | 7 | SHA1 (patch-aa) = 63dd4599dcf49c6269502d7871b99ae01e42f581 | |
8 | SHA1 (patch-ac) = 28c79343079680251a013ec3fe364b01f5a5ccac | 8 | SHA1 (patch-ac) = 28c79343079680251a013ec3fe364b01f5a5ccac | |
9 | SHA1 (patch-ad) = 0c87ee69672e98189afa2cfdcdd9691a1571f354 | 9 | SHA1 (patch-ad) = 0c87ee69672e98189afa2cfdcdd9691a1571f354 | |
10 | SHA1 (patch-ae) = f94dfb058d2b6e54e8deef96f6c8c429c0f64463 | 10 | SHA1 (patch-ae) = 4c08e766c18c46a9e606d80cc785d954cb2bf14c | |
11 | SHA1 (patch-src_misc.c) = af6b8c7ccde2dba8bbcdcd91f7e6e37c3d1c5301 | |||
12 | SHA1 (patch-src_pixmap.c) = 6288ba39bb7c7d80df7a48ff9df53cebee29a84c | |||
13 | SHA1 (patch-src_xdefaults.c) = dec764692c359503d6bd091dbfd2c44bdf220cf8 |
@@ -1,30 +1,61 @@ | @@ -1,30 +1,61 @@ | |||
1 | $NetBSD: patch-aa,v 1.5 2008/05/27 21:46:53 tonnerre Exp $ | 1 | $NetBSD: patch-aa,v 1.6 2016/05/01 19:56:40 dholland Exp $ | |
2 | 2 | |||
3 | --- src/main.c.orig 2005-06-20 18:10:19.000000000 +0200 | 3 | - Use ctype.h functions properly. | |
4 | - Silence debug prints. | |||
5 | - Don't assume :0 if DISPLAY isn't set. | |||
6 | ||||
7 | --- src/main.c.orig 2005-06-20 16:10:19.000000000 +0000 | |||
4 | +++ src/main.c | 8 | +++ src/main.c | |
9 | @@ -196,7 +196,7 @@ xerror_handler (Display * dpy, XErrorEve | |||
10 | void | |||
11 | color_aliases(int idx) | |||
12 | { | |||
13 | - if (rs_color[idx] && isdigit(*rs_color[idx])) { | |||
14 | + if (rs_color[idx] && isdigit((unsigned char)*rs_color[idx])) { | |||
15 | int i = atoi(rs_color[idx]); | |||
16 | ||||
17 | if (i >= 8 && i <= 15) { /* bright colors */ | |||
5 | @@ -1037,12 +1037,10 @@ resize_window(XEvent* ev) | 18 | @@ -1037,12 +1037,10 @@ resize_window(XEvent* ev) | |
6 | XConfigureEvent *xconf = &(ev->xconfigure); | 19 | XConfigureEvent *xconf = &(ev->xconfigure); | |
7 | 20 | |||
8 | while( XCheckTypedWindowEvent( Xdisplay, TermWin.parent, ConfigureNotify, ev ) ); | 21 | while( XCheckTypedWindowEvent( Xdisplay, TermWin.parent, ConfigureNotify, ev ) ); | |
9 | - fprintf( stderr, "config_geom = %dx%d\n", xconf->width, xconf->height ); | 22 | - fprintf( stderr, "config_geom = %dx%d\n", xconf->width, xconf->height ); | |
10 | resize_window1(xconf->width, xconf->height); | 23 | resize_window1(xconf->width, xconf->height); | |
11 | #if 1 | 24 | #if 1 | |
12 | XTranslateCoordinates (Xdisplay, TermWin.parent, Xroot, 0, 0, &root_x, &root_y, &wdumm); | 25 | XTranslateCoordinates (Xdisplay, TermWin.parent, Xroot, 0, 0, &root_x, &root_y, &wdumm); | |
13 | 26 | |||
14 | - fprintf( stderr, "root_geom = %dx%d%+d%+d, root_size = %dx%d\n", xconf->width, xconf->height, root_x, root_y, XdisplayWidth, XdisplayHeight ); | 27 | - fprintf( stderr, "root_geom = %dx%d%+d%+d, root_size = %dx%d\n", xconf->width, xconf->height, root_x, root_y, XdisplayWidth, XdisplayHeight ); | |
15 | TermWin.root_x = root_x ; | 28 | TermWin.root_x = root_x ; | |
16 | TermWin.root_y = root_y ; | 29 | TermWin.root_y = root_y ; | |
17 | TermWin.root_width = xconf->width ; | 30 | TermWin.root_width = xconf->width ; | |
31 | @@ -1215,7 +1213,7 @@ set_window_color(int idx, const char *co | |||
32 | return; | |||
33 | ||||
34 | /* handle color aliases */ | |||
35 | - if (isdigit(*color)) { | |||
36 | + if (isdigit((unsigned char)*color)) { | |||
37 | i = atoi(color); | |||
38 | if (i >= 8 && i <= 15) { /* bright colors */ | |||
39 | i -= 8; | |||
40 | @@ -1432,7 +1430,7 @@ change_font(int init, const char *fontna | |||
41 | break; | |||
42 | ||||
43 | default: | |||
44 | - if (fontname[1] != '\0' && !isdigit(fontname[1])) | |||
45 | + if (fontname[1] != '\0' && !isdigit((unsigned char)fontname[1])) | |||
46 | return; | |||
47 | if (idx < 0 || idx >= (NFONTS)) | |||
48 | return; | |||
18 | @@ -2047,9 +2045,14 @@ main(int argc, char *argv[]) | 49 | @@ -2047,9 +2045,14 @@ main(int argc, char *argv[]) | |
19 | */ | 50 | */ | |
20 | get_options(argc, argv); | 51 | get_options(argc, argv); | |
21 | 52 | |||
22 | - if( display_name == NULL ) | 53 | - if( display_name == NULL ) | |
23 | - if ((display_name = getenv("DISPLAY")) == NULL) | 54 | - if ((display_name = getenv("DISPLAY")) == NULL) | |
24 | - display_name = ":0"; | 55 | - display_name = ":0"; | |
25 | + if( display_name == NULL ) | 56 | + if( display_name == NULL ) | |
26 | + display_name = getenv("DISPLAY"); | 57 | + display_name = getenv("DISPLAY"); | |
27 | + | 58 | + | |
28 | + if( display_name == NULL ) | 59 | + if( display_name == NULL ) | |
29 | + { | 60 | + { | |
30 | + print_error("DISPLAY variable not set and none given"); | 61 | + print_error("DISPLAY variable not set and none given"); |
@@ -1,27 +1,73 @@ | @@ -1,27 +1,73 @@ | |||
1 | $NetBSD: patch-ae,v 1.7 2012/09/29 17:59:34 asau Exp $ | 1 | $NetBSD: patch-ae,v 1.8 2016/05/01 19:56:40 dholland Exp $ | |
2 | 2 | |||
3 | Tags: from-upstream | 3 | - Use pseudo-terminal multiplexor on NetBSD. | |
4 | - Correctly set the terminal size on FreeBSD and NetBSD. | |||
5 | (these parts apparently from upstream) | |||
4 | 6 | |||
5 | Use pseudo-terminal multiplexor on NetBSD. | 7 | - Use ctype.h functions correctly. | |
6 | Correctly set the terminal size on FreeBSD and NetBSD. | |||
7 | 8 | |||
8 | --- src/command.c.orig 2005-06-21 20:08:16.000000000 +0000 | 9 | --- src/command.c.orig 2005-06-21 20:08:16.000000000 +0000 | |
9 | +++ src/command.c | 10 | +++ src/command.c | |
10 | @@ -542,7 +542,7 @@ get_pty(void) | 11 | @@ -542,7 +542,7 @@ get_pty(void) | |
11 | ptydev = ttydev = _getpty(&fd, O_RDWR | O_NDELAY, 0622, 0); | 12 | ptydev = ttydev = _getpty(&fd, O_RDWR | O_NDELAY, 0622, 0); | |
12 | if (ptydev == NULL) | 13 | if (ptydev == NULL) | |
13 | goto Failed; | 14 | goto Failed; | |
14 | -#elif defined (__svr4__) || defined(__CYGWIN32__) || defined(__lnx21__) | 15 | -#elif defined (__svr4__) || defined(__CYGWIN32__) || defined(__lnx21__) | |
15 | +#elif defined (__svr4__) || defined(__CYGWIN32__) || defined(__lnx21__) || defined(__NetBSD__) | 16 | +#elif defined (__svr4__) || defined(__CYGWIN32__) || defined(__lnx21__) || defined(__NetBSD__) | |
16 | { | 17 | { | |
17 | extern char *ptsname(); | 18 | extern char *ptsname(); | |
18 | 19 | |||
19 | @@ -1085,6 +1085,8 @@ run_command(char *argv[]) | 20 | @@ -1085,6 +1085,8 @@ run_command(char *argv[]) | |
20 | #endif /* SRIOCSREDIR */ | 21 | #endif /* SRIOCSREDIR */ | |
21 | } | 22 | } | |
22 | 23 | |||
23 | + tt_winsize(0); /* set window size */ | 24 | + tt_winsize(0); /* set window size */ | |
24 | + | 25 | + | |
25 | /* reset signals and spin off the command interpreter */ | 26 | /* reset signals and spin off the command interpreter */ | |
26 | signal(SIGINT, SIG_DFL); | 27 | signal(SIGINT, SIG_DFL); | |
27 | signal(SIGQUIT, SIG_DFL); | 28 | signal(SIGQUIT, SIG_DFL); | |
29 | @@ -1225,9 +1227,9 @@ init_command(char *argv[]) | |||
30 | meta_char = (Options & Opt_meta8 ? 0x80 : 033); | |||
31 | if (rs_modifier | |||
32 | && strlen(rs_modifier) == 4 | |||
33 | - && toupper(*rs_modifier) == 'M' | |||
34 | - && toupper(rs_modifier[1]) == 'O' | |||
35 | - && toupper(rs_modifier[2]) == 'D') | |||
36 | + && toupper((unsigned char)*rs_modifier) == 'M' | |||
37 | + && toupper((unsigned char)rs_modifier[1]) == 'O' | |||
38 | + && toupper((unsigned char)rs_modifier[2]) == 'D') | |||
39 | switch (rs_modifier[3]) { | |||
40 | case '2': | |||
41 | ModXMask = Mod2Mask; | |||
42 | @@ -1302,13 +1304,13 @@ init_xlocale(void) | |||
43 | for (s = tmp; *s; s++) { | |||
44 | char *end, *next_s; | |||
45 | ||||
46 | - for (; *s && isspace(*s); s++) | |||
47 | + for (; *s && isspace((unsigned char)*s); s++) | |||
48 | /* */ ; | |||
49 | if (!*s) | |||
50 | break; | |||
51 | for (end = s; (*end && (*end != ',')); end++) | |||
52 | /* */ ; | |||
53 | - for (next_s = end--; ((end >= s) && isspace(*end)); end--) | |||
54 | + for (next_s = end--; ((end >= s) && isspace((unsigned char)*end)); end--) | |||
55 | /* */ ; | |||
56 | *++end = '\0'; | |||
57 | if (*s) { | |||
58 | @@ -1340,13 +1342,13 @@ init_xlocale(void) | |||
59 | unsigned short i; | |||
60 | char *end, *next_s; | |||
61 | ||||
62 | - for (; *s && isspace(*s); s++) | |||
63 | + for (; *s && isspace((unsigned char)*s); s++) | |||
64 | /* */ ; | |||
65 | if (!*s) | |||
66 | break; | |||
67 | for (end = s; (*end && (*end != ',')); end++) | |||
68 | /* */ ; | |||
69 | - for (next_s = end--; ((end >= s) && isspace(*end));) | |||
70 | + for (next_s = end--; ((end >= s) && isspace((unsigned char)*end));) | |||
71 | *end-- = 0; | |||
72 | ||||
73 | if (!strcmp(s, "OverTheSpot")) |
$NetBSD: patch-src_misc.c,v 1.1 2016/05/01 19:56:40 dholland Exp $
- Use ctype.h functions correctly.
--- src/misc.c~ 2004-11-10 17:21:46.000000000 +0000
+++ src/misc.c
@@ -85,7 +85,7 @@ char *
Str_skip_space(char *str)
{
if (str && *str) {
- while (*str && isspace(*str))
+ while (*str && isspace((unsigned char)*str))
str++;
}
return str;
@@ -102,7 +102,7 @@ Str_trim(char *str)
src = Str_skip_space(str);
n = strlen(src) - 1;
- while (n > 0 && isspace(src[n]))
+ while (n > 0 && isspace((unsigned char)src[n]))
n--;
src[n + 1] = '\0';
@@ -159,12 +159,12 @@ Str_escaped(char *str)
str[i++] = '\033'; /* destination */
len--;
p += n;
- if (toupper(*p) == 'X') {
+ if (toupper((unsigned char)*p) == 'X') {
/* append carriage-return for `M-xcommand' */
append = '\r';
str[i++] = 'x'; /* destination */
p++;
- while (isspace(*p)) {
+ while (isspace((unsigned char)*p)) {
p++;
len--;
}
@@ -214,7 +214,7 @@ Str_escaped(char *str)
ch = *p;
p++;
len--;
- ch = toupper(ch);
+ ch = toupper((unsigned char)ch);
ch = (ch == '?' ? 127 : (ch - '@'));
}
str[i] = ch;
$NetBSD: patch-src_pixmap.c,v 1.1 2016/05/01 19:56:40 dholland Exp $
Silence some sign-mismatch warnings.
--- src/pixmap.c~ 2005-06-21 20:08:16.000000000 +0000
+++ src/pixmap.c
@@ -83,19 +83,20 @@ ValidatePixmap (Pixmap p, int bSetHandle
/* we need to check if pixmap is still valid */
Window root;
int junk;
+ unsigned ujunk;
if (bSetHandler)
oldXErrorHandler = XSetErrorHandler (pixmap_error_handler);
if (bTransparent)
p = GetRootPixmap (None);
if (!pWidth)
- pWidth = &junk;
+ pWidth = &ujunk;
if (!pHeight)
- pHeight = &junk;
+ pHeight = &ujunk;
if (p != None)
{
- if (!XGetGeometry (dpy, p, &root, &junk, &junk, pWidth, pHeight, &junk, &junk))
+ if (!XGetGeometry (dpy, p, &root, &junk, &junk, pWidth, pHeight, &ujunk, &junk))
p = None;
}
if(bSetHandler)
$NetBSD: patch-src_xdefaults.c,v 1.1 2016/05/01 19:56:40 dholland Exp $
- Pass the right type (int) for %*s formats.
- Use ctype.h functions correctly.
--- src/xdefaults.c~ 2005-06-03 20:11:55.000000000 +0000
+++ src/xdefaults.c
@@ -516,7 +516,7 @@ usage(int type)
fprintf(stderr, " %s%s %-*s%s%s\n",
(optList_isBool(i) ? "-/+" : "-"),
optList[i].opt,
- (INDENT - strlen(optList[i].opt)
+ (int)(INDENT - strlen(optList[i].opt)
+ (optList_isBool(i) ? 0 : 2)),
(optList[i].arg ? optList[i].arg : ""),
(optList_isBool(i) ? "turn on/off " : ""),
@@ -533,12 +533,12 @@ usage(int type)
if (optList[i].kw != NULL)
fprintf(stderr, " %s: %*s\n",
optList[i].kw,
- (INDENT - strlen(optList[i].kw)),
+ (int)(INDENT - strlen(optList[i].kw)),
(optList_isBool(i) ? "boolean" : optList[i].arg));
#ifdef KEYSYM_RESOURCE
fprintf(stderr, " " "keysym.sym" ": %*s\n",
- (INDENT - strlen("keysym.sym")), "keysym");
+ (int)(INDENT - strlen("keysym.sym")), "keysym");
#endif
fprintf(stderr, "\n -help to list options\n -version for the version information with options list\n\n");
break;
@@ -686,8 +686,8 @@ int
my_strcasecmp(const char *s1, const char *s2)
{
for ( /*nil */ ; (*s1 && *s2); s1++, s2++) {
- register int c1 = toupper(*s1);
- register int c2 = toupper(*s2);
+ register int c1 = toupper((unsigned char)*s1);
+ register int c2 = toupper((unsigned char)*s2);
if (c1 != c2)
return (c1 - c2);
@@ -739,8 +739,8 @@ parse_keysym(char *str, char *arg)
str += n; /* skip `keysym.' */
}
/* some scanf() have trouble with a 0x prefix */
- if (isdigit(str[0])) {
- if (str[0] == '0' && toupper(str[1]) == 'X')
+ if (isdigit((unsigned char)str[0])) {
+ if (str[0] == '0' && toupper((unsigned char)str[1]) == 'X')
str += 2;
if (arg) {
if (sscanf(str, (strchr(str, ':') ? "%x:" : "%x"), &sym) != 1)
@@ -823,7 +823,7 @@ get_xdefaults(FILE * stream, const char
while ((str = fgets(buffer, sizeof(buffer), stream)) != NULL) {
unsigned int entry, n;
- while (*str && isspace(*str))
+ while (*str && isspace((unsigned char)*str))
str++; /* leading whitespace */
if ((str[len] != '*' && str[len] != '.') ||