Skip to content

Commit

Permalink
Remove ux2st & st2ux deadcode
Browse files Browse the repository at this point in the history
My pleasure: we get enough legacy code to handle and understand.
No need for additional `#if 0` diversion.
  • Loading branch information
nicolas-cellier-aka-nice committed Dec 24, 2019
1 parent f8c78a3 commit afd70d6
Showing 1 changed file with 0 additions and 72 deletions.
72 changes: 0 additions & 72 deletions platforms/unix/vm-display-X11/sqUnixX11.c
Expand Up @@ -461,78 +461,6 @@ void browserProcessCommand(void); /* see sqUnixMozilla.c */

static inline int min(int x, int y) { return (x < y) ? x : y; }


#if 0

/* Conversion table from X to Squeak (reversible) */

static unsigned char X_to_Squeak[256] =
{
0, 1, 2, 3, 4, 5, 6, 7, /* 0 - 7 */
8, 9, 13, 11, 12, 10, 14, 15, /* 8 - 15 */
16, 17, 18, 19, 20, 21, 22, 23, /* 16 - 23 */
24, 25, 26, 27, 28, 29, 30, 31, /* 24 - 31 */
32, 33, 34, 35, 36, 37, 38, 39, /* 32 - 39 */
40, 41, 42, 43, 44, 45, 46, 47, /* 40 - 47 */
48, 49, 50, 51, 52, 53, 54, 55, /* 48 - 55 */
56, 57, 58, 59, 60, 61, 62, 63, /* 56 - 63 */
64, 65, 66, 67, 68, 69, 70, 71, /* 64 - 71 */
72, 73, 74, 75, 76, 77, 78, 79, /* 72 - 79 */
80, 81, 82, 83, 84, 85, 86, 87, /* 80 - 87 */
88, 89, 90, 91, 92, 93, 94, 95, /* 88 - 95 */
96, 97, 98, 99, 100, 101, 102, 103, /* 96 - 103 */
104, 105, 106, 107, 108, 109, 110, 111, /* 104 - 111 */
112, 113, 114, 115, 116, 117, 118, 119, /* 112 - 119 */
120, 121, 122, 123, 124, 125, 126, 127, /* 120 - 127 */
196, 197, 165, 201, 209, 247, 220, 225, /* 128 - 135 */
224, 226, 228, 227, 198, 176, 170, 248, /* 136 - 143 */
213, 206, 195, 207, 211, 212, 210, 219, /* 144 - 151 */
218, 221, 246, 245, 250, 249, 251, 252, /* 152 - 159 */
160, 193, 162, 163, 223, 180, 182, 164, /* 160 - 167 */
172, 169, 187, 199, 194, 173, 168, 255, /* 168 - 175 */
161, 177, 178, 179, 171, 181, 166, 183, /* 176 - 183 */
184, 185, 188, 200, 186, 189, 202, 192, /* 184 - 191 */
203, 231, 229, 204, 128, 129, 174, 130, /* 192 - 199 */
233, 131, 230, 232, 237, 234, 235, 236, /* 200 - 207 */
208, 132, 241, 238, 239, 205, 133, 215, /* 208 - 215 */
175, 244, 242, 243, 134, 217, 222, 167, /* 216 - 223 */
136, 135, 137, 139, 138, 140, 190, 141, /* 224 - 231 */
143, 142, 144, 145, 147, 146, 148, 149, /* 232 - 239 */
240, 150, 152, 151, 153, 155, 154, 214, /* 240 - 247 */
191, 157, 156, 158, 159, 253, 254, 216, /* 248 - 255 */
};

unsigned char Squeak_to_X[256];

void initCharmap(void)
{
int i;
for(i= 0; i < 256; i++)
Squeak_to_X[X_to_Squeak[i]]= i;
}

void st2ux(unsigned char *string)
{
if (!string) return;
while (*string)
{
*string= Squeak_to_X[*string];
string++;
}
}

void ux2st(unsigned char *string)
{
if (!string) return;
while (*string)
{
*string= X_to_Squeak[*string];
string++;
}
}

#endif

/*** X-related Functions ***/

/* Called prior to forking a squeak session.
Expand Down

0 comments on commit afd70d6

Please sign in to comment.