Pierre A. Humblet wrote:

At 10:26 PM 10/14/2003 +0200, Micha Nelissen wrote:

@@ -1110,6 +1117,12 @@
               break;
             case 9:    /* dim */
               dev_state->intensity = INTENSITY_DIM;
+              break;
+             case 10:   /* end alternate charset */
+               alternate_charset_active = FALSE;
+              break;
+             case 11:   /* start alternate charset */
+               alternate_charset_active = TRUE;
               break;
             case 24:
               dev_state->underline = FALSE;


FWIW, wouldn't it be cleaner to make "alternate_charset_active" a member of dev_state instead of introducing a new global variable?

Yes, although original_codepage was a viable candidate for a global variable?. Never mind, but then either:
1) that alternate_charset check which currently is in str_to_con (centralized), needs to dispersed over all calls to str_to_con. (Currently, 1, AFAICS). Prone to bugs, if you ask me because this could be forgotten in the future, unless this one call will remain the only one.
2) str_to_con has to become a member of dev_state too.


Regards,

Micha.




Reply via email to