Sfoglia il codice sorgente

cmDspBuiltIn.c : Added 'send' input port to FName object.

master
kpl_harpo 10 anni fa
parent
commit
102725929c
1 ha cambiato i file con 7 aggiunte e 0 eliminazioni
  1. 7
    0
      dsp/cmDspBuiltIn.c

+ 7
- 0
dsp/cmDspBuiltIn.c Vedi File

@@ -2487,6 +2487,7 @@ enum
2487 2487
   kDirFnId,
2488 2488
   kPatFnId,
2489 2489
   kValFnId,
2490
+  kSendFnId
2490 2491
 };
2491 2492
 
2492 2493
 cmDspClass_t _cmFnameDC;
@@ -2510,6 +2511,8 @@ cmDspInst_t*  _cmDspFnameAlloc(cmDspCtx_t* ctx, cmDspClass_t* classPtr, unsigned
2510 2511
     { "dir",  kDirFnId,  0, 0, kInDsvFl  | kReqArgDsvFl | kBoolDsvFl, "Dir=true Filename=false" },
2511 2512
     { "pat",  kPatFnId,  0, 0, kInDsvFl  | kOptArgDsvFl | kStrzDsvFl, "File pattern string (e.g. HTML Files (*.html)\tImage Files (*.{bmp,gif,jpg,png}))" },
2512 2513
     { "out",  kValFnId,  0, 0, kOutDsvFl | kOptArgDsvFl | kStrzDsvFl, "Current file or directory name." },
2514
+    { "send", kSendFnId, 0, 0, kInDsvFl  | kTypeDsvMask, "Send file name on any msg."},
2515
+
2513 2516
     { NULL, 0, 0, 0, 0 }
2514 2517
   };
2515 2518
 
@@ -2536,6 +2539,10 @@ cmDspRC_t _cmDspFnameRecv(cmDspCtx_t* ctx, cmDspInst_t* inst, const cmDspEvt_t*
2536 2539
 
2537 2540
   switch( evt->dstVarId )
2538 2541
   {
2542
+    case kSendFnId:
2543
+      cmDspSetStrcz(ctx, inst, kValFnId, cmDspStrcz(inst,kValFnId) );
2544
+      break;
2545
+
2539 2546
     case kDirFnId:
2540 2547
     case kPatFnId:
2541 2548
     case kValFnId:

Loading…
Annulla
Salva