Difference for psfgen/src/tcl_psfgen.c from version 1.26 to 1.27

version 1.26version 1.27
Line 922
Line 922
     }     }
     Tcl_AppendResult(interp, "Invalid segid: ", argv[2], NULL);     Tcl_AppendResult(interp, "Invalid segid: ", argv[2], NULL);
     return TCL_ERROR;     return TCL_ERROR;
   } else if (argc == 5 && !strcasecmp(argv[1], "coordinates")) {   } else if (argc == 5 && 
               (!strcasecmp(argv[1], "coordinates") || 
                !strcasecmp(argv[1], "mass"))) {
     topo_mol *mol = psf->mol;     topo_mol *mol = psf->mol;
     int segindex = (mol ?      int segindex = (mol ? 
         hasharray_index(mol->segment_hash, argv[2]) :         hasharray_index(mol->segment_hash, argv[2]) :
Line 942
Line 944
       atoms = seg->residue_array[resindex].atoms;       atoms = seg->residue_array[resindex].atoms;
       while (atoms) {       while (atoms) {
         if (!strcmp(atoms->name, argv[4])) {         if (!strcmp(atoms->name, argv[4])) {
            if (!strcasecmp(argv[1], "coordinates")) { 
 #if TCL_MINOR_VERSION >= 6 #if TCL_MINOR_VERSION >= 6
           char buf[512];           char buf[512];
           sprintf(buf, "%f %f %f", atoms->x, atoms->y, atoms->z);           sprintf(buf, "%f %f %f", atoms->x, atoms->y, atoms->z);
Line 950
Line 953
           sprintf(interp->result, "%f %f %f", atoms->x, atoms->y, atoms->z);           sprintf(interp->result, "%f %f %f", atoms->x, atoms->y, atoms->z);
 #endif #endif
           return TCL_OK;           return TCL_OK;
            } else if (!strcasecmp(argv[1], "mass")) {
  #if TCL_MINOR_VERSION >= 6
              char buf[512];
              sprintf(buf, "%f", atoms->mass);
              Tcl_AppendResult(interp, buf, NULL);
  #else
              sprintf(interp->result, "%f", atoms->mass);
  #endif
              return TCL_OK;
            }
         }         }
         atoms = atoms->next;         atoms = atoms->next;
       }       }


Legend:
Removed in v.1.26 
changed lines
 Added in v.1.27



Made by using version 1.53 of cvs2html