Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Merge 8.7. But - in stead - remove all deprecated API from libtommath 1.2.0: Starting with Tcl 9.0 we don't support libtommath's deprecated API any more. |
|---|---|
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
7552e35b149546de0692c653a38e1f3f |
| User & Date: | jan.nijtmans 2019-10-23 14:33:58.940 |
Context
|
2019-10-24
| ||
| 08:45 | Merge 8.7 check-in: d017cc8ec7 user: jan.nijtmans tags: trunk | |
|
2019-10-23
| ||
| 20:53 | Merge trunk check-in: 246db07421 user: jan.nijtmans tags: novem | |
| 14:33 | Merge 8.7. But - in stead - remove all deprecated API from libtommath 1.2.0: Starting with Tcl 9.0 w... check-in: 7552e35b14 user: jan.nijtmans tags: trunk | |
| 14:11 | Deprecate mp_unsigned_bin_size, mp_init_set_int, mp_set_int, which are deprecated in libtommath 1.2.... check-in: 631e7ac3ab user: jan.nijtmans tags: core-8-branch | |
| 11:11 | Merge 8.7 check-in: 96b897fd2b user: jan.nijtmans tags: trunk | |
Changes
Changes to generic/tclStrToD.c.
| ︙ | ︙ | |||
4317 4318 4319 4320 4321 4322 4323 |
for (i=0; i<9; ++i) {
mp_init(pow5 + i);
}
mp_set(pow5, 5);
for (i=0; i<8; ++i) {
mp_sqr(pow5+i, pow5+i+1);
}
| | | 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 |
for (i=0; i<9; ++i) {
mp_init(pow5 + i);
}
mp_set(pow5, 5);
for (i=0; i<8; ++i) {
mp_sqr(pow5+i, pow5+i+1);
}
mp_init_ul(pow5_13, 1220703125);
for (i = 1; i < 5; ++i) {
mp_init(pow5_13 + i);
mp_sqr(pow5_13 + i - 1, pow5_13 + i);
}
/*
* Determine the number of decimal digits to the left and right of the
|
| ︙ | ︙ |
Changes to generic/tclStubInit.c.
| ︙ | ︙ | |||
60 61 62 63 64 65 66 |
#endif
MP_SET_UNSIGNED(mp_set_ull, Tcl_WideUInt)
MP_GET_MAG(mp_get_mag_ull, Tcl_WideUInt)
mp_err TclBN_mp_set_int(mp_int *a, unsigned long i)
{
| | < < < < < < < < < | | 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
#endif
MP_SET_UNSIGNED(mp_set_ull, Tcl_WideUInt)
MP_GET_MAG(mp_get_mag_ull, Tcl_WideUInt)
mp_err TclBN_mp_set_int(mp_int *a, unsigned long i)
{
mp_set_ul(a, i);
return MP_OKAY;
}
static mp_err TclBN_mp_set_long(mp_int *a, unsigned long i)
{
mp_set_ul(a, i);
return MP_OKAY;
}
#define TclBN_mp_set_ul (void (*)(mp_int *a, unsigned long i))TclBN_mp_set_long
#ifdef _WIN32
# define TclUnixWaitForFile 0
|
| ︙ | ︙ | |||
171 172 173 174 175 176 177 |
return result;
}
#define Tcl_ExprLongObj (int(*)(Tcl_Interp*,Tcl_Obj*,long*))exprIntObj
#endif /* TCL_WIDE_INT_IS_LONG */
#endif /* __CYGWIN__ */
| < < < | 162 163 164 165 166 167 168 169 170 171 172 173 174 175 |
return result;
}
#define Tcl_ExprLongObj (int(*)(Tcl_Interp*,Tcl_Obj*,long*))exprIntObj
#endif /* TCL_WIDE_INT_IS_LONG */
#endif /* __CYGWIN__ */
/*
* WARNING: The contents of this file is automatically generated by the
* tools/genStubs.tcl script. Any modifications to the function declarations
* below should be made in the generic/tcl.decls script.
*/
MODULE_SCOPE const TclStubs tclStubs;
|
| ︙ | ︙ | |||
621 622 623 624 625 626 627 |
TclBN_mp_sqr, /* 40 */
TclBN_mp_sqrt, /* 41 */
TclBN_mp_sub, /* 42 */
TclBN_mp_sub_d, /* 43 */
0, /* 44 */
0, /* 45 */
0, /* 46 */
| | | | | | 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 |
TclBN_mp_sqr, /* 40 */
TclBN_mp_sqrt, /* 41 */
TclBN_mp_sub, /* 42 */
TclBN_mp_sub_d, /* 43 */
0, /* 44 */
0, /* 45 */
0, /* 46 */
0, /* 47 */
TclBN_mp_xor, /* 48 */
TclBN_mp_zero, /* 49 */
0, /* 50 */
0, /* 51 */
0, /* 52 */
0, /* 53 */
0, /* 54 */
0, /* 55 */
0, /* 56 */
0, /* 57 */
0, /* 58 */
0, /* 59 */
0, /* 60 */
TclBN_mp_init_ul, /* 61 */
TclBN_mp_set_ul, /* 62 */
TclBN_mp_cnt_lsb, /* 63 */
0, /* 64 */
0, /* 65 */
0, /* 66 */
0, /* 67 */
TclBN_mp_set_ull, /* 68 */
TclBN_mp_get_mag_ull, /* 69 */
0, /* 70 */
TclBN_mp_get_mag_ul, /* 71 */
TclBN_mp_isodd, /* 72 */
0, /* 73 */
0, /* 74 */
0, /* 75 */
TclBN_mp_signed_rsh, /* 76 */
0, /* 77 */
|
| ︙ | ︙ |
Changes to generic/tclTomMath.decls.
| ︙ | ︙ | |||
164 165 166 167 168 169 170 |
# mp_err TclBN_mp_to_unsigned_bin_n(const mp_int *a, unsigned char *b,
# unsigned long *outlen)
#}
# Removed in 9.0
#declare 46 {
# mp_err TclBN_mp_toradix_n(const mp_int *a, char *str, int radix, int maxlen)
#}
| > | | < > | | | 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 |
# mp_err TclBN_mp_to_unsigned_bin_n(const mp_int *a, unsigned char *b,
# unsigned long *outlen)
#}
# Removed in 9.0
#declare 46 {
# mp_err TclBN_mp_toradix_n(const mp_int *a, char *str, int radix, int maxlen)
#}
# Removed in 9.0
#declare 47 {deprecated {Use mp_ubin_size}} {
# int TclBN_mp_unsigned_bin_size(const mp_int *a)
#}
declare 48 {
mp_err TclBN_mp_xor(const mp_int *a, const mp_int *b, mp_int *c)
}
declare 49 {
void TclBN_mp_zero(mp_int *a)
}
declare 61 {
mp_err TclBN_mp_init_ul(mp_int *a, unsigned long i)
}
declare 62 {
void TclBN_mp_set_ul(mp_int *a, unsigned long i)
}
declare 63 {
int TclBN_mp_cnt_lsb(const mp_int *a)
}
# Formerly internal API to allow initialisation of bignums without knowing the
# typedefs of how a bignum works internally.
|
| ︙ | ︙ | |||
209 210 211 212 213 214 215 |
# Added in libtommath 1.0.1
declare 68 {
void TclBN_mp_set_ull(mp_int *a, Tcl_WideUInt i)
}
declare 69 {
Tcl_WideUInt TclBN_mp_get_mag_ull(const mp_int *a)
}
| < < < | 210 211 212 213 214 215 216 217 218 219 220 221 222 223 |
# Added in libtommath 1.0.1
declare 68 {
void TclBN_mp_set_ull(mp_int *a, Tcl_WideUInt i)
}
declare 69 {
Tcl_WideUInt TclBN_mp_get_mag_ull(const mp_int *a)
}
declare 71 {
unsigned long TclBN_mp_get_mag_ul(const mp_int *a)
}
declare 72 {
mp_bool TclBN_mp_isodd(const mp_int *a)
}
|
| ︙ | ︙ |
Changes to generic/tclTomMathDecls.h.
| ︙ | ︙ | |||
86 87 88 89 90 91 92 | #define mp_grow TclBN_mp_grow #define s_mp_get_bit TclBN_mp_get_bit #define mp_grow TclBN_mp_grow #define mp_init TclBN_mp_init #define mp_init_copy TclBN_mp_init_copy #define mp_init_multi TclBN_mp_init_multi #define mp_init_set TclBN_mp_init_set | | > | | 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 | #define mp_grow TclBN_mp_grow #define s_mp_get_bit TclBN_mp_get_bit #define mp_grow TclBN_mp_grow #define mp_init TclBN_mp_init #define mp_init_copy TclBN_mp_init_copy #define mp_init_multi TclBN_mp_init_multi #define mp_init_set TclBN_mp_init_set #define mp_init_set_int(a,i) TclBN_mp_init_ul(a,(unsigned int)(i)) #define mp_init_size TclBN_mp_init_size #define mp_init_ul TclBN_mp_init_ul #define mp_karatsuba_mul TclBN_mp_karatsuba_mul #define s_mp_karatsuba_mul TclBN_mp_karatsuba_mul #define mp_karatsuba_sqr TclBN_mp_karatsuba_sqr #define s_mp_karatsuba_sqr TclBN_mp_karatsuba_sqr #define mp_isodd TclBN_mp_isodd #define mp_lshd TclBN_mp_lshd #define mp_mod TclBN_mp_mod #define mp_mod_2d TclBN_mp_mod_2d #define mp_mul TclBN_mp_mul #define mp_mul_2 TclBN_mp_mul_2 #define mp_mul_2d TclBN_mp_mul_2d #define mp_mul_d TclBN_mp_mul_d #define mp_neg TclBN_mp_neg #define mp_or TclBN_mp_or #define mp_radix_size TclBN_mp_radix_size #define mp_read_radix TclBN_mp_read_radix #define mp_rshd TclBN_mp_rshd #define mp_set TclBN_mp_set #define mp_set_int(a,b) (TclBN_mp_set_ul((a),((unsigned int)(b))),MP_OKAY) #define mp_set_long(a,b) (TclBN_mp_set_ul((a),(b)),MP_OKAY) #define mp_set_long_long(a,b) (TclBN_mp_set_ull((a),(b)),MP_OKAY) #define mp_set_ul TclBN_mp_set_ul #define mp_set_ull TclBN_mp_set_ull #define mp_shrink TclBN_mp_shrink #define mp_sqr TclBN_mp_sqr #define mp_sqrt TclBN_mp_sqrt |
| ︙ | ︙ | |||
132 133 134 135 136 137 138 | #define s_mp_balance_mul TclBN_mp_balance_mul #define mp_toom_sqr TclBN_mp_toom_sqr #define s_mp_toom_sqr TclBN_mp_toom_sqr #define mp_toradix_n TclBN_mp_toradix_n #define mp_to_radix TclBN_mp_to_radix #define mp_to_ubin TclBN_mp_to_ubin #define mp_ubin_size TclBN_mp_ubin_size | < | 133 134 135 136 137 138 139 140 141 142 143 144 145 146 | #define s_mp_balance_mul TclBN_mp_balance_mul #define mp_toom_sqr TclBN_mp_toom_sqr #define s_mp_toom_sqr TclBN_mp_toom_sqr #define mp_toradix_n TclBN_mp_toradix_n #define mp_to_radix TclBN_mp_to_radix #define mp_to_ubin TclBN_mp_to_ubin #define mp_ubin_size TclBN_mp_ubin_size #define mp_xor TclBN_mp_xor #define mp_zero TclBN_mp_zero #define s_mp_add TclBN_s_mp_add #define s_mp_mul_digs TclBN_s_mp_mul_digs #define s_mp_sqr TclBN_s_mp_sqr #define s_mp_sub TclBN_s_mp_sub |
| ︙ | ︙ | |||
292 293 294 295 296 297 298 | mp_int *c); /* 43 */ EXTERN mp_err TclBN_mp_sub_d(const mp_int *a, mp_digit b, mp_int *c); /* Slot 44 is reserved */ /* Slot 45 is reserved */ /* Slot 46 is reserved */ | | < | | | < | 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 | mp_int *c); /* 43 */ EXTERN mp_err TclBN_mp_sub_d(const mp_int *a, mp_digit b, mp_int *c); /* Slot 44 is reserved */ /* Slot 45 is reserved */ /* Slot 46 is reserved */ /* Slot 47 is reserved */ /* 48 */ EXTERN mp_err TclBN_mp_xor(const mp_int *a, const mp_int *b, mp_int *c); /* 49 */ EXTERN void TclBN_mp_zero(mp_int *a); /* Slot 50 is reserved */ /* Slot 51 is reserved */ /* Slot 52 is reserved */ /* Slot 53 is reserved */ /* Slot 54 is reserved */ /* Slot 55 is reserved */ /* Slot 56 is reserved */ /* Slot 57 is reserved */ /* Slot 58 is reserved */ /* Slot 59 is reserved */ /* Slot 60 is reserved */ /* 61 */ EXTERN mp_err TclBN_mp_init_ul(mp_int *a, unsigned long i); /* 62 */ EXTERN void TclBN_mp_set_ul(mp_int *a, unsigned long i); /* 63 */ EXTERN int TclBN_mp_cnt_lsb(const mp_int *a); /* Slot 64 is reserved */ /* Slot 65 is reserved */ /* Slot 66 is reserved */ /* Slot 67 is reserved */ /* 68 */ EXTERN void TclBN_mp_set_ull(mp_int *a, Tcl_WideUInt i); /* 69 */ EXTERN Tcl_WideUInt TclBN_mp_get_mag_ull(const mp_int *a); /* Slot 70 is reserved */ /* 71 */ EXTERN unsigned long TclBN_mp_get_mag_ul(const mp_int *a); /* 72 */ EXTERN mp_bool TclBN_mp_isodd(const mp_int *a); /* Slot 73 is reserved */ /* Slot 74 is reserved */ /* Slot 75 is reserved */ |
| ︙ | ︙ | |||
397 398 399 400 401 402 403 |
mp_err (*tclBN_mp_sqr) (const mp_int *a, mp_int *b); /* 40 */
mp_err (*tclBN_mp_sqrt) (const mp_int *a, mp_int *b); /* 41 */
mp_err (*tclBN_mp_sub) (const mp_int *a, const mp_int *b, mp_int *c); /* 42 */
mp_err (*tclBN_mp_sub_d) (const mp_int *a, mp_digit b, mp_int *c); /* 43 */
void (*reserved44)(void);
void (*reserved45)(void);
void (*reserved46)(void);
| | | | | | 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 |
mp_err (*tclBN_mp_sqr) (const mp_int *a, mp_int *b); /* 40 */
mp_err (*tclBN_mp_sqrt) (const mp_int *a, mp_int *b); /* 41 */
mp_err (*tclBN_mp_sub) (const mp_int *a, const mp_int *b, mp_int *c); /* 42 */
mp_err (*tclBN_mp_sub_d) (const mp_int *a, mp_digit b, mp_int *c); /* 43 */
void (*reserved44)(void);
void (*reserved45)(void);
void (*reserved46)(void);
void (*reserved47)(void);
mp_err (*tclBN_mp_xor) (const mp_int *a, const mp_int *b, mp_int *c); /* 48 */
void (*tclBN_mp_zero) (mp_int *a); /* 49 */
void (*reserved50)(void);
void (*reserved51)(void);
void (*reserved52)(void);
void (*reserved53)(void);
void (*reserved54)(void);
void (*reserved55)(void);
void (*reserved56)(void);
void (*reserved57)(void);
void (*reserved58)(void);
void (*reserved59)(void);
void (*reserved60)(void);
mp_err (*tclBN_mp_init_ul) (mp_int *a, unsigned long i); /* 61 */
void (*tclBN_mp_set_ul) (mp_int *a, unsigned long i); /* 62 */
int (*tclBN_mp_cnt_lsb) (const mp_int *a); /* 63 */
void (*reserved64)(void);
void (*reserved65)(void);
void (*reserved66)(void);
void (*reserved67)(void);
void (*tclBN_mp_set_ull) (mp_int *a, Tcl_WideUInt i); /* 68 */
Tcl_WideUInt (*tclBN_mp_get_mag_ull) (const mp_int *a); /* 69 */
void (*reserved70)(void);
unsigned long (*tclBN_mp_get_mag_ul) (const mp_int *a); /* 71 */
mp_bool (*tclBN_mp_isodd) (const mp_int *a); /* 72 */
void (*reserved73)(void);
void (*reserved74)(void);
void (*reserved75)(void);
mp_err (*tclBN_mp_signed_rsh) (const mp_int *a, int b, mp_int *c); /* 76 */
void (*reserved77)(void);
|
| ︙ | ︙ | |||
536 537 538 539 540 541 542 | #define TclBN_mp_sub \ (tclTomMathStubsPtr->tclBN_mp_sub) /* 42 */ #define TclBN_mp_sub_d \ (tclTomMathStubsPtr->tclBN_mp_sub_d) /* 43 */ /* Slot 44 is reserved */ /* Slot 45 is reserved */ /* Slot 46 is reserved */ | | < | | | | | < | 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 | #define TclBN_mp_sub \ (tclTomMathStubsPtr->tclBN_mp_sub) /* 42 */ #define TclBN_mp_sub_d \ (tclTomMathStubsPtr->tclBN_mp_sub_d) /* 43 */ /* Slot 44 is reserved */ /* Slot 45 is reserved */ /* Slot 46 is reserved */ /* Slot 47 is reserved */ #define TclBN_mp_xor \ (tclTomMathStubsPtr->tclBN_mp_xor) /* 48 */ #define TclBN_mp_zero \ (tclTomMathStubsPtr->tclBN_mp_zero) /* 49 */ /* Slot 50 is reserved */ /* Slot 51 is reserved */ /* Slot 52 is reserved */ /* Slot 53 is reserved */ /* Slot 54 is reserved */ /* Slot 55 is reserved */ /* Slot 56 is reserved */ /* Slot 57 is reserved */ /* Slot 58 is reserved */ /* Slot 59 is reserved */ /* Slot 60 is reserved */ #define TclBN_mp_init_ul \ (tclTomMathStubsPtr->tclBN_mp_init_ul) /* 61 */ #define TclBN_mp_set_ul \ (tclTomMathStubsPtr->tclBN_mp_set_ul) /* 62 */ #define TclBN_mp_cnt_lsb \ (tclTomMathStubsPtr->tclBN_mp_cnt_lsb) /* 63 */ /* Slot 64 is reserved */ /* Slot 65 is reserved */ /* Slot 66 is reserved */ /* Slot 67 is reserved */ #define TclBN_mp_set_ull \ (tclTomMathStubsPtr->tclBN_mp_set_ull) /* 68 */ #define TclBN_mp_get_mag_ull \ (tclTomMathStubsPtr->tclBN_mp_get_mag_ull) /* 69 */ /* Slot 70 is reserved */ #define TclBN_mp_get_mag_ul \ (tclTomMathStubsPtr->tclBN_mp_get_mag_ul) /* 71 */ #define TclBN_mp_isodd \ (tclTomMathStubsPtr->tclBN_mp_isodd) /* 72 */ /* Slot 73 is reserved */ /* Slot 74 is reserved */ /* Slot 75 is reserved */ |
| ︙ | ︙ |
Changes to generic/tclTomMathInterface.c.
| ︙ | ︙ | |||
108 109 110 111 112 113 114 |
void
TclInitBignumFromWideInt(
mp_int *a, /* Bignum to initialize */
Tcl_WideInt v) /* Initial value */
{
if (mp_init(a) != MP_OKAY) {
| > | | | 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
void
TclInitBignumFromWideInt(
mp_int *a, /* Bignum to initialize */
Tcl_WideInt v) /* Initial value */
{
if (mp_init(a) != MP_OKAY) {
wipanic:
Tcl_Panic("initialization failure in TclInitBignumFromWideInt");
}
if (v < (Tcl_WideInt)0) {
mp_set_ull(a, (Tcl_WideUInt)(-v));
if (mp_neg(a, a) != MP_OKAY) goto wipanic;
} else {
mp_set_ull(a, (Tcl_WideUInt)v);
}
}
/*
*----------------------------------------------------------------------
|
| ︙ | ︙ |
Changes to generic/tclZipfs.c.
| ︙ | ︙ | |||
273 274 275 276 277 278 279 280 281 282 283 284 285 |
int waiters; /* RW lock, see below */
int wrmax; /* Maximum write size of a file */
int idCount; /* Counter for channel names */
Tcl_HashTable fileHash; /* File name to ZipEntry mapping */
Tcl_HashTable zipHash; /* Mount to ZipFile mapping */
} ZipFS = {
0, 0, 0, DEFAULT_WRITE_MAX_SIZE, 0,
};
/*
* For password rotation.
*/
| > > | | 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 |
int waiters; /* RW lock, see below */
int wrmax; /* Maximum write size of a file */
int idCount; /* Counter for channel names */
Tcl_HashTable fileHash; /* File name to ZipEntry mapping */
Tcl_HashTable zipHash; /* Mount to ZipFile mapping */
} ZipFS = {
0, 0, 0, DEFAULT_WRITE_MAX_SIZE, 0,
{0,{0,0,0,0},0,0,0,0,0,0,0,0,0},
{0,{0,0,0,0},0,0,0,0,0,0,0,0,0}
};
/*
* For password rotation.
*/
static const char pwrot[17] =
"\x00\x80\x40\xC0\x20\xA0\x60\xE0"
"\x10\x90\x50\xD0\x30\xB0\x70\xF0";
/*
* Table to compute CRC32.
*/
#ifdef Z_U4
|
| ︙ | ︙ | |||
1869 1870 1871 1872 1873 1874 1875 | * A ZIP archive file is mounted, resources are allocated. * *------------------------------------------------------------------------- */ static int ZipFSMountObjCmd( | | | 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 |
* A ZIP archive file is mounted, resources are allocated.
*
*-------------------------------------------------------------------------
*/
static int
ZipFSMountObjCmd(
void *dummy, /* Not used. */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
if (objc > 4) {
Tcl_WrongNumArgs(interp, 1, objv,
"?mountpoint? ?zipfile? ?password?");
|
| ︙ | ︙ | |||
1903 1904 1905 1906 1907 1908 1909 | * A ZIP archive file is mounted, resources are allocated. * *------------------------------------------------------------------------- */ static int ZipFSMountBufferObjCmd( | | | 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 |
* A ZIP archive file is mounted, resources are allocated.
*
*-------------------------------------------------------------------------
*/
static int
ZipFSMountBufferObjCmd(
void *dummy, /* Not used. */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
const char *mountPoint; /* Mount point path. */
unsigned char *data;
size_t length = 0;
|
| ︙ | ︙ | |||
1955 1956 1957 1958 1959 1960 1961 | * Side effects: * *------------------------------------------------------------------------- */ static int ZipFSRootObjCmd( | | | 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 |
* Side effects:
*
*-------------------------------------------------------------------------
*/
static int
ZipFSRootObjCmd(
void *dummy, /* Not used. */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_SetObjResult(interp, Tcl_NewStringObj(ZIPFS_VOLUME, -1));
return TCL_OK;
}
|
| ︙ | ︙ | |||
1982 1983 1984 1985 1986 1987 1988 | * A mounted ZIP archive file is unmounted, resources are free'd. * *------------------------------------------------------------------------- */ static int ZipFSUnmountObjCmd( | | | 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 |
* A mounted ZIP archive file is unmounted, resources are free'd.
*
*-------------------------------------------------------------------------
*/
static int
ZipFSUnmountObjCmd(
void *dummy, /* Not used. */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
if (objc != 2) {
Tcl_WrongNumArgs(interp, 1, objv, "zipfile");
return TCL_ERROR;
|
| ︙ | ︙ | |||
2013 2014 2015 2016 2017 2018 2019 | * None. * *------------------------------------------------------------------------- */ static int ZipFSMkKeyObjCmd( | | | 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 |
* None.
*
*-------------------------------------------------------------------------
*/
static int
ZipFSMkKeyObjCmd(
void *dummy, /* Not used. */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
int len, i = 0;
char *pw, passBuf[264];
|
| ︙ | ︙ | |||
2792 2793 2794 2795 2796 2797 2798 | * See description of ZipFSMkZipOrImgCmd(). * *------------------------------------------------------------------------- */ static int ZipFSMkZipObjCmd( | | | | 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 |
* See description of ZipFSMkZipOrImgCmd().
*
*-------------------------------------------------------------------------
*/
static int
ZipFSMkZipObjCmd(
void *dummy, /* Not used. */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
if (objc < 3 || objc > 5) {
Tcl_WrongNumArgs(interp, 1, objv, "outfile indir ?strip? ?password?");
return TCL_ERROR;
}
if (Tcl_IsSafe(interp)) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"operation not permitted in a safe interpreter", -1));
Tcl_SetErrorCode(interp, "TCL", "ZIPFS", "SAFE_INTERP", NULL);
return TCL_ERROR;
}
return ZipFSMkZipOrImgObjCmd(interp, 0, 0, objc, objv);
}
static int
ZipFSLMkZipObjCmd(
void *dummy, /* Not used. */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
if (objc < 3 || objc > 4) {
Tcl_WrongNumArgs(interp, 1, objv, "outfile inlist ?password?");
return TCL_ERROR;
|
| ︙ | ︙ | |||
2849 2850 2851 2852 2853 2854 2855 | * See description of ZipFSMkZipOrImgCmd(). * *------------------------------------------------------------------------- */ static int ZipFSMkImgObjCmd( | | | | 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 |
* See description of ZipFSMkZipOrImgCmd().
*
*-------------------------------------------------------------------------
*/
static int
ZipFSMkImgObjCmd(
void *dummy, /* Not used. */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
if (objc < 3 || objc > 6) {
Tcl_WrongNumArgs(interp, 1, objv,
"outfile indir ?strip? ?password? ?infile?");
return TCL_ERROR;
}
if (Tcl_IsSafe(interp)) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"operation not permitted in a safe interpreter", -1));
Tcl_SetErrorCode(interp, "TCL", "ZIPFS", "SAFE_INTERP", NULL);
return TCL_ERROR;
}
return ZipFSMkZipOrImgObjCmd(interp, 1, 0, objc, objv);
}
static int
ZipFSLMkImgObjCmd(
void *dummy, /* Not used. */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
if (objc < 3 || objc > 5) {
Tcl_WrongNumArgs(interp, 1, objv, "outfile inlist ?password infile?");
return TCL_ERROR;
|
| ︙ | ︙ | |||
2907 2908 2909 2910 2911 2912 2913 | * None. * *------------------------------------------------------------------------- */ static int ZipFSCanonicalObjCmd( | | | 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 |
* None.
*
*-------------------------------------------------------------------------
*/
static int
ZipFSCanonicalObjCmd(
void *dummy, /* Not used. */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
char *mntpoint = NULL;
char *filename = NULL;
char *result;
|
| ︙ | ︙ | |||
2963 2964 2965 2966 2967 2968 2969 | * None. * *------------------------------------------------------------------------- */ static int ZipFSExistsObjCmd( | | | 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 |
* None.
*
*-------------------------------------------------------------------------
*/
static int
ZipFSExistsObjCmd(
void *dummy, /* Not used. */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
char *filename;
int exists;
Tcl_DString ds;
|
| ︙ | ︙ | |||
3016 3017 3018 3019 3020 3021 3022 | * None. * *------------------------------------------------------------------------- */ static int ZipFSInfoObjCmd( | | | 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 |
* None.
*
*-------------------------------------------------------------------------
*/
static int
ZipFSInfoObjCmd(
void *dummy, /* Not used. */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
char *filename;
ZipEntry *z;
|
| ︙ | ︙ | |||
3066 3067 3068 3069 3070 3071 3072 | * None. * *------------------------------------------------------------------------- */ static int ZipFSListObjCmd( | | | 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 |
* None.
*
*-------------------------------------------------------------------------
*/
static int
ZipFSListObjCmd(
void *dummy, /* Not used. */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
char *pattern = NULL;
Tcl_RegExp regexp = NULL;
Tcl_HashEntry *hPtr;
|
| ︙ | ︙ | |||
3263 3264 3265 3266 3267 3268 3269 | * This cache is never cleared. * *------------------------------------------------------------------------- */ static int ZipFSTclLibraryObjCmd( | | | 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 |
* This cache is never cleared.
*
*-------------------------------------------------------------------------
*/
static int
ZipFSTclLibraryObjCmd(
void *dummy, /* Not used. */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
if (!Tcl_IsSafe(interp)) {
Tcl_Obj *pResult = TclZipfs_TclLibrary();
|
| ︙ | ︙ | |||
3298 3299 3300 3301 3302 3303 3304 |
*
*-------------------------------------------------------------------------
*/
static int
ZipChannelClose(
void *instanceData,
| | | 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 |
*
*-------------------------------------------------------------------------
*/
static int
ZipChannelClose(
void *instanceData,
Tcl_Interp *dummy) /* Current interpreter. */
{
ZipChannel *info = instanceData;
if (info->iscompr && info->ubuf) {
Tcl_Free(info->ubuf);
info->ubuf = NULL;
}
|
| ︙ | ︙ | |||
4148 4149 4150 4151 4152 4153 4154 | * None. * *------------------------------------------------------------------------- */ static int ZipFSMatchInDirectoryProc( | | | 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 |
* None.
*
*-------------------------------------------------------------------------
*/
static int
ZipFSMatchInDirectoryProc(
Tcl_Interp *dummy, /* Current interpreter. */
Tcl_Obj *result,
Tcl_Obj *pathPtr,
const char *pattern,
Tcl_GlobTypeData *types)
{
Tcl_HashEntry *hPtr;
Tcl_HashSearch search;
|
| ︙ | ︙ | |||
4338 4339 4340 4341 4342 4343 4344 |
*
*-------------------------------------------------------------------------
*/
static int
ZipFSPathInFilesystemProc(
Tcl_Obj *pathPtr,
| | | 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 |
*
*-------------------------------------------------------------------------
*/
static int
ZipFSPathInFilesystemProc(
Tcl_Obj *pathPtr,
void **dummy)
{
Tcl_HashEntry *hPtr;
Tcl_HashSearch search;
int ret = -1;
size_t len;
char *path;
|
| ︙ | ︙ |
Changes to unix/Makefile.in.
| ︙ | ︙ | |||
325 326 327 328 329 330 331 | bn_mp_add_d.o bn_mp_clamp.o bn_mp_clear.o bn_mp_clear_multi.o \ bn_mp_cmp.o bn_mp_cmp_d.o bn_mp_cmp_mag.o \ bn_mp_cnt_lsb.o bn_mp_copy.o \ bn_mp_count_bits.o bn_mp_div.o bn_mp_div_d.o bn_mp_div_2.o \ bn_mp_div_2d.o bn_mp_div_3.o bn_mp_exch.o bn_mp_expt_u32.o \ bn_s_mp_get_bit.o bn_mp_get_mag_ul.o bn_mp_grow.o bn_mp_init.o \ bn_mp_init_copy.o bn_mp_init_multi.o bn_mp_init_set.o \ | | | 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 | bn_mp_add_d.o bn_mp_clamp.o bn_mp_clear.o bn_mp_clear_multi.o \ bn_mp_cmp.o bn_mp_cmp_d.o bn_mp_cmp_mag.o \ bn_mp_cnt_lsb.o bn_mp_copy.o \ bn_mp_count_bits.o bn_mp_div.o bn_mp_div_d.o bn_mp_div_2.o \ bn_mp_div_2d.o bn_mp_div_3.o bn_mp_exch.o bn_mp_expt_u32.o \ bn_s_mp_get_bit.o bn_mp_get_mag_ul.o bn_mp_grow.o bn_mp_init.o \ bn_mp_init_copy.o bn_mp_init_multi.o bn_mp_init_set.o \ bn_mp_init_size.o bn_mp_init_ul.o bn_s_mp_karatsuba_mul.o \ bn_s_mp_karatsuba_sqr.o bn_s_mp_balance_mul.o bn_mp_isodd.o \ bn_mp_lshd.o bn_mp_mod.o bn_mp_mod_2d.o bn_mp_mul.o bn_mp_mul_2.o \ bn_mp_mul_2d.o bn_mp_mul_d.o bn_mp_neg.o bn_mp_or.o \ bn_mp_radix_size.o bn_mp_radix_smap.o \ bn_mp_read_radix.o bn_mp_rshd.o bn_mp_set.o bn_mp_set_ul.o \ bn_mp_shrink.o \ bn_mp_sqr.o bn_mp_sqrt.o bn_mp_sub.o bn_mp_sub_d.o \ |
| ︙ | ︙ | |||
1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 | $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_init_multi.c bn_mp_init_set.o: $(TOMMATH_DIR)/bn_mp_init_set.c $(MATHHDRS) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_init_set.c bn_mp_init_size.o:$(TOMMATH_DIR)/bn_mp_init_size.c $(MATHHDRS) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_init_size.c bn_s_mp_karatsuba_mul.o: $(TOMMATH_DIR)/bn_s_mp_karatsuba_mul.c $(MATHHDRS) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_s_mp_karatsuba_mul.c bn_s_mp_karatsuba_sqr.o: $(TOMMATH_DIR)/bn_s_mp_karatsuba_sqr.c $(MATHHDRS) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_s_mp_karatsuba_sqr.c | > > > | 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 | $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_init_multi.c bn_mp_init_set.o: $(TOMMATH_DIR)/bn_mp_init_set.c $(MATHHDRS) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_init_set.c bn_mp_init_size.o:$(TOMMATH_DIR)/bn_mp_init_size.c $(MATHHDRS) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_init_size.c bn_mp_init_ul.o:$(TOMMATH_DIR)/bn_mp_init_ul.c $(MATHHDRS) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_init_ul.c bn_s_mp_karatsuba_mul.o: $(TOMMATH_DIR)/bn_s_mp_karatsuba_mul.c $(MATHHDRS) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_s_mp_karatsuba_mul.c bn_s_mp_karatsuba_sqr.o: $(TOMMATH_DIR)/bn_s_mp_karatsuba_sqr.c $(MATHHDRS) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_s_mp_karatsuba_sqr.c |
| ︙ | ︙ |
Changes to unix/tclUnixFile.c.
| ︙ | ︙ | |||
266 267 268 269 270 271 272 | int matchHidden, matchHiddenPat; Tcl_StatBuf statBuf; Tcl_DString ds; /* native encoding of dir */ Tcl_DString dsOrig; /* utf-8 encoding of dir */ Tcl_Encoding encoding = Tcl_GetEncoding(interp ,NULL); Tcl_DStringInit(&dsOrig); | | > | 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 | int matchHidden, matchHiddenPat; Tcl_StatBuf statBuf; Tcl_DString ds; /* native encoding of dir */ Tcl_DString dsOrig; /* utf-8 encoding of dir */ Tcl_Encoding encoding = Tcl_GetEncoding(interp ,NULL); Tcl_DStringInit(&dsOrig); dirName = TclGetString(fileNamePtr); dirLength = fileNamePtr->length; Tcl_DStringAppend(&dsOrig, dirName, dirLength); /* * Make sure that the directory part of the name really is a * directory. If the directory name is "", use the name "." instead, * because some UNIX systems don't treat "" like "." automatically. * Keep the "" for use in generating file names, otherwise "glob |
| ︙ | ︙ |
Changes to win/Makefile.in.
| ︙ | ︙ | |||
383 384 385 386 387 388 389 390 391 392 393 394 395 396 |
bn_mp_get_mag_ul.${OBJEXT} \
bn_mp_grow.${OBJEXT} \
bn_mp_init.${OBJEXT} \
bn_mp_init_copy.${OBJEXT} \
bn_mp_init_multi.${OBJEXT} \
bn_mp_init_set.${OBJEXT} \
bn_mp_init_size.${OBJEXT} \
bn_mp_isodd.${OBJEXT} \
bn_mp_lshd.${OBJEXT} \
bn_mp_mod.${OBJEXT} \
bn_mp_mod_2d.${OBJEXT} \
bn_mp_mul.${OBJEXT} \
bn_mp_mul_2.${OBJEXT} \
bn_mp_mul_2d.${OBJEXT} \
| > | 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 |
bn_mp_get_mag_ul.${OBJEXT} \
bn_mp_grow.${OBJEXT} \
bn_mp_init.${OBJEXT} \
bn_mp_init_copy.${OBJEXT} \
bn_mp_init_multi.${OBJEXT} \
bn_mp_init_set.${OBJEXT} \
bn_mp_init_size.${OBJEXT} \
bn_mp_init_ul.${OBJEXT} \
bn_mp_isodd.${OBJEXT} \
bn_mp_lshd.${OBJEXT} \
bn_mp_mod.${OBJEXT} \
bn_mp_mod_2d.${OBJEXT} \
bn_mp_mul.${OBJEXT} \
bn_mp_mul_2.${OBJEXT} \
bn_mp_mul_2d.${OBJEXT} \
|
| ︙ | ︙ |
Changes to win/makefile.vc.
| ︙ | ︙ | |||
337 338 339 340 341 342 343 344 345 346 347 348 349 350 | $(TMP_DIR)\bn_mp_get_mag_ul.obj \ $(TMP_DIR)\bn_mp_grow.obj \ $(TMP_DIR)\bn_mp_init.obj \ $(TMP_DIR)\bn_mp_init_copy.obj \ $(TMP_DIR)\bn_mp_init_multi.obj \ $(TMP_DIR)\bn_mp_init_set.obj \ $(TMP_DIR)\bn_mp_init_size.obj \ $(TMP_DIR)\bn_mp_isodd.obj \ $(TMP_DIR)\bn_mp_lshd.obj \ $(TMP_DIR)\bn_mp_mod.obj \ $(TMP_DIR)\bn_mp_mod_2d.obj \ $(TMP_DIR)\bn_mp_mul.obj \ $(TMP_DIR)\bn_mp_mul_2.obj \ $(TMP_DIR)\bn_mp_mul_2d.obj \ | > | 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 | $(TMP_DIR)\bn_mp_get_mag_ul.obj \ $(TMP_DIR)\bn_mp_grow.obj \ $(TMP_DIR)\bn_mp_init.obj \ $(TMP_DIR)\bn_mp_init_copy.obj \ $(TMP_DIR)\bn_mp_init_multi.obj \ $(TMP_DIR)\bn_mp_init_set.obj \ $(TMP_DIR)\bn_mp_init_size.obj \ $(TMP_DIR)\bn_mp_init_ul.obj \ $(TMP_DIR)\bn_mp_isodd.obj \ $(TMP_DIR)\bn_mp_lshd.obj \ $(TMP_DIR)\bn_mp_mod.obj \ $(TMP_DIR)\bn_mp_mod_2d.obj \ $(TMP_DIR)\bn_mp_mul.obj \ $(TMP_DIR)\bn_mp_mul_2.obj \ $(TMP_DIR)\bn_mp_mul_2d.obj \ |
| ︙ | ︙ |