Mercurial > MadButterfly
comparison src/shape_path.c @ 202:75ec0124202a
Commit merged between 200 and 201
author | wycc@wycc-desktop |
---|---|
date | Tue, 09 Dec 2008 23:34:05 +0800 |
parents | bcad1ccdf45c c234ee745ceb |
children | 29e1b2bffe4c |
comparison
equal
deleted
inserted
replaced
201:31933f9ee70e | 202:75ec0124202a |
---|---|
680 | 680 |
681 /*! \todo Use elmpool to manage sh_path_t objects. */ | 681 /*! \todo Use elmpool to manage sh_path_t objects. */ |
682 path = (sh_path_t *)malloc(sizeof(sh_path_t)); | 682 path = (sh_path_t *)malloc(sizeof(sh_path_t)); |
683 /*! \todo Remove this memset()? */ | 683 /*! \todo Remove this memset()? */ |
684 memset(&path->shape, 0, sizeof(shape_t)); | 684 memset(&path->shape, 0, sizeof(shape_t)); |
685 path->shape.sh_type = SHT_PATH; | 685 MBO_TYPE(path) = MBO_PATH; |
686 path->cmd_len = cmd_cnt; | 686 path->cmd_len = cmd_cnt; |
687 path->arg_len = arg_cnt; | 687 path->arg_len = arg_cnt; |
688 path->fix_arg_len = fix_arg_cnt; | 688 path->fix_arg_len = fix_arg_cnt; |
689 | 689 |
690 msz = cmd_cnt + sizeof(co_aix) * arg_cnt + sizeof(int) * fix_arg_cnt; | 690 msz = cmd_cnt + sizeof(co_aix) * arg_cnt + sizeof(int) * fix_arg_cnt; |
720 | 720 |
721 /*! \todo Use elmpool to manage sh_path_t objects. */ | 721 /*! \todo Use elmpool to manage sh_path_t objects. */ |
722 path = (sh_path_t *)malloc(sizeof(sh_path_t)); | 722 path = (sh_path_t *)malloc(sizeof(sh_path_t)); |
723 /*! \todo Remove this memset()? */ | 723 /*! \todo Remove this memset()? */ |
724 memset(&path->shape, 0, sizeof(shape_t)); | 724 memset(&path->shape, 0, sizeof(shape_t)); |
725 path->shape.sh_type = SHT_PATH; | 725 MBO_TYPE(path) = MBO_PATH; |
726 path->cmd_len = strlen(commands); | 726 path->cmd_len = strlen(commands); |
727 path->arg_len = arg_cnt; | 727 path->arg_len = arg_cnt; |
728 path->fix_arg_len = fix_arg_cnt; | 728 path->fix_arg_len = fix_arg_cnt; |
729 msz = cmd_cnt + sizeof(co_aix) * arg_cnt + sizeof(int) * fix_arg_cnt; | 729 msz = cmd_cnt + sizeof(co_aix) * arg_cnt + sizeof(int) * fix_arg_cnt; |
730 path->user_data = (char *)malloc(msz * 2); | 730 path->user_data = (char *)malloc(msz * 2); |