*/}}
Browse Source

Clean up printf's

ChengduLittleA 1 year ago
parent
commit
f084b37811
4 changed files with 17 additions and 18 deletions
  1. 3 3
      la_controllers.c
  2. 5 5
      la_data.c
  3. 8 9
      la_kernel.c
  4. 1 1
      resources/la_modelling.c

+ 3 - 3
la_controllers.c

@@ -103,12 +103,12 @@ void la_UpdateControllerStatus(){
             if(event.type&LA_JS_EVENT_BUTTON){
                 if(event.number>=c->NumButtons) continue;
                 c->ButtonValues[event.number]=event.value; HasEvent=1;
-                printf("b %d %d\n", event.number, event.value);
+                //printf("b %d %d\n", event.number, event.value);
             }
             if(event.type&LA_JS_EVENT_AXIS){
                 if(event.number>=c->NumAxes) continue;
-                c->AxisValues[event.number]=event.value;
-                printf("a %d %d\n", event.number, event.value); HasEvent=1;
+                c->AxisValues[event.number]=event.value; HasEvent=1;
+                //printf("a %d %d\n", event.number, event.value);
             }
         }
         if(bytes<=0){ struct stat buffer; if(stat(c->Path->Ptr,&buffer)<0){ c->Error=1; HasEvent=1; } }

+ 5 - 5
la_data.c

@@ -3429,7 +3429,7 @@ int laPackUDF(laUDF *udf, int UseInstanceList, int DoBackup){
         strSafeDestroy(&ps->Path);
         FreeMem(ps);
     }
-    printf("[ALL DONE]\n");
+    printf("[ALL DONE]\n\n");
 
     nuidActualSeek = la_Tell(udf);
 
@@ -3933,7 +3933,7 @@ void la_FreeDBProp(laDBProp* dbp, int cleanup_only, int SkipInstances){
     }elif(dbp->p->PropertyType==LA_PROP_STRING && ((laStringProp*)dbp->p)->IsSafeString){
         strSafeSet(&dbp->Data,0);
     }elif(dbp->p->PropertyType==LA_PROP_RAW){
-        printf("raw dbp %s\n",dbp->p->Identifier);
+        //printf("raw dbp %s\n",dbp->p->Identifier);
         free(dbp->Data);
     }else{
         //printf("-data- %x\n",dbp->Data);
@@ -3958,7 +3958,7 @@ void la_FreeDiffCommand(laDiffCommand* dc, laDiff* d, int FromLeft){
     }elif(dc->p->PropertyType==LA_PROP_STRING && ((laStringProp*)dc->p)->IsSafeString){
         strSafeSet(&dc->Data,0);
     }elif(dc->p->PropertyType==LA_PROP_RAW){
-        printf("raw %s\n",dc->p->Identifier);
+        //printf("raw %s\n",dc->p->Identifier);
         free(dc->Data);
     }
     memFree(dc);
@@ -4093,7 +4093,7 @@ int la_AddRawDBProp(laDBInst* dbi, laDBRawProp* dbp, laDiff* diff, laPropPack *p
     laProp *p = pp->LastPs->p; int *Data; int s=0; int ret=0; int IsCopy=0;
     Data=laGetRaw(pp,&s,&IsCopy); if(diff&&dbp){
         if(dbp->DataSize!=s || (!dbp->Data&&Data) || (!Data&&dbp->Data) || (dbp->Data&&Data&&memcmp(dbp->Data, Data, s))){
-            printf("s%d %x %d \n",s,Data,dbp->DataSize);
+            //printf("s%d %x %d \n",s,Data,dbp->DataSize);
             void* NewData=(s&&Data)?calloc(1,s):0;
             if(s&&Data)memcpy(NewData, Data, s);
             laDiffCommandRaw* dcr=la_GiveDiffCommand(diff, dbi, p, dbp->Data);
@@ -4589,7 +4589,7 @@ int laRecordDifferences(laPropPack* base, char* path){
         laIterateDB(FromDBI, &PP, MAIN.HeadDifference, dbp);
         if(MAIN.HeadDifference->Commands.pFirst){ success = 1; }
     }else{
-        success = 0; printf("Prop not recorded as DBInst.\n");
+        success = 0; //printf("Prop not recorded as DBInst.\n");
     }
 
     la_FreePropStepCache(PP.Go);

+ 8 - 9
la_kernel.c

@@ -420,24 +420,23 @@ void la_DestroyWindow(laWindow *wnd){
     if (!wnd) return;
     
     la_StopAllOperators();
-
     strSafeDestroy(&wnd->Title);
 
-    la_PrintUserList(wnd);
-    printf("----\n");
+    //la_PrintUserList(wnd);
+    //printf("----\n");
 
     while (p = lstPopItem(&wnd->Panels)){ laDestroySinglePanel(p,1); }
     while (l = lstPopItem(&wnd->Layouts)){
         laDestroyBlocksRecursive(l->FirstBlock);
-        la_PrintUserList(l);
-        printf("%x %s\n", l, l->ID->Ptr);
+        //la_PrintUserList(l);
+        //printf("%x %s\n", l, l->ID->Ptr);
         strSafeDestroy(&l->ID);
         memFree(l);
-        la_PrintUserList(wnd);
-        printf("----\n");
+        //la_PrintUserList(wnd);
+        //printf("----\n");
     }
-    printf("----\n%x\n",wnd);
-    la_PrintUserList(wnd);
+    //printf("----\n%x\n",wnd);
+    //la_PrintUserList(wnd);
     la_DestroySystemWindow(wnd);
     lstRemoveItem(&MAIN.Windows, wnd);
 

+ 1 - 1
resources/la_modelling.c

@@ -224,7 +224,7 @@ int la_SelectGetClosest(MSelectData* sd, int uix, int uiy, int radius, int *Elem
         }
         //printf("\n");
     }
-    printf("%d %d\n",MinID, MinIDe);
+    //printf("%d %d\n",MinID, MinIDe);
     free(buf);
     if(MinID && MinIDe){ if(MinD<MinDe*5){ *ElemType=0; return MinID; } }
     if(MinIDe){ *ElemType=TNS_MMESH_EDGE_BIT; return MinIDe; }