Remove unused function.
authorayin <ayin>
Sat, 8 Sep 2007 20:55:49 +0000 (20:55 +0000)
committerayin <ayin>
Sat, 8 Sep 2007 20:55:49 +0000 (20:55 +0000)
src/misc.C
src/rxvt.h

index 98caa73f68d7e93b8cad32016f2f1e237c151138..f65cde4aee52aecae6a104ba104cecd0e9706470 100644 (file)
@@ -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
index 8370d6f18d77c144db6d1f6e62eee1c8240a6941..31a98298c03588adcc29e45409301a8a54f508ca 100644 (file)
@@ -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;