Mercurial > hg > Game > Cerium
diff example/share_task/main.cc @ 256:2c775d229cc6 draft
fix examples
author | tkaito@localhost.localdomain |
---|---|
date | Wed, 03 Jun 2009 16:14:06 +0900 |
parents | 028ffc9c0375 |
children | 768452fab95e |
line wrap: on
line diff
--- a/example/share_task/main.cc Wed Jun 03 15:46:07 2009 +0900 +++ b/example/share_task/main.cc Wed Jun 03 16:14:06 2009 +0900 @@ -10,7 +10,7 @@ int numtask = 1; int length = DATA_NUM; -char *help_str = "Usage: ./share [-task numtask] [-length data_length]\n \ +const char *usr_help_str = "Usage: ./share [-task numtask] [-length data_length]\n \ -task Number of task (default 1) \n \ -length Number of data (default DATA_NUM (Func.h))"; @@ -20,7 +20,7 @@ HTaskPtr task_load; HTaskPtr task_exec; - idata = (int*)manager->malloc(sizeof(int)*length); + idata = (int*)manager->allocate(sizeof(int)*length); for (int i = 0; i < length; i++) { idata[i] = i; } @@ -58,10 +58,6 @@ if (strcmp(argv[i], "-length") == 0) { length = atoi(argv[++i]); } - if (strcmp(argv[i], "--help") == 0) { - printf("%s\n", help_str); - return -1; - } } return 0; @@ -69,7 +65,7 @@ //---------main´Ø¿ô----------- int -cerium_main(int argc, char *argv[]) +TMmain(int argc, char *argv[]) { if (init(argc, argv) < 0) {