str 75 include/cerr.h void setcerr(int num, const char *str); str 75 include/monitor.h MONARGS *monargstok(const char *str); str 25 include/word.h WORD nh2word(const char *str); str 26 src/assemble.c WORD getadr(const char *prog, const char *str, PASS pass); str 40 src/assemble.c WORD grword(const char *str, bool is_x); str 50 src/assemble.c WORD getliteral(const char *str, PASS pass); str 72 src/assemble.c void writestr(const char *str, bool literal, PASS pass); str 82 src/assemble.c void writedc(const char *str, PASS pass); str 319 src/assemble.c WORD getadr(const char *prog, const char *str, PASS pass) str 323 src/assemble.c if(str[0] == '=') { str 324 src/assemble.c adr = getliteral(str, pass); str 325 src/assemble.c } else if(isdigit(str[0]) || str[0] == '-' || str[0] == '#') { str 326 src/assemble.c adr = nh2word(str); str 329 src/assemble.c if((adr = getlabel(prog, str)) == 0xFFFF) { str 330 src/assemble.c setcerr(103, str); /* label not found */ str 337 src/assemble.c WORD grword(const char *str, bool is_x) str 342 src/assemble.c if(strlen(str) != 3 || str 343 src/assemble.c strncmp(str, "GR", 2) != 0 || str 344 src/assemble.c str[2] < '0' || str[2] > '0' + (GRSIZE - 1)) str 348 src/assemble.c r = (WORD)(str[2] - '0'); str 357 src/assemble.c WORD getliteral(const char *str, PASS pass) str 359 src/assemble.c assert(str[0] == '='); str 362 src/assemble.c str++; str 363 src/assemble.c if(str[0] == '\'') { /* 文字定数 */ str 364 src/assemble.c writestr(str, true, pass); str 366 src/assemble.c writememory(nh2word(str), (asptr->lptr)++, pass); str 387 src/assemble.c void writestr(const char *str, bool literal, PASS pass) str 389 src/assemble.c assert(str[0] == '\''); str 393 src/assemble.c for(int i = 1; str[i] != '\'' || str[++i] == '\''; i++) { str 395 src/assemble.c if(!str[i]) { str 396 src/assemble.c setcerr(123, str); /* unclosed quote */ str 400 src/assemble.c setcerr(124, str); /* more than one character in literal */ str 405 src/assemble.c writememory(str[i], (asptr->lptr)++, pass); str 408 src/assemble.c writememory(str[i], (asptr->ptr)++, pass); str 413 src/assemble.c void writedc(const char *str, PASS pass) str 417 src/assemble.c if(*str == '\'') { str 418 src/assemble.c writestr(str, false, pass); str 420 src/assemble.c if(str[0] == '#' || isdigit(str[0]) || str[0] == '-') { str 421 src/assemble.c adr = nh2word(str); str 423 src/assemble.c if(pass == SECOND && (adr = getlabel(asptr->prog, str)) == 0xFFFF) { str 424 src/assemble.c setcerr(103, str); /* label not found */ str 19 src/casl2.c char *objfile_name(const char *str); str 45 src/cerr.c void setcerr(int num, const char *str) str 51 src/cerr.c if(0 < strlen(str) && strlen(str) <= CERRSTRSIZE) { str 52 src/cerr.c sprintf(cerr->msg, "%s: %s", str, getcerrmsg(cerr->num)); str 95 src/exec.c char *str = malloc_chk(CERRSTRSIZE + 1, "pr2str.pr"); str 97 src/exec.c sprintf(str, "PR:#%04X", pr); str 98 src/exec.c return str; str 124 src/monitor.c MONARGS *monargstok(const char *str) str 132 src/monitor.c if(!str || !str[0]) { str 135 src/monitor.c tok = p = strdup_chk(str, "argstok.p"); str 243 src/struct.c char *str = NULL; str 245 src/struct.c str = malloc_chk(3 + 1, "grstr.str"); str 246 src/struct.c sprintf(str, "GR%d", word); str 247 src/struct.c return str; str 10 src/token.c OPD *opdtok(const char *str); str 30 src/token.c OPD *opdtok(const char *str) str 38 src/token.c if(!str || !str[0]) { str 41 src/token.c tok = p = strdup_chk(str, "opdtok.p"); str 66 src/token.c setcerr(123, str); /* unclosed quote */ str 17 src/word.c WORD n2word(const char *str); str 26 src/word.c WORD h2word(const char *str); str 28 src/word.c WORD n2word(const char *str) str 30 src/word.c assert(isdigit(str[0]) || str[0] == '-'); str 35 src/word.c n = strtol(str, &check, 10); str 37 src/word.c setcerr(114, str); /* not integer */ str 47 src/word.c WORD h2word(const char *str) str 49 src/word.c assert(str[0] == '#'); str 53 src/word.c str++; str 54 src/word.c if(*str == '-' || strlen(str) > 4) { str 55 src/word.c setcerr(116, str-1); /* out of hex range */ str 59 src/word.c w = (WORD)strtol(str, &check, 16); str 61 src/word.c setcerr(115, str-1); /* not hex */ str 82 src/word.c WORD nh2word(const char *str) str 87 src/word.c if(str == NULL) { str 90 src/word.c if(!isdigit(*str) && *str != '-' && *str != '#') { str 91 src/word.c setcerr(114, str); /* not integer */ str 94 src/word.c if(*str == '#') { str 95 src/word.c w = h2word(str); str 97 src/word.c w = n2word(str); str 5 test/unit/getgr/cmd.c WORD getgr(const char *str, bool is_x); str 14 test/unit/getgr/cmd.c char *str[] = { str 27 test/unit/getgr/cmd.c for(j = 0; j < ARRAYSIZE(str); j++) { str 29 test/unit/getgr/cmd.c r = getgr(str[j], is_x[i]); str 30 test/unit/getgr/cmd.c printf("%s\t#%04X", str[j], r); str 8 test/unit/hash/cmd.c char *str[2] = {"abc", "123"}; str 16 test/unit/hash/cmd.c keys[i]->val.s = strdup(str[i]); str 39 test/unit/hash/cmd.c char *str[2] = {"abc", "123"}; str 47 test/unit/hash/cmd.c keys[cnt++]->val.s = strdup(str[i]); str 9 test/unit/nh2word/cmd.c char *str[] = { str 17 test/unit/nh2word/cmd.c for(i = 0; i < sizeof(str)/sizeof(str[0]); i++) { str 19 test/unit/nh2word/cmd.c r = nh2word(str[i]); str 20 test/unit/nh2word/cmd.c printf("%s\t#%04X", str[i], r); str 3 test/unit/nh2word/test_h2word.h WORD h2word(const char *str); str 5 test/unit/opdtok/cmd.c OPD *opdtok(const char *str); str 10 test/unit/opdtok/cmd.c char *str[] = { str 21 test/unit/opdtok/cmd.c for(i = 0; i < ARRAYSIZE(str); i++) { str 23 test/unit/opdtok/cmd.c printf("%s\n", str[i]); str 24 test/unit/opdtok/cmd.c opd = opdtok(str[i]); str 46 test/unit/setcerr/cmd.c const char *str[] = {NULL, "foobar"}; str 50 test/unit/setcerr/cmd.c for(i = 0; i < ARRAYSIZE(str); i++) { str 52 test/unit/setcerr/cmd.c setcerr(code[j], str[i]); str 53 test/unit/setcerr/cmd.c printf("%d: %s - %d\t%s\n", code[j], str[i], cerr->num, cerr->msg);