Lines Matching refs:str
119 char str[MAX_DATA_LENGTH] = { 0 };
125 if (readDataFromShmNoClear(str) != 0 || strncmp(code, str, CODE_HEAD) != 0) {
128 LOG("while: waitDataWithCode 9999 str= %s, i=%d", str, i);
132 if (readDataFromShm(str) == 0 && strncmp(code, str, CODE_HEAD) == 0) {
133 if (strncpy_s(data, strlen("0") + 1, str + STR_KEY, 1) != EOK) {
137 LOG("waitDataWithCode 9999 str= %s", str);
144 LOG("while: waitDataWithCode 9999 str= %s, i=%d", str, i);
153 char* str = (char*)malloc(MAX_DATA_LENGTH);
154 if (str == nullptr) {
158 (void)memset_s(str, MAX_DATA_LENGTH, 0, MAX_DATA_LENGTH);
167 if (strcpy_s(str, MAX_DATA_LENGTH, codeStr) != EOK) {
171 if (strcat_s(str, MAX_DATA_LENGTH, ":") != EOK) {
180 if (strcat_s(str, MAX_DATA_LENGTH, buf) != EOK) {
184 int nres = writeDataToShm(str);
232 char* Int2String(int num, char* str) // 10进制
234 if (str == nullptr) {
237 int i = 0; // 指示填充str
240 str[i++] = '-';
244 str[i++] = num % DECIM_TEN + CALCU_FOUR_AIGHT;
248 str[i] = '\0';
252 if (str[0] == '-') {
259 str[j] = str[j] + str[i - 1 - j];
260 str[i - 1 - j] = str[j] - str[i - 1 - j];
261 str[j] = str[j] - str[i - 1 - j];
264 return str; // 返回转换后的值