Subject: Change src/msdos.c from raw-text to ASCII

From: Paul Eggert <[email-masked]>
Date: Tue, 05 Mar 2013 09:43:07 -0800

Tags: patch

In my attempt to make the Emacs sources UTF-8-safe, I ran across
src/msdos.c, which is currently raw-text because
it has string literals containing bytes with the top
bit set.  There's an easy way to make this ASCII, e.g.,
use the string literal "\375" rather than "X" (where X is
the actual byte with octal code 375).  Attached is a proposed patch.
I'm CC'ing this to Eli since this affects the MS-DOS port.
=== modified file 'src/msdos.c'
--- src/msdos.c	2013-02-17 16:49:27 +0000
+++ src/msdos.c	2013-03-05 17:38:22 +0000
@@ -1,4 +1,4 @@
-/* MS-DOS specific C utilities.          -*- coding: raw-text -*-
+/* MS-DOS specific C utilities.          -*- coding: us-ascii -*-
 
 Copyright (C) 1993-1997, 1999-2013 Free Software Foundation, Inc.
 
@@ -1976,11 +1976,11 @@
 static struct dos_keyboard_map fr_keyboard = {
 /* 0         1         2         3         4         5      */
 /* 012 3456789012345678901234567890123456789012345678901234 */
-  "ý&‚\",(-Š_€…)=  azertyuiop^$   qsdfghjklm—*   wxcvbnm;:!  ",
+  "\375&\202\",(-\212_\200\205)=  azertyuiop^$   qsdfghjklm\227*   wxcvbnm;:!  ",
 /* 0123456789012345678901234567890123456789012345678901234 */
-  " 1234567890ø+  AZERTYUIOPùœ   QSDFGHJKLM%æ   WXCVBN?./õ  ",
+  " 1234567890\370+  AZERTYUIOP\371\234   QSDFGHJKLM%\346   WXCVBN?./\365  ",
 /* 01234567 89012345678901234567890123456789012345678901234 */
-  "  ~#{[|`\\^@]}             Ï                              ",
+  "  ~#{[|`\\^@]}             \317                              ",
   0				/* no translate table */
 };
 
@@ -2000,9 +2000,9 @@
 static struct dos_keyboard_map it_keyboard = {
 /* 0          1         2         3         4         5     */
 /* 0 123456789012345678901234567890123456789012345678901234 */
-  "\\1234567890'�< qwertyuiopŠ+>  asdfghjkl•…—   zxcvbnm,.-  ",
+  "\\1234567890'\215< qwertyuiop\212+>  asdfghjkl\225\205\227   zxcvbnm,.-  ",
 /* 01 23456789012345678901234567890123456789012345678901234 */
-  "|!\"œ$%&/()=?^> QWERTYUIOP‚*   ASDFGHJKL‡øõ   ZXCVBNM;:_  ",
+  "|!\"\234$%&/()=?^> QWERTYUIOP\202*   ASDFGHJKL\207\370\365   ZXCVBNM;:_  ",
 /* 0123456789012345678901234567890123456789012345678901234 */
   "        {}~`             []             @#               ",
   it_kbd_translate_table
@@ -2011,11 +2011,11 @@
 static struct dos_keyboard_map dk_keyboard = {
 /* 0         1         2         3         4         5      */
 /* 0123456789012345678901234567890123456789012345678901234 */
-  "«1234567890+|  qwertyuiop†~   asdfghjkl‘›'   zxcvbnm,.-  ",
+  "\2531234567890+|  qwertyuiop\206~   asdfghjkl\221\233'   zxcvbnm,.-  ",
 /* 01 23456789012345678901234567890123456789012345678901234 */
-  "õ!\"#$%&/()=?`  QWERTYUIOP�^   ASDFGHJKL’�*   ZXCVBNM;:_  ",
+  "\365!\"#$%&/()=?`  QWERTYUIOP\217^   ASDFGHJKL\222\235*   ZXCVBNM;:_  ",
 /* 0123456789012345678901234567890123456789012345678901234 */
-  "  @œ$  {[]} |                                             ",
+  "  @\234$  {[]} |                                             ",
   0				/* no translate table */
 };