Bläddra i källkod

cmScoreProc.c:Changed format of output file from in _cmScWriteMeasFile().

master
kpl 11 år sedan
förälder
incheckning
b2cd4afccd
1 ändrade filer med 4 tillägg och 4 borttagningar
  1. 4
    4
      app/cmScoreProc.c

+ 4
- 4
app/cmScoreProc.c Visa fil

@@ -169,7 +169,7 @@ cmSpRC_t _cmScWriteMeasFile( cmCtx_t* ctx, cmSp_t* sp, const cmChar_t* outFn )
169 169
     goto errLabel;
170 170
   }
171 171
 
172
-  cmFilePrintf(fH,"{\n");
172
+  cmFilePrintf(fH,"{\n meas : \n[\n[\"seq\" \"mark\" \"typeId\" \"typeLabel\" \"loc\" \"evt\" \"sec\" \"val\" \"cost\" ]\n");
173 173
 
174 174
   _cmScMeas_t* mp = sp->list_beg;
175 175
   for(; mp!=NULL; mp=mp->link)
@@ -186,7 +186,7 @@ cmSpRC_t _cmScWriteMeasFile( cmCtx_t* ctx, cmSp_t* sp, const cmChar_t* outFn )
186 186
 
187 187
     for(i=0; i<mp->setPtr->sectCnt; ++i)
188 188
     {
189
-      cmFilePrintf(fH,"{seq:%i mark:\"%s\" typeId:%i typeLabel:\"%s\" loc:%i evt:%i sect:\"%s\" value:%f cost:%f }\n",
189
+      cmFilePrintf(fH,"[ %i \"%s\" %i \"%s\" %i %i \"%s\" %f %f ]\n",
190 190
         mp->markPtr->obj.seqId,
191 191
         cmStringNullGuard(mp->markPtr->obj.name),
192 192
         mp->setPtr->varId,
@@ -199,7 +199,7 @@ cmSpRC_t _cmScWriteMeasFile( cmCtx_t* ctx, cmSp_t* sp, const cmChar_t* outFn )
199 199
     } 
200 200
   }
201 201
 
202
-  cmFilePrintf(fH,"}\n");
202
+  cmFilePrintf(fH,"\n]\n}\n");
203 203
 
204 204
  errLabel:
205 205
   if( cmFileClose(&fH) != kOkFileRC )
@@ -383,7 +383,7 @@ unsigned cmScoreProc(cmCtx_t* ctx)
383 383
 {
384 384
   cmSpRC_t rc = kOkSpRC;
385 385
   const cmChar_t* rsrcFn = "/home/kevin/.kc/time_line.js";
386
-  const cmChar_t* outFn  = "/home/kevin/temp/meas0.js";
386
+  const cmChar_t* outFn  = "/home/kevin/src/cmkc/src/kc/data/meas0.js";
387 387
   cmSp_t sp;
388 388
 
389 389
   memset(&sp,0,sizeof(sp));

Laddar…
Avbryt
Spara