Home
last modified time | relevance | path

Searched refs:n (Results 1 – 25 of 265) sorted by relevance

1234567891011

/system/nfc/src/gki/common/
Dgki_inet.h24 #define ntohs(n) (n) argument
25 #define ntohl(n) (n) argument
26 #define ntoh6(n) (n) argument
28 #define nettohs(n) (n) argument
29 #define nettohl(n) (n) argument
31 extern uint16_t ntohs(uint16_t n);
32 extern uint32_t ntohl(uint32_t n);
35 #define nettohs(n) ((uint16_t)((((n) << 8) & 0xff00) | (((n) >> 8) & 0x00ff))) argument
36 #define nettohl(n) \ argument
37 ((((n)&0x000000ff) << 24) | (((n) << 8) & 0x00ff0000) | \
[all …]
/system/core/libutils/include/utils/
DBitSet.h42 static inline uint32_t valueForBit(uint32_t n) { return 0x80000000UL >> n; } in valueForBit()
67 inline bool hasBit(uint32_t n) const { return hasBit(value, n); } in hasBit()
69 static inline bool hasBit(uint32_t value, uint32_t n) { return value & valueForBit(n); } in hasBit()
72 inline void markBit(uint32_t n) { markBit(value, n); } in markBit()
74 static inline void markBit (uint32_t& value, uint32_t n) { value |= valueForBit(n); } in markBit()
77 inline void clearBit(uint32_t n) { clearBit(value, n); } in clearBit()
79 static inline void clearBit(uint32_t& value, uint32_t n) { value &= ~ valueForBit(n); } in clearBit()
104 uint32_t n = firstMarkedBit(value); in clearFirstMarkedBit() local
105 clearBit(value, n); in clearFirstMarkedBit()
106 return n; in clearFirstMarkedBit()
[all …]
DFastStrcmp.h44 const ssize_t n = s; // To help reject negative sizes, treat like zero in fastcmp() local
45 return __predict_true(n > 0) && in fastcmp()
46 ((*l != *r) || (__predict_true(n > 1) && cmp(l + 1, r + 1, n - 1))); in fastcmp()
51 const ssize_t n = s; // To help reject negative sizes, treat like zero in fasticmp() local
52 return __predict_true(n > 0) && in fasticmp()
53 ((tolower(*l) != tolower(*r)) || (__predict_true(n > 1) && cmp(l + 1, r + 1, n - 1))); in fasticmp()
60 const ssize_t n = s; // To help reject negative sizes, treat like zero in fastcmp() local
61 return __predict_true(n > 0) && in fastcmp()
62 ((*l != *r) || (__predict_true(n > 1) && cmp(l + 1, r + 1, n - 1))); in fastcmp()
DTypeHelpers.h134 void construct_type(TYPE* p, size_t n) {
136 while (n > 0) {
137 n--;
144 void destroy_type(TYPE* p, size_t n) {
146 while (n > 0) {
147 n--;
157 copy_type(TYPE* d, const TYPE* s, size_t n) {
158 memcpy(d,s,n*sizeof(TYPE));
164 copy_type(TYPE* d, const TYPE* s, size_t n) {
165 while (n > 0) {
[all …]
/system/teeui/libteeui/prebuilt/localization/
DConfirmationUITranslations.cpp1308 for (int n = 0; haystack[n] != nullptr; n++) { in findStr() local
1309 if (strcmp(needle, haystack[n]) == 0) { in findStr()
1310 return n; in findStr()
1322 size_t n; in langIdMatch() local
1330 for (n = 0; lang_id[n] != '\0' && n < MAX_LANG_ID_SIZE; n++) { in langIdMatch()
1331 lang_id_buf[n] = lang_id[n]; in langIdMatch()
1333 lang_id_buf[n] = '\0'; in langIdMatch()
1335 while (n >= 1) { in langIdMatch()
1337 while (n >= 1 && lang_id_buf[n - 1] != '-') { in langIdMatch()
1338 n--; in langIdMatch()
[all …]
/system/core/libpixelflinger/
Dfixed.cpp163 int32_t gglDivQ(GGLfixed n, GGLfixed d, int32_t i) in gglDivQ() argument
166 const int32_t ds = n^d; in gglDivQ()
167 if (n<0) n = -n; in gglDivQ()
169 int nd = gglClz(d) - gglClz(n); in gglDivQ()
172 else n <<= -nd; in gglDivQ()
182 n -= d; in gglDivQ()
185 if (n>=0) q |= 128; in gglDivQ()
186 else n += d; in gglDivQ()
187 n = n*2 - d; in gglDivQ()
188 if (n>=0) q |= 64; in gglDivQ()
[all …]
Dpicker.cpp43 new_needs.n &= ~GGL_NEEDS_CB_FORMAT_MASK; in ggl_pick()
44 new_needs.n |= GGL_BUILD_NEEDS(c->state.buffers.color.format, CB_FORMAT); in ggl_pick()
50 uint32_t n = GGL_BUILD_NEEDS(c->state.buffers.color.format, CB_FORMAT); in ggl_pick() local
82 n |= GGL_BUILD_NEEDS( src, BLEND_SRC ); in ggl_pick()
83 n |= GGL_BUILD_NEEDS( dst, BLEND_DST ); in ggl_pick()
85 n |= GGL_BUILD_NEEDS( src_alpha, BLEND_SRCA ); in ggl_pick()
86 n |= GGL_BUILD_NEEDS( dst_alpha, BLEND_DSTA ); in ggl_pick()
88 n |= GGL_BUILD_NEEDS( src, BLEND_SRCA ); in ggl_pick()
89 n |= GGL_BUILD_NEEDS( dst, BLEND_DSTA ); in ggl_pick()
92 n |= GGL_BUILD_NEEDS( GGL_ONE, BLEND_SRC ); in ggl_pick()
[all …]
/system/libufdt/sysdeps/
Dlibufdt_sysdeps_vendor.c62 #define swapcode(TYPE, parmi, parmj, n) \ argument
64 long i = (n) / sizeof(TYPE); \
78 static __inline void swapfunc(char *a, char *b, int n, int swaptype) { in swapfunc() argument
79 if (swaptype <= 1) swapcode(long, a, b, n) else swapcode(char, a, b, n) in swapfunc()
89 #define vecswap(a, b, n) \ argument
90 if ((n) > 0) swapfunc(a, b, n, swaptype)
98 void qsort(void *aa, size_t n, size_t es, in qsort() argument
106 if (n < 7) { in qsort()
107 for (pm = (char *)a + es; pm < (char *)a + n * es; pm += es) in qsort()
112 pm = (char *)a + (n / 2) * es; in qsort()
[all …]
Dlibufdt_sysdeps_posix.c52 int dto_memcmp(const void *lhs, const void *rhs, size_t n) { in dto_memcmp() argument
53 return memcmp(lhs, rhs, n); in dto_memcmp()
56 void *dto_memcpy(void *dest, const void *src, size_t n) { in dto_memcpy() argument
57 return memcpy(dest, src, n); in dto_memcpy()
62 int dto_strncmp(const char *s1, const char *s2, size_t n) { in dto_strncmp() argument
63 return strncmp(s1, s2, n); in dto_strncmp()
66 void *dto_memchr(const void *s, int c, size_t n) { return memchr(s, c, n); } in dto_memchr() argument
68 void *dto_memset(void *s, int c, size_t n) { return memset(s, c, n); } in dto_memset() argument
/system/bt/osi/src/
Dcompat.cc67 size_t n = siz; in strlcpy() local
70 if (n != 0) { in strlcpy()
71 while (--n != 0) { in strlcpy()
77 if (n == 0) { in strlcpy()
98 size_t n = siz; in strlcat() local
102 while (n-- != 0 && *d != '\0') d++; in strlcat()
104 n = siz - dlen; in strlcat()
106 if (n == 0) return (dlen + strlen(s)); in strlcat()
109 if (n != 1) { in strlcat()
111 n--; in strlcat()
/system/core/debuggerd/
Dutil.cpp52 size_t sz = sizeof(buf), n; in get_timestamp() local
53 n = strftime(s, sz, "%F %H:%M", &tm), s += n, sz -= n; in get_timestamp()
54 n = snprintf(s, sz, ":%02d.%09ld", tm.tm_sec, ts.tv_nsec), s += n, sz -= n; in get_timestamp()
55 n = strftime(s, sz, "%z", &tm), s += n, sz -= n; in get_timestamp()
/system/core/libutils/
DStopWatch.cpp40 const int n = mNumLaps; in ~StopWatch() local
42 for (int i=0 ; i<n ; i++) { in ~StopWatch()
60 const int n = mNumLaps; in lap() local
61 mLaps[n].soFar = elapsed; in lap()
62 mLaps[n].thisLap = n ? (elapsed - mLaps[n-1].soFar) : elapsed; in lap()
63 mNumLaps = n+1; in lap()
/system/media/audio_utils/
Dfixedfft.cpp107 void fixed_fft(int n, int32_t *v) in fixed_fft() argument
111 for (r = 0, i = 1; i < n; ++i) { in fixed_fft()
112 for (p = n; !(p & r); p >>= 1, r ^= p); in fixed_fft()
120 for (p = 1; p < n; p <<= 1) { in fixed_fft()
123 for (i = 0; i < n; i += p << 1) { in fixed_fft()
134 for (i = r; i < n; i += p << 1) { in fixed_fft()
144 void fixed_fft_real(int n, int32_t *v) in fixed_fft_real() argument
146 int scale = LOG_FFT_SIZE, m = n >> 1, i; in fixed_fft_real()
148 fixed_fft(n, v); in fixed_fft_real()
149 for (i = 1; i <= n; i <<= 1, --scale) in fixed_fft_real()
[all …]
Dfifo_writer32.cpp30 #define _(n) \ in memcpyWords() argument
31 case n: { \ in memcpyWords()
32 struct s##n { int32_t a[n]; }; \ in memcpyWords()
33 *(struct s##n *)dst = *(const struct s##n *)src; \ in memcpyWords()
/system/extras/tests/uevents/
Duevents.c26 int n; in main() local
33 while ((n = uevent_kernel_multicast_recv(device_fd, msg, UEVENT_MSG_LEN)) > 0) { in main()
34 msg[n] = '\0'; in main()
35 msg[n+1] = '\0'; in main()
37 for (i = 0; i < n; i++) in main()
/system/bt/embdrv/sbc/decoder/include/
Doi_time.h67 #define OI_SECONDS(n) ((OI_INTERVAL)((n)*OI_INTERVALS_PER_SECOND)) argument
73 #define OI_MSECONDS(n) \ argument
74 ((OI_INTERVAL)(((n) + MSECS_PER_OI_INTERVAL - 1) / MSECS_PER_OI_INTERVAL))
80 #define OI_MINUTES(n) ((OI_INTERVAL)((n)*OI_SECONDS(60))) argument
/system/update_engine/
Dp2p_manager_unittest.cc152 for (int n = 0; n < 5; n++) { in TEST_F() local
154 base::StringPrintf("file_%d.cros_au.p2p", n)); in TEST_F()
155 base::Time file_time = start_time + TimeDelta::FromMinutes(n); in TEST_F()
160 base::StringPrintf("file_%d.OTHER.p2p", n)); in TEST_F()
171 for (int n = 0; n < 5; n++) { in TEST_F() local
175 expect = (n >= 2); in TEST_F()
177 "%s/file_%d.cros_au.p2p", test_conf_->GetP2PDir().value().c_str(), n); in TEST_F()
181 "%s/file_%d.OTHER.p2p", test_conf_->GetP2PDir().value().c_str(), n); in TEST_F()
216 for (int n = 0; n < 5; n++) { in TEST_F() local
218 base::StringPrintf("file_%d.cros_au.p2p", n)); in TEST_F()
[all …]
/system/bt/gd/packet/parser/
Dlanguage_y.yy97 %destructor { std::cout << "DESTROYING STRING " << *$$ << "\n"; delete $$; } IDENTIFIER STRING SIZE…
119 DEBUG() << "FOUND ENUM\n\n";
124 DEBUG() << "FOUND PACKET\n\n";
130 DEBUG() << "FOUND STRUCT\n\n";
150 << " size=" << $4 << "\n";
163 DEBUG() << "Enumerator with comma\n";
170 DEBUG() << "Enumerator with list\n";
180 << " value=" << $3 << "\n";
195 DEBUG() << "Checksum field defined\n";
236 DEBUG() << "Struct " << struct_name << " with parent " << parent_struct_name << "\n";
[all …]
/system/core/fastboot/
Dusb_linux.cpp290 int fd, n; in read_sysfs_string() local
300 n = read(fd, buf, bufsize - 1); in read_sysfs_string()
303 if (n < 0) in read_sysfs_string()
306 buf[n] = '\0'; in read_sysfs_string()
308 return n; in read_sysfs_string()
350 int n, in, out, ifc; in find_usb_device() local
375 n = read(fd, desc, sizeof(desc)); in find_usb_device()
377 if (filter_usb_device(de->d_name, desc, n, writable, callback, &in, &out, &ifc) == 0) { in find_usb_device()
384 n = ioctl(fd, USBDEVFS_CLAIMINTERFACE, &ifc); in find_usb_device()
385 if (n != 0) { in find_usb_device()
[all …]
/system/core/adb/client/
Dtransport_usb.cpp53 int n = usb_read(h, buffer, usb_packet_size); in UsbReadMessage() local
54 if (n != sizeof(*msg)) { in UsbReadMessage()
55 D("usb_read returned unexpected length %d (expected %zu)", n, sizeof(*msg)); in UsbReadMessage()
59 return n; in UsbReadMessage()
101 int n = UsbReadMessage(usb, &p->msg); in remote_read() local
102 if (n < 0) { in remote_read()
106 if (static_cast<size_t>(n) != sizeof(p->msg)) { in remote_read()
107 D("remote usb: read received unexpected header length %d", n); in remote_read()
111 n = UsbReadPayload(usb, p); in remote_read()
112 if (n < 0) { in remote_read()
[all …]
/system/core/libcutils/
Dstrlcpy.c37 size_t n = siz; in strlcpy() local
40 if (n != 0) { in strlcpy()
41 while (--n != 0) { in strlcpy()
48 if (n == 0) { in strlcpy()
Dsocket_inaddr_any_server_unix.cpp36 int s, n; in socket_inaddr_any_server() local
46 n = 1; in socket_inaddr_any_server()
47 setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (const char *) &n, sizeof(n)); in socket_inaddr_any_server()
/system/vold/
DKeyBuffer.h35 inline OPTNONE void* memset_s(void* s, int c, size_t n) { in memset_s() argument
37 return memset(s, c, n); in memset_s()
44 void deallocate(pointer p, size_type n) { in deallocate() argument
45 memset_s(p, 0, n); in deallocate()
46 std::allocator<char>::deallocate(p, n); in deallocate()
/system/libufdt/sysdeps/include/
Dlibufdt_sysdeps.h65 int dto_memcmp(const void *lhs, const void *rhs, size_t n);
67 void *dto_memcpy(void *dest, const void *src, size_t n);
71 int dto_strncmp(const char *s1, const char *s2, size_t n);
73 void *dto_memchr(const void *s, int c, size_t n);
75 void *dto_memset(void *s, int c, size_t n);
/system/core/fastboot/device/
Dusb.cpp85 int n = write(h->bulk_in, buf, write_len); in usb_ffs_write() local
86 if (n < 0) { in usb_ffs_write()
87 D("ERROR: fd = %d, n = %d: %s", h->bulk_in.get(), n, strerror(errno)); in usb_ffs_write()
90 buf += n; in usb_ffs_write()
91 len -= n; in usb_ffs_write()
106 int n = read(h->bulk_out, buf, read_len); in usb_ffs_read() local
107 if (n < 0) { in usb_ffs_read()
108 D("ERROR: fd = %d, n = %d: %s", h->bulk_out.get(), n, strerror(errno)); in usb_ffs_read()
111 buf += n; in usb_ffs_read()
112 len -= n; in usb_ffs_read()
[all …]

1234567891011