| 239 | } |
| 240 | |
| 241 | static void ApplyAddSchema |
| 242 | ( |
| 243 | FILE *stream, // effects stream |
| 244 | GraphContext *gc // graph to operate on |
| 245 | ) { |
| 246 | //-------------------------------------------------------------------------- |
| 247 | // effect format: |
| 248 | // effect type |
| 249 | // schema type |
| 250 | // schema name |
| 251 | //-------------------------------------------------------------------------- |
| 252 | |
| 253 | // read schema type |
| 254 | SchemaType t; |
| 255 | fread_assert(&t, sizeof(t), stream); |
| 256 | |
| 257 | // read schema name |
| 258 | // read string length |
| 259 | size_t l; |
| 260 | fread_assert(&l, sizeof(l), stream); |
| 261 | |
| 262 | // read string |
| 263 | char schema_name[l]; |
| 264 | fread_assert(schema_name, l, stream); |
| 265 | |
| 266 | // create schema |
| 267 | AddSchema(gc, schema_name, t, false); |
| 268 | } |
| 269 | |
| 270 | static void ApplyAddAttribute |
| 271 | ( |
no test coverage detected