Kaynağa Gözat

cmDspClass.c : Add instance label to error message header.

master
kevin 9 yıl önce
ebeveyn
işleme
3c6b55186b
1 değiştirilmiş dosya ile 5 ekleme ve 4 silme
  1. 5
    4
      dsp/cmDspClass.c

+ 5
- 4
dsp/cmDspClass.c Dosyayı Görüntüle

@@ -372,18 +372,19 @@ cmDspRC_t   cmDspInstRemoveAttrSym(   cmDspCtx_t* ctx, cmDspInst_t* inst, unsign
372 372
 }
373 373
 
374 374
 
375
-cmDspRC_t _cmDspClassErrV( cmDspCtx_t* ctx, cmDspClass_t* classPtr, unsigned instId, cmDspRC_t rc, const cmChar_t* fmt, va_list vl )
375
+cmDspRC_t _cmDspClassErrV( cmDspCtx_t* ctx, cmDspClass_t* classPtr, unsigned instId, const cmChar_t* instLbl, cmDspRC_t rc, const cmChar_t* fmt, va_list vl )
376 376
 {
377 377
   va_list vl2;
378 378
   va_copy(vl2,vl);
379 379
   unsigned n = vsnprintf(NULL,0,fmt,vl2)+1;
380 380
 
381
+
381 382
   cmChar_t buf[n+1];
382 383
   vsnprintf(buf,n,fmt,vl);
383 384
   if( instId == cmInvalidId )
384 385
     cmErrMsg( &classPtr->err, rc, "%s DSP Class:%s",buf, classPtr->labelStr);
385 386
   else
386
-    cmErrMsg( &classPtr->err, rc, "%s DSP Class:%s Inst:%i",buf, classPtr->labelStr,instId);
387
+    cmErrMsg( &classPtr->err, rc, "%s DSP Class:%s Inst:%i %s",buf, classPtr->labelStr,instId,instLbl==NULL?"":instLbl);
387 388
 
388 389
   va_end(vl2);
389 390
   return rc;
@@ -393,7 +394,7 @@ cmDspRC_t   cmDspClassErr( cmDspCtx_t* ctx, cmDspClass_t* classPtr, cmDspRC_t rc
393 394
 {
394 395
   va_list vl;
395 396
   va_start(vl,fmt);
396
-  rc = _cmDspClassErrV(ctx,classPtr,cmInvalidId,rc,fmt,vl);
397
+  rc = _cmDspClassErrV(ctx,classPtr,cmInvalidId,NULL,rc,fmt,vl);
397 398
   va_end(vl);
398 399
   return rc;
399 400
 }
@@ -402,7 +403,7 @@ cmDspRC_t cmDspInstErr( cmDspCtx_t* ctx, cmDspInst_t* inst, cmDspRC_t rc, const
402 403
 {
403 404
   va_list vl;
404 405
   va_start(vl,fmt);
405
-  rc = _cmDspClassErrV(ctx,inst->classPtr,inst->id,rc,fmt,vl);
406
+  rc = _cmDspClassErrV(ctx,inst->classPtr,inst->id,cmSymTblLabel(ctx->stH,inst->symId),rc,fmt,vl);
406 407
   va_end(vl);
407 408
   return rc;
408 409
 }

Loading…
İptal
Kaydet