Bläddra i källkod

some small fixes

ceriel 34 år sedan
förälder
incheckning
15b6ab6873
2 ändrade filer med 7 tillägg och 4 borttagningar
  1. 2 2
      util/cmisc/tabgen.1
  2. 5 2
      util/cmisc/tabgen.c

+ 2 - 2
util/cmisc/tabgen.1

@@ -21,8 +21,8 @@ directly followed by a list of indices for which the table to be generated
 has this value. This list of indices must be in a certain \fBinputformat\fP,
 characterized by a charactet.
 Currently, there is only one inputformat, "c". In this format, the indices
-are characters. There are two special characters: '\e' and '-'. The
-'\e' behaves like in a C-string, and the '-' describes a range, unless
+are characters. There are two special characters: '\e' and '-'. The '\e'
+behaves like in a C-string, and the '-' describes a range, unless
 it starts the list of indices.
 .PP
 Some examples of descriptions:

+ 5 - 2
util/cmisc/tabgen.c

@@ -296,7 +296,6 @@ quoted(pstr)
 	}
 	else	{
 		switch (*str++)	{
-
 		case 'n':
 			ch = '\n';
 			break;
@@ -312,8 +311,12 @@ quoted(pstr)
 		case 'f':
 			ch = '\f';
 			break;
+		case 'v':
+			ch = '\v';
+			break;
 		default :
-			ch = *str;
+			ch = *(str - 1);
+			break;
 		}
 	}
 	*pstr = str;