/ File Content
DEMO | DOWNLOAD | DEPLOY | SEARCH
Login

Latest version of file 'c-demos/minimal.c':

  • File c-demos/minimal.c — part of check-in [b1b2cfa5f0] at 2019-03-31 21:19:58 on branch trunk — Fix no_interactive mode. (user: pmacdona size: 344)

#include "jsi.c"

int main(int argc, char *argv[])
{
    Jsi_InterpOpts opts = {.argc=argc, .argv=argv};
    opts.no_interactive = 1;
    Jsi_Interp *interp = Jsi_InterpNew(&opts);
    if (!interp)
        return 1;

    if (!Jsi_Main(&opts))
        exit(1);
    
    // User code here ...
    
    Jsi_InterpDelete(interp);
    return(0);
}