add a schema addition effect to buffer
| 733 | |
| 734 | // add a schema addition effect to buffer |
| 735 | void EffectsBuffer_AddNewSchemaEffect |
| 736 | ( |
| 737 | EffectsBuffer *buff, // effect buffer |
| 738 | const char *schema_name, // id of the schema |
| 739 | SchemaType st // type of the schema |
| 740 | ) { |
| 741 | //-------------------------------------------------------------------------- |
| 742 | // effect format: |
| 743 | // effect type |
| 744 | // schema type |
| 745 | // schema name |
| 746 | //-------------------------------------------------------------------------- |
| 747 | |
| 748 | EffectType t = EFFECT_ADD_SCHEMA; |
| 749 | EffectsBuffer_WriteBytes(&t, sizeof(t), buff); |
| 750 | |
| 751 | //-------------------------------------------------------------------------- |
| 752 | // write schema type |
| 753 | //-------------------------------------------------------------------------- |
| 754 | |
| 755 | EffectsBuffer_WriteBytes(&st, sizeof(st), buff); |
| 756 | |
| 757 | //-------------------------------------------------------------------------- |
| 758 | // write schema name |
| 759 | //-------------------------------------------------------------------------- |
| 760 | |
| 761 | EffectsBuffer_WriteString(schema_name, buff); |
| 762 | |
| 763 | EffectsBuffer_IncEffectCount(buff); |
| 764 | } |
| 765 | |
| 766 | // add an attribute addition effect to buffer |
| 767 | void EffectsBuffer_AddNewAttributeEffect |
no test coverage detected