changeset 73:2f339dd13496

Added C/C++ style escape sequence processing. And fixed a couple OS/2 and Windows bugs.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Mon, 18 Feb 2002 08:43:34 +0000
parents ab77a22a2a36
children f794f2baabf2
files compat.c win/dw.c
diffstat 2 files changed, 36 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/compat.c	Fri Feb 15 09:30:50 2002 +0000
+++ b/compat.c	Mon Feb 18 08:43:34 2002 +0000
@@ -806,7 +806,41 @@
 				{
 					/* Use defaults on blank lines */
 					if(text[0])
-						locale_text[current] = strdup(text);
+					{
+						int x = 0, z, len = strlen(text);
+
+						locale_text[current] = calloc(1, len + 1);
+
+						for(z=0;z<len;z++)
+						{
+							if(text[z] == '\\' && (text[z+1] == 'r' || text[z+1] == 'n'
+							   || text[z+1] == '\"'  || text[z+1] == '\''))
+							{
+								switch(text[z+1])
+								{
+								case 'r':
+									locale_text[current][x] = '\r';
+                                    break;
+								case 'n':
+									locale_text[current][x] = '\n';
+                                    break;
+								case '\"':
+									locale_text[current][x] = '\"';
+                                    break;
+								case '\'':
+									locale_text[current][x] = '\'';
+                                    break;
+								}
+								x++;
+								z++;
+							}
+							else
+							{
+								locale_text[current][x] = text[z];
+								x++;
+							}
+						}
+					}
 					current++;
 				}
 			}
--- a/win/dw.c	Fri Feb 15 09:30:50 2002 +0000
+++ b/win/dw.c	Mon Feb 18 08:43:34 2002 +0000
@@ -2687,7 +2687,7 @@
 	wc.lpfnWndProc = (WNDPROC)_framewndproc;
 	wc.cbClsExtra = 0;
 	wc.cbWndExtra = 32;
-	wc.hbrBackground = (HBRUSH)COLOR_WINDOW;
+	wc.hbrBackground = (HBRUSH)GetSysColorBrush(COLOR_3DFACE);
 	wc.hCursor = LoadCursor(NULL, IDC_ARROW);
 	wc.lpszMenuName = NULL;
 	wc.lpszClassName = FRAMECLASSNAME;