Annotation of pkgsrc/x11/Xaw-Xpm/patches/patch-aa, Revision 1.4
1.4 ! rillig 1: $NetBSD: patch-aa,v 1.3 1999/06/28 09:11:13 agc Exp $
1.2 agc 2:
1.3 agc 3: Handle wide signal masks.
4:
1.4 ! rillig 5: For the removal of the type casts, see patch-ak.
! 6:
! 7: --- Xpm.c.orig 1996-11-26 14:40:26.000000000 +0100
! 8: +++ Xpm.c 2007-10-09 12:54:37.000000000 +0200
! 9: @@ -46,7 +46,7 @@ char directory[MAXPATHLEN];
! 10: }
! 11: chdir(directory);
! 12: }
! 13: - (PixmapNode *)PixList.first = (PixmapNode *)pixnode;
! 14: + PixList.first = pixnode;
! 15: pixnode->next = NULL;
! 16: PixList.n_entries = 1;
! 17: pixnode->filename = filename;
! 18: @@ -55,18 +55,18 @@ char directory[MAXPATHLEN];
! 19:
! 20: /* Is the pixmap already in the list? */
! 21:
! 22: - (PixmapNode *)pixnode = (PixmapNode *)PixList.first;
! 23: + pixnode = PixList.first;
! 24: for(;;)
! 25: {
! 26: if(strncmp(filename,pixnode->filename, MAXPATHLEN) == 0)
! 27: return((Pixmap *)&pixnode->pixmap);
! 28: if(pixnode->next == NULL) break;
! 29: - (PixmapNode *)pixnode = (PixmapNode *)pixnode->next;
! 30: + pixnode = pixnode->next;
! 31: }
! 32:
! 33: /* Didnt find the pixmap...make a new one */
! 34:
! 35: - (PixmapNode *)pixnew = (void *)malloc(sizeof(PixmapNode));
! 36: + pixnew = (void *)malloc(sizeof(PixmapNode));
! 37:
! 38: XGetWindowAttributes(XtDisplay(w) ,DefaultRootWindow(XtDisplay(w)),&root_att);
! 39: orig_att.closeness=65536;
! 40: @@ -86,7 +86,7 @@ char directory[MAXPATHLEN];
! 41: }
! 42: chdir(directory);
! 43: }
! 44: - (PixmapNode *)pixnode->next = (PixmapNode *)pixnew;
! 45: + pixnode->next = pixnew;
! 46: pixnew->filename = filename;
! 47: pixnew->next = NULL;
! 48: return((Pixmap *)&pixnew->pixmap);
! 49: @@ -105,7 +105,7 @@ XpmAttributes orig_att;
! 50: char error_buf[BUFSIZ];
! 51: char directory[MAXPATHLEN];
! 52:
! 53: - (PixmapNode *)pixnode = (PixmapNode *)PixList.first;
! 54: + pixnode = PixList.first;
! 55: for(;;)
! 56: {
! 57: if(strncmp(filename,pixnode->filename, MAXPATHLEN) == 0)
! 58: @@ -114,7 +114,7 @@ char directory[MAXPATHLEN];
! 59: break;
! 60: }
! 61: if(pixnode->next == NULL) break;
! 62: - (PixmapNode *)pixnode = (PixmapNode *)pixnode->next;
! 63: + pixnode = pixnode->next;
! 64: }
! 65: if(found)
! 66: {
! 67: @@ -140,7 +140,7 @@ char directory[MAXPATHLEN];
! 68: }
! 69: else
! 70: {
! 71: - (PixmapNode *)pixnew = (void *)malloc(sizeof(PixmapNode));
! 72: + pixnew = (void *)malloc(sizeof(PixmapNode));
! 73: XGetWindowAttributes(XtDisplay(w) ,DefaultRootWindow(XtDisplay(w)),&root_att);
! 74: orig_att.closeness=65536;
! 75: orig_att.colormap=root_att.colormap;
! 76: @@ -159,7 +159,7 @@ char directory[MAXPATHLEN];
! 77: }
! 78: chdir(directory);
! 79: }
! 80: - (PixmapNode *)pixnode->next = (PixmapNode *)pixnew;
! 81: + pixnode->next = pixnew;
! 82: pixnew->filename = filename;
! 83: pixnew->next = NULL;
! 84: return((Pixmap *)&pixnew->mask);
! 85: @@ -206,9 +206,8 @@ char *soundfile;
1.3 agc 86: sigchld.
87: */
1.1 frueauf 88: new.sa_handler=SigHandle;
1.3 agc 89: - new.sa_mask=0;
1.1 frueauf 90: - new.sa_flags=SA_NOMASK | SA_ONESHOT;
91: - new.sa_restorer=NULL;
1.3 agc 92: + (void) memset(&new.sa_mask, 0, sizeof(new.sa_mask));
1.1 frueauf 93: + new.sa_flags=SA_NODEFER;
94: sigaction(SIGCHLD, &new, &old);
95: playing = 1;
1.3 agc 96: soundpid = fork();
CVSweb <webmaster@jp.NetBSD.org>