repo: rxvt-unicode-sixel action: commit revision: path_from: revision_from: 12bfd69ad01367625821b283c1bd4dba5741395b: path_to: revision_to:
commit 12bfd69ad01367625821b283c1bd4dba5741395b Author: Emanuele GiaquintaDate: Sat Sep 8 20:55:49 2007 +0000 Remove unused function. diff --git a/src/misc.C b/src/misc.C
--- a/src/misc.C
+++ b/src/misc.C
@@ -261,91 +261,6 @@ rxvt_Str_trim (char *str) NOTHROW
return str;
}
-/*
- * in-place interpretation of string:
- *
- * backslash-escaped: "\a\b\E\e\n\r\t", "\octal"
- * Ctrl chars: ^@ .. ^_, ^?
- *
- * Emacs-style: "M-" prefix
- *
- * Also,
- * "M-x" prefixed strings, append "\r" if needed
- * "\E]" prefixed strings (XTerm escape sequence) append ST if needed
- *
- * returns the converted string length
- */
-int
-rxvt_Str_escaped (char *str) NOTHROW
-{
- char ch, *s, *d;
- int i, num, append = 0;
-
- if (!str || !*str)
- return 0;
-
- d = s = str;
-
- if (*s == 'M' && s[1] == '-')
- {
- /* Emacs convenience, replace leading `M-..' with `\E..' */
- *d++ = C0_ESC;
- s += 2;
- if (toupper (*s) == 'X')
- /* append carriage-return for `M-xcommand' */
- for (*d++ = 'x', append = '\r', s++; isspace (*s); s++) ;
- }
- for (; (ch = *s++);)
- {
- if (ch == '\\')
- {
- ch = *s++;
- if (ch >= '0' && ch <= '7')
- { /* octal */
- num = ch - '0';
- for (i = 0; i < 2; i++, s++)
- {
- ch = *s;
- if (ch < '0' || ch > '7')
- break;
- num = num * 8 + ch - '0';
- }
- ch = (char)num;
- }
- else if (ch == 'a')
- ch = C0_BEL; /* bell */
- else if (ch == 'b')
- ch = C0_BS; /* backspace */
- else if (ch == 'E' || ch == 'e')
- ch = C0_ESC; /* escape */
- else if (ch == 'n')
- ch = '\n'; /* newline */
- else if (ch == 'r')
- ch = '\r'; /* carriage-return */
- else if (ch == 't')
- ch = C0_HT; /* tab */
- }
- else if (ch == '^')
- {
- ch = *s++;
- ch = toupper (ch);
- ch = (ch == '?' ? 127 : (ch - '@'));
- }
- *d++ = ch;
- }
-
- /* ESC] is an XTerm escape sequence, must be terminated */
- if (*str == '\0' && str[1] == C0_ESC && str[2] == ']')
- append = CHAR_ST;
-
- /* add trailing character as required */
- if (append && d[-1] != append)
- *d++ = append;
- *d = '\0';
-
- return (d - str);
-}
-
/*
* Split a comma-separated string into an array, stripping leading and
* trailing spaces from each entry. Empty strings are properly returned
diff --git a/src/rxvt.h b/src/rxvt.h
--- a/src/rxvt.h +++ b/src/rxvt.h @@ -121,7 +121,6 @@ void rxvt_fatal (const char *fmt, ...) THROW ( void rxvt_exit_failure () THROW ((class rxvt_failure_exception)) NORETURN; char * rxvt_Str_trim (char *str) NOTHROW; -int rxvt_Str_escaped (char *str) NOTHROW; char ** rxvt_splitcommastring (const char *cs) NOTHROW; void rxvt_freecommastring (char **cs) NOTHROW;
-----END OF PAGE-----