Ticket #43824: pymol-clang.diff

File pymol-clang.diff, 30.4 KB (added by howarth.at.macports@…, 10 years ago)

replacement pymol-clang.diff for pymol 1.7.1.1

  • layer0/ShaderMgr.c

     
    151151    while (replaceStrings[i]){
    152152      slen = strlen(replaceStrings[i]);
    153153      rlen = strlen(replaceStrings[i+1]);
    154       while(rstr=strstr(dest_line, replaceStrings[i])){
     154      while((rstr=strstr(dest_line, replaceStrings[i]))){
    155155        strcpy(tmp_line, rstr + slen);
    156156        strcpy(rstr, replaceStrings[i+1]);
    157157        strcpy(rstr+rlen, tmp_line);
     
    499499  if (I){
    500500    GLenum err ;
    501501    glBindAttribLocation(I->id, VERTEX_POS, "a_Vertex");
    502     if (err = glGetError()){
     502    if ((err = glGetError())){
    503503      PRINTFB(G, FB_ShaderMgr, FB_Warnings) "GLERROR: a_Vertex: %d\n", err ENDFB(G);
    504504    }
    505505    glBindAttribLocation(I->id, VERTEX_NORMAL, "a_Normal");
    506     if (err = glGetError()){
     506    if ((err = glGetError())){
    507507      PRINTFB(G, FB_ShaderMgr, FB_Warnings) "GLERROR: a_Normal: %d\n", err ENDFB(G);
    508508    }
    509509    glBindAttribLocation(I->id, VERTEX_COLOR, "a_Color");
    510     if (err = glGetError()){
     510    if ((err = glGetError())){
    511511      PRINTFB(G, FB_ShaderMgr, FB_Warnings) "GLERROR: a_Color: %d\n", err ENDFB(G);
    512512    }
    513513    CShaderPrg_Link(I);
     
    538538  if (I){
    539539    GLenum err ;
    540540    glBindAttribLocation(I->id, CYLINDER_ORIGIN, "attr_origin");
    541     if (err = glGetError()){
     541    if ((err = glGetError())){
    542542      PRINTFB(G, FB_ShaderMgr, FB_Warnings) "GLERROR: attr_origin: %d\n", err ENDFB(G);
    543543    }
    544544    glBindAttribLocation(I->id, CYLINDER_AXIS, "attr_axis");
    545     if (err = glGetError()){
     545    if ((err = glGetError())){
    546546      PRINTFB(G, FB_ShaderMgr, FB_Warnings) "GLERROR: attr_axis: %d\n", err ENDFB(G);
    547547    }
    548548    glBindAttribLocation(I->id, CYLINDER_COLOR, "attr_color");
    549     if (err = glGetError()){
     549    if ((err = glGetError())){
    550550      PRINTFB(G, FB_ShaderMgr, FB_Warnings) "GLERROR: attr_color: %d\n", err ENDFB(G);
    551551    }
    552552    glBindAttribLocation(I->id, CYLINDER_COLOR2, "attr_color2");
    553     if (err = glGetError()){
     553    if ((err = glGetError())){
    554554      PRINTFB(G, FB_ShaderMgr, FB_Warnings) "GLERROR: attr_color2: %d\n", err ENDFB(G);
    555555    }
    556556    CShaderPrg_Link(I);   
     
    873873    if (indicatorShader){
    874874      GLenum err ;
    875875      glBindAttribLocation(indicatorShader->id, VERTEX_POS, "a_Vertex");
    876       if (err = glGetError()){
     876      if ((err = glGetError())){
    877877        PRINTFB(G, FB_ShaderMgr, FB_Warnings) "GLERROR: a_Vertex: %d\n", err ENDFB(G);
    878878      }
    879879      glBindAttribLocation(indicatorShader->id, VERTEX_COLOR, "a_Color");
    880       if (err = glGetError()){
     880      if ((err = glGetError())){
    881881        PRINTFB(G, FB_ShaderMgr, FB_Warnings) "GLERROR: a_Color: %d\n", err ENDFB(G);
    882882      }
    883883      CShaderPrg_Link(indicatorShader);
  • layer0/Map.c

     
    588588  register int *link = I->Link;
    589589  register int st, flag;
    590590  register int *i_ptr3, *i_ptr4, *i_ptr5;
    591   register int *e_list;
     591  register int *e_list = NULL;
    592592#ifdef _MemoryCache_ON
    593593  register int block_offset = I->block_base + cCache_map_elist_offset;
    594594  register int group_id = I->group_id;
  • layer1/Basis.c

     
    28682868  float ll;
    28692869  CPrimitive *prm;
    28702870  register int i;
    2871   register int *tempRef;
    2872   int n, h, q, x, y, z, j, k, l, e;
     2871  register int *tempRef = NULL;
     2872  int n = 0, h, q, x, y, z, j, k, l, e;
    28732873  int extra_vert = 0;
    28742874  float p[3], dd[3], *d1, *d2, vd[3], cx[3], cy[3];
    2875   float *tempVertex;
     2875  float *tempVertex = NULL;
    28762876  float xs, ys;
    28772877  int remapMode = true;         /* remap mode means that some objects will span more
    28782878                                 * than one voxel, so we have to worry about populating
  • layer1/CGO.c

     
    4747#define CLIP_NORMAL_VALUE(cv)  ((cv>1.f) ? 127 :  (cv < -1.f) ? -128 : pymol_roundf(((cv + 1.f)/2.f) * 255) - 128 )
    4848
    4949#define CHECK_GL_ERROR_OK(printstr)     \
    50   if (err = glGetError()){    \
     50  if ((err = glGetError())){    \
    5151     PRINTFB(I->G, FB_CGO, FB_Errors) printstr, err ENDFB(I->G);           \
    5252  }
    5353
     
    23102310  *num_total_vertices = 0;
    23112311  *num_total_indexes = 0;
    23122312
    2313   while(op = (CGO_MASK & CGO_read_int(pc))) {
     2313  while((op = (CGO_MASK & CGO_read_int(pc)))) {
    23142314    save_pc = pc;
    23152315    err = 0;
    23162316    switch (op) {
     
    43684368    GL_C_INT_TYPE *indexVals = 0;
    43694369    int tot = 4 * 4 * 3 * num_total_cylinders;
    43704370    short copyToLeftOver, copyColorToLeftOver, copyPickColorToLeftOver, copyAlphaToLeftOver, copyToReturnCGO ;
    4371     float *org_originVals;
     4371    float *org_originVals= NULL;
    43724372    float *org_axisVals;
    43734373    float *org_colorVals;
    43744374    float *org_color2Vals = NULL;
     
    71357135  int  texture_id = CGO_get_int(*pc);
    71367136  float worldPos[4], screenMin[3], screenMax[3], textExtent[4];
    71377137  CShaderPrg * shaderPrg;
    7138   int buf1, buf2, attr_worldpos, attr_screenoffset, attr_texcoords;
     7138  int buf1 = 0, buf2 = 0, attr_worldpos, attr_screenoffset, attr_texcoords;
    71397139  copy3f(*pc, worldPos);  worldPos[3] = 1.f;
    71407140  copy3f(*pc+3, screenMin);
    71417141  copy3f(*pc+6, screenMax);
     
    71767176  int  texture_id = CGO_get_int(*pc);
    71777177  float worldPos[4], screenMin[3], screenMax[3], textExtent[4];
    71787178  CShaderPrg * shaderPrg;
    7179   int buf1, buf2, attr_worldpos, attr_screenoffset, attr_texcoords;
     7179  int buf1 = 0, buf2 = 0, attr_worldpos, attr_screenoffset, attr_texcoords;
    71807180  copy3f(*pc, worldPos);  worldPos[3] = 1.f;
    71817181  copy3f(*pc+3, screenMin);
    71827182  copy3f(*pc+6, screenMax);
     
    95649564int CGOChangeShadersTo(CGO *I, int frommode, int tomode){
    95659565  register float *pc = I->op;
    95669566  int op = 0, totops = 0;
    9567   while(op = (CGO_MASK & CGO_read_int(pc))) {
     9567  while((op = (CGO_MASK & CGO_read_int(pc)))) {
    95689568    totops++;
    95699569    switch (op) {
    95709570    case CGO_ENABLE:
  • layer1/Ortho.c

     
    10201020        curLine = I->CurLine & OrthoSaveLines;
    10211021        if(I->PromptChar) {
    10221022          strcpy(buffer, I->Line[curLine]);
    1023           if(PComplete(G, buffer + I->PromptChar, sizeof(OrthoLineType) - I->PromptChar));      /* just print, don't complete */
     1023          PComplete(G, buffer + I->PromptChar, sizeof(OrthoLineType) - I->PromptChar);      /* just print, don't complete */
    10241024        }
    10251025      }
    10261026      break;
     
    14001400
    14011401  {
    14021402    if (!I->bgCGO) {
    1403       CGO *cgo = CGONew(G), *cgo2;
     1403      CGO *cgo = CGONew(G), *cgo2 = NULL;
    14041404      ok &= CGOBegin(cgo, GL_TRIANGLE_STRIP);
    14051405      if (ok)
    14061406        ok &= CGOVertex(cgo, -1.f, -1.f, 0.98f);
  • layer1/P.c

     
    14641464void PUnlockAPIAsGlut(PyMOLGlobals * G)
    14651465{                               /* must call with unblocked interpreter */
    14661466  PRINTFD(G, FB_Threads)
    1467     " PUnlockAPIAsGlut-DEBUG: entered as thread 0x%x\n", PyThread_get_thread_ident()
     1467    " PUnlockAPIAsGlut-DEBUG: entered as thread 0x%lx\n", PyThread_get_thread_ident()
    14681468    ENDFD;
    14691469  PBlock(G);
    14701470  PXDecRef(PyObject_CallFunction(G->P_inst->unlock, "iO", 0, G->P_inst->cmd));  /* NOTE this may flush the command buffer! */
     
    14781478void PUnlockAPIAsGlutNoFlush(PyMOLGlobals * G)
    14791479{                               /* must call with unblocked interpreter */
    14801480  PRINTFD(G, FB_Threads)
    1481     " PUnlockAPIAsGlut-DEBUG: entered as thread 0x%x\n", PyThread_get_thread_ident()
     1481    " PUnlockAPIAsGlut-DEBUG: entered as thread 0x%lx\n", PyThread_get_thread_ident()
    14821482    ENDFD;
    14831483  PBlock(G);
    14841484  PXDecRef(PyObject_CallFunction(G->P_inst->unlock, "iO", -1, G->P_inst->cmd)); /* prevents flushing of the buffer */
     
    15291529int PLockAPIAsGlut(PyMOLGlobals * G, int block_if_busy)
    15301530{
    15311531  PRINTFD(G, FB_Threads)
    1532     "*PLockAPIAsGlut-DEBUG: entered as thread 0x%x\n", PyThread_get_thread_ident()
     1532    "*PLockAPIAsGlut-DEBUG: entered as thread 0x%lx\n", PyThread_get_thread_ident()
    15331533    ENDFD;
    15341534
    15351535  PBlock(G);
     
    15411541  PUnlockStatus(G);
    15421542
    15431543  PRINTFD(G, FB_Threads)
    1544     "#PLockAPIAsGlut-DEBUG: acquiring lock as thread 0x%x\n", PyThread_get_thread_ident()
     1544    "#PLockAPIAsGlut-DEBUG: acquiring lock as thread 0x%lx\n", PyThread_get_thread_ident()
    15451545    ENDFD;
    15461546
    15471547  if(!get_api_lock(G, block_if_busy)) {
     
    15591559       holding the API lock, therefore it is safe even through increment
    15601560       isn't atomic. */
    15611561    PRINTFD(G, FB_Threads)
    1562       "-PLockAPIAsGlut-DEBUG: glut_thread_keep_out 0x%x\n", PyThread_get_thread_ident()
     1562      "-PLockAPIAsGlut-DEBUG: glut_thread_keep_out 0x%lx\n", PyThread_get_thread_ident()
    15631563      ENDFD;
    15641564
    15651565    PXDecRef(PyObject_CallFunction(G->P_inst->unlock, "iO", -1, G->P_inst->cmd));       /* prevent buffer flushing */
     
    26322632      /* don't run if we're currently banned */
    26332633      char *buffer = 0;
    26342634      int size, curSize = 0;
    2635       while(size = OrthoCommandOutSize(G)){
     2635      while((size = OrthoCommandOutSize(G))){
    26362636        if (!curSize){
    26372637          buffer = VLACalloc(char, size);
    26382638          curSize = size;
     
    26762676  int did_work = false;
    26772677  char *buffer = 0;
    26782678  int size, curSize = 0;
    2679   while(size = OrthoCommandOutSize(G)){
     2679  while((size = OrthoCommandOutSize(G))){
    26802680    if (!curSize){
    26812681      buffer = VLACalloc(char, size);
    26822682      curSize = size;
     
    26882688    OrthoCommandNest(G, 1);
    26892689    did_work = true;
    26902690    PRINTFD(G, FB_Threads)
    2691       " PFlushFast-DEBUG: executing '%s' as thread 0x%x\n", buffer,
     2691      " PFlushFast-DEBUG: executing '%s' as thread 0x%lx\n", buffer,
    26922692      PyThread_get_thread_ident()
    26932693      ENDFD;
    26942694    if(PyErr_Occurred()) {
     
    27842784      PXDecRef(PyObject_CallFunction(G->P_inst->unlock_c, "O", G->P_inst->cmd));
    27852785
    27862786      PRINTFD(G, FB_Threads)
    2787         " PAutoBlock-DEBUG: blocked 0x%x (0x%x, 0x%x, 0x%x)\n",
     2787        " PAutoBlock-DEBUG: blocked 0x%lx (0x%x, 0x%x, 0x%x)\n",
    27882788        PyThread_get_thread_ident(), SavedThread[MAX_SAVED_THREAD - 1].id,
    27892789        SavedThread[MAX_SAVED_THREAD - 2].id, SavedThread[MAX_SAVED_THREAD - 3].id ENDFD;
    27902790
     
    27932793    a--;
    27942794  }
    27952795  PRINTFD(G, FB_Threads)
    2796     " PAutoBlock-DEBUG: 0x%x not found, thus already blocked.\n",
     2796    " PAutoBlock-DEBUG: 0x%lx not found, thus already blocked.\n",
    27972797    PyThread_get_thread_ident()
    27982798    ENDFD;
    27992799  return 0;
     
    28142814  SavedThreadRec *SavedThread = G->P_inst->savedThread;
    28152815  /* NOTE: ASSUMES a locked API */
    28162816  PRINTFD(G, FB_Threads)
    2817     " PUnblock-DEBUG: entered as thread 0x%x\n", PyThread_get_thread_ident()
     2817    " PUnblock-DEBUG: entered as thread 0x%lx\n", PyThread_get_thread_ident()
    28182818    ENDFD;
    28192819
    28202820  /* reserve a space while we have a lock */
  • layer1/Extrude.c

     
    687687  float *v;
    688688  float *n;
    689689  float *c;
    690   float *sv, *sn, *tv, *tn, *tv1, *tn1, *TV, *TN;
     690  float *sv, *sn, *tv, *tn, *tv1, *tn1, *TV, *TN = NULL;
    691691  float v0[3];
    692692  int start, stop;
    693693  int ok = true;
     
    13871387  float *v;
    13881388  float *n;
    13891389  float *c;
    1390   float *sv, *sn, *tv, *tn, *tv1, *tn1, *TV, *TN;
     1390  float *sv, *sn, *tv, *tn, *tv1, *tn1, *TV, *TN = NULL;
    13911391  float v0[3];
    13921392  int ok = true;
    13931393
     
    17051705  float *v;
    17061706  float *n;
    17071707  float *c;
    1708   float *sv, *sn, *tv, *tn, *tv1, *tn1, *TV, *TN;
     1708  float *sv, *sn, *tv, *tn, *tv1, *tn1, *TV, *TN = NULL;
    17091709  float v0[3], n0[3], s0[3], z[3] = { 1.0, 0.0, 1.0 };
    17101710  int subN;
    17111711  int ok = true;
  • layer1/Scene.c

     
    76237623      /* update all gadgets first (single-threaded since they're thread-unsafe) */
    76247624      rec = NULL;
    76257625      while(ListIterate(I->Obj, rec, next)) {
    7626         if((rec->obj->type == cObjectGadget)) {
     7626        if(rec->obj->type == cObjectGadget) {
    76277627          if(rec->obj->fUpdate)
    76287628            rec->obj->fUpdate(rec->obj);
    76297629        }
  • layer1/Control.c

     
    637637      but_bottom = y - (cControlBoxSize - 1);
    638638      but_height = cControlBoxSize;
    639639
    640       if((but_num == I->Active)) {
     640      if(but_num == I->Active) {
    641641        draw_button(but_left, but_bottom,
    642642                    but_width, but_height, lightEdge, darkEdge, pushed ORTHOCGOARGVAR);
    643643      } else if(((but_num == 6) && (SettingGetGlobal_b(G, cSetting_seq_view))) ||
  • layer2/RepSphere.c

     
    22042204  int c = I->N;
    22052205  SphereRec *sp = I->SP;
    22062206  float alpha;
    2207   int n_quad_verts;
    2208   float radius;
     2207  int n_quad_verts = 0;
     2208  float radius = 0.0;
    22092209  int ok = true;
    22102210  short use_shader = SettingGetGlobal_b(G, cSetting_sphere_use_shader) &
    22112211                     SettingGetGlobal_b(G, cSetting_use_shaders);
  • layer2/ObjectMolecule2.c

     
    36783678#else
    36793679  int ok = true;
    36803680  ObjectMolecule *I = NULL;
    3681   int discrete_flag;
     3681  int discrete_flag = 0;
    36823682  int ll;
    36833683  (*result) = NULL;
    36843684
     
    43054305  register int a, b;
    43064306  CoordSet *cs, **dcs;
    43074307  AtomInfoType *atInfo;
    4308   int *dAtmToIdx;
     4308  int *dAtmToIdx = NULL;
    43094309  int ok = true;
    43104310  if(!I->DiscreteFlag) {        /* currently, discrete objects are never sorted */
    43114311    int n_bytes = sizeof(int) * I->NAtom;
  • layer2/RepDot.c

     
    192192              ok &= CGOColorv(cgo, v);
    193193              v += 3;
    194194            }
    195            /*      if(normals)  /* NORMALS do not get set for points
     195           /*      if(normals)  NORMALS do not get set for points
    196196                   CGONormalv(cgo, v);*/
    197197            v += 3;
    198198            if (ok)
     
    210210            I->shaderCGO = CGOOptimizeSpheresToVBONonIndexed(cgo, CGO_BOUNDING_BOX_SZ + CGO_DRAW_SPHERE_BUFFERS_SZ);
    211211            CHECKOK(ok, I->shaderCGO);
    212212          } else {
    213             CGO *convertcgo = CGOCombineBeginEnd(cgo, 0), *tmpCGO;
     213            CGO *convertcgo = CGOCombineBeginEnd(cgo, 0), *tmpCGO = NULL;
    214214            CHECKOK(ok, convertcgo);
    215215            if (ok)
    216216              tmpCGO = CGOOptimizeToVBONotIndexed(convertcgo, CGO_BOUNDING_BOX_SZ + I->N * 3 + 7);
     
    344344  float *countPtr = NULL;
    345345  int colorCnt, lastColor;
    346346  Vector3f v1;
    347   MapType *map;
     347  MapType *map = NULL;
    348348  SphereRec *sp = G->Sphere->Sphere[0];
    349349  int ds;
    350350  float max_vdw = MAX_VDW;
  • layer2/RepSurface.c

     
    33043304            if (ok)
    33053305              convertcgo->use_shader = true;
    33063306          } else if (I->Type == 2) {
    3307             CGO *convertcgo2, *simple;
     3307            CGO *convertcgo2, *simple = NULL;
    33083308            convertcgo2 = CGOConvertLinesToShaderCylinders(I->shaderCGO, 0);
    33093309            CHECKOK(ok, convertcgo2);
    33103310            if (ok)
     
    45034503        }
    45044504        ok &= !G->Interrupt;
    45054505        if(ok) {
    4506           MapType *map, *solv_map;
     4506          MapType *map, *solv_map = NULL;
    45074507          map = MapNewFlagged(G, I->maxVdw + probe_rad_more,
    45084508                              I->coord, VLAGetSize(I->coord) / 3, NULL, NULL);
    45094509          CHECKOK(ok, map);
     
    57475747                SurfaceJobAtomInfo *j_atom_info = atom_info + j;
    57485748                if(j > a)       /* only check if this is atom trails */
    57495749                  if((!present) || present[j]) {
    5750                     if((j_atom_info->vdw == a_atom_info->vdw)) {        /* handle singularities */
     5750                    if(j_atom_info->vdw == a_atom_info->vdw) {        /* handle singularities */
    57515751                      float *v1 = coord + 3 * j;
    57525752                      if((v0[0] == v1[0]) && (v0[1] == v1[1]) && (v0[2] == v1[2]))
    57535753                        skip_flag = true;
     
    58425842                  SurfaceJobAtomInfo *j_atom_info = atom_info + j;
    58435843                  if(j > a)     /* only check if this is atom trails */
    58445844                    if((!present) || present[j]) {
    5845                       if((j_atom_info->vdw == a_atom_info->vdw)) {      /* handle singularities */
     5845                      if(j_atom_info->vdw == a_atom_info->vdw) {      /* handle singularities */
    58465846                        float *v2 = coord + 3 * j;
    58475847                        if((v0[0] == v2[0]) && (v0[1] == v2[1]) && (v0[2] == v2[2]))
    58485848                          skip_flag = true;
     
    60026002                  SurfaceJobAtomInfo *j_atom_info = atom_info + j;
    60036003                  if(j > a)       /* only check if this is atom trails */
    60046004                    if((!present) || present[j]) {
    6005                       if((j_atom_info->vdw == a_atom_info->vdw)) {        /* handle singularities */
     6005                      if(j_atom_info->vdw == a_atom_info->vdw) {        /* handle singularities */
    60066006                        float *v1 = coord + 3 * j;
    60076007                        if((v0[0] == v1[0]) && (v0[1] == v1[1]) && (v0[2] == v1[2]))
    60086008                          skip_flag = true;
  • layer2/RepCartoon.c

     
    26152615
    26162616#ifdef _PYMOL_CGO_DRAWARRAYS
    26172617        int nverts = nAt * 4, pl = 0;
    2618         float *vertexVals, *tmp_ptr;
     2618        float *vertexVals = NULL, *tmp_ptr;
    26192619        if (ok)
    26202620          vertexVals = CGODrawArrays(cgo, GL_LINES, CGO_VERTEX_ARRAY, nverts);     
    26212621        CHECKOK(ok, vertexVals);
  • layer2/ObjectMolecule.c

     
    14481448  int NPHIH, MPHIA, NHPARM, NPARM, NNB, NRES;
    14491449  int NBONA, NTHETA, NPHIA, NUMBND, NUMANG, NPTRA;
    14501450  int NATYP, NPHB, IFPERT, NBPER, NGPER, NDPER;
    1451   int MBPER, MGPER, MDPER, IFBOX, NMXRS, IFCAP;
     1451  int MBPER, MGPER, MDPER, IFBOX = 0, NMXRS, IFCAP;
    14521452  int NEXTRA, IPOL = 0;
    14531453  int wid, col;
    14541454  float BETA;
     
    20762076
    20772077    if(IFBOX > 0) {
    20782078
    2079       int IPTRES, NSPM, NSPSOL;
     2079      int IPTRES, NSPM = 0, NSPSOL;
    20802080
    20812081      if(amber7) {
    20822082        p = findflag(G, buffer, "SOLVENT_POINTERS", "3I8");
     
    44314431  AtomInfoType *ai;
    44324432  int n, nn;
    44334433  float v[3], v0[3], d;
    4434   CoordSet *cs;
     4434  CoordSet *cs = NULL;
    44354435  int ok = true;
    44364436
    44374437  ok &= ObjectMoleculeUpdateNeighbors(I);
     
    97679767                        CoordSet * cs, int bondSearchFlag, int aic_mask, int invalidate)
    97689768{
    97699769  PyMOLGlobals *G = I->Obj.G;
    9770   int *index, *outdex, *a2i, *i2a;
     9770  int *index, *outdex, *a2i, *i2a = NULL;
    97719771  BondType *bond = NULL;
    97729772  register int a, b, lb = 0, ac;
    97739773  int c, nb, a1, a2;
     
    1055110551                rms = MatrixFitRMSTTTf(G, op->nvv1, op->vv1, vt, NULL, op->ttt);
    1055210552              else
    1055310553                rms = MatrixGetRMS(G, op->nvv1, op->vv1, vt, NULL);
    10554               if((op->i1 == 2)) {
     10554              if(op->i1 == 2) {
    1055510555                ObjectMoleculeTransformTTTf(I, op->ttt, b);
    1055610556
    1055710557                if(op->i3) {
  • layer3/Selector.c

     
    86588658    for(a = cNDummyAtoms; a < I->NAtom; a++) {
    86598659      b = i_obj[i_table[a].model]->AtomInfo[i_table[a].atom].protons;
    86608660      base[0].sele[a] = (
    8661           b >  2 && b <  5 ||
    8662           b > 10 && b < 14 ||
    8663           b > 18 && b < 32 ||
    8664           b > 36 && b < 51 ||
    8665           b > 54 && b < 85 ||
     8661          (b >  2 && b <  5) ||
     8662          (b > 10 && b < 14) ||
     8663          (b > 18 && b < 32) ||
     8664          (b > 36 && b < 51) ||
     8665          (b > 54 && b < 85) ||
    86668666          b > 86);
    86678667    }
    86688668    break;
  • layer3/Executive.c

     
    1592815928                          ExecutiveSpecSetVisibility(G, rec, true, mod, false);
    1592915929                          I->LastChanged = rec;
    1593015930                        }
    15931                         if((mod == (cOrthoSHIFT | cOrthoCTRL))) {
     15931                        if(mod == (cOrthoSHIFT | cOrthoCTRL)) {
    1593215932                          if(rec != I->LastZoomed)
    1593315933                            ExecutiveWindowZoom(G, rec->name, 0.0F, -1, false, -1.0F,
    1593415934                                                true);
  • layer3/PlugIOManager.c

     
    229229                      ENDFB(G);
    230230                  }
    231231
    232                   if(stop > 0 && cnt >= stop || max > 0 && ncnt >= max) {
     232                  if((stop > 0 && cnt >= stop) || (max > 0 && ncnt >= max)) {
    233233                    cs = NULL;
    234234                    break;
    235235                  }
  • layer4/Cmd.c

     
    128128static void APIEnter(PyMOLGlobals * G)
    129129{                               /* assumes API is locked */
    130130  PRINTFD(G, FB_API)
    131     " APIEnter-DEBUG: as thread 0x%x.\n", PyThread_get_thread_ident()
     131    " APIEnter-DEBUG: as thread 0x%lx.\n", PyThread_get_thread_ident()
    132132    ENDFD;
    133133
    134134  if(G->Terminating) {          /* try to bail */
     
    163163{                               /* assumes API is locked */
    164164
    165165  PRINTFD(G, FB_API)
    166     " APIEnterBlocked-DEBUG: as thread 0x%x.\n", PyThread_get_thread_ident()
     166    " APIEnterBlocked-DEBUG: as thread 0x%lx.\n", PyThread_get_thread_ident()
    167167    ENDFD;
    168168
    169169  if(G->Terminating) {          /* try to bail */
     
    199199  if(!PIsGlutThread())
    200200    G->P_inst->glut_thread_keep_out--;
    201201  PRINTFD(G, FB_API)
    202     " APIExit-DEBUG: as thread 0x%x.\n", PyThread_get_thread_ident()
     202    " APIExit-DEBUG: as thread 0x%lx.\n", PyThread_get_thread_ident()
    203203    ENDFD;
    204204}
    205205
     
    209209  if(!PIsGlutThread())
    210210    G->P_inst->glut_thread_keep_out--;
    211211  PRINTFD(G, FB_API)
    212     " APIExitBlocked-DEBUG: as thread 0x%x.\n", PyThread_get_thread_ident()
     212    " APIExitBlocked-DEBUG: as thread 0x%lx.\n", PyThread_get_thread_ident()
    213213    ENDFD;
    214214}
    215215
     
    18531853static PyObject *CmdGetRenderer(PyObject * self, PyObject * args)
    18541854{
    18551855  PyMOLGlobals *G = NULL;
    1856   char *vendor, *renderer, *version;
     1856  char *vendor = NULL, *renderer = NULL, *version = NULL;
    18571857  int ok = false;
    18581858  ok = PyArg_ParseTuple(args, "O", &self);
    18591859  if(ok) {
  • contrib/uiuc/plugins/molfile_plugin/src/pbeqplugin.cpp

     
    259259        int addr = z*nclx*ncly + y*nclx + x;
    260260        if (fread(datablock + addr, 4, 1, fd) != 1) {
    261261          printf("pbeqplugin) Error reading potential map cell: %d,%d,%d\n", x, y, z);
    262           printf("pbeqplugin) offset: %d\n", ftell(fd));
     262          printf("pbeqplugin) offset: %ld\n", ftell(fd));
    263263          return MOLFILE_ERROR;
    264264        }
    265265        count++;
  • contrib/uiuc/plugins/molfile_plugin/src/dtrplugin.cpp

     
    484484        /* constant frame size */
    485485        if (keys[i].size() != m_framesize) {
    486486            fprintf(stderr, "non-constant framesize at frame %ld\n", i);
    487             printf("size %d framesize %d\n\n",
     487            printf("size %lld framesize %lld\n\n",
    488488                    keys[i].size(), m_framesize);
    489489            return true;
    490490        }
     
    12981298  }
    12991299  Blob pos=blobs["POSITION"];
    13001300  if (pos.count != 3*natoms) {
    1301     fprintf(stderr, "ERROR, Expected %d elements in POSITION; got %ld\n",
     1301    fprintf(stderr, "ERROR, Expected %d elements in POSITION; got %lld\n",
    13021302        3*natoms, pos.count);
    13031303    return MOLFILE_ERROR;
    13041304  }
     
    13071307  if (with_velocity && ts->velocities && blobs.find("VELOCITY")!=blobs.end()) {
    13081308    Blob vel=blobs["VELOCITY"];
    13091309    if (vel.count != 3*natoms) {
    1310       fprintf(stderr, "ERROR, Expected %d elements in VELOCITY; got %ld\n",
     1310      fprintf(stderr, "ERROR, Expected %d elements in VELOCITY; got %lld\n",
    13111311          3*natoms, vel.count);
    13121312      return MOLFILE_ERROR;
    13131313    }
     
    15691569  // if required, get velocities
    15701570  if (ts->velocities && velblob.count > 0) {
    15711571    if (velblob.count != 3*natoms) {
    1572       fprintf(stderr, "VELOCITY field has %ld values; expected %d\n",
     1572      fprintf(stderr, "VELOCITY field has %lld values; expected %d\n",
    15731573          velblob.count, 3*natoms);
    15741574      return MOLFILE_ERROR;
    15751575    }
  • contrib/uiuc/plugins/molfile_plugin/src/moldenplugin.c

     
    9999                              const char *filetype,
    100100                              int *natoms) {
    101101  FILE *fd;
    102   qmdata_t *data;
     102  qmdata_t *data = NULL;
    103103  moldendata_t *moldendata;
    104104  char buffer[1024];
    105105  char keystring[20];
  • contrib/uiuc/plugins/molfile_plugin/src/vtfplugin.c

     
    231231    switch (tolower(keyword[0])) {
    232232    case 'n': {
    233233      /* name */
    234       if (sscanf(s, "%16s %n", &atom.name, &n) < 1) {
     234      if (sscanf(s, "%16s %n", (char *) &atom.name, &n) < 1) {
    235235        vtf_error("could not get name in atom record", line);
    236236        return MOLFILE_ERROR;
    237237      }
     
    240240    }
    241241    case 't': {
    242242      /* type */
    243       if (sscanf(s, "%16s %n", &atom.type, &n) < 1) {
     243      if (sscanf(s, "%16s %n", (char *) &atom.type, &n) < 1) {
    244244        vtf_error("could not get type in atom record", line);
    245245        return MOLFILE_ERROR;
    246246      }
     
    266266      } else if (strcmp(keyword, "res") == 0 ||
    267267                 strcmp(keyword, "resname") == 0) {
    268268        /* resname */
    269         if (sscanf(s, "%8s %n", &atom.resname, &n) < 1) {
     269        if (sscanf(s, "%8s %n", (char *) &atom.resname, &n) < 1) {
    270270          vtf_error("could not get resname in atom record", line);
    271271          return MOLFILE_ERROR;
    272272        }
     
    281281    }
    282282    case 's': {
    283283      /* segid */
    284       if (sscanf(s, "%8s %n", &atom.segid, &n) < 1) {
     284      if (sscanf(s, "%8s %n", (char *) &atom.segid, &n) < 1) {
    285285        vtf_error("could not get segid in atom record", line);
    286286        return MOLFILE_ERROR;
    287287      }
     
    290290    }
    291291    case 'i': {
    292292      /* insertion */
    293       if (sscanf(s, "%2s %n", &atom.insertion, &n) < 1) {
     293      if (sscanf(s, "%2s %n", (char *) &atom.insertion, &n) < 1) {
    294294        vtf_error("could not get insertion in atom record", line);
    295295        return MOLFILE_ERROR;
    296296      }
     
    302302      /* chain, charge */
    303303      if (strlen(keyword) == 1 ||
    304304          strcmp(keyword, "chain") == 0) {
    305         if (sscanf(s, "%2s %n", &atom.chain, &n) < 1) {
     305        if (sscanf(s, "%2s %n", (char *) &atom.chain, &n) < 1) {
    306306          vtf_error("could not get chain in atom record", line);
    307307          return MOLFILE_ERROR;
    308308        }
     
    336336        }
    337337        d->optflags |= MOLFILE_ATOMICNUMBER;
    338338      } else if (strcmp(keyword, "altloc")) {
    339         if (sscanf(s, "%2s %n", &atom.altloc, &n) < 1) {
     339        if (sscanf(s, "%2s %n", (char *) &atom.altloc, &n) < 1) {
    340340          vtf_error("could not get altloc in atom record", line);
    341341          return MOLFILE_ERROR;
    342342        }
  • contrib/uiuc/plugins/molfile_plugin/src/gamessplugin.c

     
    375375                  const char *filetype, int *natoms) {
    376376
    377377  FILE *fd;
    378   qmdata_t *data;
     378  qmdata_t *data = NULL;
    379379  gmsdata *gms;
    380380
    381381  /* open the input file */
  • contrib/uiuc/plugins/molfile_plugin/src/maeffplugin.cpp

     
    19831983      }
    19841984    }
    19851985    catch (std::exception &e) {
    1986       fprintf(stderr, e.what());
     1986      fprintf(stderr, "%s", e.what());
    19871987      return MOLFILE_ERROR;
    19881988    }
    19891989    return MOLFILE_SUCCESS;
  • contrib/uiuc/plugins/molfile_plugin/src/graspplugin.cpp

     
    104104
    105105  ///ojo aqui le quite el  !
    106106  if ((grassp->flag)!=POTENTIALS) {
    107     if (index >=0 && index <= 4)
     107    if (index <= 4)
    108108      printf("graspplugin) No data available for '%s' option\n", name[index]);
    109109    else
    110110      printf("graspplugin) out of range property, flag: %d index: %d\n", grassp->flag, index);
  • modules/cealign/src/tnt/tnt_fortran_array1d.h

     
    221221#ifdef TNT_DEBUG
    222222                std::cout << "entered subarray. \n";
    223223#endif
    224         if ((i0 > 0) && (i1 < n_) || (i0 <= i1))
     224        if (((i0 > 0) && (i1 < n_)) || (i0 <= i1))
    225225        {
    226226                Fortran_Array1D<T> X(*this);  /* create a new instance of this array. */
    227227                X.n_ = i1-i0+1;
  • modules/cealign/src/tnt/tnt_array1d.h

     
    258258template <class T>
    259259inline Array1D<T> Array1D<T>::subarray(int i0, int i1)
    260260{
    261         if ((i0 >= 0) && (i1 < n_) || (i0 <= i1))
     261        if (((i0 >= 0) && (i1 < n_)) || (i0 <= i1))
    262262        {
    263263                Array1D<T> X(*this);  /* create a new instance of this array. */
    264264                X.n_ = i1-i0+1;