v1_4_15
|
v1_4_16
+ |
+v1_4_17
+2022-01-28 Mark Geisert <mark@maxrnd.com>
+
+ Release 1.4.17
+ * configure.ac: Bump version number to 1.4.17.
+ * BRANCHES: Ditto.
+ * cygutils.cygport: Ditto.
+ * src/clip/getclip.c: Fix segfault on xterm selections. Thanks to
+ Denis Excoffier for the report, Brian Inglis, Andrey Repin, and Jon
+ Turney for the discussion.
+ * src/clip/putclip.c: Add missing 32/64 timespec expansion. Thanks to
+ Takashi Yano for the report and investigation.
+ * src/clip/putclip.c: Make sure allocated buf is large enough to
+ append a NUL character. Thanks to Marco Atzeri for the report.
+ * src/clip/putclip.c: Add debugging feature to allow a file name in
+ argv (undocumented).
+
2021-11-03 Mark Geisert <mark@maxrnd.com> (1.4.16-8)
* src/clip/{get,put}clip.c: Replace use of Windows UTF-8 conversion
functions with corresponding POSIX functions. MultiByteToWideChar->
mbstowcs, WideCharToMultiByte->wcstombs. Thanks to Takashi Yano.
- * src/putclip.c: Have putclip open the clipboard just once instead
- of multiple times for multiple formats. Thanks to Takashi Yano.
+ * src/clip/putclip.c: Have putclip open the clipboard just once
+ instead of multiple times for multiple formats. Thanks to Takashi Yano.
2021-09-23 Mark Geisert <mark@maxrnd.com> (1.4.16-7)
didn't make it into the released -3 package. Thank you Takashi Yano.
* Fix maintainer build environment issues that caused cygstart crash
on non-AVX user systems: Thank you Takashi Yano, Brian Inglis, Achim
- Gratz and user Jay Abel for reporting the issue.
+ Gratz, and user Jay Abel for reporting the issue.
* src/cygdrop/cygdrop.cc: Fix crash with recent gcc and fix printf
format strings. Thank you Christian Franke.
+1.4.17
+ * More bug fixes to getclip and putclip.
+
1.4.16
* Unicode support added to mkshortcut and readshortcut by Thomas Wolff.
* Minor formatting fixes to quash compiler warnings.
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.69)
-AC_INIT(cygutils, 1.4.16, cygwin@cygwin.com)
+AC_INIT(cygutils, 1.4.17, cygwin@cygwin.com)
AC_CONFIG_SRCDIR([config.h.in])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
NAME=cygutils
-VERSION=1.4.16
-RELEASE=7
+VERSION=1.4.17
+RELEASE=1
SUMM="A collection of simple utilities"
DESC="A collection of simple (single source file) utilities, including"
char *prev;
char *curr;
char *pos;
+#if DEBUGGING
UINT format;
+#endif
OpenClipboard (0);
#if DEBUGGING
DWORD err = GetLastError ();
#if DEBUGGING
/* look up error code displayed here in w32api/winerror.h */
- fprintf (stderr, "GetClipboardData returns %ld\n", err);
+ fprintf (stderr, "GetClipboardData returns %d\n", err);
#endif
CloseClipboard ();
return err != 0;
char *prev;
char *curr;
char *pos;
+#if DEBUGGING
UINT format;
+#endif
OpenClipboard (0);
#if DEBUGGING
DWORD err = GetLastError ();
#if DEBUGGING
/* look up error code displayed here in w32api/winerror.h */
- fprintf (stderr, "GetClipboardData returns %ld\n", err);
+ fprintf (stderr, "GetClipboardData returns %d\n", err);
#endif
CloseClipboard ();
return err != 0;
setlocale (LC_ALL, "");
if (rest == NULL)
+#if DEBUGGING
+ready:
+#endif
ec |= putclip (stdin, flags, stderr, program_name);
else
{
+#if DEBUGGING
+ // undocumented debugging feature: read stdin from file named in argv
+ if (isalpha (**rest))
+ {
+ FILE *tmpin = freopen (*rest, "rb", stdin);
+ if (tmpin == stdin && !*(rest + 1))
+ goto ready;
+ }
+#endif
fprintf (stderr, "Extra args ignored: ");
while (*rest)
fprintf (stderr, "%s ", *rest++);
{
UINT cygnativeformat;
+ // make sure buf and copies of it have space for a NUL to be appended
+ // DO NOT CHANGE len TO ACCOUNT FOR THIS
+ buf = realloc (buf, len + 1);
+
// if flags.endl_mode == ENDLMODE_NOCONV
convbuf = buf;
convlen = len;
#if DEBUGGING
DWORD err = GetLastError ();
/* look up error code displayed here in w32api/winerror.h */
- fprintf (stderr, "OpenClipboard returns %ld\n", err);
+ fprintf (stderr, "OpenClipboard returns %d\n", err);
#endif
goto failout2;
}
clipbufX->cb_sec = clipbufX->ts.tv_sec;
#endif
clipbufX->cb_size = convlen;
- memcpy (&clipbufX[1], convbuf, convlen);
+ memcpy (((char *) clipbufX) + sizeof (cygcb_t), convbuf, convlen);
}
else if (cygNewFormat == 1)
{
#if DEBUGGING
DWORD err = GetLastError ();
/* look up error code displayed here in w32api/winerror.h */
- fprintf (stderr, "SetClipboardData returns %ld\n", err);
+ fprintf (stderr, "SetClipboardData returns %d\n", err);
#endif
goto failout;
}
#if DEBUGGING
DWORD err = GetLastError ();
/* look up error code displayed here in w32api/winerror.h */
- fprintf (stderr, "SetClipboardData returns %ld\n", err);
+ fprintf (stderr, "SetClipboardData returns %d\n", err);
#endif
goto failout;
}
#if DEBUGGING
DWORD err = GetLastError ();
/* look up error code displayed here in w32api/winerror.h */
- fprintf (stderr, "SetClipboardData returns %ld\n", err);
+ fprintf (stderr, "SetClipboardData returns %d\n", err);
#endif
goto failout;
}