gonzui


Format: Advanced Search

SearchGoogle itResults 1 - 1 of 1 for funcall:P from t2ex/t2ex_source/kernel/sysmain/src/command.c (0.01 seconds)
t2ex
t2ex_source/kernel/sysmain/src/command.c - 24.4KB - 884 lines
89:         if (dd < E_OK) {
90:                 P("Can't open CLOCK device [%#x]\n", dd);
91:                 goto exit0;
111: if (er < E_OK) { 112: P("Can't set CLOCK [%#x]\n", er); 113: goto exit1;
120: if (er < E_OK ) { 121: P("dt_tzset(UTC+0) ERR [%#x]\n", er); 122: goto exit1;
127: if (er < E_OK) { 128: P("Can't get CLOCK [%#x]\n", er); 129: goto exit1;
164: if (er < E_OK ) { 165: P("dt_tzset(JST-9) ERR [%#x]\n", er); 166: } else {
168: if (er < E_OK) { 169: P("dt_setsystz() ERR [%#x]\n", er); 170: }
192: if (er < E_OK) { 193: P("dt_localtime() ERR [%#x]\n", er); 194: } else { 195: P("%d/%02d/%02d (%s) %02d:%02d:%02d\n", 196: ctm.tm_year + 1900, ctm.tm_mon + 1,
212: if (er < E_OK) { 213: P("dt_mktime() ERR [%#x]\n", er); 214: } else {
216: if (er < E_OK) { 217: P("tk_set_tim() ERR [%#x]\n", er); 218: } else {
238: if (er >= E_OK) { 239: P("attached '%s' at /'%s'\n", av[1], av[2]); 240: } else { 241: P("fs_attach(%s, %s, FIMP_FAT ..) ERR [%#x]\n", 242: av[1], av[2], er);
256: if (er >= E_OK) { 257: P("detached '%s'\n", av[1]); 258: } else { 259: P("fs_detach(%s) ERR [%#x]\n", av[1], er); 260: }
275: if (er >= E_OK) { 276: P("directory '%s' %o created\n", av[1], mode); 277: } else { 278: P("fs_mkdir(%s, %o) ERR [%#x]\n", av[1], mode, er); 279: }
292: if (er >= E_OK) { 293: P("directory '%s' removed\n", av[1]); 294: } else { 295: P("fs_rmdir(%s) ERR [%#x]\n", av[1], er); 296: }
309: if (er >= E_OK) { 310: P("file '%s' removed\n", av[1]); 311: } else { 312: P("fs_unlink(%s) ERR [%#x]\n", av[1], er); 313: }
326: if (er >= E_OK) { 327: P("file '%s' -> '%s' moved\n", av[1], av[2]); 328: } else { 329: P("fs_rename(%s,%s) ERR [%#x]\n", av[1], av[2], er); 330: }
342: if (er >= E_OK) { 343: P("== '%s'\n", buf); 344: } else { 345: P("fs_getcwd(..) ERR [%#x]\n", er); 346: }
359: if (er >= E_OK) { 360: P("=> '%s'\n", av[1]); 361: } else { 362: P("fs_chdir(%s) ERR [%#x]\n", av[1], er); 363: }
395: if (dir == NULL) { 396: P("opendir ERR\n"); 397: return;
410: if (er < E_OK) { 411: P("fs_stat(%s) ERR [%#x]\n", path, er); 412: continue;
418: 419: P("%-16s %8d %04o %d/%02d/%02d %02d:%02d:%02d", 420: &path[n], st.st_size, st.st_mode & 0x1FF,
424: dt_localtime_ms(&st.st_ctime, NULL, &ctm); 425: P(" c:%d/%02d/%02d %02d:%02d:%02d", 426: ctm.tm_year + 1900, ctm.tm_mon + 1, ctm.tm_mday,
428: dt_localtime_ms(&st.st_atime, NULL, &ctm); 429: P(" a:%d/%02d/%02d", 430: ctm.tm_year + 1900, ctm.tm_mon + 1, ctm.tm_mday);
432: if (opt & 0x02) { 433: P(" b:%-4d m:%#04x i:%d", 434: (W)st.st_blocks, st.st_mode, (W)st.st_ino); 435: } 436: P("\n"); 437: }
459: if (!fp) { 460: P("%s open ERR\n", av[1]); 461: return;
466: if (fsz <= 0) { 467: P("%s is empty\n", av[1]); 468: goto exit1;
471: if (ofs >= fsz) { 472: P("bad offset: %d >= %d\n", ofs, fsz); 473: goto exit1;
479: if (!buf) { 480: P("No memory\n"); 481: goto exit1;
483: if (fread(buf, fsz, 1, fp) != 1) { 484: P("read ERR\n"); 485: goto exit2;
488: for (i = 0; i < len; i++) { 489: P("%c", buf[ofs + i]); 490: }
492: for (i = 0; i < len; ) { 493: if ((i % 16) == 0) P("%04x:", ofs + i); 494: P(" %02x", buf[ofs + i]); 495: if ((++i % 16) == 0) P("\n"); 496: } 497: if ((i % 16) != 0) P("\n"); 498: }
523: if (!sfp) { 524: P("%s open ERR\n", av[1]); 525: goto exit0;
533: if (!buf) { 534: P("No memory\n"); 535: goto exit1;
537: if (fread(buf, fsz, 1, sfp) != 1) { 538: P("read ERR\n"); 539: goto exit2;
544: if (n > FILENAME_MAX) { 545: P("too long path: %s\n", av[2]); 546: goto exit2;
555: if (strlen(p) + n > FILENAME_MAX) { 556: P("too long path: %s/%s\n", av[2], av[1]); 557: goto exit2;
564: if (!dfp) { 565: P("%s open ERR\n", dst); 566: goto exit2;
568: if (fseek(dfp, wofs, SEEK_SET) < 0) { 569: P("%s fseek(%d) ERR\n", dst, wofs); 570: goto exit3;
574: if (!dfp) { 575: P("%s open ERR\n", dst); 576: goto exit2;
581: if (fwrite(buf, wlen, 1, dfp) != 1) { 582: P("write ERR\n"); 583: goto exit3; 584: } 585: P("%s ", av[1]); 586: if (fsz != wlen) P("[%d bytes] ", wlen); 587: if (wofs == 0) { 588: P("is copied to %s\n", dst); 589: } else if (wofs < 0) { 590: P("is appended to %s\n", dst); 591: } else { 592: P("is overwrited to %s at %d\n", dst, wofs); 593: }
618: if (er >= E_OK) { 619: P("'%s' is truncated to %d\n", av[1], len); 620: } else { 621: P("fs_truncate(%s, %d) ERR [%#x]\n", av[1], len, er); 622: }
636: if (er < E_OK) { 637: P("fs_statvfs(%s) ERR [%#x]\n", av[1], er); 638: return; 639: } 640: P("Blocks: total = %d free = %d blksz = %d used = %d %%\n", 641: (W)buf.f_blocks, (W)buf.f_bfree, buf.f_frsize,
656: if (er < E_OK) { 657: P("fs_sync ERR [%#x]\n", er); 658: }
661: if (fd < 0) { 662: P("fs_open(%s) ERR [%#x]\n", av[1], fd); 663: } else {
666: if (er < E_OK) { 667: P("fs_fdatasync ERR [%#x]\n", er); 668: }
671: if (er < E_OK) { 672: P("fs_sync ERR [%#x]\n", er); 673: }
692: if (er < E_OK) { 693: P("fs_chmod(%s, %#x/0%o) ERR [%#x]\n", av[1], md, md, er); 694: }
712: if (er < E_OK) { 713: P("pm_load ERR [%#x]\n", er); 714: return; 715: } 716: P("[%d] PROG (entry at %d)\n", er, (int)entry); 717: }
733: if (er < E_OK) { 734: P("pm_loadspg ERR [%#x]\n", er); 735: return; 736: } 737: P("[%d] SYSPRG\n", er); 738: }
753: if (er < E_OK) { 754: P("pm_unload(%d) ERR [%#x]\n", progid, er); 755: }
849: } else if (strncmp(av[0], "?", 1) == 0) { 850: P("date [y m d [h m s]]\n"); 851: P("attach devnm connm\n"); 852: P("detach connm\n"); 853: P("cd dir\n"); 854: P("pwd \n"); 855: P("ls [-t][-l][dir]\n"); 856: P("mkdir dir [mode]\n"); 857: P("rmdir dir\n"); 858: P("rm path\n"); 859: P("mv o-path n-path\n"); 860: P("trunc path len\n"); 861: P("df path\n"); 862: P("sync [path [d]]\n"); 863: P("chmod path mode\n"); 864: P("tp path [ofs len]\n"); 865: P("tpx path [ofs len]\n"); 866: P("cp s-path d-path/dir [wofs [wlen]]\n"); 867: P("ref [item]\n"); 868: P("call addr [p1 p2 p3]\n"); 869: P("load path\n"); 870: P("loadspg path [arg ...]\n"); 871: P("unload progid\n"); 872: #ifdef NET_SAMPLE 873: P("net execute network sample\n"); 874: