pkgsrc/x11/xmx/patches/patch-bq
dholland 019aff8e20 Fix the "minor PLIST problems" and unmark this as only for SunOS.
Add proper deps.
Add destdir support.
And, finally, make it build properly. (82 (small) patches later...)
2008-08-31 06:52:29 +00:00

77 lines
2.5 KiB
Text

$NetBSD: patch-bq,v 1.1 2008/08/31 06:52:29 dholland Exp $
--- server/dprx.c~ 1998-04-03 17:45:53.000000000 -0500
+++ server/dprx.c 2008-08-31 00:43:57.000000000 -0400
@@ -27,7 +27,9 @@
* Routines for printing X protocol structures. *
* *
************************************************************************/
+#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#define NEED_REPLIES
#define NEED_EVENTS
#include <X11/Xproto.h>
@@ -60,7 +62,7 @@ dprx_stackmode_str
case BottomIf: return "BottomIf";
case Opposite: return "Opposite";
default:
- sprintf(buf, "<%d>", mode);
+ snprintf(buf, sizeof(buf), "<%d>", mode);
return buf;
}
}
@@ -83,7 +85,7 @@ dprx_notify_detail_str
case NotifyPointerRoot: return "NotifyPointerRoot";
case NotifyDetailNone: return "NotifyDetailNone";
default:
- sprintf(buf, "<%d>", detail);
+ snprintf(buf, sizeof(buf), "<%d>", detail);
return buf;
}
}
@@ -265,7 +267,7 @@ dprx_notify_mode_str
case NotifyUngrab: return "NotifyUngrab";
case NotifyWhileGrabbed: return "NotifyWhileGrabbed";
default:
- sprintf(buf, "<unknown mode(%d)>", mode);
+ snprintf(buf, sizeof(buf), "<unknown mode(%d)>", mode);
return buf;
}
}
@@ -293,7 +295,7 @@ dprx_allowevents_mode_str
case AsyncBoth: return "AsyncBoth";
case SyncBoth: return "SyncBoth";
default:
- sprintf(buf, "<unknown mode(%d)>", mode);
+ snprintf(buf, sizeof(buf), "<unknown mode(%d)>", mode);
return buf;
}
}
@@ -318,7 +320,7 @@ dprx_addrfam_str
case FamilyLocal: return "FamilyLocal";
case FamilyWild: return "FamilyWild";
default:
- sprintf(buf, "FamilyBAD(%d)", family);
+ snprintf(buf, sizeof(buf), "FamilyBAD(%d)", family);
return buf;
}
}
@@ -558,7 +560,7 @@ dprx_pixel_str
{
static char buf[32];
- sprintf(buf, "%d (%x)", pxl, pxl);
+ snprintf(buf, sizeof(buf), "%d (%x)", pxl, pxl);
return buf;
}
@@ -2213,7 +2215,7 @@ dprx_event
warn("\teventX_________ %d\n", ep->u.keyButtonPointer.eventX);
warn("\teventY_________ %d\n", ep->u.keyButtonPointer.eventY);
if (isprint(ep->u.u.detail))
- sprintf(buf, " '%c'", ep->u.u.detail);
+ snprintf(buf, sizeof(buf), " '%c'", ep->u.u.detail);
else
buf[0] = '\0';
warn("\tdetail_________ %d%s\n", ep->u.u.detail, buf);