Home
last modified time | relevance | path

Searched refs:CAST (Results 1 – 25 of 34) sorted by relevance

12

/PHP-8.1/ext/fileinfo/libmagic/
H A Dmagic.c331 ms->indir_max = CAST(uint16_t, *CAST(const size_t *, val)); in magic_setparam()
334 ms->name_max = CAST(uint16_t, *CAST(const size_t *, val)); in magic_setparam()
337 ms->elf_phnum_max = CAST(uint16_t, *CAST(const size_t *, val)); in magic_setparam()
340 ms->elf_shnum_max = CAST(uint16_t, *CAST(const size_t *, val)); in magic_setparam()
343 ms->elf_notes_max = CAST(uint16_t, *CAST(const size_t *, val)); in magic_setparam()
346 ms->regex_max = CAST(uint16_t, *CAST(const size_t *, val)); in magic_setparam()
367 *CAST(size_t *, val) = ms->indir_max; in magic_getparam()
370 *CAST(size_t *, val) = ms->name_max; in magic_getparam()
382 *CAST(size_t *, val) = ms->regex_max; in magic_getparam()
385 *CAST(size_t *, val) = ms->bytes_max; in magic_getparam()
[all …]
H A Dsoftmagic.c109 #define BE16(p) ((CAST(uint16_t, (p)->hs[0])<<8)|(CAST(uint16_t, (p)->hs[1])))
110 #define LE16(p) ((CAST(uint16_t, (p)->hs[1])<<8)|(CAST(uint16_t, (p)->hs[0])))
112 CAST(intmax_t, CAST(int##v##_t, p)) : \
113 CAST(intmax_t, CAST(uint##v##_t, p)))
604 CAST(utype, v)); \ in mprint()
607 CAST(stype, v)); \ in mprint()
831 return CAST(int32_t, t); in mprint()
928 o = CAST(int32_t, in moffset()
1580 CAST(uint32_t, offset + o), CAST(uint32_t, nbytes), m) == -1) in mget()
2369 matched = CAST(int64_t, v) > CAST(int64_t, l); in magiccheck()
[all …]
H A Dcdf_time.c94 return CAST(int, m); in cdf_getmonth()
96 return CAST(int, m); in cdf_getmonth()
112 tm.tm_sec = CAST(int, t % 60); in cdf_timestamp_to_timespec()
115 tm.tm_min = CAST(int, t % 60); in cdf_timestamp_to_timespec()
118 tm.tm_hour = CAST(int, t % 24); in cdf_timestamp_to_timespec()
122 tm.tm_year = CAST(int, CDF_BASE_YEAR + (t / 365)); in cdf_timestamp_to_timespec()
126 tm.tm_mday = cdf_getday(tm.tm_year, CAST(int, t)); in cdf_timestamp_to_timespec()
127 tm.tm_mon = cdf_getmonth(tm.tm_year, CAST(int, t)); in cdf_timestamp_to_timespec()
176 CAST(long long, *sec)); in cdf_ctime()
H A Delfclass.h44 CAST(zend_off_t, elf_getu(swap, elfhdr.e_phoff)), phnum,
45 CAST(size_t, elf_getu16(swap, elfhdr.e_phentsize)),
59 CAST(zend_off_t, elf_getu(swap, elfhdr.e_phoff)), phnum,
60 CAST(size_t, elf_getu16(swap, elfhdr.e_phentsize)),
69 CAST(zend_off_t, elf_getu(swap, elfhdr.e_shoff)), shnum,
70 CAST(size_t, elf_getu16(swap, elfhdr.e_shentsize)),
72 CAST(int, elf_getu16(swap, elfhdr.e_shstrndx)),
H A Dascmagic.c83 bb.flen = trim_nuls(CAST(const unsigned char *, b->fbuf), b->flen); in file_ascmagic()
110 const unsigned char *buf = CAST(const unsigned char *, b->fbuf); in file_ascmagic_with_encoding()
130 size_t last_line_end = CAST(size_t, -1); in file_ascmagic_with_encoding()
146 if ((utf8_buf = CAST(unsigned char *, emalloc(mlen))) == NULL) { in file_ascmagic_with_encoding()
154 CAST(size_t, utf8_end - utf8_buf)); in file_ascmagic_with_encoding()
353 *buf++ = CAST(unsigned char, ubuf[i]); in encode_utf8()
359 *buf++ = CAST(unsigned char, (ubuf[i] >> 6) + 0xc0); in encode_utf8()
365 *buf++ = CAST(unsigned char, (ubuf[i] >> 12) + 0xe0); in encode_utf8()
371 *buf++ = CAST(unsigned char, (ubuf[i] >> 18) + 0xf0); in encode_utf8()
377 *buf++ = CAST(unsigned char, (ubuf[i] >> 24) + 0xf8); in encode_utf8()
[all …]
H A Dcdf.c86 (CAST(uint64_t, NEED_SWAP ? _cdf_tole8(x) : CAST(uint64_t, x)))
88 (CAST(uint32_t, NEED_SWAP ? _cdf_tole4(x) : CAST(uint32_t, x)))
90 (CAST(uint16_t, NEED_SWAP ? _cdf_tole2(x) : CAST(uint16_t, x)))
335 if (CAST(zend_off_t, off + len) != CAST(zend_off_t, siz)) in cdf_read()
853 return CAST(int, i); in cdf_find_stream()
866 return CAST(const void *, CAST(const uint8_t *, p) + l); in cdf_offset()
885 q = CAST(const uint8_t *, cdf_offset(CAST(const void *, p), in cdf_get_property_info_pos()
933 if (CAST(size_t, CAST(const char *, e) - CAST(const char *, p)) < len) in cdf_copy_info()
1199 np = CAST(const uint16_t *, CAST(const void *, (b + 16))); in cdf_unpack_catalog()
1200 nb = CAST(const char *, CAST(const void *, in cdf_unpack_catalog()
[all …]
H A Dcompress.c108 unsigned char *s = CAST(unsigned char *, CAST(void *, &x)); in zlibcmp()
273 CAST(size_t, compr[i].maglen)) == 0; in file_zmagic()
371 buf = CAST(const char *, buf) + rv; in swrite()
423 if (t > 0 && CAST(size_t, t) < n) { in sread()
571 z.avail_in = CAST(uint32_t, *n); in uncompresszlib()
587 *n = CAST(size_t, z.total_out); in uncompresszlib()
620 bz.avail_in = CAST(uint32_t, *n); in uncompressbzlib()
630 *n = CAST(size_t, bz.total_out_lo32); in uncompressbzlib()
663 xz.avail_in = CAST(uint32_t, *n); in uncompressxzlib()
671 *n = CAST(size_t, xz.total_out); in uncompressxzlib()
[all …]
H A Dapprentice.c291 return CAST(off_t, INT_MAX); in maxoff_t()
509 if ((ms = CAST(struct magic_set *, ecalloc(CAST(size_t, 1u), in file_ms_alloc()
1460 v = CAST(short, v); in file_signextend()
1477 v = CAST(int32_t, v); in file_signextend()
1495 v = CAST(int64_t, v); in file_signextend()
1858 diff = CAST(int32_t, cont_level) - CAST(int32_t, m->cont_level); in parse()
2300 char *buf = CAST(char *, CAST(void *, m)) + off; in parse_extra()
2837 *p++ = CAST(char, c); in getstr()
2889 *p++ = CAST(char, val); in getstr()
2905 *p++ = CAST(char, val); in getstr()
[all …]
H A Dfuncs.c533 *(n)++ = ((CAST(uint32_t, *(o)) >> 6) & 3) + '0', \
534 *(n)++ = ((CAST(uint32_t, *(o)) >> 3) & 7) + '0', \
581 CAST(size_t, eop - op), &state); in file_getbuffer()
582 if (bytesconsumed == CAST(size_t, -1) || in file_getbuffer()
583 bytesconsumed == CAST(size_t, -2)) { in file_getbuffer()
606 if (isprint(CAST(unsigned char, *op))) { in file_getbuffer()
761 struct guid *g = CAST(struct guid *, CAST(void *, guid)); in file_parse_guid()
772 const struct guid *g = CAST(const struct guid *, in file_print_guid()
773 CAST(const void *, guid)); in file_print_guid()
808 while (isspace(CAST(unsigned char, *str))) in file_strtrim()
[all …]
H A Dencoding.c101 *ubuf = CAST(file_unichar_t *, ecalloc(CAST(size_t, 1), mlen)); in file_encoding()
107 if ((nbuf = CAST(unsigned char *, in file_encoding()
108 ecalloc(CAST(size_t, 1), mlen))) == NULL) { in file_encoding()
495 | (CAST(file_unichar_t, bf[i]) << 8); in looks_ucs16()
498 | (CAST(file_unichar_t, bf[i + 1]) << 8); in looks_ucs16()
534 | (CAST(file_unichar_t, bf[i + 2]) << 8) in looks_ucs32()
535 | (CAST(file_unichar_t, bf[i + 1]) << 16) in looks_ucs32()
536 | (CAST(file_unichar_t, bf[i]) << 24); in looks_ucs32()
539 | (CAST(file_unichar_t, bf[i + 1]) << 8) in looks_ucs32()
540 | (CAST(file_unichar_t, bf[i + 2]) << 16) in looks_ucs32()
[all …]
H A Dprint.c67 (CAST(size_t, m->in_op & FILE_OPS_MASK) < in file_mdump()
114 if (CAST(size_t, m->mask_op & FILE_OPS_MASK) < in file_mdump()
122 CAST(unsigned long long, m->num_mask)); in file_mdump()
145 CAST(long long, m->value.q)); in file_mdump()
154 CAST(size_t, m->vallen)); in file_mdump()
252 cdf_timestamp_to_timespec(&ts, CAST(cdf_timestamp_t, v)); in file_fmttime()
257 t = CAST(time_t, v); in file_fmttime()
H A Dis_tar.c65 const unsigned char *buf = CAST(const unsigned char *, b->fbuf); in file_is_tar()
151 while (isspace(CAST(unsigned char, *where))) { /* Skip spaces */ in from_oct()
162 if (digs > 0 && *where && !isspace(CAST(unsigned char, *where))) in from_oct()
H A Dder.c42 #define CAST(a, b) ((a)(b))
64 #define DER_BAD CAST(uint32_t, -1)
223 return CAST(uint32_t, len); in getlength()
240 const uint8_t *d = CAST(const uint8_t *, q); in der_data()
295 ms->c.li[m->cont_level - 1].off = CAST(int, offs + tlen); in der_offs()
299 return CAST(int32_t, offs); in der_offs()
347 if (!isdigit(CAST(unsigned char, *s))) in der_cmp()
353 while (isdigit(CAST(unsigned char, *++s))); in der_cmp()
H A Dbuffer.c76 b->elen = CAST(size_t, b->st.st_size) < b->flen ? in buffer_fill()
77 CAST(size_t, b->st.st_size) : b->flen; in buffer_fill()
H A Dreadcdf.c199 if (isprint(CAST(unsigned char, *s))) in cdf_file_property_info()
313 CAST(uint32_t, si.si_os_version) >> 8) == -1) in cdf_file_summary_info()
318 CAST(uint32_t, si.si_os_version) >> 8, in cdf_file_summary_info()
325 CAST(uint32_t, si.si_os_version) >> 8) == -1) in cdf_file_summary_info()
401 name[k] = CAST(char, cdf_tole2(d->d_name[k])); in cdf_check_summary_info()
535 const unsigned char *buf = CAST(const unsigned char *, b->fbuf); in file_trycdf()
H A Dis_csv.c135 const unsigned char *uc = CAST(const unsigned char *, b->fbuf); in file_is_csv()
/PHP-8.1/ext/mysqli/tests/
H A Dbug45019.phpt15 print "Using CAST('somestring' AS CHAR)...\n";
16 …if (!($res = $link->query("SELECT CAST('one' AS CHAR) AS column1 UNION SELECT CAST('three' AS CHAR…
27 … (!($stmt = $link->prepare("SELECT CAST('one' AS CHAR) AS column1 UNION SELECT CAST('three' AS CHA…
55 Using CAST('somestring' AS CHAR)...
H A Dmysqli_ps_select_union.phpt15 print "Using CAST('somestring' AS CHAR)...\n";
16 …if (!($res = $link->query("SELECT CAST('one' AS CHAR) AS column1 UNION SELECT CAST('three' AS CHAR…
27 … (!($stmt = $link->prepare("SELECT CAST('one' AS CHAR) AS column1 UNION SELECT CAST('three' AS CHA…
52 … (!($stmt = $link->prepare("SELECT CAST('one' AS CHAR) AS column1 UNION SELECT CAST('three' AS CHA…
72 print "Mixing CAST('somestring'AS CHAR), integer and CAST(integer AS CHAR)...\n";
73 …(!($res = $link->query("SELECT 1 AS column1 UNION SELECT CAST('three' AS CHAR) UNION SELECT CAST(2…
83 …$stmt = $link->prepare("SELECT 1 AS column1 UNION SELECT CAST('three' AS CHAR) UNION SELECT CAST(2…
213 …if (!($stmt = $link->prepare("SELECT CAST('one' AS CHAR) AS column1 UNION SELECT CAST(? AS CHAR) U…
232 …if (!($stmt = $link->prepare("SELECT CAST('one' AS CHAR) AS column1 UNION SELECT CAST(? AS CHAR) U…
255 Using CAST('somestring' AS CHAR)...
[all …]
H A Dbug_mysql_49406.phpt17 …$query = "SELECT CASE WHEN 0 THEN CAST('2009-12-03' AS DATE) ELSE CAST('2009-12-03' AS DATE) END…
/PHP-8.1/ext/pdo_dblib/tests/
H A Dtypes.phpt32 CAST('2030-01-01 23:59:59' AS DATETIME) AS [datetime],
33 CAST(0 AS BIT) AS [false],
36 CAST(10.500 AS MONEY) AS [money],
37 CAST('1950-01-18 23:00:00' AS SMALLDATETIME) as [smalldatetime],
38 CAST(1 AS BIT) AS [true]
H A Dbug_73396.phpt18 $stmt = $db->query('SELECT CAST(1 AS bigint)');
/PHP-8.1/ext/pdo_firebird/tests/
H A Dgh10908.phpt52 query_and_dump($dbh, "SELECT CAST(NUM AS NUMERIC(9, 3)) FROM gh10908"); // works fine
53 query_and_dump($dbh, "SELECT CAST(ID AS INTEGER) FROM gh10908"); // works fine
54 query_and_dump($dbh, "SELECT CAST(ID AS BIGINT) FROM gh10908"); // Used to "bus error"
139 [CAST] => 12.340
145 [CAST] => 1
151 [CAST] => 1
/PHP-8.1/ext/fileinfo/
H A Dlibmagic.patch148 - if ((ms = CAST(struct magic_set *, calloc(CAST(size_t, 1u),
149 + if ((ms = CAST(struct magic_set *, ecalloc(CAST(size_t, 1u),
185 - if (CAST(char *, b) >= CAST(char *, p) &&
186 - CAST(char *, b) <= CAST(char *, p) + map->len)
1110 - if (CAST(off_t, off + len) != CAST(off_t, siz))
1111 + if (CAST(zend_off_t, off + len) != CAST(zend_off_t, siz))
1126 return CAST(ssize_t, len);
1407 - if (lseek(fd, CAST(off_t, 0), SEEK_SET) == CAST(off_t, -1)) {
1483 - *ubuf = CAST(file_unichar_t *, calloc(CAST(size_t, 1), mlen));
1484 + *ubuf = CAST(file_unichar_t *, ecalloc(CAST(size_t, 1), mlen));
[all …]
/PHP-8.1/ext/opcache/tests/jit/
H A Dcast_002.phpt2 JIT CAST: 002
H A Dcast_001.phpt2 JIT CAST: 001

Completed in 96 milliseconds

12