Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | merge with trunk |
---|---|
Timelines: | family | ancestors | descendants | both | wtf-8-experiment |
Files: | files | file ages | folders |
SHA1: |
1f030daff967da0ed7a88be21a20ad57 |
User & Date: | chw 2020-06-25 14:33:41.664 |
Context
2020-06-25
| ||
15:23 | merge with trunk check-in: 5e4e821402 user: chw tags: wtf-8-experiment | |
14:33 | merge with trunk check-in: 1f030daff9 user: chw tags: wtf-8-experiment | |
14:32 | more selected tcl upstream changes check-in: d24dd175db user: chw tags: trunk | |
10:08 | merge with trunk check-in: c61291cd7f user: chw tags: wtf-8-experiment | |
Changes
Changes to jni/tcl/compat/gettod.c.
︙ | ︙ | |||
17 18 19 20 21 22 23 24 25 26 | int gettimeofday( struct timeval *tp, struct timezone *tz) { struct timeb t; ftime(&t); tp->tv_sec = t.time; | > > | | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | int gettimeofday( struct timeval *tp, struct timezone *tz) { struct timeb t; (void)tz; ftime(&t); tp->tv_sec = t.time; tp->tv_usec = t.millitm * 1000; return 0; } |
Changes to jni/tcl/compat/opendir.c.
︙ | ︙ | |||
16 17 18 19 20 21 22 | * open a directory. */ DIR * opendir( char *name) { | | | | | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | * open a directory. */ DIR * opendir( char *name) { DIR *dirp; int fd; const char *myname; myname = ((*name == '\0') ? "." : name); if ((fd = open(myname, 0, 0)) == -1) { return NULL; } dirp = (DIR *) ckalloc(sizeof(DIR)); if (dirp == NULL) { |
︙ | ︙ | |||
61 62 63 64 65 66 67 | /* * get next entry in a directory. */ struct dirent * readdir( | | | | 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | /* * get next entry in a directory. */ struct dirent * readdir( DIR *dirp) { struct olddirect *dp; static struct dirent dir; for (;;) { if (dirp->dd_loc == 0) { dirp->dd_size = read(dirp->dd_fd, dirp->dd_buf, DIRBLKSIZ); if (dirp->dd_size <= 0) { return NULL; |
︙ | ︙ | |||
97 98 99 100 101 102 103 | /* * close a directory. */ void closedir( | | | | 97 98 99 100 101 102 103 104 105 106 107 108 109 110 | /* * close a directory. */ void closedir( DIR *dirp) { close(dirp->dd_fd); dirp->dd_fd = -1; dirp->dd_loc = 0; ckfree((char *)dirp); } |
Changes to jni/tcl/compat/strstr.c.
︙ | ︙ | |||
32 33 34 35 36 37 38 | * None. * *---------------------------------------------------------------------- */ char * strstr( | | | | | | | 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | * None. * *---------------------------------------------------------------------- */ char * strstr( const char *string, /* String to search. */ const char *substring) /* Substring to try to find in string. */ { const char *a, *b; /* * First scan quickly through the two strings looking for a * single-character match. When it's found, then compare the rest of the * substring. */ b = substring; if (*b == 0) { return (char *)string; } for ( ; *string != 0; string += 1) { if (*string != *b) { continue; } a = string; while (1) { if (*b == 0) { return (char *)string; } if (*a++ != *b++) { break; } } b = substring; } |
︙ | ︙ |
Changes to jni/tcl/compat/strtol.c.
︙ | ︙ | |||
41 42 43 44 45 46 47 | * character, or NULL. */ int base) /* Base for conversion. Must be less than 37. * If 0, then the base is chosen from the * leading characters of string: "0x" means * hex, "0" means octal, anything else means * decimal. */ { | | | 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | * character, or NULL. */ int base) /* Base for conversion. Must be less than 37. * If 0, then the base is chosen from the * leading characters of string: "0x" means * hex, "0" means octal, anything else means * decimal. */ { const char *p; long result; /* * Skip any leading blanks. */ p = string; |
︙ | ︙ |
Changes to jni/tcl/compat/strtoul.c.
︙ | ︙ | |||
58 59 60 61 62 63 64 | * character, or NULL. */ int base) /* Base for conversion. Must be less than 37. * If 0, then the base is chosen from the * leading characters of string: "0x" means * hex, "0" means octal, anything else means * decimal. */ { | | | | | 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | * character, or NULL. */ int base) /* Base for conversion. Must be less than 37. * If 0, then the base is chosen from the * leading characters of string: "0x" means * hex, "0" means octal, anything else means * decimal. */ { const char *p; unsigned long int result = 0; unsigned digit; int anyDigits = 0; int negative=0; int overflow=0; /* * Skip any leading blanks. */ |
︙ | ︙ |
Changes to jni/tcl/compat/waitpid.c.
︙ | ︙ | |||
66 67 68 69 70 71 72 | pid_t pid, /* The pid to wait on. Must be -1 or greater * than zero. */ int *statusPtr, /* Where to store wait status for the * process. */ int options) /* OR'ed combination of WNOHANG and * WUNTRACED. */ { | | | 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | pid_t pid, /* The pid to wait on. Must be -1 or greater * than zero. */ int *statusPtr, /* Where to store wait status for the * process. */ int options) /* OR'ed combination of WNOHANG and * WUNTRACED. */ { WaitInfo *waitPtr, *prevPtr; pid_t result; WAIT_STATUS_TYPE status; if ((pid < -1) || (pid == 0)) { errno = EINVAL; return -1; } |
︙ | ︙ |
Changes to jni/tcl/generic/tclZlib.c.
︙ | ︙ | |||
3013 3014 3015 3016 3017 3018 3019 | int n, decBytes; /* if starting from scratch or continuation after full decompression */ if (!cd->inStream.avail_in) { /* buffer to start, we can read to whole available buffer */ cd->inStream.next_in = (Bytef *) cd->inBuffer; } | | | 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 | int n, decBytes; /* if starting from scratch or continuation after full decompression */ if (!cd->inStream.avail_in) { /* buffer to start, we can read to whole available buffer */ cd->inStream.next_in = (Bytef *) cd->inBuffer; } /* * If done - no read needed anymore, check we have to copy rest of * decompressed data, otherwise return with size (or 0 for Eof) */ if (cd->flags & STREAM_DECOMPRESS) { goto copyDecompressed; } /* |
︙ | ︙ | |||
3097 3098 3099 3100 3101 3102 3103 | if (!gotBytes && !(cd->flags & STREAM_DONE)) { /* if no-data, but not ready - avoid signaling Eof, * continue in blocking mode, otherwise EAGAIN */ if (Tcl_InputBlocked(cd->parent)) { continue; } *errorCodePtr = EAGAIN; | | | 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 | if (!gotBytes && !(cd->flags & STREAM_DONE)) { /* if no-data, but not ready - avoid signaling Eof, * continue in blocking mode, otherwise EAGAIN */ if (Tcl_InputBlocked(cd->parent)) { continue; } *errorCodePtr = EAGAIN; return -1; } break; } /* * Loop until the request is satisfied (or no data available from * above, possibly EOF). |
︙ | ︙ |