Diff
Not logged in

Differences From Artifact [b7fbf00ab1]:

To Artifact [7163a84806]:


128
129
130
131
132
133
134
135
136
137
138
139





140
141
142
143
144
145




146
147
148
149
150
151




152
153
154
155
156
157
158
128
129
130
131
132
133
134





135
136
137
138
139
140
141




142
143
144
145
146
147




148
149
150
151
152
153
154
155
156
157
158







-
-
-
-
-
+
+
+
+
+


-
-
-
-
+
+
+
+


-
-
-
-
+
+
+
+







};

/*
 * How to construct the ensembles.
 */

static const EnsembleImplMap binaryMap[] = {
    { "format", BinaryFormatCmd, TclCompileBasicMin1ArgCmd, NULL, NULL, 0 },
    { "scan",   BinaryScanCmd, TclCompileBasicMin2ArgCmd, NULL, NULL, 0 },
    { "encode", NULL, NULL, NULL, NULL, 0 },
    { "decode", NULL, NULL, NULL, NULL, 0 },
    { NULL, NULL, NULL, NULL, NULL, 0 }
    { "format", BinaryFormatCmd, TclCompileBasicMin1ArgCmd, NULL, 0 },
    { "scan",   BinaryScanCmd, TclCompileBasicMin2ArgCmd, NULL, 0 },
    { "encode", NULL, NULL, NULL, 0 },
    { "decode", NULL, NULL, NULL, 0 },
    { NULL, NULL, NULL, NULL, 0 }
};
static const EnsembleImplMap encodeMap[] = {
    { "hex",      BinaryEncodeHex, TclCompileBasic1ArgCmd, NULL, (ClientData)HexDigits, 0 },
    { "uuencode", BinaryEncode64,  NULL, NULL, (ClientData)UueDigits, 0 },
    { "base64",   BinaryEncode64,  NULL, NULL, (ClientData)B64Digits, 0 },
    { NULL, NULL, NULL, NULL, NULL, 0 }
    { "hex",      BinaryEncodeHex, TclCompileBasic1ArgCmd, (ClientData)HexDigits, 0 },
    { "uuencode", BinaryEncode64,  NULL, (ClientData)UueDigits, 0 },
    { "base64",   BinaryEncode64,  NULL, (ClientData)B64Digits, 0 },
    { NULL, NULL, NULL, NULL, 0 }
};
static const EnsembleImplMap decodeMap[] = {
    { "hex",      BinaryDecodeHex, TclCompileBasic1Or2ArgCmd, NULL, NULL, 0 },
    { "uuencode", BinaryDecodeUu,  TclCompileBasic1Or2ArgCmd, NULL, NULL, 0 },
    { "base64",   BinaryDecode64,  TclCompileBasic1Or2ArgCmd, NULL, NULL, 0 },
    { NULL, NULL, NULL, NULL, NULL, 0 }
    { "hex",      BinaryDecodeHex, TclCompileBasic1Or2ArgCmd, NULL, 0 },
    { "uuencode", BinaryDecodeUu,  TclCompileBasic1Or2ArgCmd, NULL, 0 },
    { "base64",   BinaryDecode64,  TclCompileBasic1Or2ArgCmd, NULL, 0 },
    { NULL, NULL, NULL, NULL, 0 }
};

/*
 * The following object type represents an array of bytes. An array of bytes
 * is not equivalent to an internationalized string. Conceptually, a string is
 * an array of 16-bit quantities organized as a sequence of properly formed
 * UTF-8 characters, while a ByteArray is an array of 8-bit quantities.