s 57 include/cmem.h char *strdup_chk(const char *s, const char *tag); s 68 include/cmem.h char *strndup_chk(const char *s, size_t len, const char *tag); s 77 include/cmem.h void strip_end(char *s); s 86 include/cmem.h void strip_casl2_comment(char *s); s 95 include/cmem.h char *strrev(const char *s); s 18 include/hash.h char *s; /**<char型のデータ */ s 25 src/cmem.c char *strdup_chk(const char *s, const char *tag) s 27 src/cmem.c assert(s != NULL); s 28 src/cmem.c char *t = malloc_chk(strlen(s) + 1, tag); s 29 src/cmem.c strcpy(t, s); s 33 src/cmem.c char *strndup_chk(const char *s, size_t len, const char *tag) s 35 src/cmem.c assert(s != NULL); s 38 src/cmem.c if(len < strlen(s)) { s 40 src/cmem.c strncpy(t, s, len); s 43 src/cmem.c t = strdup_chk(s, tag); s 48 src/cmem.c void strip_end(char *s) s 50 src/cmem.c for(int i = strlen(s) - 1; i > 0 && (s[i] == '\n' || s[i] == '\r' || s[i] == ' ' || s[i] == '\t'); i--) { s 51 src/cmem.c s[i] = '\0'; s 55 src/cmem.c void strip_casl2_comment(char *s) s 59 src/cmem.c for(int i = 0; s[i]; i++) { s 61 src/cmem.c if(s[i] == '\'' && s[i+1] != '\'' && (quoting == false || s[i-1] != '\'')) { s 64 src/cmem.c } else if(quoting == false && s[i] == ';') { s 65 src/cmem.c s[i] = '\0'; s 71 src/cmem.c char *strrev(const char *s) s 73 src/cmem.c char *t = strdup_chk(s, "strrev.t"); s 165 src/exec.c char *s = NULL; s 168 src/exec.c setcerr(205, s = pr2str(sys->cpu->pr)); /* r/r1 in word #1 - not GR */ s 169 src/exec.c FREE(s); s 178 src/exec.c char *s = NULL; s 181 src/exec.c setcerr(206, s = pr2str(sys->cpu->pr)); /* r/r1 in word #1 - not GR */ s 182 src/exec.c FREE(s); s 202 src/exec.c char *s = NULL; s 205 src/exec.c setcerr(207, s = pr2str(sys->cpu->pr + 1)); /* address in word #2 - out of memory */ s 206 src/exec.c FREE(s); s 301 src/exec.c unsigned long s = 0; s 307 src/exec.c s = o + val; s 308 src/exec.c if(s > 0xFFFF) { s 315 src/exec.c s = o + (~val + 1); s 316 src/exec.c if(s > 0xFFFF) { s 317 src/exec.c s &= 0xFFFF; s 320 src/exec.c sys->cpu->gr[r] = (WORD)s; s 322 src/exec.c if((s & 0x8000) == 0x8000) { s 325 src/exec.c else if(s == 0x0) { s 629 src/exec.c char *s = NULL; s 632 src/exec.c setcerr(203, s = pr2str(sys->cpu->pr)); /* Stack Pointer (SP) - stack underflow */ s 633 src/exec.c FREE(s); s 681 src/exec.c char *s = NULL; s 715 src/exec.c setcerr(201, s = pr2str(sys->cpu->pr)); /* Program Register (PR) - memory overflow */ s 720 src/exec.c setcerr(202, s = pr2str(sys->cpu->pr)); /* Stack Pointer (SP) - stack overflow */ s 726 src/exec.c setcerr(204, s = pr2str(sys->cpu->pr)); /* OP in word #1 - not command code */ s 750 src/exec.c FREE(s); s 13 src/hash.c for(int j = 0; keyv[i]->val.s[j]; j++) { s 14 src/hash.c hashval = keyv[i]->val.s[j] + HASHNUM * hashval; s 56 src/label.c key->val.s = strdup_chk(value, "label_hashkey->value"); s 72 src/label.c FREE(keys[j]->val.s); s 137 src/label.c int s = 0; s 145 src/label.c l[s++] = p->label; s 148 src/label.c qsort(l, s, sizeof(*l), compare_adr); s 149 src/label.c for(int i = 0; i < s; i++) { s 96 src/struct.c keys[0]->val.s = strdup_chk(cmd, "keys[0].val.s"); s 103 src/struct.c FREE(keys[0]->val.s); s 107 src/word.c char *s = malloc_chk(MAXLEN + 1, "word2n.n"); s 112 src/word.c s[d++] = word % 10 + '0'; s 114 src/word.c s[d] = '\0'; s 115 src/word.c t = strrev(s); s 116 src/word.c FREE(s); s 16 test/unit/hash/cmd.c keys[i]->val.s = strdup(str[i]); s 47 test/unit/hash/cmd.c keys[cnt++]->val.s = strdup(str[i]); s 5 test/unit/strip_casl2_comment/cmd.c char s[][50] = { s 14 test/unit/strip_casl2_comment/cmd.c for(size_t i = 0; i < sizeof(s) / sizeof(s[0]); i++) { s 15 test/unit/strip_casl2_comment/cmd.c printf("%s::\n", strip_casl2_comment(s[i])); s 5 test/unit/strip_end/cmd.c char s[][10] = {"abc\n", "abc ", "abc\t", "abc\t\n", "abc"}; s 7 test/unit/strip_end/cmd.c for(size_t i = 0; i < sizeof(s) / sizeof(s[0]); i++) { s 8 test/unit/strip_end/cmd.c printf("%s:\n", strip_end(s[i]));