Lines Matching defs:cstr

2165     struct CString *cstr;
7197 static void cstr_realloc(CString *cstr, int new_size)
7202 size = cstr->size_allocated;
7207 data = tcc_realloc(cstr->data_allocated, size);
7210 cstr->data_allocated = data;
7211 cstr->size_allocated = size;
7212 cstr->data = data;
7216 static inline void cstr_ccat(CString *cstr, int ch)
7219 size = cstr->size + 1;
7220 if (size > cstr->size_allocated)
7221 cstr_realloc(cstr, size);
7222 ((unsigned char *)cstr->data)[size - 1] = ch;
7223 cstr->size = size;
7226 static void cstr_cat(CString *cstr, const char *str)
7233 cstr_ccat(cstr, c);
7239 static void cstr_wccat(CString *cstr, int ch)
7242 size = cstr->size + sizeof(int);
7243 if (size > cstr->size_allocated)
7244 cstr_realloc(cstr, size);
7245 *(int *)(((unsigned char *)cstr->data) + size - sizeof(int)) = ch;
7246 cstr->size = size;
7249 static void cstr_new(CString *cstr)
7251 memset(cstr, 0, sizeof(CString));
7255 static void cstr_free(CString *cstr)
7257 tcc_free(cstr->data_allocated);
7258 cstr_new(cstr);
7261 #define cstr_reset(cstr) cstr_free(cstr)
7264 static void add_char(CString *cstr, int c)
7268 cstr_ccat(cstr, '\\');
7271 cstr_ccat(cstr, c);
7273 cstr_ccat(cstr, '\\');
7275 cstr_ccat(cstr, 'n');
7277 cstr_ccat(cstr, '0' + ((c >> 6) & 7));
7278 cstr_ccat(cstr, '0' + ((c >> 3) & 7));
7279 cstr_ccat(cstr, '0' + (c & 7));
7290 CString *cstr;
7320 cstr = cv->cstr;
7321 len = cstr->size - 1;
7323 add_char(&cstr_buf, ((unsigned char *)cstr->data)[i]);
7328 cstr = cv->cstr;
7331 len = cstr->size - 1;
7333 add_char(&cstr_buf, ((unsigned char *)cstr->data)[i]);
7335 len = (cstr->size / sizeof(int)) - 1;
7337 add_char(&cstr_buf, ((int *)cstr->data)[i]);
8050 CString *cstr;
8052 nb_words = (sizeof(CString) + cv->cstr->size + 3) >> 2;
8055 cstr = (CString *)(str + len);
8056 cstr->data = NULL;
8057 cstr->size = cv->cstr->size;
8058 cstr->data_allocated = NULL;
8059 cstr->size_allocated = cstr->size;
8060 memcpy((char *)cstr + sizeof(CString),
8061 cv->cstr->data, cstr->size);
8134 cv.cstr = (CString *)p; \
8135 cv.cstr->data = (char *)p + sizeof(CString);\
8136 p += (sizeof(CString) + cv.cstr->size + 3) >> 2;\
8538 pstrcat(buf, sizeof(buf), (char *)tokc.cstr->data);
8707 (char *)tokc.cstr->data);
9364 tokc.cstr = &tokcstr;
9423 tokc.cstr = &tokcstr;
9600 CString cstr;
9615 cstr_new(&cstr);
9620 cstr_ccat(&cstr, ' ');
9622 cstr_cat(&cstr, get_tok_str(t, &cval));
9625 cstr_ccat(&cstr, '\0');
9627 printf("stringize: %s\n", (char *)cstr.data);
9630 cval.cstr = &cstr;
9632 cstr_free(&cstr);
9703 CString cstr;
9733 cstr_new(&cstr);
9734 cstr_cat(&cstr, cstrval);
9735 cstr_ccat(&cstr, '\0');
9736 cval.cstr = &cstr;
9738 cstr_free(&cstr);
9852 CString cstr;
9867 cstr_new(&cstr);
9889 cstr_reset(&cstr);
9891 cstr_cat(&cstr, p1);
9893 cstr_cat(&cstr, p2);
9894 cstr_ccat(&cstr, '\0');
9902 tokc.cstr = &cstr;
9920 ts = tok_alloc(cstr.data, strlen(cstr.data));
9924 const char *str = cstr.data;
9948 cstr_reset(&cstr);
9950 cstr_cat(&cstr, p1);
9951 cstr_ccat(&cstr, '\0');
9953 warning("pasting \"%s\" and \"%s\" does not give a valid preprocessing token", cstr.data, p2);
9969 cstr_free(&cstr);
10074 parse_number((char *)tokc.cstr->data);
12043 ad->section = find_section(tcc_state, (char *)tokc.cstr->data);
14101 CString *cstr;
14103 cstr = tokc.cstr;
14106 cstr_len = cstr->size;
14108 cstr_len = cstr->size / sizeof(int);
14120 memcpy(sec->data + c + array_length, cstr->data, nb);
14124 ch = ((unsigned char *)cstr->data)[i];
14126 ch = ((int *)cstr->data)[i];
16153 p = tokc.cstr->data;
17127 p = tokc.cstr->data;
17453 p = tokc.cstr->data;
17590 p = tokc.cstr->data;
17591 size = tokc.cstr->size;
17630 pstrcat(sname, sizeof(sname), tokc.cstr->data);
17723 p = tokc.cstr->data;
17929 op->constraint = tcc_malloc(tokc.cstr->size);
17930 strcpy(op->constraint, tokc.cstr->data);
17969 cstr_cat(astr, tokc.cstr->data);
18012 asm_clobber(clobber_regs, tokc.cstr->data);