add \'
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Mon, 13 Feb 1989 11:53:12 +0000 (03:53 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Mon, 13 Feb 1989 11:53:12 +0000 (03:53 -0800)
SCCS-vsn: usr.bin/printf/printf.c 5.2

usr/src/usr.bin/printf/printf.c

index fc75337..e62ef63 100644 (file)
@@ -22,7 +22,7 @@ char copyright[] =
 #endif /* not lint */
 
 #ifndef lint
 #endif /* not lint */
 
 #ifndef lint
-static char sccsid[] = "@(#)printf.c   5.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)printf.c   5.2 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <sys/types.h>
 #endif /* not lint */
 
 #include <sys/types.h>
@@ -182,7 +182,8 @@ escape(fmt)
                        *++store = '\0';
                        return;
                case '\\':              /* backslash */
                        *++store = '\0';
                        return;
                case '\\':              /* backslash */
-                       *store = '\\';
+               case '\'':              /* single quote */
+                       *store = *fmt;
                        break;
                case 'a':               /* bell/alert */
                        *store = '\7';
                        break;
                case 'a':               /* bell/alert */
                        *store = '\7';