/system/core/logd/ |
D | LogWhiteBlackList.cpp | 67 int PruneList::init(const char *str) { in init() argument 81 if (str && !strcmp(str, _default)) { in init() 82 str = NULL; in init() 85 if (str && !strcmp(str, _disable)) { in init() 86 str = ""; in init() 91 if (str) { in init() 92 filter = str; in init() 116 for(str = filter.c_str(); *str; ++str) { in init() 117 if (isspace(*str)) { in init() 122 if ((*str == '~') || (*str == '!')) { // ~ supported, ! undocumented in init() [all …]
|
D | LogAudit.cpp | 86 char *str = NULL; in logPrint() local 88 int rc = vasprintf(&str, fmt, args); in logPrint() 96 while ((cp = strstr(str, " "))) { in logPrint() 100 bool info = strstr(str, " permissive=1") || strstr(str, " policy loaded "); in logPrint() 109 iov[1].iov_base = str; in logPrint() 110 iov[1].iov_len = strlen(str); in logPrint() 123 char *timeptr = strstr(str, audit_str); in logPrint() 145 char *pidptr = strstr(str, pid_str); in logPrint() 162 size_t l = strnlen(str, LOGGER_ENTRY_MAX_PAYLOAD); in logPrint() 175 memcpy(event->data, str, l); in logPrint() [all …]
|
/system/core/libmincrypt/test/ |
D | rsa_test.c | 748 unsigned char* parsehex(char* str, int* len) { in parsehex() argument 750 unsigned char* result = malloc(strlen(str)); in parsehex() 755 while (*str) { in parsehex() 758 while (isspace(*str)) str++; in parsehex() 760 switch (*str) { in parsehex() 763 b = (*str - '0') << 4; break; in parsehex() 765 b = (*str - 'a' + 10) << 4; break; in parsehex() 767 b = (*str - 'A' + 10) << 4; break; in parsehex() 773 str++; in parsehex() 775 while (isspace(*str)) str++; in parsehex() [all …]
|
D | ecdsa_test.c | 169 unsigned char* parsehex(char* str, int* len) { in parsehex() argument 171 unsigned char* result = malloc(strlen(str)); in parsehex() 176 while (*str) { in parsehex() 179 while (isspace(*str)) str++; in parsehex() 181 switch (*str) { in parsehex() 184 b = (*str - '0') << 4; break; in parsehex() 186 b = (*str - 'a' + 10) << 4; break; in parsehex() 188 b = (*str - 'A' + 10) << 4; break; in parsehex() 194 str++; in parsehex() 196 while (isspace(*str)) str++; in parsehex() [all …]
|
/system/core/libutils/tests/ |
D | Unicode_test.cpp | 39 const uint8_t str[] = { }; in TEST_F() local 41 measured = utf8_to_utf16_length(str, 0); in TEST_F() 50 const uint8_t str[] = { 0x30 }; in TEST_F() local 52 measured = utf8_to_utf16_length(str, sizeof(str)); in TEST_F() 61 const uint8_t str[] = { 0xE2, 0x8C, 0xA3 }; in TEST_F() local 63 measured = utf8_to_utf16_length(str, sizeof(str)); in TEST_F() 72 const uint8_t str[] = { 0xF0, 0x90, 0x80, 0x80 }; in TEST_F() local 74 measured = utf8_to_utf16_length(str, sizeof(str)); in TEST_F() 84 const uint8_t str[] = { 0xE2, 0x8C }; in TEST_F() local 86 measured = utf8_to_utf16_length(str, sizeof(str)); in TEST_F() [all …]
|
/system/core/libpixelflinger/tests/arch-arm64/assembler/ |
D | asm_test_jacket.S | 170 str x0, [x28,#0] 171 str x1, [x28,#8] 172 str x2, [x28,#16] 173 str x3, [x28,#24] 174 str x4, [x28,#32] 175 str x5, [x28,#40] 176 str x6, [x28,#48] 177 str x7, [x28,#56] 178 str x8, [x28,#64] 179 str x9, [x28,#72] [all …]
|
/system/core/libutils/ |
D | String16.cpp | 44 char16_t* str = (char16_t*)buf->data(); in initialize_string16() local 45 *str = 0; in initialize_string16() 47 gEmptyString = str; in initialize_string16() 125 char16_t* str = (char16_t*)buf->data(); in String16() local 126 strcpy16(str, o); in String16() 127 mString = str; in String16() 139 char16_t* str = (char16_t*)buf->data(); in String16() local 140 memcpy(str, o, len*sizeof(char16_t)); in String16() 141 str[len] = 0; in String16() 142 mString = str; in String16() [all …]
|
D | String8.cpp | 68 char* str = (char*)buf->data(); in initialize_string8() local 69 *str = 0; in initialize_string8() 71 gEmptyString = str; in initialize_string8() 92 char* str = (char*)buf->data(); in allocFromUTF8() local 93 memcpy(str, in, len); in allocFromUTF8() 94 str[len] = 0; in allocFromUTF8() 95 return str; in allocFromUTF8() 118 char* str = (char*)buf->data(); in allocFromUTF16() local 119 utf16_to_utf8(in, len, str); in allocFromUTF16() 120 return str; in allocFromUTF16() [all …]
|
/system/bt/osi/test/ |
D | allocator_test.cpp | 31 char str[] = "IloveBluetooth"; in TEST_F() local 32 size_t len = strlen(str); in TEST_F() 36 copy_str = osi_strndup(str, 0); in TEST_F() 41 copy_str = osi_strndup(str, len); in TEST_F() 42 EXPECT_EQ(0, strcmp(str, copy_str)); in TEST_F() 46 copy_str = osi_strndup(str, len - 5); in TEST_F() 51 copy_str = osi_strndup(str, len + 5); in TEST_F() 52 EXPECT_EQ(0, strcmp(str, copy_str)); in TEST_F()
|
/system/extras/tests/sdcard/ |
D | stopwatch.cpp | 36 #define SNPRINTF_OR_RETURN(str, size, format, ...) { \ argument 37 int len = snprintf((str), (size), (format), ## __VA_ARGS__); \ 43 (size) -= len; (str) += len; \ 106 void StopWatch::sprint(char **str, size_t *size) in sprint() argument 118 if (kVerbose) SNPRINTF_OR_RETURN(*str, *size, "# Got %d samples for %s\n", mDataLen, mName); in sprint() 121 SNPRINTF_OR_RETURN(*str, *size, "# StopWatch %s total/cumulative duration %f Samples: %d\n", in sprint() 123 printThroughput(str, size); in sprint() 124 printAverageMinMax(str, size); in sprint() 130 … SNPRINTF_OR_RETURN(*str, *size, "# Name Iterations Duration Min MinIdx Max MaxIdx SizeKbytes\n"); in sprint() 131 SNPRINTF_OR_RETURN(*str, *size, "%s %d %f %f %d %f %d %d\n", mName, mNum, mDuration, in sprint() [all …]
|
D | testcase.cpp | 99 char *str = buffer; in runTest() local 102 testTimer()->sprint(&str, &size_left); in runTest() 103 if(openTimer()->used()) openTimer()->sprint(&str, &size_left); in runTest() 104 if(readTimer()->used()) readTimer()->sprint(&str, &size_left); in runTest() 105 if(writeTimer()->used()) writeTimer()->sprint(&str, &size_left); in runTest() 106 if(syncTimer()->used()) syncTimer()->sprint(&str, &size_left); in runTest() 107 if(truncateTimer()->used()) truncateTimer()->sprint(&str, &size_left); in runTest() 108 if(traverseTimer()->used()) traverseTimer()->sprint(&str, &size_left); in runTest() 110 write(mIpc[TestCase::WRITE_TO_PARENT], buffer, str - buffer); in runTest()
|
/system/core/libsync/ |
D | sync_test.c | 82 char str[256]; in main() local 95 sprintf(str, "test_fence%d-%d", i, j); in main() 96 int fd = sw_sync_fence_create(sync_timeline_fd, str, val); in main() 109 sprintf(str, "merged_fence%d", j); in main() 110 sync_data[3].fd[j] = sync_merge(str, sync_data[0].fd[j], sync_data[1].fd[j]); in main() 125 fgets(str, sizeof(str), stdin); in main() 134 fgets(str, sizeof(str), stdin); in main() 139 fgets(str, sizeof(str), stdin); in main()
|
/system/core/adb/ |
D | adb_io.cpp | 124 bool WriteFdExactly(int fd, const char* str) { in WriteFdExactly() argument 125 return WriteFdExactly(fd, str, strlen(str)); in WriteFdExactly() 128 bool WriteFdExactly(int fd, const std::string& str) { in WriteFdExactly() argument 129 return WriteFdExactly(fd, str.c_str(), str.size()); in WriteFdExactly() 133 std::string str; in WriteFdFmt() local 137 android::base::StringAppendV(&str, fmt, ap); in WriteFdFmt() 140 return WriteFdExactly(fd, str); in WriteFdFmt()
|
D | adb_utils_test.cpp | 38 std::string str(parent); in subdir() local 39 str += OS_PATH_SEPARATOR; in subdir() 40 str += child; in subdir() 41 return str; in subdir()
|
/system/bt/embdrv/sbc/decoder/include/ |
D | oi_utils.h | 132 OI_BOOL OI_ParseBdAddr(const OI_CHAR *str, 264 OI_INT OI_atoi(const OI_CHAR *str); 280 const OI_CHAR* OI_ScanInt(const OI_CHAR *str, 297 const OI_CHAR* OI_ScanUInt(const OI_CHAR *str, 310 const OI_CHAR* OI_ScanStr(const OI_CHAR *str, 330 const OI_CHAR* OI_ScanAlt(const OI_CHAR *str, 345 const OI_CHAR* OI_ScanBdAddr(const OI_CHAR *str,
|
/system/bt/osi/src/ |
D | allocator.c | 27 char *osi_strdup(const char *str) { in osi_strdup() argument 28 size_t size = strlen(str) + 1; // + 1 for the null terminator in osi_strdup() 40 memcpy(new_string, str, size); in osi_strdup() 44 char *osi_strndup(const char *str, size_t len) { in osi_strndup() argument 45 size_t size = strlen(str); in osi_strndup() 60 memcpy(new_string, str, size); in osi_strndup()
|
D | hash_map_utils.c | 44 char *str = osi_strdup(params); in hash_map_utils_new_from_string_params() local 45 if (!str) in hash_map_utils_new_from_string_params() 48 LOG_VERBOSE(LOG_TAG, "%s: source string: '%s'", __func__, str); in hash_map_utils_new_from_string_params() 53 char *kvpair = strtok_r(str, ";", &tmpstr); in hash_map_utils_new_from_string_params() 83 osi_free(str); in hash_map_utils_new_from_string_params()
|
/system/bt/service/common/bluetooth/util/ |
D | atomic_string.cpp | 21 AtomicString::AtomicString(const std::string& str) in AtomicString() argument 22 : str_(str) { in AtomicString() 31 void AtomicString::Set(const std::string& str) { in Set() argument 33 str_ = str; in Set()
|
/system/bt/btif/src/ |
D | btif_sock_util.c | 151 static inline void byte2hex(const char* data, char** str) in byte2hex() argument 153 **str = hex_table[(*data >> 4) & 0xf]; in byte2hex() 154 ++*str; in byte2hex() 155 **str = hex_table[*data & 0xf]; in byte2hex() 156 ++*str; in byte2hex() 158 static inline void byte2char(const char* data, char** str) in byte2char() argument 160 **str = *data < ' ' ? '.' : *data > '~' ? '.' : *data; in byte2char() 161 ++(*str); in byte2char()
|
/system/core/libcutils/ |
D | str_parms.c | 62 static int str_hash_fn(void *str) in str_hash_fn() argument 67 for (p = str; p && *p; p++) in str_hash_fn() 149 char *str; in str_parms_create_str() local 158 str = strdup(_string); in str_parms_create_str() 159 if (!str) in str_parms_create_str() 164 kvpair = strtok_r(str, ";", &tmpstr); in str_parms_create_str() 203 free(str); in str_parms_create_str() 364 char *str = NULL; in str_parms_to_str() local 367 hashmapForEach(str_parms->map, combine_strings, &str); in str_parms_to_str() 369 str = strdup(""); in str_parms_to_str() [all …]
|
/system/tools/aidl/ |
D | options.cpp | 246 bool EndsWith(const string& str, const string& suffix) { in EndsWith() argument 247 if (str.length() < suffix.length()) { in EndsWith() 250 return std::equal(str.crbegin(), str.crbegin() + suffix.length(), in EndsWith() 256 string* str) { in ReplaceSuffix() argument 257 if (!EndsWith(*str, old_suffix)) return false; in ReplaceSuffix() 258 str->replace(str->length() - old_suffix.length(), in ReplaceSuffix()
|
/system/bt/bta/hf_client/ |
D | bta_hf_client_api.c | 245 …ientSendAT(UINT16 handle, tBTA_HF_CLIENT_AT_CMD_TYPE at, UINT32 val1, UINT32 val2, const char *str) in BTA_HfClientSendAT() argument 255 if (str) { in BTA_HfClientSendAT() 256 strlcpy(p_buf->str, str, BTA_HF_CLIENT_NUMBER_LEN + 1); in BTA_HfClientSendAT() 257 p_buf->str[BTA_HF_CLIENT_NUMBER_LEN] = '\0'; in BTA_HfClientSendAT() 259 p_buf->str[0] = '\0'; in BTA_HfClientSendAT()
|
/system/core/liblog/tests/ |
D | benchmark_main.cpp | 61 int PrettyPrintInt(char* str, int len, unsigned int arg) in PrettyPrintInt() argument 64 return snprintf(str, len, "%uGi", arg/(1<<30)); in PrettyPrintInt() 66 return snprintf(str, len, "%uMi", arg/(1<<20)); in PrettyPrintInt() 68 return snprintf(str, len, "%uKi", arg/(1<<10)); in PrettyPrintInt() 70 return snprintf(str, len, "%uG", arg/1000000000); in PrettyPrintInt() 72 return snprintf(str, len, "%uM", arg/1000000); in PrettyPrintInt() 74 return snprintf(str, len, "%uK", arg/1000); in PrettyPrintInt() 76 return snprintf(str, len, "%u", arg); in PrettyPrintInt()
|
/system/sepolicy/tools/ |
D | insertkeys.py | 46 "line: " + str(lineNo)) 54 + str(lineNo)) 61 sys.exit("Empty certficate , certificate "+ str(certNo) + " found in file: " 71 sys.exit("Invalid certificate, certificate "+ str(certNo) + " found in file: " 83 sys.exit("Detected erroneous line \""+ line + "\" on " + str(lineNo) 102 return str(self.getBase16Keys()) 131 str(target_build_variant)) 221 version = "%prog " + str(__VERSION) 262 logging.info(k + " : " + str(key_map[k]))
|
/system/bt/bta/ag/ |
D | bta_ag_cmd.c | 507 char str[12]; in bta_ag_send_ind() local 508 char *p = str; in bta_ag_send_ind() 577 bta_ag_send_result(p_scb, BTA_AG_RES_CIEV, str, 0); in bta_ag_send_ind() 853 strlcpy(val.str, p_arg, BTA_AG_AT_MAX_LEN); in bta_ag_at_hsp_cback() 894 strlcpy(val.str, p_arg, BTA_AG_AT_MAX_LEN); in bta_ag_at_hfp_cback() 980 val.idx = bta_ag_parse_chld(p_scb, val.str); in bta_ag_at_hfp_cback() 1001 if(val.str[0] == '2') in bta_ag_at_hfp_cback() 1176 for (i = 0, ind_id = 1; (val.str[i] != 0) && (ind_id <= 20); i++, ind_id++) in bta_ag_at_hfp_cback() 1178 if (val.str[i] == ',') in bta_ag_at_hfp_cback() 1181 if (val.str[i] == '0') in bta_ag_at_hfp_cback() [all …]
|