MCPcopy Create free account
hub / github.com/csound/csound / csoundCheckOpcodeDeny

Function csoundCheckOpcodeDeny

Top/csmodule.c:520–547  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

518}
519
520static int csoundCheckOpcodeDeny(CSOUND * csound, const char *fname)
521{
522 /* Check to see if the fname is on the do-not-load list */
523 char buff[256];
524 char *th;
525 char *p, *deny;
526 char *list = getenv("CS_OMIT_LIBS");
527 /* printf("DEBUG %s(%d): check fname=%s\n", __FILE__, __LINE__, fname); */
528 /* printf("DEBUG %s(%d): list %s\n", __FILE__, __LINE__, list); */
529 if (list==NULL) return 0;
530 strNcpy(buff, fname, 255); //buff[255]='\0';
531 strrchr(buff, '.')[0] = '\0'; /* Remove .so etc */
532 p = cs_strdup(csound, list);
533 deny = cs_strtok_r(p, ",", &th);
534 /* printf("DEBUG %s(%d): check buff=%s\n", __FILE__, __LINE__, deny); */
535 while (deny) {
536 /* printf("DEBUG %s(%d): deny=%s\n", __FILE__, __LINE__, deny); */
537 if (strcmp(deny, buff)==0) {
538 csound->Free(csound, p);
539 /* printf("DEBUG %s(%d): found\n", __FILE__, __LINE__); */
540 return 1;
541 }
542 deny = cs_strtok_r(NULL, ",", &th);
543 }
544 csound->Free(csound, p);
545 /* printf("DEBUG %s(%d): not found\n", __FILE__, __LINE__); */
546 return 0;
547}
548
549
550static int _dir_exists(char *path) {

Callers 2

csoundLoadModulesFunction · 0.85
csoundLoadAndInitModulesFunction · 0.85

Calls 3

cs_strdupFunction · 0.85
cs_strtok_rFunction · 0.85
strNcpyFunction · 0.50

Tested by

no test coverage detected