Changeset: e4d5a200873d for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/e4d5a200873d
Modified Files:
gdk/gdk_string.c
Branch: Jul2021
Log Message:
Remove ancient, unused code for ASCII chr interpretation.
We don't have chr anymore.
diffs (51 lines):
diff --git a/gdk/gdk_string.c b/gdk/gdk_string.c
--- a/gdk/gdk_string.c
+++ b/gdk/gdk_string.c
@@ -609,13 +609,7 @@ strFromStr(const char *restrict src, siz
* Convert a GDK string value to something printable.
*/
/* all but control characters (in range 0 to 31) and DEL */
-#ifdef ASCII_CHR
-/* ASCII printable characters */
-#define printable_chr(ch) (' ' <= (ch) && (ch) <= '~')
-#else
-/* everything except ASCII control characters */
#define printable_chr(ch) ((' ' <= (ch) && (ch) <= '~') || ((ch) & 0x80)
!= 0)
-#endif
size_t
escapedStrlen(const char *restrict src, const char *sep1, const char *sep2,
int quote)
@@ -631,7 +625,6 @@ escapedStrlen(const char *restrict src,
|| (sep1len && strncmp(src + end, sep1, sep1len) == 0)
|| (sep2len && strncmp(src + end, sep2, sep2len) == 0)) {
sz += 2;
-#ifndef ASCII_CHR
} else if (src[end] == (char) '\302' &&
0200 <= ((int) src[end + 1] & 0377) &&
((int) src[end + 1] & 0377) <= 0237) {
@@ -643,7 +636,6 @@ escapedStrlen(const char *restrict src,
* 1, together that's 8, i.e. the width of two
* backslash-escaped octal coded characters */
sz += 7;
-#endif
} else if (!printable_chr(src[end])) {
sz += 4;
} else {
@@ -662,16 +654,13 @@ escapedStr(char *restrict dst, const cha
sep2len = sep2 ? strlen(sep2) : 0;
for (; src[cur] && l < dstlen; cur++)
if (!printable_chr(src[cur])
-#ifndef ASCII_CHR
|| (src[cur] == '\302'
&& 0200 <= (src[cur + 1] & 0377)
&& ((int) src[cur + 1] & 0377) <= 0237)
|| (cur > 0
&& src[cur - 1] == '\302'
&& 0200 <= (src[cur] & 0377)
- && (src[cur] & 0377) <= 0237)
-#endif
- ) {
+ && (src[cur] & 0377) <= 0237)) {
dst[l++] = '\\';
switch (src[cur]) {
case '\t':
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list