/base/global/resource_management/frameworks/resmgr/test/unittest/common/ |
D | string_utils_test.cpp | 73 void FuncMultiThread(int* num, Lock* lock) in FuncMultiThread() argument 76 auto tmp = (*num); in FuncMultiThread() 78 (*num) = tmp + 1; in FuncMultiThread() 81 void TestThread(int* num, int threadNum, Lock* lock) in TestThread() argument 85 threads.push_back(std::thread(FuncMultiThread, num, lock)); in TestThread() 99 int num = 0; variable 101 int result = num + threadNum; 103 TestThread(&num, threadNum, &lock); 104 EXPECT_EQ(result, num);
|
/base/global/resource_management_lite/frameworks/resmgr_lite/test/unittest/lite/common/ |
D | string_utils_test.cpp | 74 void FuncMultiThread(int* num, Lock* lock) in FuncMultiThread() argument 77 auto tmp = (*num); in FuncMultiThread() 79 (*num) = tmp + 1; in FuncMultiThread() 82 void TestThread(int* num, int threadNum, Lock* lock) in TestThread() argument 86 threads.push_back(std::thread(FuncMultiThread, num, lock)); in TestThread() 100 int num = 0; variable 102 int result = num + threadNum; 104 TestThread(&num, threadNum, &lock); 105 EXPECT_EQ(result, num);
|
/base/global/i18n_lite/frameworks/i18n/src/ |
D | number_format_impl.cpp | 124 std::string NumberFormatImpl::InnerFormat(double num, bool hasDec, bool isShowGroup, bool isPercent, in InnerFormat() argument 132 double adjustNum = (num < 0) ? (-1 * num) : num; in InnerFormat() 171 if (num < 0) { in InnerFormat() 211 int num = 0; in DelMoreZero() local 214 num = DelZero(result, lastLen, delNum, true); in DelMoreZero() 217 if ((maxDecimalLength != NO_SET) && (maxDecimalLength < decLen - 1 - num)) { in DelMoreZero() 218 int delNum = decLen - 1 - num - maxDecimalLength; in DelMoreZero() 219 num = num + DelZero(result, lastLen - num, delNum, false); in DelMoreZero() 222 if (hasDec && (minDecimalLength != NO_SET) && (minDecimalLength > decLen - 1 - num)) { in DelMoreZero() 223 if (decLen - 1 - num < 0) { in DelMoreZero() [all …]
|
D | number_format.cpp | 61 std::string NumberFormat::Format(double num, NumberFormatType type, int &status) in Format() argument 66 return impl->Format(num, type, status); in Format() 69 std::string NumberFormat::Format(int num, int &status) in Format() argument 74 return impl->Format(num, status); in Format() 77 std::string NumberFormat::FormatNoGroup(double num, NumberFormatType type, int &status) in FormatNoGroup() argument 82 return impl->FormatNoGroup(num, type, status); in FormatNoGroup() 85 std::string NumberFormat::FormatNoGroup(int num, int &status) in FormatNoGroup() argument 90 return impl->FormatNoGroup(num, status); in FormatNoGroup()
|
D | measure_format.cpp | 55 std::string MeasureFormat::Format(double num, std::string unit, I18nStatus &status, MeasureFormatTy… in Format() argument 61 return measureFormatImpl->Format(num, unit, type, status); in Format() 64 std::string MeasureFormat::Format(int num, std::string unit, I18nStatus &status, MeasureFormatType … in Format() argument 70 return measureFormatImpl->Format(num, unit, type, status); in Format()
|
D | plural_format_impl.cpp | 311 int num = ParseNumber(rule, ruleSize, index); in CompareResult() local 318 int rangeStart = num; in CompareResult() 326 if (number == num) { in CompareResult() 330 num = ParseNumber(rule, ruleSize, index); in CompareResult() 333 if (number == num) { in CompareResult() 347 int num = ParseNumber(rule, ruleSize, index); in CompareNotEqualResult() local 355 int rangeStart = num; in CompareNotEqualResult() 362 if (number == num) { in CompareNotEqualResult() 366 num = ParseNumber(rule, ruleSize, index); in CompareNotEqualResult() 369 if (number == num) { in CompareNotEqualResult() [all …]
|
/base/security/huks/test/unittest/huks_standard_test/module_test/service_test/huks_service/systemapi_wrap/useridm_test/src/ |
D | hks_useridm_api_wrap_test.cpp | 122 uint32_t num = 0; variable 123 int32_t ret = HksUserIdmGetAuthInfoNum(0, HKS_USER_AUTH_TYPE_FINGERPRINT, &num); 164 uint32_t num = 0; variable 165 int32_t ret = HksUserIdmGetAuthInfoNum(0, HKS_USER_AUTH_TYPE_PIN, &num); 177 uint32_t num = 0; variable 178 int32_t ret = HksUserIdmGetAuthInfoNum(0, HKS_USER_AUTH_TYPE_FACE, &num); 191 uint32_t num = 0; variable 192 …32_t ret = HksUserIdmGetAuthInfoNum(1, (enum HksUserAuthType)HKS_USER_AUTH_TYPE_FINGERPRINT, &num); 194 …EXPECT_EQ(num > 0, true) << "HksUseridmWrapTest010 HksUserIdmGetAuthInfoNum failed, num = " << num; 206 uint32_t num = 0; variable [all …]
|
/base/telephony/core_service/services/sim/src/ |
D | sim_number_decode.cpp | 34 inline static bool IsNumber(const char num) in IsNumber() argument 36 return (num >= '0' && num <= '9'); in IsNumber() 39 inline static bool IsPlusNumber(const char num) in IsPlusNumber() argument 41 return IsNumber(num) || (num == '+'); in IsPlusNumber() 44 inline static bool IsSharpStar(const char num) in IsSharpStar() argument 46 return num == '#' || num == '*'; in IsSharpStar() 49 inline static bool IsValidNumberChar(const char num) in IsValidNumberChar() argument 51 return IsPlusNumber(num) || IsSharpStar(num); in IsValidNumberChar() 56 for (const auto &num : number) { in IsValidNumberString() local 57 if (!IsValidNumberChar(num)) { in IsValidNumberString() [all …]
|
/base/telephony/sms_mms/services/sms/gsm/ |
D | gsm_sms_param_encode.cpp | 35 bool GsmSmsParamEncode::EncodeAddressPdu(const struct AddressNumber *num, std::string &resultNum) in EncodeAddressPdu() argument 37 if (num == nullptr) { in EncodeAddressPdu() 41 const char *temp = static_cast<const char *>(num->address); in EncodeAddressPdu() 55 ton = num->ton; in EncodeAddressPdu() 59 resultNum.push_back(HEX_VALUE_80 + (ton << HEX_VALUE_04) + num->npi); in EncodeAddressPdu() 77 uint8_t GsmSmsParamEncode::EncodeSmscPdu(const char *num, uint8_t *resultNum) in EncodeSmscPdu() argument 79 if (num == nullptr || resultNum == nullptr) { in EncodeSmscPdu() 90 if (num[0] == '+') { in EncodeSmscPdu() 91 ret = strncpy_s(newNum, sizeof(newNum), num + 1, MAX_SMSC_LEN); in EncodeSmscPdu() 93 ret = strncpy_s(newNum, sizeof(newNum), num, MAX_SMSC_LEN); in EncodeSmscPdu() [all …]
|
D | gsm_sms_param_codec.cpp | 26 bool GsmSmsParamCodec::EncodeAddressPdu(const struct AddressNumber *num, std::string &resultNum) in EncodeAddressPdu() argument 29 return codec.EncodeAddressPdu(num, resultNum); in EncodeAddressPdu() 32 uint8_t GsmSmsParamCodec::EncodeSmscPdu(const char *num, uint8_t *resultNum) in EncodeSmscPdu() argument 35 return codec.EncodeSmscPdu(num, resultNum); in EncodeSmscPdu() 38 uint8_t GsmSmsParamCodec::EncodeSmscPdu(const struct AddressNumber *num, uint8_t *smscNum, uint8_t … in EncodeSmscPdu() argument 41 return codec.EncodeSmscPdu(num, smscNum, smscLen); in EncodeSmscPdu()
|
/base/update/updater/services/common/ring_buffer/ |
D | ring_buffer.cpp | 30 bool RingBuffer::Init(uint32_t singleSize, uint32_t num) in Init() argument 32 if (singleSize == 0 || num == 0 || (num & (num - 1)) != 0) { // power of 2 in Init() 33 LOG(ERROR) << "singleSize:" << singleSize << " num:" << num << " error"; in Init() 36 bufArray_ = new (std::nothrow) uint8_t* [num] {}; in Init() 37 lenArray_ = new (std::nothrow) uint32_t [num] {}; in Init() 39 LOG(ERROR) << "new buf or len " << num << " error"; in Init() 42 for (uint32_t i = 0; i < num; i++) { in Init() 52 num_ = num; in Init()
|
/base/security/appverify/interfaces/innerkits/appverify_lite/unittest/src/ |
D | write_file.cpp | 56 int32_t num = 0; in CopyFile() local 57 while (num < len) { in CopyFile() 58 int32_t trueLen = ((len - num) >= ONCE_WRITE) ? ONCE_WRITE : (len - num); in CopyFile() 59 char *temp = buffer.get() + num; in CopyFile() 60 num += trueLen; in CopyFile()
|
/base/global/i18n_lite/interfaces/kits/i18n/include/ |
D | number_format.h | 94 std::string Format(double num, NumberFormatType type, int &status); 107 std::string Format(int num, int &status); 121 std::string FormatNoGroup(double num, NumberFormatType type, int &status); 133 std::string FormatNoGroup(int num, int &status);
|
/base/startup/init/ueventd/ |
D | ueventd.c | 175 static void HandleRequiredBlockDeviceNodes(const struct Uevent *uevent, char **devices, int num) in HandleRequiredBlockDeviceNodes() argument 177 for (int i = 0; i < num; i++) { in HandleRequiredBlockDeviceNodes() 199 static void HandleUeventRequired(const struct Uevent *uevent, char **devices, int num) in HandleUeventRequired() argument 201 INIT_ERROR_CHECK(devices != NULL && num > 0, return, "Fault parameters"); in HandleUeventRequired() 207 HandleRequiredBlockDeviceNodes(uevent, devices, num); in HandleUeventRequired() 288 void ProcessUevent(int sockFd, char **devices, int num) in ProcessUevent() argument 300 if (devices != NULL && num > 0) { in ProcessUevent() 301 HandleUeventRequired(&uevent, devices, num); in ProcessUevent() 308 static void DoTrigger(const char *ueventPath, int sockFd, char **devices, int num) in DoTrigger() argument 331 ProcessUevent(sockFd, devices, num); in DoTrigger() [all …]
|
/base/security/access_token/test/fuzztest/access_token/gethaptokeninfo_fuzzer/ |
D | gethaptokeninfo_fuzzer.cpp | 32 int num = static_cast<int>(size); in GetHapTokenInfoFuzzTest() local 38 .userID = num, in GetHapTokenInfoFuzzTest() 40 .instIndex = num, in GetHapTokenInfoFuzzTest() 41 .dlpType = num, in GetHapTokenInfoFuzzTest()
|
/base/hiviewdfx/hiappevent/interfaces/native/kits/include/hiappevent/ |
D | hiappevent.h | 171 ParamList OH_HiAppEvent_AddInt8Param(ParamList list, const char* name, int8_t num); 196 ParamList OH_HiAppEvent_AddInt16Param(ParamList list, const char* name, int16_t num); 221 ParamList OH_HiAppEvent_AddInt32Param(ParamList list, const char* name, int32_t num); 246 ParamList OH_HiAppEvent_AddInt64Param(ParamList list, const char* name, int64_t num); 271 ParamList OH_HiAppEvent_AddFloatParam(ParamList list, const char* name, float num); 296 ParamList OH_HiAppEvent_AddDoubleParam(ParamList list, const char* name, double num);
|
/base/global/i18n_lite/frameworks/i18n/include/ |
D | number_format_impl.h | 31 std::string Format(double num, NumberFormatType type, int &status) const; 32 std::string Format(int num, int &status) const; 33 std::string FormatNoGroup(double num, NumberFormatType type, int &status) const; 34 std::string FormatNoGroup(int num, int &status) const; 45 …std::string InnerFormat(double num, bool hasDec, bool isShowGroup, bool isPercent, int &status) co…
|
/base/update/sys_installer/services/module_update/src/ |
D | module_loop.cpp | 69 bool PreAllocateLoopDevices(const size_t num) in PreAllocateLoopDevices() argument 110 for (size_t id = startId; id < num + startId; ++id) { in PreAllocateLoopDevices() 117 LOG(INFO) << "Pre-allocated " << num << " loopback devices"; in PreAllocateLoopDevices() 249 std::unique_ptr<LoopbackDeviceUniqueFd> WaitForDevice(const int num) in WaitForDevice() argument 252 LOOP_BLOCK_PATH + std::to_string(num), in WaitForDevice() 253 LOOP_DEV_PATH + std::to_string(num), in WaitForDevice() 268 LOG(WARNING) << "Loopback device " << num << " not ready. Waiting 50ms..."; in WaitForDevice() 271 LOG(ERROR) << "Failed to open loopback device " << num; in WaitForDevice() 285 int num = ioctl(ctlFd.Get(), LOOP_CTL_GET_FREE); in CreateLoopDevice() local 286 if (num < 0) { in CreateLoopDevice() [all …]
|
/base/hiviewdfx/hiview/utility/common_utils/include/ |
D | log_parse.h | 38 …stack<std::string> GetStackTop(const std::vector<std::string>& validStack, const size_t num) const; 45 std::vector<std::string> GetValidStack(size_t num, std::stack<std::string>& inStack) const; 46 …ist<std::vector<std::string>> StackToMultipart(std::stack<std::string>& inStack, size_t num) const; 47 …bool GetValidStack(int num, std::stack<std::string>& inStack, std::stack<std::string>& outStack) c… 48 …gnoreLibrary(std::stack<std::string> inStack, std::stack<std::string>& outStack, size_t num) const;
|
/base/hiviewdfx/hiview/utility/common_utils/ |
D | log_parse.cpp | 94 bool LogParse::GetValidStack(int num, stack<string>& inStack, stack<string>& outStack) const in GetValidStack() argument 97 size_t count = static_cast<size_t>(num); in GetValidStack() 112 stack<string> LogParse::GetStackTop(const vector<string>& validStack, const size_t num) const in GetStackTop() 117 if (i == 0 || len - i < num) { in GetStackTop() 124 list<vector<string>> LogParse::StackToMultipart(stack<string>& inStack, size_t num) const in StackToMultipart() 135 validPart = GetValidStack(num, partStack); in StackToMultipart() 148 validPart = GetValidStack(num, partStack); in StackToMultipart() 201 vector<string> LogParse::GetValidStack(size_t num, stack<string>& inStack) const in GetValidStack() argument 216 MatchIgnoreLibrary(inStack, outStatck, num); in GetValidStack() 237 void LogParse::MatchIgnoreLibrary(stack<string> inStack, stack<string>& outStack, size_t num) const in MatchIgnoreLibrary() [all …]
|
/base/msdp/device_status/test/fuzztest/updatedragstyle_fuzzer/ |
D | updatedragstyle_fuzzer.cpp | 48 int32_t num = 0; in UpdateDragStyleFuzzTest() local 49 GetObject<int32_t>(data, size, num); in UpdateDragStyleFuzzTest() 50 …InteractionManager::GetInstance()->UpdateDragStyle(static_cast<DragCursorStyle>(num % DRAGCURSORST… in UpdateDragStyleFuzzTest()
|
/base/msdp/device_status/test/fuzztest/setdragwindowvisible_fuzzer/ |
D | setdragwindowvisible_fuzzer.cpp | 49 int32_t num = 0; in SetDragWindowVisibleFuzzTest() local 50 GetObject<int32_t>(data, size, num); in SetDragWindowVisibleFuzzTest() 51 if ((num % NUM_TWO) == 1) { in SetDragWindowVisibleFuzzTest()
|
/base/telephony/sms_mms/services/sms/include/gsm/ |
D | gsm_sms_param_codec.h | 28 bool EncodeAddressPdu(const struct AddressNumber *num, std::string &resultNum); 31 uint8_t EncodeSmscPdu(const char *num, uint8_t *resultNum); 32 uint8_t EncodeSmscPdu(const struct AddressNumber *num, uint8_t *smscNum, uint8_t smscLen);
|
/base/powermgr/thermal_manager/test/common/src/ |
D | thermal_test.cpp | 40 size_t num = fwrite(buf.c_str(), sizeof(char), buf.length(), fp); in WriteFile() local 41 if (num != buf.length()) { in WriteFile() 42 THERMAL_HILOGD(COMP_SVC, "Failed to fwrite %{public}s, num=%{public}zu", path.c_str(), num); in WriteFile() 61 size_t num = fread(&buffer[0], sizeof(char), fileSize, fp); in ReadFile() local 62 if (static_cast<int32_t>(num) != fileSize) { in ReadFile() 63 THERMAL_HILOGD(COMP_SVC, "Failed to fread %{public}s, num=%{public}zu", path.c_str(), num); in ReadFile()
|
/base/hiviewdfx/hiappevent/frameworks/native/ndk/ |
D | hiappevent_ndk.c | 180 ParamList OH_HiAppEvent_AddInt8Param(ParamList list, const char* name, int8_t num) in OH_HiAppEvent_AddInt8Param() argument 185 return ADD_INT8_PARAM(list, name, num); in OH_HiAppEvent_AddInt8Param() 196 ParamList OH_HiAppEvent_AddInt16Param(ParamList list, const char* name, int16_t num) in OH_HiAppEvent_AddInt16Param() argument 201 return ADD_INT16_PARAM(list, name, num); in OH_HiAppEvent_AddInt16Param() 212 ParamList OH_HiAppEvent_AddInt32Param(ParamList list, const char* name, int32_t num) in OH_HiAppEvent_AddInt32Param() argument 217 return ADD_INT32_PARAM(list, name, num); in OH_HiAppEvent_AddInt32Param() 228 ParamList OH_HiAppEvent_AddInt64Param(ParamList list, const char* name, int64_t num) in OH_HiAppEvent_AddInt64Param() argument 233 return ADD_INT64_PARAM(list, name, num); in OH_HiAppEvent_AddInt64Param() 244 ParamList OH_HiAppEvent_AddFloatParam(ParamList list, const char* name, float num) in OH_HiAppEvent_AddFloatParam() argument 249 return ADD_FLOAT_PARAM(list, name, num); in OH_HiAppEvent_AddFloatParam() [all …]
|