Ticket #43824: pymol-clang.diff
File pymol-clang.diff, 30.4 KB (added by howarth.at.macports@…, 10 years ago) |
---|
-
layer0/ShaderMgr.c
151 151 while (replaceStrings[i]){ 152 152 slen = strlen(replaceStrings[i]); 153 153 rlen = strlen(replaceStrings[i+1]); 154 while( rstr=strstr(dest_line, replaceStrings[i])){154 while((rstr=strstr(dest_line, replaceStrings[i]))){ 155 155 strcpy(tmp_line, rstr + slen); 156 156 strcpy(rstr, replaceStrings[i+1]); 157 157 strcpy(rstr+rlen, tmp_line); … … 499 499 if (I){ 500 500 GLenum err ; 501 501 glBindAttribLocation(I->id, VERTEX_POS, "a_Vertex"); 502 if ( err = glGetError()){502 if ((err = glGetError())){ 503 503 PRINTFB(G, FB_ShaderMgr, FB_Warnings) "GLERROR: a_Vertex: %d\n", err ENDFB(G); 504 504 } 505 505 glBindAttribLocation(I->id, VERTEX_NORMAL, "a_Normal"); 506 if ( err = glGetError()){506 if ((err = glGetError())){ 507 507 PRINTFB(G, FB_ShaderMgr, FB_Warnings) "GLERROR: a_Normal: %d\n", err ENDFB(G); 508 508 } 509 509 glBindAttribLocation(I->id, VERTEX_COLOR, "a_Color"); 510 if ( err = glGetError()){510 if ((err = glGetError())){ 511 511 PRINTFB(G, FB_ShaderMgr, FB_Warnings) "GLERROR: a_Color: %d\n", err ENDFB(G); 512 512 } 513 513 CShaderPrg_Link(I); … … 538 538 if (I){ 539 539 GLenum err ; 540 540 glBindAttribLocation(I->id, CYLINDER_ORIGIN, "attr_origin"); 541 if ( err = glGetError()){541 if ((err = glGetError())){ 542 542 PRINTFB(G, FB_ShaderMgr, FB_Warnings) "GLERROR: attr_origin: %d\n", err ENDFB(G); 543 543 } 544 544 glBindAttribLocation(I->id, CYLINDER_AXIS, "attr_axis"); 545 if ( err = glGetError()){545 if ((err = glGetError())){ 546 546 PRINTFB(G, FB_ShaderMgr, FB_Warnings) "GLERROR: attr_axis: %d\n", err ENDFB(G); 547 547 } 548 548 glBindAttribLocation(I->id, CYLINDER_COLOR, "attr_color"); 549 if ( err = glGetError()){549 if ((err = glGetError())){ 550 550 PRINTFB(G, FB_ShaderMgr, FB_Warnings) "GLERROR: attr_color: %d\n", err ENDFB(G); 551 551 } 552 552 glBindAttribLocation(I->id, CYLINDER_COLOR2, "attr_color2"); 553 if ( err = glGetError()){553 if ((err = glGetError())){ 554 554 PRINTFB(G, FB_ShaderMgr, FB_Warnings) "GLERROR: attr_color2: %d\n", err ENDFB(G); 555 555 } 556 556 CShaderPrg_Link(I); … … 873 873 if (indicatorShader){ 874 874 GLenum err ; 875 875 glBindAttribLocation(indicatorShader->id, VERTEX_POS, "a_Vertex"); 876 if ( err = glGetError()){876 if ((err = glGetError())){ 877 877 PRINTFB(G, FB_ShaderMgr, FB_Warnings) "GLERROR: a_Vertex: %d\n", err ENDFB(G); 878 878 } 879 879 glBindAttribLocation(indicatorShader->id, VERTEX_COLOR, "a_Color"); 880 if ( err = glGetError()){880 if ((err = glGetError())){ 881 881 PRINTFB(G, FB_ShaderMgr, FB_Warnings) "GLERROR: a_Color: %d\n", err ENDFB(G); 882 882 } 883 883 CShaderPrg_Link(indicatorShader); -
layer0/Map.c
588 588 register int *link = I->Link; 589 589 register int st, flag; 590 590 register int *i_ptr3, *i_ptr4, *i_ptr5; 591 register int *e_list ;591 register int *e_list = NULL; 592 592 #ifdef _MemoryCache_ON 593 593 register int block_offset = I->block_base + cCache_map_elist_offset; 594 594 register int group_id = I->group_id; -
layer1/Basis.c
2868 2868 float ll; 2869 2869 CPrimitive *prm; 2870 2870 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; 2873 2873 int extra_vert = 0; 2874 2874 float p[3], dd[3], *d1, *d2, vd[3], cx[3], cy[3]; 2875 float *tempVertex ;2875 float *tempVertex = NULL; 2876 2876 float xs, ys; 2877 2877 int remapMode = true; /* remap mode means that some objects will span more 2878 2878 * than one voxel, so we have to worry about populating -
layer1/CGO.c
47 47 #define CLIP_NORMAL_VALUE(cv) ((cv>1.f) ? 127 : (cv < -1.f) ? -128 : pymol_roundf(((cv + 1.f)/2.f) * 255) - 128 ) 48 48 49 49 #define CHECK_GL_ERROR_OK(printstr) \ 50 if ( err = glGetError()){ \50 if ((err = glGetError())){ \ 51 51 PRINTFB(I->G, FB_CGO, FB_Errors) printstr, err ENDFB(I->G); \ 52 52 } 53 53 … … 2310 2310 *num_total_vertices = 0; 2311 2311 *num_total_indexes = 0; 2312 2312 2313 while( op = (CGO_MASK & CGO_read_int(pc))) {2313 while((op = (CGO_MASK & CGO_read_int(pc)))) { 2314 2314 save_pc = pc; 2315 2315 err = 0; 2316 2316 switch (op) { … … 4368 4368 GL_C_INT_TYPE *indexVals = 0; 4369 4369 int tot = 4 * 4 * 3 * num_total_cylinders; 4370 4370 short copyToLeftOver, copyColorToLeftOver, copyPickColorToLeftOver, copyAlphaToLeftOver, copyToReturnCGO ; 4371 float *org_originVals ;4371 float *org_originVals= NULL; 4372 4372 float *org_axisVals; 4373 4373 float *org_colorVals; 4374 4374 float *org_color2Vals = NULL; … … 7135 7135 int texture_id = CGO_get_int(*pc); 7136 7136 float worldPos[4], screenMin[3], screenMax[3], textExtent[4]; 7137 7137 CShaderPrg * shaderPrg; 7138 int buf1 , buf2, attr_worldpos, attr_screenoffset, attr_texcoords;7138 int buf1 = 0, buf2 = 0, attr_worldpos, attr_screenoffset, attr_texcoords; 7139 7139 copy3f(*pc, worldPos); worldPos[3] = 1.f; 7140 7140 copy3f(*pc+3, screenMin); 7141 7141 copy3f(*pc+6, screenMax); … … 7176 7176 int texture_id = CGO_get_int(*pc); 7177 7177 float worldPos[4], screenMin[3], screenMax[3], textExtent[4]; 7178 7178 CShaderPrg * shaderPrg; 7179 int buf1 , buf2, attr_worldpos, attr_screenoffset, attr_texcoords;7179 int buf1 = 0, buf2 = 0, attr_worldpos, attr_screenoffset, attr_texcoords; 7180 7180 copy3f(*pc, worldPos); worldPos[3] = 1.f; 7181 7181 copy3f(*pc+3, screenMin); 7182 7182 copy3f(*pc+6, screenMax); … … 9564 9564 int CGOChangeShadersTo(CGO *I, int frommode, int tomode){ 9565 9565 register float *pc = I->op; 9566 9566 int op = 0, totops = 0; 9567 while( op = (CGO_MASK & CGO_read_int(pc))) {9567 while((op = (CGO_MASK & CGO_read_int(pc)))) { 9568 9568 totops++; 9569 9569 switch (op) { 9570 9570 case CGO_ENABLE: -
layer1/Ortho.c
1020 1020 curLine = I->CurLine & OrthoSaveLines; 1021 1021 if(I->PromptChar) { 1022 1022 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 */ 1024 1024 } 1025 1025 } 1026 1026 break; … … 1400 1400 1401 1401 { 1402 1402 if (!I->bgCGO) { 1403 CGO *cgo = CGONew(G), *cgo2 ;1403 CGO *cgo = CGONew(G), *cgo2 = NULL; 1404 1404 ok &= CGOBegin(cgo, GL_TRIANGLE_STRIP); 1405 1405 if (ok) 1406 1406 ok &= CGOVertex(cgo, -1.f, -1.f, 0.98f); -
layer1/P.c
1464 1464 void PUnlockAPIAsGlut(PyMOLGlobals * G) 1465 1465 { /* must call with unblocked interpreter */ 1466 1466 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() 1468 1468 ENDFD; 1469 1469 PBlock(G); 1470 1470 PXDecRef(PyObject_CallFunction(G->P_inst->unlock, "iO", 0, G->P_inst->cmd)); /* NOTE this may flush the command buffer! */ … … 1478 1478 void PUnlockAPIAsGlutNoFlush(PyMOLGlobals * G) 1479 1479 { /* must call with unblocked interpreter */ 1480 1480 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() 1482 1482 ENDFD; 1483 1483 PBlock(G); 1484 1484 PXDecRef(PyObject_CallFunction(G->P_inst->unlock, "iO", -1, G->P_inst->cmd)); /* prevents flushing of the buffer */ … … 1529 1529 int PLockAPIAsGlut(PyMOLGlobals * G, int block_if_busy) 1530 1530 { 1531 1531 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() 1533 1533 ENDFD; 1534 1534 1535 1535 PBlock(G); … … 1541 1541 PUnlockStatus(G); 1542 1542 1543 1543 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() 1545 1545 ENDFD; 1546 1546 1547 1547 if(!get_api_lock(G, block_if_busy)) { … … 1559 1559 holding the API lock, therefore it is safe even through increment 1560 1560 isn't atomic. */ 1561 1561 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() 1563 1563 ENDFD; 1564 1564 1565 1565 PXDecRef(PyObject_CallFunction(G->P_inst->unlock, "iO", -1, G->P_inst->cmd)); /* prevent buffer flushing */ … … 2632 2632 /* don't run if we're currently banned */ 2633 2633 char *buffer = 0; 2634 2634 int size, curSize = 0; 2635 while( size = OrthoCommandOutSize(G)){2635 while((size = OrthoCommandOutSize(G))){ 2636 2636 if (!curSize){ 2637 2637 buffer = VLACalloc(char, size); 2638 2638 curSize = size; … … 2676 2676 int did_work = false; 2677 2677 char *buffer = 0; 2678 2678 int size, curSize = 0; 2679 while( size = OrthoCommandOutSize(G)){2679 while((size = OrthoCommandOutSize(G))){ 2680 2680 if (!curSize){ 2681 2681 buffer = VLACalloc(char, size); 2682 2682 curSize = size; … … 2688 2688 OrthoCommandNest(G, 1); 2689 2689 did_work = true; 2690 2690 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, 2692 2692 PyThread_get_thread_ident() 2693 2693 ENDFD; 2694 2694 if(PyErr_Occurred()) { … … 2784 2784 PXDecRef(PyObject_CallFunction(G->P_inst->unlock_c, "O", G->P_inst->cmd)); 2785 2785 2786 2786 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", 2788 2788 PyThread_get_thread_ident(), SavedThread[MAX_SAVED_THREAD - 1].id, 2789 2789 SavedThread[MAX_SAVED_THREAD - 2].id, SavedThread[MAX_SAVED_THREAD - 3].id ENDFD; 2790 2790 … … 2793 2793 a--; 2794 2794 } 2795 2795 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", 2797 2797 PyThread_get_thread_ident() 2798 2798 ENDFD; 2799 2799 return 0; … … 2814 2814 SavedThreadRec *SavedThread = G->P_inst->savedThread; 2815 2815 /* NOTE: ASSUMES a locked API */ 2816 2816 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() 2818 2818 ENDFD; 2819 2819 2820 2820 /* reserve a space while we have a lock */ -
layer1/Extrude.c
687 687 float *v; 688 688 float *n; 689 689 float *c; 690 float *sv, *sn, *tv, *tn, *tv1, *tn1, *TV, *TN ;690 float *sv, *sn, *tv, *tn, *tv1, *tn1, *TV, *TN = NULL; 691 691 float v0[3]; 692 692 int start, stop; 693 693 int ok = true; … … 1387 1387 float *v; 1388 1388 float *n; 1389 1389 float *c; 1390 float *sv, *sn, *tv, *tn, *tv1, *tn1, *TV, *TN ;1390 float *sv, *sn, *tv, *tn, *tv1, *tn1, *TV, *TN = NULL; 1391 1391 float v0[3]; 1392 1392 int ok = true; 1393 1393 … … 1705 1705 float *v; 1706 1706 float *n; 1707 1707 float *c; 1708 float *sv, *sn, *tv, *tn, *tv1, *tn1, *TV, *TN ;1708 float *sv, *sn, *tv, *tn, *tv1, *tn1, *TV, *TN = NULL; 1709 1709 float v0[3], n0[3], s0[3], z[3] = { 1.0, 0.0, 1.0 }; 1710 1710 int subN; 1711 1711 int ok = true; -
layer1/Scene.c
7623 7623 /* update all gadgets first (single-threaded since they're thread-unsafe) */ 7624 7624 rec = NULL; 7625 7625 while(ListIterate(I->Obj, rec, next)) { 7626 if( (rec->obj->type == cObjectGadget)) {7626 if(rec->obj->type == cObjectGadget) { 7627 7627 if(rec->obj->fUpdate) 7628 7628 rec->obj->fUpdate(rec->obj); 7629 7629 } -
layer1/Control.c
637 637 but_bottom = y - (cControlBoxSize - 1); 638 638 but_height = cControlBoxSize; 639 639 640 if( (but_num == I->Active)) {640 if(but_num == I->Active) { 641 641 draw_button(but_left, but_bottom, 642 642 but_width, but_height, lightEdge, darkEdge, pushed ORTHOCGOARGVAR); 643 643 } else if(((but_num == 6) && (SettingGetGlobal_b(G, cSetting_seq_view))) || -
layer2/RepSphere.c
2204 2204 int c = I->N; 2205 2205 SphereRec *sp = I->SP; 2206 2206 float alpha; 2207 int n_quad_verts ;2208 float radius ;2207 int n_quad_verts = 0; 2208 float radius = 0.0; 2209 2209 int ok = true; 2210 2210 short use_shader = SettingGetGlobal_b(G, cSetting_sphere_use_shader) & 2211 2211 SettingGetGlobal_b(G, cSetting_use_shaders); -
layer2/ObjectMolecule2.c
3678 3678 #else 3679 3679 int ok = true; 3680 3680 ObjectMolecule *I = NULL; 3681 int discrete_flag ;3681 int discrete_flag = 0; 3682 3682 int ll; 3683 3683 (*result) = NULL; 3684 3684 … … 4305 4305 register int a, b; 4306 4306 CoordSet *cs, **dcs; 4307 4307 AtomInfoType *atInfo; 4308 int *dAtmToIdx ;4308 int *dAtmToIdx = NULL; 4309 4309 int ok = true; 4310 4310 if(!I->DiscreteFlag) { /* currently, discrete objects are never sorted */ 4311 4311 int n_bytes = sizeof(int) * I->NAtom; -
layer2/RepDot.c
192 192 ok &= CGOColorv(cgo, v); 193 193 v += 3; 194 194 } 195 /* if(normals) /*NORMALS do not get set for points195 /* if(normals) NORMALS do not get set for points 196 196 CGONormalv(cgo, v);*/ 197 197 v += 3; 198 198 if (ok) … … 210 210 I->shaderCGO = CGOOptimizeSpheresToVBONonIndexed(cgo, CGO_BOUNDING_BOX_SZ + CGO_DRAW_SPHERE_BUFFERS_SZ); 211 211 CHECKOK(ok, I->shaderCGO); 212 212 } else { 213 CGO *convertcgo = CGOCombineBeginEnd(cgo, 0), *tmpCGO ;213 CGO *convertcgo = CGOCombineBeginEnd(cgo, 0), *tmpCGO = NULL; 214 214 CHECKOK(ok, convertcgo); 215 215 if (ok) 216 216 tmpCGO = CGOOptimizeToVBONotIndexed(convertcgo, CGO_BOUNDING_BOX_SZ + I->N * 3 + 7); … … 344 344 float *countPtr = NULL; 345 345 int colorCnt, lastColor; 346 346 Vector3f v1; 347 MapType *map ;347 MapType *map = NULL; 348 348 SphereRec *sp = G->Sphere->Sphere[0]; 349 349 int ds; 350 350 float max_vdw = MAX_VDW; -
layer2/RepSurface.c
3304 3304 if (ok) 3305 3305 convertcgo->use_shader = true; 3306 3306 } else if (I->Type == 2) { 3307 CGO *convertcgo2, *simple ;3307 CGO *convertcgo2, *simple = NULL; 3308 3308 convertcgo2 = CGOConvertLinesToShaderCylinders(I->shaderCGO, 0); 3309 3309 CHECKOK(ok, convertcgo2); 3310 3310 if (ok) … … 4503 4503 } 4504 4504 ok &= !G->Interrupt; 4505 4505 if(ok) { 4506 MapType *map, *solv_map ;4506 MapType *map, *solv_map = NULL; 4507 4507 map = MapNewFlagged(G, I->maxVdw + probe_rad_more, 4508 4508 I->coord, VLAGetSize(I->coord) / 3, NULL, NULL); 4509 4509 CHECKOK(ok, map); … … 5747 5747 SurfaceJobAtomInfo *j_atom_info = atom_info + j; 5748 5748 if(j > a) /* only check if this is atom trails */ 5749 5749 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 */ 5751 5751 float *v1 = coord + 3 * j; 5752 5752 if((v0[0] == v1[0]) && (v0[1] == v1[1]) && (v0[2] == v1[2])) 5753 5753 skip_flag = true; … … 5842 5842 SurfaceJobAtomInfo *j_atom_info = atom_info + j; 5843 5843 if(j > a) /* only check if this is atom trails */ 5844 5844 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 */ 5846 5846 float *v2 = coord + 3 * j; 5847 5847 if((v0[0] == v2[0]) && (v0[1] == v2[1]) && (v0[2] == v2[2])) 5848 5848 skip_flag = true; … … 6002 6002 SurfaceJobAtomInfo *j_atom_info = atom_info + j; 6003 6003 if(j > a) /* only check if this is atom trails */ 6004 6004 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 */ 6006 6006 float *v1 = coord + 3 * j; 6007 6007 if((v0[0] == v1[0]) && (v0[1] == v1[1]) && (v0[2] == v1[2])) 6008 6008 skip_flag = true; -
layer2/RepCartoon.c
2615 2615 2616 2616 #ifdef _PYMOL_CGO_DRAWARRAYS 2617 2617 int nverts = nAt * 4, pl = 0; 2618 float *vertexVals , *tmp_ptr;2618 float *vertexVals = NULL, *tmp_ptr; 2619 2619 if (ok) 2620 2620 vertexVals = CGODrawArrays(cgo, GL_LINES, CGO_VERTEX_ARRAY, nverts); 2621 2621 CHECKOK(ok, vertexVals); -
layer2/ObjectMolecule.c
1448 1448 int NPHIH, MPHIA, NHPARM, NPARM, NNB, NRES; 1449 1449 int NBONA, NTHETA, NPHIA, NUMBND, NUMANG, NPTRA; 1450 1450 int NATYP, NPHB, IFPERT, NBPER, NGPER, NDPER; 1451 int MBPER, MGPER, MDPER, IFBOX , NMXRS, IFCAP;1451 int MBPER, MGPER, MDPER, IFBOX = 0, NMXRS, IFCAP; 1452 1452 int NEXTRA, IPOL = 0; 1453 1453 int wid, col; 1454 1454 float BETA; … … 2076 2076 2077 2077 if(IFBOX > 0) { 2078 2078 2079 int IPTRES, NSPM , NSPSOL;2079 int IPTRES, NSPM = 0, NSPSOL; 2080 2080 2081 2081 if(amber7) { 2082 2082 p = findflag(G, buffer, "SOLVENT_POINTERS", "3I8"); … … 4431 4431 AtomInfoType *ai; 4432 4432 int n, nn; 4433 4433 float v[3], v0[3], d; 4434 CoordSet *cs ;4434 CoordSet *cs = NULL; 4435 4435 int ok = true; 4436 4436 4437 4437 ok &= ObjectMoleculeUpdateNeighbors(I); … … 9767 9767 CoordSet * cs, int bondSearchFlag, int aic_mask, int invalidate) 9768 9768 { 9769 9769 PyMOLGlobals *G = I->Obj.G; 9770 int *index, *outdex, *a2i, *i2a ;9770 int *index, *outdex, *a2i, *i2a = NULL; 9771 9771 BondType *bond = NULL; 9772 9772 register int a, b, lb = 0, ac; 9773 9773 int c, nb, a1, a2; … … 10551 10551 rms = MatrixFitRMSTTTf(G, op->nvv1, op->vv1, vt, NULL, op->ttt); 10552 10552 else 10553 10553 rms = MatrixGetRMS(G, op->nvv1, op->vv1, vt, NULL); 10554 if( (op->i1 == 2)) {10554 if(op->i1 == 2) { 10555 10555 ObjectMoleculeTransformTTTf(I, op->ttt, b); 10556 10556 10557 10557 if(op->i3) { -
layer3/Selector.c
8658 8658 for(a = cNDummyAtoms; a < I->NAtom; a++) { 8659 8659 b = i_obj[i_table[a].model]->AtomInfo[i_table[a].atom].protons; 8660 8660 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) || 8666 8666 b > 86); 8667 8667 } 8668 8668 break; -
layer3/Executive.c
15928 15928 ExecutiveSpecSetVisibility(G, rec, true, mod, false); 15929 15929 I->LastChanged = rec; 15930 15930 } 15931 if( (mod == (cOrthoSHIFT | cOrthoCTRL))) {15931 if(mod == (cOrthoSHIFT | cOrthoCTRL)) { 15932 15932 if(rec != I->LastZoomed) 15933 15933 ExecutiveWindowZoom(G, rec->name, 0.0F, -1, false, -1.0F, 15934 15934 true); -
layer3/PlugIOManager.c
229 229 ENDFB(G); 230 230 } 231 231 232 if( stop > 0 && cnt >= stop || max > 0 && ncnt >= max) {232 if((stop > 0 && cnt >= stop) || (max > 0 && ncnt >= max)) { 233 233 cs = NULL; 234 234 break; 235 235 } -
layer4/Cmd.c
128 128 static void APIEnter(PyMOLGlobals * G) 129 129 { /* assumes API is locked */ 130 130 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() 132 132 ENDFD; 133 133 134 134 if(G->Terminating) { /* try to bail */ … … 163 163 { /* assumes API is locked */ 164 164 165 165 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() 167 167 ENDFD; 168 168 169 169 if(G->Terminating) { /* try to bail */ … … 199 199 if(!PIsGlutThread()) 200 200 G->P_inst->glut_thread_keep_out--; 201 201 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() 203 203 ENDFD; 204 204 } 205 205 … … 209 209 if(!PIsGlutThread()) 210 210 G->P_inst->glut_thread_keep_out--; 211 211 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() 213 213 ENDFD; 214 214 } 215 215 … … 1853 1853 static PyObject *CmdGetRenderer(PyObject * self, PyObject * args) 1854 1854 { 1855 1855 PyMOLGlobals *G = NULL; 1856 char *vendor , *renderer, *version;1856 char *vendor = NULL, *renderer = NULL, *version = NULL; 1857 1857 int ok = false; 1858 1858 ok = PyArg_ParseTuple(args, "O", &self); 1859 1859 if(ok) { -
contrib/uiuc/plugins/molfile_plugin/src/pbeqplugin.cpp
259 259 int addr = z*nclx*ncly + y*nclx + x; 260 260 if (fread(datablock + addr, 4, 1, fd) != 1) { 261 261 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)); 263 263 return MOLFILE_ERROR; 264 264 } 265 265 count++; -
contrib/uiuc/plugins/molfile_plugin/src/dtrplugin.cpp
484 484 /* constant frame size */ 485 485 if (keys[i].size() != m_framesize) { 486 486 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", 488 488 keys[i].size(), m_framesize); 489 489 return true; 490 490 } … … 1298 1298 } 1299 1299 Blob pos=blobs["POSITION"]; 1300 1300 if (pos.count != 3*natoms) { 1301 fprintf(stderr, "ERROR, Expected %d elements in POSITION; got %l d\n",1301 fprintf(stderr, "ERROR, Expected %d elements in POSITION; got %lld\n", 1302 1302 3*natoms, pos.count); 1303 1303 return MOLFILE_ERROR; 1304 1304 } … … 1307 1307 if (with_velocity && ts->velocities && blobs.find("VELOCITY")!=blobs.end()) { 1308 1308 Blob vel=blobs["VELOCITY"]; 1309 1309 if (vel.count != 3*natoms) { 1310 fprintf(stderr, "ERROR, Expected %d elements in VELOCITY; got %l d\n",1310 fprintf(stderr, "ERROR, Expected %d elements in VELOCITY; got %lld\n", 1311 1311 3*natoms, vel.count); 1312 1312 return MOLFILE_ERROR; 1313 1313 } … … 1569 1569 // if required, get velocities 1570 1570 if (ts->velocities && velblob.count > 0) { 1571 1571 if (velblob.count != 3*natoms) { 1572 fprintf(stderr, "VELOCITY field has %l d values; expected %d\n",1572 fprintf(stderr, "VELOCITY field has %lld values; expected %d\n", 1573 1573 velblob.count, 3*natoms); 1574 1574 return MOLFILE_ERROR; 1575 1575 } -
contrib/uiuc/plugins/molfile_plugin/src/moldenplugin.c
99 99 const char *filetype, 100 100 int *natoms) { 101 101 FILE *fd; 102 qmdata_t *data ;102 qmdata_t *data = NULL; 103 103 moldendata_t *moldendata; 104 104 char buffer[1024]; 105 105 char keystring[20]; -
contrib/uiuc/plugins/molfile_plugin/src/vtfplugin.c
231 231 switch (tolower(keyword[0])) { 232 232 case 'n': { 233 233 /* name */ 234 if (sscanf(s, "%16s %n", &atom.name, &n) < 1) {234 if (sscanf(s, "%16s %n", (char *) &atom.name, &n) < 1) { 235 235 vtf_error("could not get name in atom record", line); 236 236 return MOLFILE_ERROR; 237 237 } … … 240 240 } 241 241 case 't': { 242 242 /* type */ 243 if (sscanf(s, "%16s %n", &atom.type, &n) < 1) {243 if (sscanf(s, "%16s %n", (char *) &atom.type, &n) < 1) { 244 244 vtf_error("could not get type in atom record", line); 245 245 return MOLFILE_ERROR; 246 246 } … … 266 266 } else if (strcmp(keyword, "res") == 0 || 267 267 strcmp(keyword, "resname") == 0) { 268 268 /* resname */ 269 if (sscanf(s, "%8s %n", &atom.resname, &n) < 1) {269 if (sscanf(s, "%8s %n", (char *) &atom.resname, &n) < 1) { 270 270 vtf_error("could not get resname in atom record", line); 271 271 return MOLFILE_ERROR; 272 272 } … … 281 281 } 282 282 case 's': { 283 283 /* segid */ 284 if (sscanf(s, "%8s %n", &atom.segid, &n) < 1) {284 if (sscanf(s, "%8s %n", (char *) &atom.segid, &n) < 1) { 285 285 vtf_error("could not get segid in atom record", line); 286 286 return MOLFILE_ERROR; 287 287 } … … 290 290 } 291 291 case 'i': { 292 292 /* insertion */ 293 if (sscanf(s, "%2s %n", &atom.insertion, &n) < 1) {293 if (sscanf(s, "%2s %n", (char *) &atom.insertion, &n) < 1) { 294 294 vtf_error("could not get insertion in atom record", line); 295 295 return MOLFILE_ERROR; 296 296 } … … 302 302 /* chain, charge */ 303 303 if (strlen(keyword) == 1 || 304 304 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) { 306 306 vtf_error("could not get chain in atom record", line); 307 307 return MOLFILE_ERROR; 308 308 } … … 336 336 } 337 337 d->optflags |= MOLFILE_ATOMICNUMBER; 338 338 } 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) { 340 340 vtf_error("could not get altloc in atom record", line); 341 341 return MOLFILE_ERROR; 342 342 } -
contrib/uiuc/plugins/molfile_plugin/src/gamessplugin.c
375 375 const char *filetype, int *natoms) { 376 376 377 377 FILE *fd; 378 qmdata_t *data ;378 qmdata_t *data = NULL; 379 379 gmsdata *gms; 380 380 381 381 /* open the input file */ -
contrib/uiuc/plugins/molfile_plugin/src/maeffplugin.cpp
1983 1983 } 1984 1984 } 1985 1985 catch (std::exception &e) { 1986 fprintf(stderr, e.what());1986 fprintf(stderr, "%s", e.what()); 1987 1987 return MOLFILE_ERROR; 1988 1988 } 1989 1989 return MOLFILE_SUCCESS; -
contrib/uiuc/plugins/molfile_plugin/src/graspplugin.cpp
104 104 105 105 ///ojo aqui le quite el ! 106 106 if ((grassp->flag)!=POTENTIALS) { 107 if (index >=0 && index<= 4)107 if (index <= 4) 108 108 printf("graspplugin) No data available for '%s' option\n", name[index]); 109 109 else 110 110 printf("graspplugin) out of range property, flag: %d index: %d\n", grassp->flag, index); -
modules/cealign/src/tnt/tnt_fortran_array1d.h
221 221 #ifdef TNT_DEBUG 222 222 std::cout << "entered subarray. \n"; 223 223 #endif 224 if (( i0 > 0) && (i1 < n_) || (i0 <= i1))224 if (((i0 > 0) && (i1 < n_)) || (i0 <= i1)) 225 225 { 226 226 Fortran_Array1D<T> X(*this); /* create a new instance of this array. */ 227 227 X.n_ = i1-i0+1; -
modules/cealign/src/tnt/tnt_array1d.h
258 258 template <class T> 259 259 inline Array1D<T> Array1D<T>::subarray(int i0, int i1) 260 260 { 261 if (( i0 >= 0) && (i1 < n_) || (i0 <= i1))261 if (((i0 >= 0) && (i1 < n_)) || (i0 <= i1)) 262 262 { 263 263 Array1D<T> X(*this); /* create a new instance of this array. */ 264 264 X.n_ = i1-i0+1;