| 505 | } |
| 506 | |
| 507 | cbm_userconfig_source_state_t cbm_userconfig_project_source(const cbm_userconfig_t *cfg, |
| 508 | const char **bytes, size_t *len) { |
| 509 | if (bytes) |
| 510 | *bytes = NULL; |
| 511 | if (len) |
| 512 | *len = 0; |
| 513 | if (!cfg || !cfg->project_source) |
| 514 | return CBM_USERCONFIG_SOURCE_ERROR; |
| 515 | const cbm_userconfig_source_t *source = cfg->project_source; |
| 516 | if (source->state == CBM_USERCONFIG_SOURCE_PRESENT) { |
| 517 | if (bytes) |
| 518 | *bytes = source->bytes; |
| 519 | if (len) |
| 520 | *len = source->len; |
| 521 | } |
| 522 | return source->state; |
| 523 | } |
| 524 | |
| 525 | CBMLanguage cbm_userconfig_lookup(const cbm_userconfig_t *cfg, const char *ext) { |
| 526 | if (!cfg || !ext || !ext[0]) { |
no outgoing calls