Changeset 694 for trunk/gui


Ignore:
Timestamp:
May 3, 2007, 12:32:30 PM (18 years ago)
Author:
nkissebe
Message:

takes pymol execution command/arguments from own command line arguments
rather than being hardcoded.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gui/vizservers/pymolproxy/pymolproxy.c

    r691 r694  
    13421342#ifdef STANDALONE
    13431343
    1344 int
    1345 main(int argc, char *argv)
    1346 {
    1347     char *myargv[10];
    1348         char *command = "/home/nanohub/nkissebe/pymol-trunk/pymol";
    1349         myargv[0] = command;
    1350         myargv[1] = "-p";
    1351         myargv[2] = "-q";
    1352         myargv[3] = "-i";
    1353         myargv[4] = "-x";
    1354         myargv[5] = "-X";
    1355         myargv[6] = "0";
    1356         myargv[7] = "-Y";
    1357         myargv[8] = "0";
    1358         myargv[9] = NULL;
    1359 
    1360     pyMol_Proxy(fileno(stdin), fileno(stdout), command, myargv);
     1344#define MAX_ARGS 100
     1345
     1346int
     1347main(int argc, char *argv[])
     1348{
     1349    int arg;
     1350    char *myargv[MAX_ARGS+1];
     1351
     1352        if (argc > MAX_ARGS+1) {
     1353        fprintf(stderr, "%s: Argument list too long (%d > %d arguments).", argv[0], argc, MAX_ARGS + 1);
     1354                return(1);
     1355        }
     1356
     1357    for(arg = 1; arg < argc; arg++)
     1358            myargv[arg-1] = argv[arg];
     1359
     1360        myargv[arg-1] = NULL;
     1361
     1362    pyMol_Proxy(fileno(stdin), fileno(stdout), myargv[0], myargv);
    13611363}
    13621364
    13631365#endif
    13641366
    1365 
Note: See TracChangeset for help on using the changeset viewer.