By default, scriptdir/scriptname/main.extension is opened, where:
However, for lightweight apps, it may be confusing to have a dir for each script and have only one main.* in each. In this case, one dir and many scriptname.extension is better. The applicatiopn developer may choose this or a third approach as well, so we provide a callback function pointer in gpmi_scripts:
char *(*gpmi_scripts_asm_scriptname)(const GPMI_Script_Info *info, const char *file_name) = NULL;If this pointer is not NULL, instead of the default script file name generation, gpmi_scripts will call that function and will open the file name returned. This routine may not return NULL or invalid string. After use, gpmi_scripts will free() the returned pointer.