Multiple fixes for 020+ mode, including:
[rmac] / token.c
diff --git a/token.c b/token.c
index 1722f63ee5bf8c4d8785fb7d551fda4528796f53..b53b7decbf552b3366ed81df86cc9e057baae13c 100644 (file)
--- a/token.c
+++ b/token.c
@@ -1292,6 +1292,11 @@ dostring:
                                                case '\\':
                                                        c = '\\';
                                                        break;
+                        case '!':
+                            // If we're evaluating a macro
+                            // this is valid and expands to
+                            // "dot-size"
+                            break;
                                                default:
                                                        warn("bad backslash code in string");
                                                        ln--;
@@ -1557,20 +1562,32 @@ dostring:
                                {
                                        v &= 0x000000FF;
                                        ln += 2;
+                    *tk++ = CONST;
+                    *tk++ = v;
+                    *tk++ = DOTB;
                                }
                                else if ((*(ln + 1) == 'w') || (*(ln + 1) == 'W'))
                                {
                                        v &= 0x0000FFFF;
                                        ln += 2;
+                    *tk++ = CONST;
+                    *tk++ = v;
+                    *tk++ = DOTW;
                                }
                                else if ((*(ln + 1) == 'l') || (*(ln + 1) == 'L'))
                                {
                                        ln += 2;
-                               }
-                       }
+                    *tk++ = CONST;
+                    *tk++ = v;
+                    *tk++ = DOTL;
+                }
+            }
+            else
+            {
+                *tk++ = CONST;
+                *tk++ = v;
+            }
 
-                       *tk++ = CONST;
-                       *tk++ = v;
 //printf("CONST: %i\n", v);
                        continue;
                }