Просмотр исходного кода

(unquote_string): Unquote '\a' and '\v'. Reported by Helmut Waitzmann <helmut.waitzmann@web.de>

Sergey Poznyakoff 20 лет назад
Родитель
Сommit
28efbf6944
1 измененных файлов с 17 добавлено и 7 удалено
  1. 17 7
      src/misc.c

+ 17 - 7
src/misc.c

@@ -123,13 +123,13 @@ unquote_string (char *string)
 	  source++;
 	  break;
 
-	case 'n':
-	  *destination++ = '\n';
+	case 'a':
+	  *destination++ = '\a';
 	  source++;
 	  break;
-
-	case 't':
-	  *destination++ = '\t';
+	  
+	case 'b':
+	  *destination++ = '\b';
 	  source++;
 	  break;
 
@@ -138,8 +138,8 @@ unquote_string (char *string)
 	  source++;
 	  break;
 
-	case 'b':
-	  *destination++ = '\b';
+	case 'n':
+	  *destination++ = '\n';
 	  source++;
 	  break;
 
@@ -148,6 +148,16 @@ unquote_string (char *string)
 	  source++;
 	  break;
 
+	case 't':
+	  *destination++ = '\t';
+	  source++;
+	  break;
+
+	case 'v':
+	  *destination++ = '\v';
+	  source++;
+	  break;
+	  
 	case '?':
 	  *destination++ = 0177;
 	  source++;